diff --git a/.ci-operator.yaml b/.ci-operator.yaml index 1e59c02c25..7c15f83e3e 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: release namespace: openshift - tag: rhel-9-release-golang-1.22-openshift-4.17 + tag: rhel-9-release-golang-1.23-openshift-4.19 diff --git a/Makefile b/Makefile index b87d106bd5..317c0aaf6f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ GO_BUILD_PACKAGES_EXPANDED :=$(GO_BUILD_PACKAGES) GO_LD_FLAGS:= RUNTIME ?= podman -RUNTIME_IMAGE_NAME ?= registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.22-openshift-4.17 +RUNTIME_IMAGE_NAME ?= registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.23-openshift-4.19 examples: go build -o examples/build/app ./examples/build/ diff --git a/apiserver/applyconfigurations/apiserver/v1/apirequestcount.go b/apiserver/applyconfigurations/apiserver/v1/apirequestcount.go index 5aca61b39e..b2bde545f4 100644 --- a/apiserver/applyconfigurations/apiserver/v1/apirequestcount.go +++ b/apiserver/applyconfigurations/apiserver/v1/apirequestcount.go @@ -3,21 +3,21 @@ package v1 import ( - apiapiserverv1 "github.com/openshift/api/apiserver/v1" + apiserverv1 "github.com/openshift/api/apiserver/v1" internal "github.com/openshift/client-go/apiserver/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // APIRequestCountApplyConfiguration represents a declarative configuration of the APIRequestCount type for use // with apply. type APIRequestCountApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIRequestCountSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIRequestCountStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *APIRequestCountSpecApplyConfiguration `json:"spec,omitempty"` + Status *APIRequestCountStatusApplyConfiguration `json:"status,omitempty"` } // APIRequestCount constructs a declarative configuration of the APIRequestCount type for use with @@ -41,18 +41,18 @@ func APIRequestCount(name string) *APIRequestCountApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractAPIRequestCount(aPIRequestCount *apiapiserverv1.APIRequestCount, fieldManager string) (*APIRequestCountApplyConfiguration, error) { +func ExtractAPIRequestCount(aPIRequestCount *apiserverv1.APIRequestCount, fieldManager string) (*APIRequestCountApplyConfiguration, error) { return extractAPIRequestCount(aPIRequestCount, fieldManager, "") } // ExtractAPIRequestCountStatus is the same as ExtractAPIRequestCount except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractAPIRequestCountStatus(aPIRequestCount *apiapiserverv1.APIRequestCount, fieldManager string) (*APIRequestCountApplyConfiguration, error) { +func ExtractAPIRequestCountStatus(aPIRequestCount *apiserverv1.APIRequestCount, fieldManager string) (*APIRequestCountApplyConfiguration, error) { return extractAPIRequestCount(aPIRequestCount, fieldManager, "status") } -func extractAPIRequestCount(aPIRequestCount *apiapiserverv1.APIRequestCount, fieldManager string, subresource string) (*APIRequestCountApplyConfiguration, error) { +func extractAPIRequestCount(aPIRequestCount *apiserverv1.APIRequestCount, fieldManager string, subresource string) (*APIRequestCountApplyConfiguration, error) { b := &APIRequestCountApplyConfiguration{} err := managedfields.ExtractInto(aPIRequestCount, internal.Parser().Type("com.github.openshift.api.apiserver.v1.APIRequestCount"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractAPIRequestCount(aPIRequestCount *apiapiserverv1.APIRequestCount, fie // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithKind(value string) *APIRequestCountApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *APIRequestCountApplyConfiguration) WithKind(value string) *APIRequestCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithAPIVersion(value string) *APIRequestCountApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *APIRequestCountApplyConfiguration) WithAPIVersion(value string) *APIReq // If called multiple times, the Name field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithName(value string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *APIRequestCountApplyConfiguration) WithName(value string) *APIRequestCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithGenerateName(value string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *APIRequestCountApplyConfiguration) WithGenerateName(value string) *APIR // If called multiple times, the Namespace field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithNamespace(value string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *APIRequestCountApplyConfiguration) WithNamespace(value string) *APIRequ // If called multiple times, the UID field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithUID(value types.UID) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *APIRequestCountApplyConfiguration) WithUID(value types.UID) *APIRequest // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithResourceVersion(value string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *APIRequestCountApplyConfiguration) WithResourceVersion(value string) *A // If called multiple times, the Generation field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithGeneration(value int64) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIRequestCountApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIRequestCountApplyConfiguration { +func (b *APIRequestCountApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIRequestCountApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIRequestCountApplyConfiguration { +func (b *APIRequestCountApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *APIRequestCountApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *APIRequestCountApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *APIRequestCountApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *APIRequestCountApplyConfiguration) WithLabels(entries map[string]string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *APIRequestCountApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *APIRequestCountApplyConfiguration) WithAnnotations(entries map[string]string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *APIRequestCountApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIRequestCountApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIRequestCountApplyConfiguration { +func (b *APIRequestCountApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *APIRequestCountApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *APIRequestCountApplyConfiguration) WithFinalizers(values ...string) *APIRequestCountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *APIRequestCountApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *APIRequestCountApplyConfiguration) WithStatus(value *APIRequestCountSta // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIRequestCountApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/apiserver/applyconfigurations/apiserver/v1/apirequestcountstatus.go b/apiserver/applyconfigurations/apiserver/v1/apirequestcountstatus.go index de099b7e2d..d6d33904b3 100644 --- a/apiserver/applyconfigurations/apiserver/v1/apirequestcountstatus.go +++ b/apiserver/applyconfigurations/apiserver/v1/apirequestcountstatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // APIRequestCountStatusApplyConfiguration represents a declarative configuration of the APIRequestCountStatus type for use // with apply. type APIRequestCountStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` RemovedInRelease *string `json:"removedInRelease,omitempty"` RequestCount *int64 `json:"requestCount,omitempty"` CurrentHour *PerResourceAPIRequestLogApplyConfiguration `json:"currentHour,omitempty"` @@ -25,7 +25,7 @@ func APIRequestCountStatus() *APIRequestCountStatusApplyConfiguration { // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *APIRequestCountStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *APIRequestCountStatusApplyConfiguration { +func (b *APIRequestCountStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *APIRequestCountStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/apiserver/applyconfigurations/internal/internal.go b/apiserver/applyconfigurations/internal/internal.go index 7a3e6c67f0..118db57bbb 100644 --- a/apiserver/applyconfigurations/internal/internal.go +++ b/apiserver/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/apiserver/clientset/versioned/clientset.go b/apiserver/clientset/versioned/clientset.go index f94cc2ed32..1e5c4c601e 100644 --- a/apiserver/clientset/versioned/clientset.go +++ b/apiserver/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" apiserverv1 "github.com/openshift/client-go/apiserver/clientset/versioned/typed/apiserver/v1" discovery "k8s.io/client-go/discovery" diff --git a/apiserver/clientset/versioned/typed/apiserver/v1/apirequestcount.go b/apiserver/clientset/versioned/typed/apiserver/v1/apirequestcount.go index 715c3380b3..3b200ca015 100644 --- a/apiserver/clientset/versioned/typed/apiserver/v1/apirequestcount.go +++ b/apiserver/clientset/versioned/typed/apiserver/v1/apirequestcount.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/apiserver/v1" - apiserverv1 "github.com/openshift/client-go/apiserver/applyconfigurations/apiserver/v1" + apiserverv1 "github.com/openshift/api/apiserver/v1" + applyconfigurationsapiserverv1 "github.com/openshift/client-go/apiserver/applyconfigurations/apiserver/v1" scheme "github.com/openshift/client-go/apiserver/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type APIRequestCountsGetter interface { // APIRequestCountInterface has methods to work with APIRequestCount resources. type APIRequestCountInterface interface { - Create(ctx context.Context, aPIRequestCount *v1.APIRequestCount, opts metav1.CreateOptions) (*v1.APIRequestCount, error) - Update(ctx context.Context, aPIRequestCount *v1.APIRequestCount, opts metav1.UpdateOptions) (*v1.APIRequestCount, error) + Create(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCount, opts metav1.CreateOptions) (*apiserverv1.APIRequestCount, error) + Update(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCount, opts metav1.UpdateOptions) (*apiserverv1.APIRequestCount, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIRequestCount *v1.APIRequestCount, opts metav1.UpdateOptions) (*v1.APIRequestCount, error) + UpdateStatus(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCount, opts metav1.UpdateOptions) (*apiserverv1.APIRequestCount, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.APIRequestCount, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.APIRequestCountList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiserverv1.APIRequestCount, error) + List(ctx context.Context, opts metav1.ListOptions) (*apiserverv1.APIRequestCountList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIRequestCount, err error) - Apply(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCountApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIRequestCount, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *apiserverv1.APIRequestCount, err error) + Apply(ctx context.Context, aPIRequestCount *applyconfigurationsapiserverv1.APIRequestCountApplyConfiguration, opts metav1.ApplyOptions) (result *apiserverv1.APIRequestCount, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCountApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIRequestCount, err error) + ApplyStatus(ctx context.Context, aPIRequestCount *applyconfigurationsapiserverv1.APIRequestCountApplyConfiguration, opts metav1.ApplyOptions) (result *apiserverv1.APIRequestCount, err error) APIRequestCountExpansion } // aPIRequestCounts implements APIRequestCountInterface type aPIRequestCounts struct { - *gentype.ClientWithListAndApply[*v1.APIRequestCount, *v1.APIRequestCountList, *apiserverv1.APIRequestCountApplyConfiguration] + *gentype.ClientWithListAndApply[*apiserverv1.APIRequestCount, *apiserverv1.APIRequestCountList, *applyconfigurationsapiserverv1.APIRequestCountApplyConfiguration] } // newAPIRequestCounts returns a APIRequestCounts func newAPIRequestCounts(c *ApiserverV1Client) *aPIRequestCounts { return &aPIRequestCounts{ - gentype.NewClientWithListAndApply[*v1.APIRequestCount, *v1.APIRequestCountList, *apiserverv1.APIRequestCountApplyConfiguration]( + gentype.NewClientWithListAndApply[*apiserverv1.APIRequestCount, *apiserverv1.APIRequestCountList, *applyconfigurationsapiserverv1.APIRequestCountApplyConfiguration]( "apirequestcounts", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.APIRequestCount { return &v1.APIRequestCount{} }, - func() *v1.APIRequestCountList { return &v1.APIRequestCountList{} }), + func() *apiserverv1.APIRequestCount { return &apiserverv1.APIRequestCount{} }, + func() *apiserverv1.APIRequestCountList { return &apiserverv1.APIRequestCountList{} }, + ), } } diff --git a/apiserver/clientset/versioned/typed/apiserver/v1/apiserver_client.go b/apiserver/clientset/versioned/typed/apiserver/v1/apiserver_client.go index 1e18e8cd56..aac5e0a687 100644 --- a/apiserver/clientset/versioned/typed/apiserver/v1/apiserver_client.go +++ b/apiserver/clientset/versioned/typed/apiserver/v1/apiserver_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/apiserver/v1" - "github.com/openshift/client-go/apiserver/clientset/versioned/scheme" + apiserverv1 "github.com/openshift/api/apiserver/v1" + scheme "github.com/openshift/client-go/apiserver/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *ApiserverV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := apiserverv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apirequestcount.go b/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apirequestcount.go index 13fa3b6467..4c516c55de 100644 --- a/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apirequestcount.go +++ b/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apirequestcount.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/apiserver/v1" apiserverv1 "github.com/openshift/client-go/apiserver/applyconfigurations/apiserver/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedapiserverv1 "github.com/openshift/client-go/apiserver/clientset/versioned/typed/apiserver/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAPIRequestCounts implements APIRequestCountInterface -type FakeAPIRequestCounts struct { +// fakeAPIRequestCounts implements APIRequestCountInterface +type fakeAPIRequestCounts struct { + *gentype.FakeClientWithListAndApply[*v1.APIRequestCount, *v1.APIRequestCountList, *apiserverv1.APIRequestCountApplyConfiguration] Fake *FakeApiserverV1 } -var apirequestcountsResource = v1.SchemeGroupVersion.WithResource("apirequestcounts") - -var apirequestcountsKind = v1.SchemeGroupVersion.WithKind("APIRequestCount") - -// Get takes name of the aPIRequestCount, and returns the corresponding aPIRequestCount object, and an error if there is any. -func (c *FakeAPIRequestCounts) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.APIRequestCount, err error) { - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(apirequestcountsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIRequestCount), err -} - -// List takes label and field selectors, and returns the list of APIRequestCounts that match those selectors. -func (c *FakeAPIRequestCounts) List(ctx context.Context, opts metav1.ListOptions) (result *v1.APIRequestCountList, err error) { - emptyResult := &v1.APIRequestCountList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(apirequestcountsResource, apirequestcountsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.APIRequestCountList{ListMeta: obj.(*v1.APIRequestCountList).ListMeta} - for _, item := range obj.(*v1.APIRequestCountList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested aPIRequestCounts. -func (c *FakeAPIRequestCounts) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(apirequestcountsResource, opts)) -} - -// Create takes the representation of a aPIRequestCount and creates it. Returns the server's representation of the aPIRequestCount, and an error, if there is any. -func (c *FakeAPIRequestCounts) Create(ctx context.Context, aPIRequestCount *v1.APIRequestCount, opts metav1.CreateOptions) (result *v1.APIRequestCount, err error) { - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(apirequestcountsResource, aPIRequestCount, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIRequestCount), err -} - -// Update takes the representation of a aPIRequestCount and updates it. Returns the server's representation of the aPIRequestCount, and an error, if there is any. -func (c *FakeAPIRequestCounts) Update(ctx context.Context, aPIRequestCount *v1.APIRequestCount, opts metav1.UpdateOptions) (result *v1.APIRequestCount, err error) { - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(apirequestcountsResource, aPIRequestCount, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIRequestCount), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAPIRequestCounts) UpdateStatus(ctx context.Context, aPIRequestCount *v1.APIRequestCount, opts metav1.UpdateOptions) (result *v1.APIRequestCount, err error) { - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(apirequestcountsResource, "status", aPIRequestCount, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIRequestCount), err -} - -// Delete takes name of the aPIRequestCount and deletes it. Returns an error if one occurs. -func (c *FakeAPIRequestCounts) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(apirequestcountsResource, name, opts), &v1.APIRequestCount{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAPIRequestCounts) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(apirequestcountsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.APIRequestCountList{}) - return err -} - -// Patch applies the patch and returns the patched aPIRequestCount. -func (c *FakeAPIRequestCounts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIRequestCount, err error) { - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(apirequestcountsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIRequestCount), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied aPIRequestCount. -func (c *FakeAPIRequestCounts) Apply(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCountApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIRequestCount, err error) { - if aPIRequestCount == nil { - return nil, fmt.Errorf("aPIRequestCount provided to Apply must not be nil") - } - data, err := json.Marshal(aPIRequestCount) - if err != nil { - return nil, err - } - name := aPIRequestCount.Name - if name == nil { - return nil, fmt.Errorf("aPIRequestCount.Name must be provided to Apply") - } - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(apirequestcountsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIRequestCount), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAPIRequestCounts) ApplyStatus(ctx context.Context, aPIRequestCount *apiserverv1.APIRequestCountApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIRequestCount, err error) { - if aPIRequestCount == nil { - return nil, fmt.Errorf("aPIRequestCount provided to Apply must not be nil") - } - data, err := json.Marshal(aPIRequestCount) - if err != nil { - return nil, err - } - name := aPIRequestCount.Name - if name == nil { - return nil, fmt.Errorf("aPIRequestCount.Name must be provided to Apply") - } - emptyResult := &v1.APIRequestCount{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(apirequestcountsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeAPIRequestCounts(fake *FakeApiserverV1) typedapiserverv1.APIRequestCountInterface { + return &fakeAPIRequestCounts{ + gentype.NewFakeClientWithListAndApply[*v1.APIRequestCount, *v1.APIRequestCountList, *apiserverv1.APIRequestCountApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("apirequestcounts"), + v1.SchemeGroupVersion.WithKind("APIRequestCount"), + func() *v1.APIRequestCount { return &v1.APIRequestCount{} }, + func() *v1.APIRequestCountList { return &v1.APIRequestCountList{} }, + func(dst, src *v1.APIRequestCountList) { dst.ListMeta = src.ListMeta }, + func(list *v1.APIRequestCountList) []*v1.APIRequestCount { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.APIRequestCountList, items []*v1.APIRequestCount) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.APIRequestCount), err } diff --git a/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apiserver_client.go b/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apiserver_client.go index c7078bc741..756df043ae 100644 --- a/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apiserver_client.go +++ b/apiserver/clientset/versioned/typed/apiserver/v1/fake/fake_apiserver_client.go @@ -13,7 +13,7 @@ type FakeApiserverV1 struct { } func (c *FakeApiserverV1) APIRequestCounts() v1.APIRequestCountInterface { - return &FakeAPIRequestCounts{c} + return newFakeAPIRequestCounts(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/apiserver/informers/externalversions/apiserver/v1/apirequestcount.go b/apiserver/informers/externalversions/apiserver/v1/apirequestcount.go index bb1312dc90..fc45806d57 100644 --- a/apiserver/informers/externalversions/apiserver/v1/apirequestcount.go +++ b/apiserver/informers/externalversions/apiserver/v1/apirequestcount.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - apiserverv1 "github.com/openshift/api/apiserver/v1" + apiapiserverv1 "github.com/openshift/api/apiserver/v1" versioned "github.com/openshift/client-go/apiserver/clientset/versioned" internalinterfaces "github.com/openshift/client-go/apiserver/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/apiserver/listers/apiserver/v1" + apiserverv1 "github.com/openshift/client-go/apiserver/listers/apiserver/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // APIRequestCounts. type APIRequestCountInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.APIRequestCountLister + Lister() apiserverv1.APIRequestCountLister } type aPIRequestCountInformer struct { @@ -54,7 +54,7 @@ func NewFilteredAPIRequestCountInformer(client versioned.Interface, resyncPeriod return client.ApiserverV1().APIRequestCounts().Watch(context.TODO(), options) }, }, - &apiserverv1.APIRequestCount{}, + &apiapiserverv1.APIRequestCount{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *aPIRequestCountInformer) defaultInformer(client versioned.Interface, re } func (f *aPIRequestCountInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiserverv1.APIRequestCount{}, f.defaultInformer) + return f.factory.InformerFor(&apiapiserverv1.APIRequestCount{}, f.defaultInformer) } -func (f *aPIRequestCountInformer) Lister() v1.APIRequestCountLister { - return v1.NewAPIRequestCountLister(f.Informer().GetIndexer()) +func (f *aPIRequestCountInformer) Lister() apiserverv1.APIRequestCountLister { + return apiserverv1.NewAPIRequestCountLister(f.Informer().GetIndexer()) } diff --git a/apiserver/informers/externalversions/generic.go b/apiserver/informers/externalversions/generic.go index 8ca713db75..e83861914d 100644 --- a/apiserver/informers/externalversions/generic.go +++ b/apiserver/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/apiserver/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/apiserver/listers/apiserver/v1/apirequestcount.go b/apiserver/listers/apiserver/v1/apirequestcount.go index f402f38c37..69d7f8b7df 100644 --- a/apiserver/listers/apiserver/v1/apirequestcount.go +++ b/apiserver/listers/apiserver/v1/apirequestcount.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/apiserver/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + apiserverv1 "github.com/openshift/api/apiserver/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // APIRequestCountLister helps list APIRequestCounts. @@ -14,19 +14,19 @@ import ( type APIRequestCountLister interface { // List lists all APIRequestCounts in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.APIRequestCount, err error) + List(selector labels.Selector) (ret []*apiserverv1.APIRequestCount, err error) // Get retrieves the APIRequestCount from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.APIRequestCount, error) + Get(name string) (*apiserverv1.APIRequestCount, error) APIRequestCountListerExpansion } // aPIRequestCountLister implements the APIRequestCountLister interface. type aPIRequestCountLister struct { - listers.ResourceIndexer[*v1.APIRequestCount] + listers.ResourceIndexer[*apiserverv1.APIRequestCount] } // NewAPIRequestCountLister returns a new APIRequestCountLister. func NewAPIRequestCountLister(indexer cache.Indexer) APIRequestCountLister { - return &aPIRequestCountLister{listers.New[*v1.APIRequestCount](indexer, v1.Resource("apirequestcount"))} + return &aPIRequestCountLister{listers.New[*apiserverv1.APIRequestCount](indexer, apiserverv1.Resource("apirequestcount"))} } diff --git a/apps/applyconfigurations/apps/v1/customdeploymentstrategyparams.go b/apps/applyconfigurations/apps/v1/customdeploymentstrategyparams.go index 0b62d195e2..10d56cc323 100644 --- a/apps/applyconfigurations/apps/v1/customdeploymentstrategyparams.go +++ b/apps/applyconfigurations/apps/v1/customdeploymentstrategyparams.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // CustomDeploymentStrategyParamsApplyConfiguration represents a declarative configuration of the CustomDeploymentStrategyParams type for use // with apply. type CustomDeploymentStrategyParamsApplyConfiguration struct { - Image *string `json:"image,omitempty"` - Environment []v1.EnvVar `json:"environment,omitempty"` - Command []string `json:"command,omitempty"` + Image *string `json:"image,omitempty"` + Environment []corev1.EnvVar `json:"environment,omitempty"` + Command []string `json:"command,omitempty"` } // CustomDeploymentStrategyParamsApplyConfiguration constructs a declarative configuration of the CustomDeploymentStrategyParams type for use with @@ -31,7 +31,7 @@ func (b *CustomDeploymentStrategyParamsApplyConfiguration) WithImage(value strin // WithEnvironment adds the given value to the Environment field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Environment field. -func (b *CustomDeploymentStrategyParamsApplyConfiguration) WithEnvironment(values ...v1.EnvVar) *CustomDeploymentStrategyParamsApplyConfiguration { +func (b *CustomDeploymentStrategyParamsApplyConfiguration) WithEnvironment(values ...corev1.EnvVar) *CustomDeploymentStrategyParamsApplyConfiguration { for i := range values { b.Environment = append(b.Environment, values[i]) } diff --git a/apps/applyconfigurations/apps/v1/deploymentcause.go b/apps/applyconfigurations/apps/v1/deploymentcause.go index 00be6ff11a..d772740d0e 100644 --- a/apps/applyconfigurations/apps/v1/deploymentcause.go +++ b/apps/applyconfigurations/apps/v1/deploymentcause.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" ) // DeploymentCauseApplyConfiguration represents a declarative configuration of the DeploymentCause type for use // with apply. type DeploymentCauseApplyConfiguration struct { - Type *v1.DeploymentTriggerType `json:"type,omitempty"` + Type *appsv1.DeploymentTriggerType `json:"type,omitempty"` ImageTrigger *DeploymentCauseImageTriggerApplyConfiguration `json:"imageTrigger,omitempty"` } @@ -22,7 +22,7 @@ func DeploymentCause() *DeploymentCauseApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *DeploymentCauseApplyConfiguration) WithType(value v1.DeploymentTriggerType) *DeploymentCauseApplyConfiguration { +func (b *DeploymentCauseApplyConfiguration) WithType(value appsv1.DeploymentTriggerType) *DeploymentCauseApplyConfiguration { b.Type = &value return b } diff --git a/apps/applyconfigurations/apps/v1/deploymentcauseimagetrigger.go b/apps/applyconfigurations/apps/v1/deploymentcauseimagetrigger.go index 2c989e12f8..05e3a794f0 100644 --- a/apps/applyconfigurations/apps/v1/deploymentcauseimagetrigger.go +++ b/apps/applyconfigurations/apps/v1/deploymentcauseimagetrigger.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // DeploymentCauseImageTriggerApplyConfiguration represents a declarative configuration of the DeploymentCauseImageTrigger type for use // with apply. type DeploymentCauseImageTriggerApplyConfiguration struct { - From *v1.ObjectReference `json:"from,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` } // DeploymentCauseImageTriggerApplyConfiguration constructs a declarative configuration of the DeploymentCauseImageTrigger type for use with @@ -21,7 +21,7 @@ func DeploymentCauseImageTrigger() *DeploymentCauseImageTriggerApplyConfiguratio // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *DeploymentCauseImageTriggerApplyConfiguration) WithFrom(value v1.ObjectReference) *DeploymentCauseImageTriggerApplyConfiguration { +func (b *DeploymentCauseImageTriggerApplyConfiguration) WithFrom(value corev1.ObjectReference) *DeploymentCauseImageTriggerApplyConfiguration { b.From = &value return b } diff --git a/apps/applyconfigurations/apps/v1/deploymentcondition.go b/apps/applyconfigurations/apps/v1/deploymentcondition.go index bd38385aa5..b5ffab10c8 100644 --- a/apps/applyconfigurations/apps/v1/deploymentcondition.go +++ b/apps/applyconfigurations/apps/v1/deploymentcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,12 +11,12 @@ import ( // DeploymentConditionApplyConfiguration represents a declarative configuration of the DeploymentCondition type for use // with apply. type DeploymentConditionApplyConfiguration struct { - Type *v1.DeploymentConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *appsv1.DeploymentConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // DeploymentConditionApplyConfiguration constructs a declarative configuration of the DeploymentCondition type for use with @@ -28,7 +28,7 @@ func DeploymentCondition() *DeploymentConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *DeploymentConditionApplyConfiguration) WithType(value v1.DeploymentConditionType) *DeploymentConditionApplyConfiguration { +func (b *DeploymentConditionApplyConfiguration) WithType(value appsv1.DeploymentConditionType) *DeploymentConditionApplyConfiguration { b.Type = &value return b } diff --git a/apps/applyconfigurations/apps/v1/deploymentconfig.go b/apps/applyconfigurations/apps/v1/deploymentconfig.go index f015449588..55fd0caaf4 100644 --- a/apps/applyconfigurations/apps/v1/deploymentconfig.go +++ b/apps/applyconfigurations/apps/v1/deploymentconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apiappsv1 "github.com/openshift/api/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" internal "github.com/openshift/client-go/apps/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // DeploymentConfigApplyConfiguration represents a declarative configuration of the DeploymentConfig type for use // with apply. type DeploymentConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DeploymentConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *DeploymentConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *DeploymentConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *DeploymentConfigStatusApplyConfiguration `json:"status,omitempty"` } // DeploymentConfig constructs a declarative configuration of the DeploymentConfig type for use with @@ -42,18 +42,18 @@ func DeploymentConfig(name, namespace string) *DeploymentConfigApplyConfiguratio // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractDeploymentConfig(deploymentConfig *apiappsv1.DeploymentConfig, fieldManager string) (*DeploymentConfigApplyConfiguration, error) { +func ExtractDeploymentConfig(deploymentConfig *appsv1.DeploymentConfig, fieldManager string) (*DeploymentConfigApplyConfiguration, error) { return extractDeploymentConfig(deploymentConfig, fieldManager, "") } // ExtractDeploymentConfigStatus is the same as ExtractDeploymentConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractDeploymentConfigStatus(deploymentConfig *apiappsv1.DeploymentConfig, fieldManager string) (*DeploymentConfigApplyConfiguration, error) { +func ExtractDeploymentConfigStatus(deploymentConfig *appsv1.DeploymentConfig, fieldManager string) (*DeploymentConfigApplyConfiguration, error) { return extractDeploymentConfig(deploymentConfig, fieldManager, "status") } -func extractDeploymentConfig(deploymentConfig *apiappsv1.DeploymentConfig, fieldManager string, subresource string) (*DeploymentConfigApplyConfiguration, error) { +func extractDeploymentConfig(deploymentConfig *appsv1.DeploymentConfig, fieldManager string, subresource string) (*DeploymentConfigApplyConfiguration, error) { b := &DeploymentConfigApplyConfiguration{} err := managedfields.ExtractInto(deploymentConfig, internal.Parser().Type("com.github.openshift.api.apps.v1.DeploymentConfig"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractDeploymentConfig(deploymentConfig *apiappsv1.DeploymentConfig, field // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithKind(value string) *DeploymentConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *DeploymentConfigApplyConfiguration) WithKind(value string) *DeploymentC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithAPIVersion(value string) *DeploymentConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *DeploymentConfigApplyConfiguration) WithAPIVersion(value string) *Deplo // If called multiple times, the Name field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithName(value string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *DeploymentConfigApplyConfiguration) WithName(value string) *DeploymentC // If called multiple times, the GenerateName field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithGenerateName(value string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *DeploymentConfigApplyConfiguration) WithGenerateName(value string) *Dep // If called multiple times, the Namespace field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithNamespace(value string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *DeploymentConfigApplyConfiguration) WithNamespace(value string) *Deploy // If called multiple times, the UID field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithUID(value types.UID) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *DeploymentConfigApplyConfiguration) WithUID(value types.UID) *Deploymen // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithResourceVersion(value string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *DeploymentConfigApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithGeneration(value int64) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *DeploymentConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeploymentConfigApplyConfiguration { +func (b *DeploymentConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *DeploymentConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeploymentConfigApplyConfiguration { +func (b *DeploymentConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *DeploymentConfigApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *DeploymentConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *DeploymentConfigApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *DeploymentConfigApplyConfiguration) WithLabels(entries map[string]string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *DeploymentConfigApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *DeploymentConfigApplyConfiguration) WithAnnotations(entries map[string]string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *DeploymentConfigApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *DeploymentConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeploymentConfigApplyConfiguration { +func (b *DeploymentConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *DeploymentConfigApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *DeploymentConfigApplyConfiguration) WithFinalizers(values ...string) *DeploymentConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *DeploymentConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *DeploymentConfigApplyConfiguration) WithStatus(value *DeploymentConfigS // GetName retrieves the value of the Name field in the declarative configuration. func (b *DeploymentConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/apps/applyconfigurations/apps/v1/deploymentstrategy.go b/apps/applyconfigurations/apps/v1/deploymentstrategy.go index 92c66bd808..0216263051 100644 --- a/apps/applyconfigurations/apps/v1/deploymentstrategy.go +++ b/apps/applyconfigurations/apps/v1/deploymentstrategy.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" corev1 "k8s.io/api/core/v1" ) // DeploymentStrategyApplyConfiguration represents a declarative configuration of the DeploymentStrategy type for use // with apply. type DeploymentStrategyApplyConfiguration struct { - Type *v1.DeploymentStrategyType `json:"type,omitempty"` + Type *appsv1.DeploymentStrategyType `json:"type,omitempty"` CustomParams *CustomDeploymentStrategyParamsApplyConfiguration `json:"customParams,omitempty"` RecreateParams *RecreateDeploymentStrategyParamsApplyConfiguration `json:"recreateParams,omitempty"` RollingParams *RollingDeploymentStrategyParamsApplyConfiguration `json:"rollingParams,omitempty"` @@ -29,7 +29,7 @@ func DeploymentStrategy() *DeploymentStrategyApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *DeploymentStrategyApplyConfiguration) WithType(value v1.DeploymentStrategyType) *DeploymentStrategyApplyConfiguration { +func (b *DeploymentStrategyApplyConfiguration) WithType(value appsv1.DeploymentStrategyType) *DeploymentStrategyApplyConfiguration { b.Type = &value return b } diff --git a/apps/applyconfigurations/apps/v1/deploymenttriggerimagechangeparams.go b/apps/applyconfigurations/apps/v1/deploymenttriggerimagechangeparams.go index 16351583af..f8db162846 100644 --- a/apps/applyconfigurations/apps/v1/deploymenttriggerimagechangeparams.go +++ b/apps/applyconfigurations/apps/v1/deploymenttriggerimagechangeparams.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // DeploymentTriggerImageChangeParamsApplyConfiguration represents a declarative configuration of the DeploymentTriggerImageChangeParams type for use // with apply. type DeploymentTriggerImageChangeParamsApplyConfiguration struct { - Automatic *bool `json:"automatic,omitempty"` - ContainerNames []string `json:"containerNames,omitempty"` - From *v1.ObjectReference `json:"from,omitempty"` - LastTriggeredImage *string `json:"lastTriggeredImage,omitempty"` + Automatic *bool `json:"automatic,omitempty"` + ContainerNames []string `json:"containerNames,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` + LastTriggeredImage *string `json:"lastTriggeredImage,omitempty"` } // DeploymentTriggerImageChangeParamsApplyConfiguration constructs a declarative configuration of the DeploymentTriggerImageChangeParams type for use with @@ -42,7 +42,7 @@ func (b *DeploymentTriggerImageChangeParamsApplyConfiguration) WithContainerName // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *DeploymentTriggerImageChangeParamsApplyConfiguration) WithFrom(value v1.ObjectReference) *DeploymentTriggerImageChangeParamsApplyConfiguration { +func (b *DeploymentTriggerImageChangeParamsApplyConfiguration) WithFrom(value corev1.ObjectReference) *DeploymentTriggerImageChangeParamsApplyConfiguration { b.From = &value return b } diff --git a/apps/applyconfigurations/apps/v1/deploymenttriggerpolicy.go b/apps/applyconfigurations/apps/v1/deploymenttriggerpolicy.go index 30eb547157..7e6dc5b5b6 100644 --- a/apps/applyconfigurations/apps/v1/deploymenttriggerpolicy.go +++ b/apps/applyconfigurations/apps/v1/deploymenttriggerpolicy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" ) // DeploymentTriggerPolicyApplyConfiguration represents a declarative configuration of the DeploymentTriggerPolicy type for use // with apply. type DeploymentTriggerPolicyApplyConfiguration struct { - Type *v1.DeploymentTriggerType `json:"type,omitempty"` + Type *appsv1.DeploymentTriggerType `json:"type,omitempty"` ImageChangeParams *DeploymentTriggerImageChangeParamsApplyConfiguration `json:"imageChangeParams,omitempty"` } @@ -22,7 +22,7 @@ func DeploymentTriggerPolicy() *DeploymentTriggerPolicyApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *DeploymentTriggerPolicyApplyConfiguration) WithType(value v1.DeploymentTriggerType) *DeploymentTriggerPolicyApplyConfiguration { +func (b *DeploymentTriggerPolicyApplyConfiguration) WithType(value appsv1.DeploymentTriggerType) *DeploymentTriggerPolicyApplyConfiguration { b.Type = &value return b } diff --git a/apps/applyconfigurations/apps/v1/execnewpodhook.go b/apps/applyconfigurations/apps/v1/execnewpodhook.go index c653879aca..ae81c4ef53 100644 --- a/apps/applyconfigurations/apps/v1/execnewpodhook.go +++ b/apps/applyconfigurations/apps/v1/execnewpodhook.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ExecNewPodHookApplyConfiguration represents a declarative configuration of the ExecNewPodHook type for use // with apply. type ExecNewPodHookApplyConfiguration struct { - Command []string `json:"command,omitempty"` - Env []v1.EnvVar `json:"env,omitempty"` - ContainerName *string `json:"containerName,omitempty"` - Volumes []string `json:"volumes,omitempty"` + Command []string `json:"command,omitempty"` + Env []corev1.EnvVar `json:"env,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + Volumes []string `json:"volumes,omitempty"` } // ExecNewPodHookApplyConfiguration constructs a declarative configuration of the ExecNewPodHook type for use with @@ -34,7 +34,7 @@ func (b *ExecNewPodHookApplyConfiguration) WithCommand(values ...string) *ExecNe // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. -func (b *ExecNewPodHookApplyConfiguration) WithEnv(values ...v1.EnvVar) *ExecNewPodHookApplyConfiguration { +func (b *ExecNewPodHookApplyConfiguration) WithEnv(values ...corev1.EnvVar) *ExecNewPodHookApplyConfiguration { for i := range values { b.Env = append(b.Env, values[i]) } diff --git a/apps/applyconfigurations/apps/v1/lifecyclehook.go b/apps/applyconfigurations/apps/v1/lifecyclehook.go index 85ee84d197..637f064e48 100644 --- a/apps/applyconfigurations/apps/v1/lifecyclehook.go +++ b/apps/applyconfigurations/apps/v1/lifecyclehook.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" ) // LifecycleHookApplyConfiguration represents a declarative configuration of the LifecycleHook type for use // with apply. type LifecycleHookApplyConfiguration struct { - FailurePolicy *v1.LifecycleHookFailurePolicy `json:"failurePolicy,omitempty"` - ExecNewPod *ExecNewPodHookApplyConfiguration `json:"execNewPod,omitempty"` - TagImages []TagImageHookApplyConfiguration `json:"tagImages,omitempty"` + FailurePolicy *appsv1.LifecycleHookFailurePolicy `json:"failurePolicy,omitempty"` + ExecNewPod *ExecNewPodHookApplyConfiguration `json:"execNewPod,omitempty"` + TagImages []TagImageHookApplyConfiguration `json:"tagImages,omitempty"` } // LifecycleHookApplyConfiguration constructs a declarative configuration of the LifecycleHook type for use with @@ -23,7 +23,7 @@ func LifecycleHook() *LifecycleHookApplyConfiguration { // WithFailurePolicy sets the FailurePolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailurePolicy field is set to the value of the last call. -func (b *LifecycleHookApplyConfiguration) WithFailurePolicy(value v1.LifecycleHookFailurePolicy) *LifecycleHookApplyConfiguration { +func (b *LifecycleHookApplyConfiguration) WithFailurePolicy(value appsv1.LifecycleHookFailurePolicy) *LifecycleHookApplyConfiguration { b.FailurePolicy = &value return b } diff --git a/apps/applyconfigurations/apps/v1/tagimagehook.go b/apps/applyconfigurations/apps/v1/tagimagehook.go index a054d02d3e..6b88c2f508 100644 --- a/apps/applyconfigurations/apps/v1/tagimagehook.go +++ b/apps/applyconfigurations/apps/v1/tagimagehook.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // TagImageHookApplyConfiguration represents a declarative configuration of the TagImageHook type for use // with apply. type TagImageHookApplyConfiguration struct { - ContainerName *string `json:"containerName,omitempty"` - To *v1.ObjectReference `json:"to,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + To *corev1.ObjectReference `json:"to,omitempty"` } // TagImageHookApplyConfiguration constructs a declarative configuration of the TagImageHook type for use with @@ -30,7 +30,7 @@ func (b *TagImageHookApplyConfiguration) WithContainerName(value string) *TagIma // WithTo sets the To field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the To field is set to the value of the last call. -func (b *TagImageHookApplyConfiguration) WithTo(value v1.ObjectReference) *TagImageHookApplyConfiguration { +func (b *TagImageHookApplyConfiguration) WithTo(value corev1.ObjectReference) *TagImageHookApplyConfiguration { b.To = &value return b } diff --git a/apps/applyconfigurations/internal/internal.go b/apps/applyconfigurations/internal/internal.go index 03f0e12a53..92598eb143 100644 --- a/apps/applyconfigurations/internal/internal.go +++ b/apps/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) @@ -1515,6 +1515,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: runAsUser type: scalar: numeric + - name: seLinuxChangePolicy + type: + scalar: string - name: seLinuxOptions type: namedType: io.k8s.api.core.v1.SELinuxOptions @@ -1655,6 +1658,9 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name + - name: resources + type: + namedType: io.k8s.api.core.v1.ResourceRequirements - name: restartPolicy type: scalar: string diff --git a/apps/clientset/versioned/clientset.go b/apps/clientset/versioned/clientset.go index bc1d7a5347..516edbee64 100644 --- a/apps/clientset/versioned/clientset.go +++ b/apps/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" appsv1 "github.com/openshift/client-go/apps/clientset/versioned/typed/apps/v1" discovery "k8s.io/client-go/discovery" diff --git a/apps/clientset/versioned/typed/apps/v1/apps_client.go b/apps/clientset/versioned/typed/apps/v1/apps_client.go index a2c507e16e..e368d6a64c 100644 --- a/apps/clientset/versioned/typed/apps/v1/apps_client.go +++ b/apps/clientset/versioned/typed/apps/v1/apps_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/apps/v1" - "github.com/openshift/client-go/apps/clientset/versioned/scheme" + appsv1 "github.com/openshift/api/apps/v1" + scheme "github.com/openshift/client-go/apps/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *AppsV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := appsv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/apps/clientset/versioned/typed/apps/v1/deploymentconfig.go b/apps/clientset/versioned/typed/apps/v1/deploymentconfig.go index 9f450f896f..a7e3bb7dfe 100644 --- a/apps/clientset/versioned/typed/apps/v1/deploymentconfig.go +++ b/apps/clientset/versioned/typed/apps/v1/deploymentconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/apps/v1" - appsv1 "github.com/openshift/client-go/apps/applyconfigurations/apps/v1" + appsv1 "github.com/openshift/api/apps/v1" + applyconfigurationsappsv1 "github.com/openshift/client-go/apps/applyconfigurations/apps/v1" scheme "github.com/openshift/client-go/apps/clientset/versioned/scheme" v1beta1 "k8s.io/api/extensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -23,21 +23,21 @@ type DeploymentConfigsGetter interface { // DeploymentConfigInterface has methods to work with DeploymentConfig resources. type DeploymentConfigInterface interface { - Create(ctx context.Context, deploymentConfig *v1.DeploymentConfig, opts metav1.CreateOptions) (*v1.DeploymentConfig, error) - Update(ctx context.Context, deploymentConfig *v1.DeploymentConfig, opts metav1.UpdateOptions) (*v1.DeploymentConfig, error) + Create(ctx context.Context, deploymentConfig *appsv1.DeploymentConfig, opts metav1.CreateOptions) (*appsv1.DeploymentConfig, error) + Update(ctx context.Context, deploymentConfig *appsv1.DeploymentConfig, opts metav1.UpdateOptions) (*appsv1.DeploymentConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, deploymentConfig *v1.DeploymentConfig, opts metav1.UpdateOptions) (*v1.DeploymentConfig, error) + UpdateStatus(ctx context.Context, deploymentConfig *appsv1.DeploymentConfig, opts metav1.UpdateOptions) (*appsv1.DeploymentConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DeploymentConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*appsv1.DeploymentConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*appsv1.DeploymentConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DeploymentConfig, err error) - Apply(ctx context.Context, deploymentConfig *appsv1.DeploymentConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DeploymentConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *appsv1.DeploymentConfig, err error) + Apply(ctx context.Context, deploymentConfig *applyconfigurationsappsv1.DeploymentConfigApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1.DeploymentConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, deploymentConfig *appsv1.DeploymentConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DeploymentConfig, err error) - Instantiate(ctx context.Context, deploymentConfigName string, deploymentRequest *v1.DeploymentRequest, opts metav1.CreateOptions) (*v1.DeploymentConfig, error) - Rollback(ctx context.Context, deploymentConfigName string, deploymentConfigRollback *v1.DeploymentConfigRollback, opts metav1.CreateOptions) (*v1.DeploymentConfig, error) + ApplyStatus(ctx context.Context, deploymentConfig *applyconfigurationsappsv1.DeploymentConfigApplyConfiguration, opts metav1.ApplyOptions) (result *appsv1.DeploymentConfig, err error) + Instantiate(ctx context.Context, deploymentConfigName string, deploymentRequest *appsv1.DeploymentRequest, opts metav1.CreateOptions) (*appsv1.DeploymentConfig, error) + Rollback(ctx context.Context, deploymentConfigName string, deploymentConfigRollback *appsv1.DeploymentConfigRollback, opts metav1.CreateOptions) (*appsv1.DeploymentConfig, error) GetScale(ctx context.Context, deploymentConfigName string, options metav1.GetOptions) (*v1beta1.Scale, error) UpdateScale(ctx context.Context, deploymentConfigName string, scale *v1beta1.Scale, opts metav1.UpdateOptions) (*v1beta1.Scale, error) @@ -46,25 +46,26 @@ type DeploymentConfigInterface interface { // deploymentConfigs implements DeploymentConfigInterface type deploymentConfigs struct { - *gentype.ClientWithListAndApply[*v1.DeploymentConfig, *v1.DeploymentConfigList, *appsv1.DeploymentConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*appsv1.DeploymentConfig, *appsv1.DeploymentConfigList, *applyconfigurationsappsv1.DeploymentConfigApplyConfiguration] } // newDeploymentConfigs returns a DeploymentConfigs func newDeploymentConfigs(c *AppsV1Client, namespace string) *deploymentConfigs { return &deploymentConfigs{ - gentype.NewClientWithListAndApply[*v1.DeploymentConfig, *v1.DeploymentConfigList, *appsv1.DeploymentConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*appsv1.DeploymentConfig, *appsv1.DeploymentConfigList, *applyconfigurationsappsv1.DeploymentConfigApplyConfiguration]( "deploymentconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.DeploymentConfig { return &v1.DeploymentConfig{} }, - func() *v1.DeploymentConfigList { return &v1.DeploymentConfigList{} }), + func() *appsv1.DeploymentConfig { return &appsv1.DeploymentConfig{} }, + func() *appsv1.DeploymentConfigList { return &appsv1.DeploymentConfigList{} }, + ), } } // Instantiate takes the representation of a deploymentRequest and creates it. Returns the server's representation of the deploymentConfig, and an error, if there is any. -func (c *deploymentConfigs) Instantiate(ctx context.Context, deploymentConfigName string, deploymentRequest *v1.DeploymentRequest, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { - result = &v1.DeploymentConfig{} +func (c *deploymentConfigs) Instantiate(ctx context.Context, deploymentConfigName string, deploymentRequest *appsv1.DeploymentRequest, opts metav1.CreateOptions) (result *appsv1.DeploymentConfig, err error) { + result = &appsv1.DeploymentConfig{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). Resource("deploymentconfigs"). @@ -78,8 +79,8 @@ func (c *deploymentConfigs) Instantiate(ctx context.Context, deploymentConfigNam } // Rollback takes the representation of a deploymentConfigRollback and creates it. Returns the server's representation of the deploymentConfig, and an error, if there is any. -func (c *deploymentConfigs) Rollback(ctx context.Context, deploymentConfigName string, deploymentConfigRollback *v1.DeploymentConfigRollback, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { - result = &v1.DeploymentConfig{} +func (c *deploymentConfigs) Rollback(ctx context.Context, deploymentConfigName string, deploymentConfigRollback *appsv1.DeploymentConfigRollback, opts metav1.CreateOptions) (result *appsv1.DeploymentConfig, err error) { + result = &appsv1.DeploymentConfig{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). Resource("deploymentconfigs"). diff --git a/apps/clientset/versioned/typed/apps/v1/fake/fake_apps_client.go b/apps/clientset/versioned/typed/apps/v1/fake/fake_apps_client.go index db01335063..32a45a59e4 100644 --- a/apps/clientset/versioned/typed/apps/v1/fake/fake_apps_client.go +++ b/apps/clientset/versioned/typed/apps/v1/fake/fake_apps_client.go @@ -13,7 +13,7 @@ type FakeAppsV1 struct { } func (c *FakeAppsV1) DeploymentConfigs(namespace string) v1.DeploymentConfigInterface { - return &FakeDeploymentConfigs{c, namespace} + return newFakeDeploymentConfigs(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/apps/clientset/versioned/typed/apps/v1/fake/fake_deploymentconfig.go b/apps/clientset/versioned/typed/apps/v1/fake/fake_deploymentconfig.go index df4d021f6f..f5f4b9d04b 100644 --- a/apps/clientset/versioned/typed/apps/v1/fake/fake_deploymentconfig.go +++ b/apps/clientset/versioned/typed/apps/v1/fake/fake_deploymentconfig.go @@ -3,189 +3,47 @@ package fake import ( - "context" - json "encoding/json" - "fmt" + context "context" v1 "github.com/openshift/api/apps/v1" appsv1 "github.com/openshift/client-go/apps/applyconfigurations/apps/v1" + typedappsv1 "github.com/openshift/client-go/apps/clientset/versioned/typed/apps/v1" v1beta1 "k8s.io/api/extensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeDeploymentConfigs implements DeploymentConfigInterface -type FakeDeploymentConfigs struct { +// fakeDeploymentConfigs implements DeploymentConfigInterface +type fakeDeploymentConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.DeploymentConfig, *v1.DeploymentConfigList, *appsv1.DeploymentConfigApplyConfiguration] Fake *FakeAppsV1 - ns string } -var deploymentconfigsResource = v1.SchemeGroupVersion.WithResource("deploymentconfigs") - -var deploymentconfigsKind = v1.SchemeGroupVersion.WithKind("DeploymentConfig") - -// Get takes name of the deploymentConfig, and returns the corresponding deploymentConfig object, and an error if there is any. -func (c *FakeDeploymentConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DeploymentConfig, err error) { - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(deploymentconfigsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DeploymentConfig), err -} - -// List takes label and field selectors, and returns the list of DeploymentConfigs that match those selectors. -func (c *FakeDeploymentConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentConfigList, err error) { - emptyResult := &v1.DeploymentConfigList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(deploymentconfigsResource, deploymentconfigsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.DeploymentConfigList{ListMeta: obj.(*v1.DeploymentConfigList).ListMeta} - for _, item := range obj.(*v1.DeploymentConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested deploymentConfigs. -func (c *FakeDeploymentConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(deploymentconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a deploymentConfig and creates it. Returns the server's representation of the deploymentConfig, and an error, if there is any. -func (c *FakeDeploymentConfigs) Create(ctx context.Context, deploymentConfig *v1.DeploymentConfig, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(deploymentconfigsResource, c.ns, deploymentConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DeploymentConfig), err -} - -// Update takes the representation of a deploymentConfig and updates it. Returns the server's representation of the deploymentConfig, and an error, if there is any. -func (c *FakeDeploymentConfigs) Update(ctx context.Context, deploymentConfig *v1.DeploymentConfig, opts metav1.UpdateOptions) (result *v1.DeploymentConfig, err error) { - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(deploymentconfigsResource, c.ns, deploymentConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeDeploymentConfigs(fake *FakeAppsV1, namespace string) typedappsv1.DeploymentConfigInterface { + return &fakeDeploymentConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.DeploymentConfig, *v1.DeploymentConfigList, *appsv1.DeploymentConfigApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("deploymentconfigs"), + v1.SchemeGroupVersion.WithKind("DeploymentConfig"), + func() *v1.DeploymentConfig { return &v1.DeploymentConfig{} }, + func() *v1.DeploymentConfigList { return &v1.DeploymentConfigList{} }, + func(dst, src *v1.DeploymentConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.DeploymentConfigList) []*v1.DeploymentConfig { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.DeploymentConfigList, items []*v1.DeploymentConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.DeploymentConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeploymentConfigs) UpdateStatus(ctx context.Context, deploymentConfig *v1.DeploymentConfig, opts metav1.UpdateOptions) (result *v1.DeploymentConfig, err error) { - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(deploymentconfigsResource, "status", c.ns, deploymentConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DeploymentConfig), err -} - -// Delete takes name of the deploymentConfig and deletes it. Returns an error if one occurs. -func (c *FakeDeploymentConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(deploymentconfigsResource, c.ns, name, opts), &v1.DeploymentConfig{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDeploymentConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(deploymentconfigsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.DeploymentConfigList{}) - return err -} - -// Patch applies the patch and returns the patched deploymentConfig. -func (c *FakeDeploymentConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DeploymentConfig, err error) { - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(deploymentconfigsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DeploymentConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied deploymentConfig. -func (c *FakeDeploymentConfigs) Apply(ctx context.Context, deploymentConfig *appsv1.DeploymentConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DeploymentConfig, err error) { - if deploymentConfig == nil { - return nil, fmt.Errorf("deploymentConfig provided to Apply must not be nil") - } - data, err := json.Marshal(deploymentConfig) - if err != nil { - return nil, err - } - name := deploymentConfig.Name - if name == nil { - return nil, fmt.Errorf("deploymentConfig.Name must be provided to Apply") - } - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(deploymentconfigsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DeploymentConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDeploymentConfigs) ApplyStatus(ctx context.Context, deploymentConfig *appsv1.DeploymentConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DeploymentConfig, err error) { - if deploymentConfig == nil { - return nil, fmt.Errorf("deploymentConfig provided to Apply must not be nil") - } - data, err := json.Marshal(deploymentConfig) - if err != nil { - return nil, err - } - name := deploymentConfig.Name - if name == nil { - return nil, fmt.Errorf("deploymentConfig.Name must be provided to Apply") - } - emptyResult := &v1.DeploymentConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(deploymentconfigsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DeploymentConfig), err } // Instantiate takes the representation of a deploymentRequest and creates it. Returns the server's representation of the deploymentConfig, and an error, if there is any. -func (c *FakeDeploymentConfigs) Instantiate(ctx context.Context, deploymentConfigName string, deploymentRequest *v1.DeploymentRequest, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { +func (c *fakeDeploymentConfigs) Instantiate(ctx context.Context, deploymentConfigName string, deploymentRequest *v1.DeploymentRequest, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { emptyResult := &v1.DeploymentConfig{} obj, err := c.Fake. - Invokes(testing.NewCreateSubresourceActionWithOptions(deploymentconfigsResource, deploymentConfigName, "instantiate", c.ns, deploymentRequest, opts), emptyResult) + Invokes(testing.NewCreateSubresourceActionWithOptions(c.Resource(), deploymentConfigName, "instantiate", c.Namespace(), deploymentRequest, opts), emptyResult) if obj == nil { return emptyResult, err @@ -194,10 +52,10 @@ func (c *FakeDeploymentConfigs) Instantiate(ctx context.Context, deploymentConfi } // Rollback takes the representation of a deploymentConfigRollback and creates it. Returns the server's representation of the deploymentConfig, and an error, if there is any. -func (c *FakeDeploymentConfigs) Rollback(ctx context.Context, deploymentConfigName string, deploymentConfigRollback *v1.DeploymentConfigRollback, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { +func (c *fakeDeploymentConfigs) Rollback(ctx context.Context, deploymentConfigName string, deploymentConfigRollback *v1.DeploymentConfigRollback, opts metav1.CreateOptions) (result *v1.DeploymentConfig, err error) { emptyResult := &v1.DeploymentConfig{} obj, err := c.Fake. - Invokes(testing.NewCreateSubresourceActionWithOptions(deploymentconfigsResource, deploymentConfigName, "rollback", c.ns, deploymentConfigRollback, opts), emptyResult) + Invokes(testing.NewCreateSubresourceActionWithOptions(c.Resource(), deploymentConfigName, "rollback", c.Namespace(), deploymentConfigRollback, opts), emptyResult) if obj == nil { return emptyResult, err @@ -206,10 +64,10 @@ func (c *FakeDeploymentConfigs) Rollback(ctx context.Context, deploymentConfigNa } // GetScale takes name of the deploymentConfig, and returns the corresponding scale object, and an error if there is any. -func (c *FakeDeploymentConfigs) GetScale(ctx context.Context, deploymentConfigName string, options metav1.GetOptions) (result *v1beta1.Scale, err error) { +func (c *fakeDeploymentConfigs) GetScale(ctx context.Context, deploymentConfigName string, options metav1.GetOptions) (result *v1beta1.Scale, err error) { emptyResult := &v1beta1.Scale{} obj, err := c.Fake. - Invokes(testing.NewGetSubresourceActionWithOptions(deploymentconfigsResource, c.ns, "scale", deploymentConfigName, options), emptyResult) + Invokes(testing.NewGetSubresourceActionWithOptions(c.Resource(), c.Namespace(), "scale", deploymentConfigName, options), emptyResult) if obj == nil { return emptyResult, err @@ -218,10 +76,10 @@ func (c *FakeDeploymentConfigs) GetScale(ctx context.Context, deploymentConfigNa } // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. -func (c *FakeDeploymentConfigs) UpdateScale(ctx context.Context, deploymentConfigName string, scale *v1beta1.Scale, opts metav1.UpdateOptions) (result *v1beta1.Scale, err error) { +func (c *fakeDeploymentConfigs) UpdateScale(ctx context.Context, deploymentConfigName string, scale *v1beta1.Scale, opts metav1.UpdateOptions) (result *v1beta1.Scale, err error) { emptyResult := &v1beta1.Scale{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(deploymentconfigsResource, "scale", c.ns, scale, opts), &v1beta1.Scale{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(c.Resource(), "scale", c.Namespace(), scale, opts), &v1beta1.Scale{}) if obj == nil { return emptyResult, err diff --git a/apps/informers/externalversions/apps/v1/deploymentconfig.go b/apps/informers/externalversions/apps/v1/deploymentconfig.go index 4be7179ad3..b741a6320f 100644 --- a/apps/informers/externalversions/apps/v1/deploymentconfig.go +++ b/apps/informers/externalversions/apps/v1/deploymentconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - appsv1 "github.com/openshift/api/apps/v1" + apiappsv1 "github.com/openshift/api/apps/v1" versioned "github.com/openshift/client-go/apps/clientset/versioned" internalinterfaces "github.com/openshift/client-go/apps/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/apps/listers/apps/v1" + appsv1 "github.com/openshift/client-go/apps/listers/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DeploymentConfigs. type DeploymentConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.DeploymentConfigLister + Lister() appsv1.DeploymentConfigLister } type deploymentConfigInformer struct { @@ -55,7 +55,7 @@ func NewFilteredDeploymentConfigInformer(client versioned.Interface, namespace s return client.AppsV1().DeploymentConfigs(namespace).Watch(context.TODO(), options) }, }, - &appsv1.DeploymentConfig{}, + &apiappsv1.DeploymentConfig{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *deploymentConfigInformer) defaultInformer(client versioned.Interface, r } func (f *deploymentConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&appsv1.DeploymentConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apiappsv1.DeploymentConfig{}, f.defaultInformer) } -func (f *deploymentConfigInformer) Lister() v1.DeploymentConfigLister { - return v1.NewDeploymentConfigLister(f.Informer().GetIndexer()) +func (f *deploymentConfigInformer) Lister() appsv1.DeploymentConfigLister { + return appsv1.NewDeploymentConfigLister(f.Informer().GetIndexer()) } diff --git a/apps/informers/externalversions/generic.go b/apps/informers/externalversions/generic.go index 7ea4a7c77a..c88774584f 100644 --- a/apps/informers/externalversions/generic.go +++ b/apps/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/apps/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/apps/listers/apps/v1/deploymentconfig.go b/apps/listers/apps/v1/deploymentconfig.go index e66f622e80..074682e441 100644 --- a/apps/listers/apps/v1/deploymentconfig.go +++ b/apps/listers/apps/v1/deploymentconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/apps/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + appsv1 "github.com/openshift/api/apps/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DeploymentConfigLister helps list DeploymentConfigs. @@ -14,7 +14,7 @@ import ( type DeploymentConfigLister interface { // List lists all DeploymentConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.DeploymentConfig, err error) + List(selector labels.Selector) (ret []*appsv1.DeploymentConfig, err error) // DeploymentConfigs returns an object that can list and get DeploymentConfigs. DeploymentConfigs(namespace string) DeploymentConfigNamespaceLister DeploymentConfigListerExpansion @@ -22,17 +22,17 @@ type DeploymentConfigLister interface { // deploymentConfigLister implements the DeploymentConfigLister interface. type deploymentConfigLister struct { - listers.ResourceIndexer[*v1.DeploymentConfig] + listers.ResourceIndexer[*appsv1.DeploymentConfig] } // NewDeploymentConfigLister returns a new DeploymentConfigLister. func NewDeploymentConfigLister(indexer cache.Indexer) DeploymentConfigLister { - return &deploymentConfigLister{listers.New[*v1.DeploymentConfig](indexer, v1.Resource("deploymentconfig"))} + return &deploymentConfigLister{listers.New[*appsv1.DeploymentConfig](indexer, appsv1.Resource("deploymentconfig"))} } // DeploymentConfigs returns an object that can list and get DeploymentConfigs. func (s *deploymentConfigLister) DeploymentConfigs(namespace string) DeploymentConfigNamespaceLister { - return deploymentConfigNamespaceLister{listers.NewNamespaced[*v1.DeploymentConfig](s.ResourceIndexer, namespace)} + return deploymentConfigNamespaceLister{listers.NewNamespaced[*appsv1.DeploymentConfig](s.ResourceIndexer, namespace)} } // DeploymentConfigNamespaceLister helps list and get DeploymentConfigs. @@ -40,15 +40,15 @@ func (s *deploymentConfigLister) DeploymentConfigs(namespace string) DeploymentC type DeploymentConfigNamespaceLister interface { // List lists all DeploymentConfigs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.DeploymentConfig, err error) + List(selector labels.Selector) (ret []*appsv1.DeploymentConfig, err error) // Get retrieves the DeploymentConfig from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.DeploymentConfig, error) + Get(name string) (*appsv1.DeploymentConfig, error) DeploymentConfigNamespaceListerExpansion } // deploymentConfigNamespaceLister implements the DeploymentConfigNamespaceLister // interface. type deploymentConfigNamespaceLister struct { - listers.ResourceIndexer[*v1.DeploymentConfig] + listers.ResourceIndexer[*appsv1.DeploymentConfig] } diff --git a/authorization/applyconfigurations/authorization/v1/clusterrole.go b/authorization/applyconfigurations/authorization/v1/clusterrole.go index efb6e3ce16..e09f47e9a7 100644 --- a/authorization/applyconfigurations/authorization/v1/clusterrole.go +++ b/authorization/applyconfigurations/authorization/v1/clusterrole.go @@ -3,22 +3,22 @@ package v1 import ( - apiauthorizationv1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" internal "github.com/openshift/client-go/authorization/applyconfigurations/internal" rbacv1 "k8s.io/api/rbac/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterRoleApplyConfiguration represents a declarative configuration of the ClusterRole type for use // with apply. type ClusterRoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` - AggregationRule *rbacv1.AggregationRule `json:"aggregationRule,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + AggregationRule *rbacv1.AggregationRule `json:"aggregationRule,omitempty"` } // ClusterRole constructs a declarative configuration of the ClusterRole type for use with @@ -42,18 +42,18 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractClusterRole(clusterRole *apiauthorizationv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { +func ExtractClusterRole(clusterRole *authorizationv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { return extractClusterRole(clusterRole, fieldManager, "") } // ExtractClusterRoleStatus is the same as ExtractClusterRole except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractClusterRoleStatus(clusterRole *apiauthorizationv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { +func ExtractClusterRoleStatus(clusterRole *authorizationv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) { return extractClusterRole(clusterRole, fieldManager, "status") } -func extractClusterRole(clusterRole *apiauthorizationv1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { +func extractClusterRole(clusterRole *authorizationv1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) { b := &ClusterRoleApplyConfiguration{} err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("com.github.openshift.api.authorization.v1.ClusterRole"), fieldManager, b, subresource) if err != nil { @@ -70,7 +70,7 @@ func extractClusterRole(clusterRole *apiauthorizationv1.ClusterRole, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithKind(value string) *ClusterRoleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -78,7 +78,7 @@ func (b *ClusterRoleApplyConfiguration) WithKind(value string) *ClusterRoleApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithAPIVersion(value string) *ClusterRoleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -87,7 +87,7 @@ func (b *ClusterRoleApplyConfiguration) WithAPIVersion(value string) *ClusterRol // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithName(value string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -96,7 +96,7 @@ func (b *ClusterRoleApplyConfiguration) WithName(value string) *ClusterRoleApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithGenerateName(value string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -105,7 +105,7 @@ func (b *ClusterRoleApplyConfiguration) WithGenerateName(value string) *ClusterR // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -114,7 +114,7 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithUID(value types.UID) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -123,7 +123,7 @@ func (b *ClusterRoleApplyConfiguration) WithUID(value types.UID) *ClusterRoleApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithResourceVersion(value string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -132,25 +132,25 @@ func (b *ClusterRoleApplyConfiguration) WithResourceVersion(value string) *Clust // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithGeneration(value int64) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterRoleApplyConfiguration { +func (b *ClusterRoleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterRoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterRoleApplyConfiguration { +func (b *ClusterRoleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -159,7 +159,7 @@ func (b *ClusterRoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterRoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -169,11 +169,11 @@ func (b *ClusterRoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *ClusterRoleApplyConfiguration) WithLabels(entries map[string]string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -184,11 +184,11 @@ func (b *ClusterRoleApplyConfiguration) WithLabels(entries map[string]string) *C // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterRoleApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -196,13 +196,13 @@ func (b *ClusterRoleApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterRoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterRoleApplyConfiguration { +func (b *ClusterRoleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -213,14 +213,14 @@ func (b *ClusterRoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *ClusterRoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -248,5 +248,5 @@ func (b *ClusterRoleApplyConfiguration) WithAggregationRule(value rbacv1.Aggrega // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterRoleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/authorization/applyconfigurations/authorization/v1/clusterrolebinding.go b/authorization/applyconfigurations/authorization/v1/clusterrolebinding.go index eee67329ac..428e90b045 100644 --- a/authorization/applyconfigurations/authorization/v1/clusterrolebinding.go +++ b/authorization/applyconfigurations/authorization/v1/clusterrolebinding.go @@ -6,21 +6,21 @@ import ( authorizationv1 "github.com/openshift/api/authorization/v1" internal "github.com/openshift/client-go/authorization/applyconfigurations/internal" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterRoleBindingApplyConfiguration represents a declarative configuration of the ClusterRoleBinding type for use // with apply. type ClusterRoleBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - UserNames *authorizationv1.OptionalNames `json:"userNames,omitempty"` - GroupNames *authorizationv1.OptionalNames `json:"groupNames,omitempty"` - Subjects []corev1.ObjectReference `json:"subjects,omitempty"` - RoleRef *corev1.ObjectReference `json:"roleRef,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + UserNames *authorizationv1.OptionalNames `json:"userNames,omitempty"` + GroupNames *authorizationv1.OptionalNames `json:"groupNames,omitempty"` + Subjects []corev1.ObjectReference `json:"subjects,omitempty"` + RoleRef *corev1.ObjectReference `json:"roleRef,omitempty"` } // ClusterRoleBinding constructs a declarative configuration of the ClusterRoleBinding type for use with @@ -72,7 +72,7 @@ func extractClusterRoleBinding(clusterRoleBinding *authorizationv1.ClusterRoleBi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithKind(value string) *ClusterRoleBindingApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -80,7 +80,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithKind(value string) *ClusterRo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithAPIVersion(value string) *ClusterRoleBindingApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -89,7 +89,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithAPIVersion(value string) *Clu // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithName(value string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -98,7 +98,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithName(value string) *ClusterRo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithGenerateName(value string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -107,7 +107,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithGenerateName(value string) *C // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -116,7 +116,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithUID(value types.UID) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -125,7 +125,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithUID(value types.UID) *Cluster // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithResourceVersion(value string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -134,25 +134,25 @@ func (b *ClusterRoleBindingApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithGeneration(value int64) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterRoleBindingApplyConfiguration { +func (b *ClusterRoleBindingApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterRoleBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterRoleBindingApplyConfiguration { +func (b *ClusterRoleBindingApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -161,7 +161,7 @@ func (b *ClusterRoleBindingApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterRoleBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -171,11 +171,11 @@ func (b *ClusterRoleBindingApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *ClusterRoleBindingApplyConfiguration) WithLabels(entries map[string]string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -186,11 +186,11 @@ func (b *ClusterRoleBindingApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterRoleBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -198,13 +198,13 @@ func (b *ClusterRoleBindingApplyConfiguration) WithAnnotations(entries map[strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterRoleBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterRoleBindingApplyConfiguration { +func (b *ClusterRoleBindingApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -215,14 +215,14 @@ func (b *ClusterRoleBindingApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) *ClusterRoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -263,5 +263,5 @@ func (b *ClusterRoleBindingApplyConfiguration) WithRoleRef(value corev1.ObjectRe // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterRoleBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/authorization/applyconfigurations/authorization/v1/grouprestriction.go b/authorization/applyconfigurations/authorization/v1/grouprestriction.go index d1e64430bb..3bb799f394 100644 --- a/authorization/applyconfigurations/authorization/v1/grouprestriction.go +++ b/authorization/applyconfigurations/authorization/v1/grouprestriction.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // GroupRestrictionApplyConfiguration represents a declarative configuration of the GroupRestriction type for use // with apply. type GroupRestrictionApplyConfiguration struct { - Groups []string `json:"groups,omitempty"` - Selectors []v1.LabelSelectorApplyConfiguration `json:"labels,omitempty"` + Groups []string `json:"groups,omitempty"` + Selectors []metav1.LabelSelectorApplyConfiguration `json:"labels,omitempty"` } // GroupRestrictionApplyConfiguration constructs a declarative configuration of the GroupRestriction type for use with @@ -32,7 +32,7 @@ func (b *GroupRestrictionApplyConfiguration) WithGroups(values ...string) *Group // WithSelectors adds the given value to the Selectors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Selectors field. -func (b *GroupRestrictionApplyConfiguration) WithSelectors(values ...*v1.LabelSelectorApplyConfiguration) *GroupRestrictionApplyConfiguration { +func (b *GroupRestrictionApplyConfiguration) WithSelectors(values ...*metav1.LabelSelectorApplyConfiguration) *GroupRestrictionApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSelectors") diff --git a/authorization/applyconfigurations/authorization/v1/role.go b/authorization/applyconfigurations/authorization/v1/role.go index 2e27798587..57f9f78144 100644 --- a/authorization/applyconfigurations/authorization/v1/role.go +++ b/authorization/applyconfigurations/authorization/v1/role.go @@ -3,20 +3,20 @@ package v1 import ( - apiauthorizationv1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" internal "github.com/openshift/client-go/authorization/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RoleApplyConfiguration represents a declarative configuration of the Role type for use // with apply. type RoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Rules []PolicyRuleApplyConfiguration `json:"rules,omitempty"` } // Role constructs a declarative configuration of the Role type for use with @@ -41,18 +41,18 @@ func Role(name, namespace string) *RoleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractRole(role *apiauthorizationv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { +func ExtractRole(role *authorizationv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { return extractRole(role, fieldManager, "") } // ExtractRoleStatus is the same as ExtractRole except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractRoleStatus(role *apiauthorizationv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { +func ExtractRoleStatus(role *authorizationv1.Role, fieldManager string) (*RoleApplyConfiguration, error) { return extractRole(role, fieldManager, "status") } -func extractRole(role *apiauthorizationv1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { +func extractRole(role *authorizationv1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) { b := &RoleApplyConfiguration{} err := managedfields.ExtractInto(role, internal.Parser().Type("com.github.openshift.api.authorization.v1.Role"), fieldManager, b, subresource) if err != nil { @@ -70,7 +70,7 @@ func extractRole(role *apiauthorizationv1.Role, fieldManager string, subresource // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RoleApplyConfiguration) WithKind(value string) *RoleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -78,7 +78,7 @@ func (b *RoleApplyConfiguration) WithKind(value string) *RoleApplyConfiguration // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RoleApplyConfiguration) WithAPIVersion(value string) *RoleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -87,7 +87,7 @@ func (b *RoleApplyConfiguration) WithAPIVersion(value string) *RoleApplyConfigur // If called multiple times, the Name field is set to the value of the last call. func (b *RoleApplyConfiguration) WithName(value string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -96,7 +96,7 @@ func (b *RoleApplyConfiguration) WithName(value string) *RoleApplyConfiguration // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RoleApplyConfiguration) WithGenerateName(value string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -105,7 +105,7 @@ func (b *RoleApplyConfiguration) WithGenerateName(value string) *RoleApplyConfig // If called multiple times, the Namespace field is set to the value of the last call. func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -114,7 +114,7 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura // If called multiple times, the UID field is set to the value of the last call. func (b *RoleApplyConfiguration) WithUID(value types.UID) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -123,7 +123,7 @@ func (b *RoleApplyConfiguration) WithUID(value types.UID) *RoleApplyConfiguratio // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RoleApplyConfiguration) WithResourceVersion(value string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -132,25 +132,25 @@ func (b *RoleApplyConfiguration) WithResourceVersion(value string) *RoleApplyCon // If called multiple times, the Generation field is set to the value of the last call. func (b *RoleApplyConfiguration) WithGeneration(value int64) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RoleApplyConfiguration { +func (b *RoleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RoleApplyConfiguration { +func (b *RoleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -159,7 +159,7 @@ func (b *RoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RoleA // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -169,11 +169,11 @@ func (b *RoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *Ro // overwriting an existing map entries in Labels field with the same key. func (b *RoleApplyConfiguration) WithLabels(entries map[string]string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -184,11 +184,11 @@ func (b *RoleApplyConfiguration) WithLabels(entries map[string]string) *RoleAppl // overwriting an existing map entries in Annotations field with the same key. func (b *RoleApplyConfiguration) WithAnnotations(entries map[string]string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -196,13 +196,13 @@ func (b *RoleApplyConfiguration) WithAnnotations(entries map[string]string) *Rol // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RoleApplyConfiguration { +func (b *RoleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -213,14 +213,14 @@ func (b *RoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenc func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -240,5 +240,5 @@ func (b *RoleApplyConfiguration) WithRules(values ...*PolicyRuleApplyConfigurati // GetName retrieves the value of the Name field in the declarative configuration. func (b *RoleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/authorization/applyconfigurations/authorization/v1/rolebinding.go b/authorization/applyconfigurations/authorization/v1/rolebinding.go index 6a99968c7f..adc5ec78b9 100644 --- a/authorization/applyconfigurations/authorization/v1/rolebinding.go +++ b/authorization/applyconfigurations/authorization/v1/rolebinding.go @@ -6,21 +6,21 @@ import ( authorizationv1 "github.com/openshift/api/authorization/v1" internal "github.com/openshift/client-go/authorization/applyconfigurations/internal" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RoleBindingApplyConfiguration represents a declarative configuration of the RoleBinding type for use // with apply. type RoleBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - UserNames *authorizationv1.OptionalNames `json:"userNames,omitempty"` - GroupNames *authorizationv1.OptionalNames `json:"groupNames,omitempty"` - Subjects []corev1.ObjectReference `json:"subjects,omitempty"` - RoleRef *corev1.ObjectReference `json:"roleRef,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + UserNames *authorizationv1.OptionalNames `json:"userNames,omitempty"` + GroupNames *authorizationv1.OptionalNames `json:"groupNames,omitempty"` + Subjects []corev1.ObjectReference `json:"subjects,omitempty"` + RoleRef *corev1.ObjectReference `json:"roleRef,omitempty"` } // RoleBinding constructs a declarative configuration of the RoleBinding type for use with @@ -74,7 +74,7 @@ func extractRoleBinding(roleBinding *authorizationv1.RoleBinding, fieldManager s // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithKind(value string) *RoleBindingApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -82,7 +82,7 @@ func (b *RoleBindingApplyConfiguration) WithKind(value string) *RoleBindingApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithAPIVersion(value string) *RoleBindingApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -91,7 +91,7 @@ func (b *RoleBindingApplyConfiguration) WithAPIVersion(value string) *RoleBindin // If called multiple times, the Name field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithName(value string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -100,7 +100,7 @@ func (b *RoleBindingApplyConfiguration) WithName(value string) *RoleBindingApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithGenerateName(value string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -109,7 +109,7 @@ func (b *RoleBindingApplyConfiguration) WithGenerateName(value string) *RoleBind // If called multiple times, the Namespace field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -118,7 +118,7 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding // If called multiple times, the UID field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithUID(value types.UID) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -127,7 +127,7 @@ func (b *RoleBindingApplyConfiguration) WithUID(value types.UID) *RoleBindingApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithResourceVersion(value string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -136,25 +136,25 @@ func (b *RoleBindingApplyConfiguration) WithResourceVersion(value string) *RoleB // If called multiple times, the Generation field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithGeneration(value int64) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RoleBindingApplyConfiguration { +func (b *RoleBindingApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RoleBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RoleBindingApplyConfiguration { +func (b *RoleBindingApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -163,7 +163,7 @@ func (b *RoleBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RoleBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -173,11 +173,11 @@ func (b *RoleBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *RoleBindingApplyConfiguration) WithLabels(entries map[string]string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -188,11 +188,11 @@ func (b *RoleBindingApplyConfiguration) WithLabels(entries map[string]string) *R // overwriting an existing map entries in Annotations field with the same key. func (b *RoleBindingApplyConfiguration) WithAnnotations(entries map[string]string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -200,13 +200,13 @@ func (b *RoleBindingApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RoleBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RoleBindingApplyConfiguration { +func (b *RoleBindingApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -217,14 +217,14 @@ func (b *RoleBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -265,5 +265,5 @@ func (b *RoleBindingApplyConfiguration) WithRoleRef(value corev1.ObjectReference // GetName retrieves the value of the Name field in the declarative configuration. func (b *RoleBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/authorization/applyconfigurations/authorization/v1/rolebindingrestriction.go b/authorization/applyconfigurations/authorization/v1/rolebindingrestriction.go index 4979187258..0fbec3a153 100644 --- a/authorization/applyconfigurations/authorization/v1/rolebindingrestriction.go +++ b/authorization/applyconfigurations/authorization/v1/rolebindingrestriction.go @@ -3,20 +3,20 @@ package v1 import ( - apiauthorizationv1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" internal "github.com/openshift/client-go/authorization/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RoleBindingRestrictionApplyConfiguration represents a declarative configuration of the RoleBindingRestriction type for use // with apply. type RoleBindingRestrictionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *RoleBindingRestrictionSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *RoleBindingRestrictionSpecApplyConfiguration `json:"spec,omitempty"` } // RoleBindingRestriction constructs a declarative configuration of the RoleBindingRestriction type for use with @@ -41,18 +41,18 @@ func RoleBindingRestriction(name, namespace string) *RoleBindingRestrictionApply // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractRoleBindingRestriction(roleBindingRestriction *apiauthorizationv1.RoleBindingRestriction, fieldManager string) (*RoleBindingRestrictionApplyConfiguration, error) { +func ExtractRoleBindingRestriction(roleBindingRestriction *authorizationv1.RoleBindingRestriction, fieldManager string) (*RoleBindingRestrictionApplyConfiguration, error) { return extractRoleBindingRestriction(roleBindingRestriction, fieldManager, "") } // ExtractRoleBindingRestrictionStatus is the same as ExtractRoleBindingRestriction except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractRoleBindingRestrictionStatus(roleBindingRestriction *apiauthorizationv1.RoleBindingRestriction, fieldManager string) (*RoleBindingRestrictionApplyConfiguration, error) { +func ExtractRoleBindingRestrictionStatus(roleBindingRestriction *authorizationv1.RoleBindingRestriction, fieldManager string) (*RoleBindingRestrictionApplyConfiguration, error) { return extractRoleBindingRestriction(roleBindingRestriction, fieldManager, "status") } -func extractRoleBindingRestriction(roleBindingRestriction *apiauthorizationv1.RoleBindingRestriction, fieldManager string, subresource string) (*RoleBindingRestrictionApplyConfiguration, error) { +func extractRoleBindingRestriction(roleBindingRestriction *authorizationv1.RoleBindingRestriction, fieldManager string, subresource string) (*RoleBindingRestrictionApplyConfiguration, error) { b := &RoleBindingRestrictionApplyConfiguration{} err := managedfields.ExtractInto(roleBindingRestriction, internal.Parser().Type("com.github.openshift.api.authorization.v1.RoleBindingRestriction"), fieldManager, b, subresource) if err != nil { @@ -70,7 +70,7 @@ func extractRoleBindingRestriction(roleBindingRestriction *apiauthorizationv1.Ro // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithKind(value string) *RoleBindingRestrictionApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -78,7 +78,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithKind(value string) *RoleB // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithAPIVersion(value string) *RoleBindingRestrictionApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -87,7 +87,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithAPIVersion(value string) // If called multiple times, the Name field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithName(value string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -96,7 +96,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithName(value string) *RoleB // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithGenerateName(value string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -105,7 +105,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithGenerateName(value string // If called multiple times, the Namespace field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithNamespace(value string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -114,7 +114,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithNamespace(value string) * // If called multiple times, the UID field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithUID(value types.UID) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -123,7 +123,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithUID(value types.UID) *Rol // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithResourceVersion(value string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -132,25 +132,25 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithResourceVersion(value str // If called multiple times, the Generation field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithGeneration(value int64) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RoleBindingRestrictionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RoleBindingRestrictionApplyConfiguration { +func (b *RoleBindingRestrictionApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RoleBindingRestrictionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RoleBindingRestrictionApplyConfiguration { +func (b *RoleBindingRestrictionApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -159,7 +159,7 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithDeletionTimestamp(value m // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RoleBindingRestrictionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -169,11 +169,11 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithDeletionGracePeriodSecond // overwriting an existing map entries in Labels field with the same key. func (b *RoleBindingRestrictionApplyConfiguration) WithLabels(entries map[string]string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -184,11 +184,11 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithLabels(entries map[string // overwriting an existing map entries in Annotations field with the same key. func (b *RoleBindingRestrictionApplyConfiguration) WithAnnotations(entries map[string]string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -196,13 +196,13 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithAnnotations(entries map[s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RoleBindingRestrictionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RoleBindingRestrictionApplyConfiguration { +func (b *RoleBindingRestrictionApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -213,14 +213,14 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithOwnerReferences(values .. func (b *RoleBindingRestrictionApplyConfiguration) WithFinalizers(values ...string) *RoleBindingRestrictionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RoleBindingRestrictionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -235,5 +235,5 @@ func (b *RoleBindingRestrictionApplyConfiguration) WithSpec(value *RoleBindingRe // GetName retrieves the value of the Name field in the declarative configuration. func (b *RoleBindingRestrictionApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/authorization/applyconfigurations/authorization/v1/userrestriction.go b/authorization/applyconfigurations/authorization/v1/userrestriction.go index 5796a10ffb..dc931b60ed 100644 --- a/authorization/applyconfigurations/authorization/v1/userrestriction.go +++ b/authorization/applyconfigurations/authorization/v1/userrestriction.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // UserRestrictionApplyConfiguration represents a declarative configuration of the UserRestriction type for use // with apply. type UserRestrictionApplyConfiguration struct { - Users []string `json:"users,omitempty"` - Groups []string `json:"groups,omitempty"` - Selectors []v1.LabelSelectorApplyConfiguration `json:"labels,omitempty"` + Users []string `json:"users,omitempty"` + Groups []string `json:"groups,omitempty"` + Selectors []metav1.LabelSelectorApplyConfiguration `json:"labels,omitempty"` } // UserRestrictionApplyConfiguration constructs a declarative configuration of the UserRestriction type for use with @@ -43,7 +43,7 @@ func (b *UserRestrictionApplyConfiguration) WithGroups(values ...string) *UserRe // WithSelectors adds the given value to the Selectors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Selectors field. -func (b *UserRestrictionApplyConfiguration) WithSelectors(values ...*v1.LabelSelectorApplyConfiguration) *UserRestrictionApplyConfiguration { +func (b *UserRestrictionApplyConfiguration) WithSelectors(values ...*metav1.LabelSelectorApplyConfiguration) *UserRestrictionApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSelectors") diff --git a/authorization/applyconfigurations/internal/internal.go b/authorization/applyconfigurations/internal/internal.go index 2db4a678b7..22313b3cf5 100644 --- a/authorization/applyconfigurations/internal/internal.go +++ b/authorization/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/authorization/clientset/versioned/clientset.go b/authorization/clientset/versioned/clientset.go index 9ca9f950bb..795638be4f 100644 --- a/authorization/clientset/versioned/clientset.go +++ b/authorization/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" discovery "k8s.io/client-go/discovery" diff --git a/authorization/clientset/versioned/typed/authorization/v1/authorization_client.go b/authorization/clientset/versioned/typed/authorization/v1/authorization_client.go index fa27642faa..a91d6f7252 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/authorization_client.go +++ b/authorization/clientset/versioned/typed/authorization/v1/authorization_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/authorization/v1" - "github.com/openshift/client-go/authorization/clientset/versioned/scheme" + authorizationv1 "github.com/openshift/api/authorization/v1" + scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -119,10 +119,10 @@ func New(c rest.Interface) *AuthorizationV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := authorizationv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/authorization/clientset/versioned/typed/authorization/v1/clusterrole.go b/authorization/clientset/versioned/typed/authorization/v1/clusterrole.go index 15fdc640fa..f863b1242d 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/clusterrole.go +++ b/authorization/clientset/versioned/typed/authorization/v1/clusterrole.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" - authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" + applyconfigurationsauthorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ClusterRolesGetter interface { // ClusterRoleInterface has methods to work with ClusterRole resources. type ClusterRoleInterface interface { - Create(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.CreateOptions) (*v1.ClusterRole, error) - Update(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.UpdateOptions) (*v1.ClusterRole, error) + Create(ctx context.Context, clusterRole *authorizationv1.ClusterRole, opts metav1.CreateOptions) (*authorizationv1.ClusterRole, error) + Update(ctx context.Context, clusterRole *authorizationv1.ClusterRole, opts metav1.UpdateOptions) (*authorizationv1.ClusterRole, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterRole, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterRoleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*authorizationv1.ClusterRole, error) + List(ctx context.Context, opts metav1.ListOptions) (*authorizationv1.ClusterRoleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) - Apply(ctx context.Context, clusterRole *authorizationv1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterRole, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *authorizationv1.ClusterRole, err error) + Apply(ctx context.Context, clusterRole *applyconfigurationsauthorizationv1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *authorizationv1.ClusterRole, err error) ClusterRoleExpansion } // clusterRoles implements ClusterRoleInterface type clusterRoles struct { - *gentype.ClientWithListAndApply[*v1.ClusterRole, *v1.ClusterRoleList, *authorizationv1.ClusterRoleApplyConfiguration] + *gentype.ClientWithListAndApply[*authorizationv1.ClusterRole, *authorizationv1.ClusterRoleList, *applyconfigurationsauthorizationv1.ClusterRoleApplyConfiguration] } // newClusterRoles returns a ClusterRoles func newClusterRoles(c *AuthorizationV1Client) *clusterRoles { return &clusterRoles{ - gentype.NewClientWithListAndApply[*v1.ClusterRole, *v1.ClusterRoleList, *authorizationv1.ClusterRoleApplyConfiguration]( + gentype.NewClientWithListAndApply[*authorizationv1.ClusterRole, *authorizationv1.ClusterRoleList, *applyconfigurationsauthorizationv1.ClusterRoleApplyConfiguration]( "clusterroles", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterRole { return &v1.ClusterRole{} }, - func() *v1.ClusterRoleList { return &v1.ClusterRoleList{} }), + func() *authorizationv1.ClusterRole { return &authorizationv1.ClusterRole{} }, + func() *authorizationv1.ClusterRoleList { return &authorizationv1.ClusterRoleList{} }, + ), } } diff --git a/authorization/clientset/versioned/typed/authorization/v1/clusterrolebinding.go b/authorization/clientset/versioned/typed/authorization/v1/clusterrolebinding.go index 0664645168..773c28745c 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/clusterrolebinding.go +++ b/authorization/clientset/versioned/typed/authorization/v1/clusterrolebinding.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" - authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" + applyconfigurationsauthorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ClusterRoleBindingsGetter interface { // ClusterRoleBindingInterface has methods to work with ClusterRoleBinding resources. type ClusterRoleBindingInterface interface { - Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.CreateOptions) (*v1.ClusterRoleBinding, error) - Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.UpdateOptions) (*v1.ClusterRoleBinding, error) + Create(ctx context.Context, clusterRoleBinding *authorizationv1.ClusterRoleBinding, opts metav1.CreateOptions) (*authorizationv1.ClusterRoleBinding, error) + Update(ctx context.Context, clusterRoleBinding *authorizationv1.ClusterRoleBinding, opts metav1.UpdateOptions) (*authorizationv1.ClusterRoleBinding, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterRoleBinding, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*authorizationv1.ClusterRoleBinding, error) + List(ctx context.Context, opts metav1.ListOptions) (*authorizationv1.ClusterRoleBindingList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) - Apply(ctx context.Context, clusterRoleBinding *authorizationv1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterRoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *authorizationv1.ClusterRoleBinding, err error) + Apply(ctx context.Context, clusterRoleBinding *applyconfigurationsauthorizationv1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *authorizationv1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } // clusterRoleBindings implements ClusterRoleBindingInterface type clusterRoleBindings struct { - *gentype.ClientWithListAndApply[*v1.ClusterRoleBinding, *v1.ClusterRoleBindingList, *authorizationv1.ClusterRoleBindingApplyConfiguration] + *gentype.ClientWithListAndApply[*authorizationv1.ClusterRoleBinding, *authorizationv1.ClusterRoleBindingList, *applyconfigurationsauthorizationv1.ClusterRoleBindingApplyConfiguration] } // newClusterRoleBindings returns a ClusterRoleBindings func newClusterRoleBindings(c *AuthorizationV1Client) *clusterRoleBindings { return &clusterRoleBindings{ - gentype.NewClientWithListAndApply[*v1.ClusterRoleBinding, *v1.ClusterRoleBindingList, *authorizationv1.ClusterRoleBindingApplyConfiguration]( + gentype.NewClientWithListAndApply[*authorizationv1.ClusterRoleBinding, *authorizationv1.ClusterRoleBindingList, *applyconfigurationsauthorizationv1.ClusterRoleBindingApplyConfiguration]( "clusterrolebindings", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterRoleBinding { return &v1.ClusterRoleBinding{} }, - func() *v1.ClusterRoleBindingList { return &v1.ClusterRoleBindingList{} }), + func() *authorizationv1.ClusterRoleBinding { return &authorizationv1.ClusterRoleBinding{} }, + func() *authorizationv1.ClusterRoleBindingList { return &authorizationv1.ClusterRoleBindingList{} }, + ), } } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_authorization_client.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_authorization_client.go index 28402c4534..df76413f82 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_authorization_client.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_authorization_client.go @@ -13,47 +13,47 @@ type FakeAuthorizationV1 struct { } func (c *FakeAuthorizationV1) ClusterRoles() v1.ClusterRoleInterface { - return &FakeClusterRoles{c} + return newFakeClusterRoles(c) } func (c *FakeAuthorizationV1) ClusterRoleBindings() v1.ClusterRoleBindingInterface { - return &FakeClusterRoleBindings{c} + return newFakeClusterRoleBindings(c) } func (c *FakeAuthorizationV1) LocalResourceAccessReviews(namespace string) v1.LocalResourceAccessReviewInterface { - return &FakeLocalResourceAccessReviews{c, namespace} + return newFakeLocalResourceAccessReviews(c, namespace) } func (c *FakeAuthorizationV1) LocalSubjectAccessReviews(namespace string) v1.LocalSubjectAccessReviewInterface { - return &FakeLocalSubjectAccessReviews{c, namespace} + return newFakeLocalSubjectAccessReviews(c, namespace) } func (c *FakeAuthorizationV1) ResourceAccessReviews() v1.ResourceAccessReviewInterface { - return &FakeResourceAccessReviews{c} + return newFakeResourceAccessReviews(c) } func (c *FakeAuthorizationV1) Roles(namespace string) v1.RoleInterface { - return &FakeRoles{c, namespace} + return newFakeRoles(c, namespace) } func (c *FakeAuthorizationV1) RoleBindings(namespace string) v1.RoleBindingInterface { - return &FakeRoleBindings{c, namespace} + return newFakeRoleBindings(c, namespace) } func (c *FakeAuthorizationV1) RoleBindingRestrictions(namespace string) v1.RoleBindingRestrictionInterface { - return &FakeRoleBindingRestrictions{c, namespace} + return newFakeRoleBindingRestrictions(c, namespace) } func (c *FakeAuthorizationV1) SelfSubjectRulesReviews(namespace string) v1.SelfSubjectRulesReviewInterface { - return &FakeSelfSubjectRulesReviews{c, namespace} + return newFakeSelfSubjectRulesReviews(c, namespace) } func (c *FakeAuthorizationV1) SubjectAccessReviews() v1.SubjectAccessReviewInterface { - return &FakeSubjectAccessReviews{c} + return newFakeSubjectAccessReviews(c) } func (c *FakeAuthorizationV1) SubjectRulesReviews(namespace string) v1.SubjectRulesReviewInterface { - return &FakeSubjectRulesReviews{c, namespace} + return newFakeSubjectRulesReviews(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrole.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrole.go index f20f603228..de34657d65 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrole.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrole.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/authorization/v1" authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedauthorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterRoles implements ClusterRoleInterface -type FakeClusterRoles struct { +// fakeClusterRoles implements ClusterRoleInterface +type fakeClusterRoles struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterRole, *v1.ClusterRoleList, *authorizationv1.ClusterRoleApplyConfiguration] Fake *FakeAuthorizationV1 } -var clusterrolesResource = v1.SchemeGroupVersion.WithResource("clusterroles") - -var clusterrolesKind = v1.SchemeGroupVersion.WithKind("ClusterRole") - -// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *FakeClusterRoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRole, err error) { - emptyResult := &v1.ClusterRole{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusterrolesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRole), err -} - -// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *FakeClusterRoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) { - emptyResult := &v1.ClusterRoleList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusterrolesResource, clusterrolesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterRoleList{ListMeta: obj.(*v1.ClusterRoleList).ListMeta} - for _, item := range obj.(*v1.ClusterRoleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *FakeClusterRoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusterrolesResource, opts)) -} - -// 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 *FakeClusterRoles) Create(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.CreateOptions) (result *v1.ClusterRole, err error) { - emptyResult := &v1.ClusterRole{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusterrolesResource, clusterRole, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRole), err -} - -// 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 *FakeClusterRoles) Update(ctx context.Context, clusterRole *v1.ClusterRole, opts metav1.UpdateOptions) (result *v1.ClusterRole, err error) { - emptyResult := &v1.ClusterRole{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusterrolesResource, clusterRole, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRole), err -} - -// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusterrolesResource, name, opts), &v1.ClusterRole{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusterrolesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterRoleList{}) - return err -} - -// Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRole, err error) { - emptyResult := &v1.ClusterRole{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterrolesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRole), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRole. -func (c *FakeClusterRoles) Apply(ctx context.Context, clusterRole *authorizationv1.ClusterRoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterRole, err error) { - if clusterRole == nil { - return nil, fmt.Errorf("clusterRole provided to Apply must not be nil") - } - data, err := json.Marshal(clusterRole) - if err != nil { - return nil, err - } - name := clusterRole.Name - if name == nil { - return nil, fmt.Errorf("clusterRole.Name must be provided to Apply") - } - emptyResult := &v1.ClusterRole{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterrolesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterRoles(fake *FakeAuthorizationV1) typedauthorizationv1.ClusterRoleInterface { + return &fakeClusterRoles{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterRole, *v1.ClusterRoleList, *authorizationv1.ClusterRoleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clusterroles"), + v1.SchemeGroupVersion.WithKind("ClusterRole"), + func() *v1.ClusterRole { return &v1.ClusterRole{} }, + func() *v1.ClusterRoleList { return &v1.ClusterRoleList{} }, + func(dst, src *v1.ClusterRoleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterRoleList) []*v1.ClusterRole { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ClusterRoleList, items []*v1.ClusterRole) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.ClusterRole), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrolebinding.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrolebinding.go index fdb11d6281..92346e5473 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrolebinding.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_clusterrolebinding.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/authorization/v1" authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedauthorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterRoleBindings implements ClusterRoleBindingInterface -type FakeClusterRoleBindings struct { +// fakeClusterRoleBindings implements ClusterRoleBindingInterface +type fakeClusterRoleBindings struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterRoleBinding, *v1.ClusterRoleBindingList, *authorizationv1.ClusterRoleBindingApplyConfiguration] Fake *FakeAuthorizationV1 } -var clusterrolebindingsResource = v1.SchemeGroupVersion.WithResource("clusterrolebindings") - -var clusterrolebindingsKind = v1.SchemeGroupVersion.WithKind("ClusterRoleBinding") - -// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *FakeClusterRoleBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterRoleBinding, err error) { - emptyResult := &v1.ClusterRoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusterrolebindingsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRoleBinding), err -} - -// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *FakeClusterRoleBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { - emptyResult := &v1.ClusterRoleBindingList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusterrolebindingsResource, clusterrolebindingsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterRoleBindingList{ListMeta: obj.(*v1.ClusterRoleBindingList).ListMeta} - for _, item := range obj.(*v1.ClusterRoleBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *FakeClusterRoleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusterrolebindingsResource, opts)) -} - -// 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 *FakeClusterRoleBindings) Create(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.CreateOptions) (result *v1.ClusterRoleBinding, err error) { - emptyResult := &v1.ClusterRoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusterrolebindingsResource, clusterRoleBinding, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRoleBinding), err -} - -// 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 *FakeClusterRoleBindings) Update(ctx context.Context, clusterRoleBinding *v1.ClusterRoleBinding, opts metav1.UpdateOptions) (result *v1.ClusterRoleBinding, err error) { - emptyResult := &v1.ClusterRoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusterrolebindingsResource, clusterRoleBinding, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRoleBinding), err -} - -// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *FakeClusterRoleBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusterrolebindingsResource, name, opts), &v1.ClusterRoleBinding{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterRoleBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusterrolebindingsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterRoleBindingList{}) - return err -} - -// Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterRoleBinding, err error) { - emptyResult := &v1.ClusterRoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterrolebindingsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterRoleBinding), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterRoleBinding. -func (c *FakeClusterRoleBindings) Apply(ctx context.Context, clusterRoleBinding *authorizationv1.ClusterRoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterRoleBinding, err error) { - if clusterRoleBinding == nil { - return nil, fmt.Errorf("clusterRoleBinding provided to Apply must not be nil") - } - data, err := json.Marshal(clusterRoleBinding) - if err != nil { - return nil, err - } - name := clusterRoleBinding.Name - if name == nil { - return nil, fmt.Errorf("clusterRoleBinding.Name must be provided to Apply") - } - emptyResult := &v1.ClusterRoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterrolebindingsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterRoleBindings(fake *FakeAuthorizationV1) typedauthorizationv1.ClusterRoleBindingInterface { + return &fakeClusterRoleBindings{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterRoleBinding, *v1.ClusterRoleBindingList, *authorizationv1.ClusterRoleBindingApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clusterrolebindings"), + v1.SchemeGroupVersion.WithKind("ClusterRoleBinding"), + func() *v1.ClusterRoleBinding { return &v1.ClusterRoleBinding{} }, + func() *v1.ClusterRoleBindingList { return &v1.ClusterRoleBindingList{} }, + func(dst, src *v1.ClusterRoleBindingList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterRoleBindingList) []*v1.ClusterRoleBinding { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ClusterRoleBindingList, items []*v1.ClusterRoleBinding) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ClusterRoleBinding), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localresourceaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localresourceaccessreview.go index 564d8ee626..ee442655f4 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localresourceaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localresourceaccessreview.go @@ -3,28 +3,39 @@ package fake import ( - "context" + context "context" v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeLocalResourceAccessReviews implements LocalResourceAccessReviewInterface -type FakeLocalResourceAccessReviews struct { +// fakeLocalResourceAccessReviews implements LocalResourceAccessReviewInterface +type fakeLocalResourceAccessReviews struct { + *gentype.FakeClient[*v1.LocalResourceAccessReview] Fake *FakeAuthorizationV1 - ns string } -var localresourceaccessreviewsResource = v1.SchemeGroupVersion.WithResource("localresourceaccessreviews") - -var localresourceaccessreviewsKind = v1.SchemeGroupVersion.WithKind("LocalResourceAccessReview") +func newFakeLocalResourceAccessReviews(fake *FakeAuthorizationV1, namespace string) authorizationv1.LocalResourceAccessReviewInterface { + return &fakeLocalResourceAccessReviews{ + gentype.NewFakeClient[*v1.LocalResourceAccessReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("localresourceaccessreviews"), + v1.SchemeGroupVersion.WithKind("LocalResourceAccessReview"), + func() *v1.LocalResourceAccessReview { return &v1.LocalResourceAccessReview{} }, + ), + fake, + } +} // Create takes the representation of a localResourceAccessReview and creates it. Returns the server's representation of the resourceAccessReviewResponse, and an error, if there is any. -func (c *FakeLocalResourceAccessReviews) Create(ctx context.Context, localResourceAccessReview *v1.LocalResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) { +func (c *fakeLocalResourceAccessReviews) Create(ctx context.Context, localResourceAccessReview *v1.LocalResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) { emptyResult := &v1.ResourceAccessReviewResponse{} obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(localresourceaccessreviewsResource, c.ns, localResourceAccessReview, opts), emptyResult) + Invokes(testing.NewCreateActionWithOptions(c.Resource(), c.Namespace(), localResourceAccessReview, opts), emptyResult) if obj == nil { return emptyResult, err diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localsubjectaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localsubjectaccessreview.go index d6f0ccbd63..62b0d73829 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localsubjectaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_localsubjectaccessreview.go @@ -3,28 +3,39 @@ package fake import ( - "context" + context "context" v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface -type FakeLocalSubjectAccessReviews struct { +// fakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface +type fakeLocalSubjectAccessReviews struct { + *gentype.FakeClient[*v1.LocalSubjectAccessReview] Fake *FakeAuthorizationV1 - ns string } -var localsubjectaccessreviewsResource = v1.SchemeGroupVersion.WithResource("localsubjectaccessreviews") - -var localsubjectaccessreviewsKind = v1.SchemeGroupVersion.WithKind("LocalSubjectAccessReview") +func newFakeLocalSubjectAccessReviews(fake *FakeAuthorizationV1, namespace string) authorizationv1.LocalSubjectAccessReviewInterface { + return &fakeLocalSubjectAccessReviews{ + gentype.NewFakeClient[*v1.LocalSubjectAccessReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("localsubjectaccessreviews"), + v1.SchemeGroupVersion.WithKind("LocalSubjectAccessReview"), + func() *v1.LocalSubjectAccessReview { return &v1.LocalSubjectAccessReview{} }, + ), + fake, + } +} // Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the subjectAccessReviewResponse, and an error, if there is any. -func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReviewResponse, err error) { +func (c *fakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReviewResponse, err error) { emptyResult := &v1.SubjectAccessReviewResponse{} obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview, opts), emptyResult) + Invokes(testing.NewCreateActionWithOptions(c.Resource(), c.Namespace(), localSubjectAccessReview, opts), emptyResult) if obj == nil { return emptyResult, err diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_resourceaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_resourceaccessreview.go index 5b6836a1fc..e34368a235 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_resourceaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_resourceaccessreview.go @@ -3,27 +3,39 @@ package fake import ( - "context" + context "context" v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeResourceAccessReviews implements ResourceAccessReviewInterface -type FakeResourceAccessReviews struct { +// fakeResourceAccessReviews implements ResourceAccessReviewInterface +type fakeResourceAccessReviews struct { + *gentype.FakeClient[*v1.ResourceAccessReview] Fake *FakeAuthorizationV1 } -var resourceaccessreviewsResource = v1.SchemeGroupVersion.WithResource("resourceaccessreviews") - -var resourceaccessreviewsKind = v1.SchemeGroupVersion.WithKind("ResourceAccessReview") +func newFakeResourceAccessReviews(fake *FakeAuthorizationV1) authorizationv1.ResourceAccessReviewInterface { + return &fakeResourceAccessReviews{ + gentype.NewFakeClient[*v1.ResourceAccessReview]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("resourceaccessreviews"), + v1.SchemeGroupVersion.WithKind("ResourceAccessReview"), + func() *v1.ResourceAccessReview { return &v1.ResourceAccessReview{} }, + ), + fake, + } +} // Create takes the representation of a resourceAccessReview and creates it. Returns the server's representation of the resourceAccessReviewResponse, and an error, if there is any. -func (c *FakeResourceAccessReviews) Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) { +func (c *fakeResourceAccessReviews) Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) { emptyResult := &v1.ResourceAccessReviewResponse{} obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(resourceaccessreviewsResource, resourceAccessReview, opts), emptyResult) + Invokes(testing.NewRootCreateActionWithOptions(c.Resource(), resourceAccessReview, opts), emptyResult) if obj == nil { return emptyResult, err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_role.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_role.go index 313f384273..7e534f6bd9 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_role.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_role.go @@ -3,142 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/authorization/v1" authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedauthorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeRoles implements RoleInterface -type FakeRoles struct { +// fakeRoles implements RoleInterface +type fakeRoles struct { + *gentype.FakeClientWithListAndApply[*v1.Role, *v1.RoleList, *authorizationv1.RoleApplyConfiguration] Fake *FakeAuthorizationV1 - ns string -} - -var rolesResource = v1.SchemeGroupVersion.WithResource("roles") - -var rolesKind = v1.SchemeGroupVersion.WithKind("Role") - -// Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *FakeRoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Role, err error) { - emptyResult := &v1.Role{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(rolesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Role), err -} - -// List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *FakeRoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleList, err error) { - emptyResult := &v1.RoleList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(rolesResource, rolesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.RoleList{ListMeta: obj.(*v1.RoleList).ListMeta} - for _, item := range obj.(*v1.RoleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested roles. -func (c *FakeRoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(rolesResource, c.ns, opts)) - } -// 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 *FakeRoles) Create(ctx context.Context, role *v1.Role, opts metav1.CreateOptions) (result *v1.Role, err error) { - emptyResult := &v1.Role{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(rolesResource, c.ns, role, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Role), err -} - -// 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 *FakeRoles) Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOptions) (result *v1.Role, err error) { - emptyResult := &v1.Role{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(rolesResource, c.ns, role, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Role), err -} - -// Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *FakeRoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(rolesResource, c.ns, name, opts), &v1.Role{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(rolesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.RoleList{}) - return err -} - -// Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) { - emptyResult := &v1.Role{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rolesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Role), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied role. -func (c *FakeRoles) Apply(ctx context.Context, role *authorizationv1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Role, err error) { - if role == nil { - return nil, fmt.Errorf("role provided to Apply must not be nil") - } - data, err := json.Marshal(role) - if err != nil { - return nil, err - } - name := role.Name - if name == nil { - return nil, fmt.Errorf("role.Name must be provided to Apply") - } - emptyResult := &v1.Role{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rolesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeRoles(fake *FakeAuthorizationV1, namespace string) typedauthorizationv1.RoleInterface { + return &fakeRoles{ + gentype.NewFakeClientWithListAndApply[*v1.Role, *v1.RoleList, *authorizationv1.RoleApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("roles"), + v1.SchemeGroupVersion.WithKind("Role"), + func() *v1.Role { return &v1.Role{} }, + func() *v1.RoleList { return &v1.RoleList{} }, + func(dst, src *v1.RoleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.RoleList) []*v1.Role { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.RoleList, items []*v1.Role) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Role), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebinding.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebinding.go index 49e4496962..f8226b7e44 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebinding.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebinding.go @@ -3,142 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/authorization/v1" authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedauthorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeRoleBindings implements RoleBindingInterface -type FakeRoleBindings struct { +// fakeRoleBindings implements RoleBindingInterface +type fakeRoleBindings struct { + *gentype.FakeClientWithListAndApply[*v1.RoleBinding, *v1.RoleBindingList, *authorizationv1.RoleBindingApplyConfiguration] Fake *FakeAuthorizationV1 - ns string -} - -var rolebindingsResource = v1.SchemeGroupVersion.WithResource("rolebindings") - -var rolebindingsKind = v1.SchemeGroupVersion.WithKind("RoleBinding") - -// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *FakeRoleBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RoleBinding, err error) { - emptyResult := &v1.RoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(rolebindingsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBinding), err -} - -// List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *FakeRoleBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleBindingList, err error) { - emptyResult := &v1.RoleBindingList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(rolebindingsResource, rolebindingsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.RoleBindingList{ListMeta: obj.(*v1.RoleBindingList).ListMeta} - for _, item := range obj.(*v1.RoleBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested roleBindings. -func (c *FakeRoleBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(rolebindingsResource, c.ns, opts)) - } -// 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 *FakeRoleBindings) Create(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.CreateOptions) (result *v1.RoleBinding, err error) { - emptyResult := &v1.RoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(rolebindingsResource, c.ns, roleBinding, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBinding), err -} - -// 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 *FakeRoleBindings) Update(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.UpdateOptions) (result *v1.RoleBinding, err error) { - emptyResult := &v1.RoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(rolebindingsResource, c.ns, roleBinding, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBinding), err -} - -// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *FakeRoleBindings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(rolebindingsResource, c.ns, name, opts), &v1.RoleBinding{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRoleBindings) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(rolebindingsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.RoleBindingList{}) - return err -} - -// Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) { - emptyResult := &v1.RoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rolebindingsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBinding), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied roleBinding. -func (c *FakeRoleBindings) Apply(ctx context.Context, roleBinding *authorizationv1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RoleBinding, err error) { - if roleBinding == nil { - return nil, fmt.Errorf("roleBinding provided to Apply must not be nil") - } - data, err := json.Marshal(roleBinding) - if err != nil { - return nil, err - } - name := roleBinding.Name - if name == nil { - return nil, fmt.Errorf("roleBinding.Name must be provided to Apply") - } - emptyResult := &v1.RoleBinding{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rolebindingsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeRoleBindings(fake *FakeAuthorizationV1, namespace string) typedauthorizationv1.RoleBindingInterface { + return &fakeRoleBindings{ + gentype.NewFakeClientWithListAndApply[*v1.RoleBinding, *v1.RoleBindingList, *authorizationv1.RoleBindingApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("rolebindings"), + v1.SchemeGroupVersion.WithKind("RoleBinding"), + func() *v1.RoleBinding { return &v1.RoleBinding{} }, + func() *v1.RoleBindingList { return &v1.RoleBindingList{} }, + func(dst, src *v1.RoleBindingList) { dst.ListMeta = src.ListMeta }, + func(list *v1.RoleBindingList) []*v1.RoleBinding { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.RoleBindingList, items []*v1.RoleBinding) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.RoleBinding), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebindingrestriction.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebindingrestriction.go index 7a40ce5bae..0530e76193 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebindingrestriction.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_rolebindingrestriction.go @@ -3,142 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/authorization/v1" authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedauthorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeRoleBindingRestrictions implements RoleBindingRestrictionInterface -type FakeRoleBindingRestrictions struct { +// fakeRoleBindingRestrictions implements RoleBindingRestrictionInterface +type fakeRoleBindingRestrictions struct { + *gentype.FakeClientWithListAndApply[*v1.RoleBindingRestriction, *v1.RoleBindingRestrictionList, *authorizationv1.RoleBindingRestrictionApplyConfiguration] Fake *FakeAuthorizationV1 - ns string -} - -var rolebindingrestrictionsResource = v1.SchemeGroupVersion.WithResource("rolebindingrestrictions") - -var rolebindingrestrictionsKind = v1.SchemeGroupVersion.WithKind("RoleBindingRestriction") - -// Get takes name of the roleBindingRestriction, and returns the corresponding roleBindingRestriction object, and an error if there is any. -func (c *FakeRoleBindingRestrictions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RoleBindingRestriction, err error) { - emptyResult := &v1.RoleBindingRestriction{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(rolebindingrestrictionsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBindingRestriction), err -} - -// List takes label and field selectors, and returns the list of RoleBindingRestrictions that match those selectors. -func (c *FakeRoleBindingRestrictions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RoleBindingRestrictionList, err error) { - emptyResult := &v1.RoleBindingRestrictionList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(rolebindingrestrictionsResource, rolebindingrestrictionsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.RoleBindingRestrictionList{ListMeta: obj.(*v1.RoleBindingRestrictionList).ListMeta} - for _, item := range obj.(*v1.RoleBindingRestrictionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested roleBindingRestrictions. -func (c *FakeRoleBindingRestrictions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(rolebindingrestrictionsResource, c.ns, opts)) - } -// Create takes the representation of a roleBindingRestriction and creates it. Returns the server's representation of the roleBindingRestriction, and an error, if there is any. -func (c *FakeRoleBindingRestrictions) Create(ctx context.Context, roleBindingRestriction *v1.RoleBindingRestriction, opts metav1.CreateOptions) (result *v1.RoleBindingRestriction, err error) { - emptyResult := &v1.RoleBindingRestriction{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(rolebindingrestrictionsResource, c.ns, roleBindingRestriction, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBindingRestriction), err -} - -// Update takes the representation of a roleBindingRestriction and updates it. Returns the server's representation of the roleBindingRestriction, and an error, if there is any. -func (c *FakeRoleBindingRestrictions) Update(ctx context.Context, roleBindingRestriction *v1.RoleBindingRestriction, opts metav1.UpdateOptions) (result *v1.RoleBindingRestriction, err error) { - emptyResult := &v1.RoleBindingRestriction{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(rolebindingrestrictionsResource, c.ns, roleBindingRestriction, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBindingRestriction), err -} - -// Delete takes name of the roleBindingRestriction and deletes it. Returns an error if one occurs. -func (c *FakeRoleBindingRestrictions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(rolebindingrestrictionsResource, c.ns, name, opts), &v1.RoleBindingRestriction{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRoleBindingRestrictions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(rolebindingrestrictionsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.RoleBindingRestrictionList{}) - return err -} - -// Patch applies the patch and returns the patched roleBindingRestriction. -func (c *FakeRoleBindingRestrictions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBindingRestriction, err error) { - emptyResult := &v1.RoleBindingRestriction{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rolebindingrestrictionsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RoleBindingRestriction), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied roleBindingRestriction. -func (c *FakeRoleBindingRestrictions) Apply(ctx context.Context, roleBindingRestriction *authorizationv1.RoleBindingRestrictionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RoleBindingRestriction, err error) { - if roleBindingRestriction == nil { - return nil, fmt.Errorf("roleBindingRestriction provided to Apply must not be nil") - } - data, err := json.Marshal(roleBindingRestriction) - if err != nil { - return nil, err - } - name := roleBindingRestriction.Name - if name == nil { - return nil, fmt.Errorf("roleBindingRestriction.Name must be provided to Apply") - } - emptyResult := &v1.RoleBindingRestriction{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rolebindingrestrictionsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeRoleBindingRestrictions(fake *FakeAuthorizationV1, namespace string) typedauthorizationv1.RoleBindingRestrictionInterface { + return &fakeRoleBindingRestrictions{ + gentype.NewFakeClientWithListAndApply[*v1.RoleBindingRestriction, *v1.RoleBindingRestrictionList, *authorizationv1.RoleBindingRestrictionApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("rolebindingrestrictions"), + v1.SchemeGroupVersion.WithKind("RoleBindingRestriction"), + func() *v1.RoleBindingRestriction { return &v1.RoleBindingRestriction{} }, + func() *v1.RoleBindingRestrictionList { return &v1.RoleBindingRestrictionList{} }, + func(dst, src *v1.RoleBindingRestrictionList) { dst.ListMeta = src.ListMeta }, + func(list *v1.RoleBindingRestrictionList) []*v1.RoleBindingRestriction { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.RoleBindingRestrictionList, items []*v1.RoleBindingRestriction) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.RoleBindingRestriction), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go index d8dad4a2b6..827eb749d2 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface -type FakeSelfSubjectRulesReviews struct { +// fakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface +type fakeSelfSubjectRulesReviews struct { + *gentype.FakeClient[*v1.SelfSubjectRulesReview] Fake *FakeAuthorizationV1 - ns string } -var selfsubjectrulesreviewsResource = v1.SchemeGroupVersion.WithResource("selfsubjectrulesreviews") - -var selfsubjectrulesreviewsKind = v1.SchemeGroupVersion.WithKind("SelfSubjectRulesReview") - -// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any. -func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) { - emptyResult := &v1.SelfSubjectRulesReview{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(selfsubjectrulesreviewsResource, c.ns, selfSubjectRulesReview, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeSelfSubjectRulesReviews(fake *FakeAuthorizationV1, namespace string) authorizationv1.SelfSubjectRulesReviewInterface { + return &fakeSelfSubjectRulesReviews{ + gentype.NewFakeClient[*v1.SelfSubjectRulesReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("selfsubjectrulesreviews"), + v1.SchemeGroupVersion.WithKind("SelfSubjectRulesReview"), + func() *v1.SelfSubjectRulesReview { return &v1.SelfSubjectRulesReview{} }, + ), + fake, } - return obj.(*v1.SelfSubjectRulesReview), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectaccessreview.go index fd35c3cf15..aca9c0750d 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectaccessreview.go @@ -3,27 +3,39 @@ package fake import ( - "context" + context "context" v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeSubjectAccessReviews implements SubjectAccessReviewInterface -type FakeSubjectAccessReviews struct { +// fakeSubjectAccessReviews implements SubjectAccessReviewInterface +type fakeSubjectAccessReviews struct { + *gentype.FakeClient[*v1.SubjectAccessReview] Fake *FakeAuthorizationV1 } -var subjectaccessreviewsResource = v1.SchemeGroupVersion.WithResource("subjectaccessreviews") - -var subjectaccessreviewsKind = v1.SchemeGroupVersion.WithKind("SubjectAccessReview") +func newFakeSubjectAccessReviews(fake *FakeAuthorizationV1) authorizationv1.SubjectAccessReviewInterface { + return &fakeSubjectAccessReviews{ + gentype.NewFakeClient[*v1.SubjectAccessReview]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("subjectaccessreviews"), + v1.SchemeGroupVersion.WithKind("SubjectAccessReview"), + func() *v1.SubjectAccessReview { return &v1.SubjectAccessReview{} }, + ), + fake, + } +} // Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReviewResponse, and an error, if there is any. -func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReviewResponse, err error) { +func (c *fakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReviewResponse, err error) { emptyResult := &v1.SubjectAccessReviewResponse{} obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(subjectaccessreviewsResource, subjectAccessReview, opts), emptyResult) + Invokes(testing.NewRootCreateActionWithOptions(c.Resource(), subjectAccessReview, opts), emptyResult) if obj == nil { return emptyResult, err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectrulesreview.go b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectrulesreview.go index 662f0b2b9f..42cf559812 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectrulesreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/fake/fake_subjectrulesreview.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + authorizationv1 "github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeSubjectRulesReviews implements SubjectRulesReviewInterface -type FakeSubjectRulesReviews struct { +// fakeSubjectRulesReviews implements SubjectRulesReviewInterface +type fakeSubjectRulesReviews struct { + *gentype.FakeClient[*v1.SubjectRulesReview] Fake *FakeAuthorizationV1 - ns string } -var subjectrulesreviewsResource = v1.SchemeGroupVersion.WithResource("subjectrulesreviews") - -var subjectrulesreviewsKind = v1.SchemeGroupVersion.WithKind("SubjectRulesReview") - -// Create takes the representation of a subjectRulesReview and creates it. Returns the server's representation of the subjectRulesReview, and an error, if there is any. -func (c *FakeSubjectRulesReviews) Create(ctx context.Context, subjectRulesReview *v1.SubjectRulesReview, opts metav1.CreateOptions) (result *v1.SubjectRulesReview, err error) { - emptyResult := &v1.SubjectRulesReview{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(subjectrulesreviewsResource, c.ns, subjectRulesReview, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeSubjectRulesReviews(fake *FakeAuthorizationV1, namespace string) authorizationv1.SubjectRulesReviewInterface { + return &fakeSubjectRulesReviews{ + gentype.NewFakeClient[*v1.SubjectRulesReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("subjectrulesreviews"), + v1.SchemeGroupVersion.WithKind("SubjectRulesReview"), + func() *v1.SubjectRulesReview { return &v1.SubjectRulesReview{} }, + ), + fake, } - return obj.(*v1.SubjectRulesReview), err } diff --git a/authorization/clientset/versioned/typed/authorization/v1/localresourceaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/localresourceaccessreview.go index 38db908e0c..53d5dc570c 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/localresourceaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/localresourceaccessreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,31 +19,32 @@ type LocalResourceAccessReviewsGetter interface { // LocalResourceAccessReviewInterface has methods to work with LocalResourceAccessReview resources. type LocalResourceAccessReviewInterface interface { - Create(ctx context.Context, localResourceAccessReview *v1.LocalResourceAccessReview, opts metav1.CreateOptions) (*v1.ResourceAccessReviewResponse, error) + Create(ctx context.Context, localResourceAccessReview *authorizationv1.LocalResourceAccessReview, opts metav1.CreateOptions) (*authorizationv1.ResourceAccessReviewResponse, error) LocalResourceAccessReviewExpansion } // localResourceAccessReviews implements LocalResourceAccessReviewInterface type localResourceAccessReviews struct { - *gentype.Client[*v1.LocalResourceAccessReview] + *gentype.Client[*authorizationv1.LocalResourceAccessReview] } // newLocalResourceAccessReviews returns a LocalResourceAccessReviews func newLocalResourceAccessReviews(c *AuthorizationV1Client, namespace string) *localResourceAccessReviews { return &localResourceAccessReviews{ - gentype.NewClient[*v1.LocalResourceAccessReview]( + gentype.NewClient[*authorizationv1.LocalResourceAccessReview]( "localresourceaccessreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.LocalResourceAccessReview { return &v1.LocalResourceAccessReview{} }), + func() *authorizationv1.LocalResourceAccessReview { return &authorizationv1.LocalResourceAccessReview{} }, + ), } } // Create takes the representation of a localResourceAccessReview and creates it. Returns the server's representation of the resourceAccessReviewResponse, and an error, if there is any. -func (c *localResourceAccessReviews) Create(ctx context.Context, localResourceAccessReview *v1.LocalResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) { - result = &v1.ResourceAccessReviewResponse{} +func (c *localResourceAccessReviews) Create(ctx context.Context, localResourceAccessReview *authorizationv1.LocalResourceAccessReview, opts metav1.CreateOptions) (result *authorizationv1.ResourceAccessReviewResponse, err error) { + result = &authorizationv1.ResourceAccessReviewResponse{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). Resource("localresourceaccessreviews"). diff --git a/authorization/clientset/versioned/typed/authorization/v1/localsubjectaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/localsubjectaccessreview.go index 7e750301b0..037e7127f3 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/localsubjectaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/localsubjectaccessreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,31 +19,32 @@ type LocalSubjectAccessReviewsGetter interface { // LocalSubjectAccessReviewInterface has methods to work with LocalSubjectAccessReview resources. type LocalSubjectAccessReviewInterface interface { - Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (*v1.SubjectAccessReviewResponse, error) + Create(ctx context.Context, localSubjectAccessReview *authorizationv1.LocalSubjectAccessReview, opts metav1.CreateOptions) (*authorizationv1.SubjectAccessReviewResponse, error) LocalSubjectAccessReviewExpansion } // localSubjectAccessReviews implements LocalSubjectAccessReviewInterface type localSubjectAccessReviews struct { - *gentype.Client[*v1.LocalSubjectAccessReview] + *gentype.Client[*authorizationv1.LocalSubjectAccessReview] } // newLocalSubjectAccessReviews returns a LocalSubjectAccessReviews func newLocalSubjectAccessReviews(c *AuthorizationV1Client, namespace string) *localSubjectAccessReviews { return &localSubjectAccessReviews{ - gentype.NewClient[*v1.LocalSubjectAccessReview]( + gentype.NewClient[*authorizationv1.LocalSubjectAccessReview]( "localsubjectaccessreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.LocalSubjectAccessReview { return &v1.LocalSubjectAccessReview{} }), + func() *authorizationv1.LocalSubjectAccessReview { return &authorizationv1.LocalSubjectAccessReview{} }, + ), } } // Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the subjectAccessReviewResponse, and an error, if there is any. -func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReviewResponse, err error) { - result = &v1.SubjectAccessReviewResponse{} +func (c *localSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *authorizationv1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *authorizationv1.SubjectAccessReviewResponse, err error) { + result = &authorizationv1.SubjectAccessReviewResponse{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). Resource("localsubjectaccessreviews"). diff --git a/authorization/clientset/versioned/typed/authorization/v1/resourceaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/resourceaccessreview.go index 5261234dd4..d1c47dd514 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/resourceaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/resourceaccessreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,31 +19,32 @@ type ResourceAccessReviewsGetter interface { // ResourceAccessReviewInterface has methods to work with ResourceAccessReview resources. type ResourceAccessReviewInterface interface { - Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (*v1.ResourceAccessReviewResponse, error) + Create(ctx context.Context, resourceAccessReview *authorizationv1.ResourceAccessReview, opts metav1.CreateOptions) (*authorizationv1.ResourceAccessReviewResponse, error) ResourceAccessReviewExpansion } // resourceAccessReviews implements ResourceAccessReviewInterface type resourceAccessReviews struct { - *gentype.Client[*v1.ResourceAccessReview] + *gentype.Client[*authorizationv1.ResourceAccessReview] } // newResourceAccessReviews returns a ResourceAccessReviews func newResourceAccessReviews(c *AuthorizationV1Client) *resourceAccessReviews { return &resourceAccessReviews{ - gentype.NewClient[*v1.ResourceAccessReview]( + gentype.NewClient[*authorizationv1.ResourceAccessReview]( "resourceaccessreviews", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ResourceAccessReview { return &v1.ResourceAccessReview{} }), + func() *authorizationv1.ResourceAccessReview { return &authorizationv1.ResourceAccessReview{} }, + ), } } // Create takes the representation of a resourceAccessReview and creates it. Returns the server's representation of the resourceAccessReviewResponse, and an error, if there is any. -func (c *resourceAccessReviews) Create(ctx context.Context, resourceAccessReview *v1.ResourceAccessReview, opts metav1.CreateOptions) (result *v1.ResourceAccessReviewResponse, err error) { - result = &v1.ResourceAccessReviewResponse{} +func (c *resourceAccessReviews) Create(ctx context.Context, resourceAccessReview *authorizationv1.ResourceAccessReview, opts metav1.CreateOptions) (result *authorizationv1.ResourceAccessReviewResponse, err error) { + result = &authorizationv1.ResourceAccessReviewResponse{} err = c.GetClient().Post(). Resource("resourceaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/authorization/clientset/versioned/typed/authorization/v1/role.go b/authorization/clientset/versioned/typed/authorization/v1/role.go index 6c377f0abf..eeb5fd649e 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/role.go +++ b/authorization/clientset/versioned/typed/authorization/v1/role.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" - authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" + applyconfigurationsauthorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type RolesGetter interface { // RoleInterface has methods to work with Role resources. type RoleInterface interface { - Create(ctx context.Context, role *v1.Role, opts metav1.CreateOptions) (*v1.Role, error) - Update(ctx context.Context, role *v1.Role, opts metav1.UpdateOptions) (*v1.Role, error) + Create(ctx context.Context, role *authorizationv1.Role, opts metav1.CreateOptions) (*authorizationv1.Role, error) + Update(ctx context.Context, role *authorizationv1.Role, opts metav1.UpdateOptions) (*authorizationv1.Role, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Role, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RoleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*authorizationv1.Role, error) + List(ctx context.Context, opts metav1.ListOptions) (*authorizationv1.RoleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Role, err error) - Apply(ctx context.Context, role *authorizationv1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Role, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *authorizationv1.Role, err error) + Apply(ctx context.Context, role *applyconfigurationsauthorizationv1.RoleApplyConfiguration, opts metav1.ApplyOptions) (result *authorizationv1.Role, err error) RoleExpansion } // roles implements RoleInterface type roles struct { - *gentype.ClientWithListAndApply[*v1.Role, *v1.RoleList, *authorizationv1.RoleApplyConfiguration] + *gentype.ClientWithListAndApply[*authorizationv1.Role, *authorizationv1.RoleList, *applyconfigurationsauthorizationv1.RoleApplyConfiguration] } // newRoles returns a Roles func newRoles(c *AuthorizationV1Client, namespace string) *roles { return &roles{ - gentype.NewClientWithListAndApply[*v1.Role, *v1.RoleList, *authorizationv1.RoleApplyConfiguration]( + gentype.NewClientWithListAndApply[*authorizationv1.Role, *authorizationv1.RoleList, *applyconfigurationsauthorizationv1.RoleApplyConfiguration]( "roles", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Role { return &v1.Role{} }, - func() *v1.RoleList { return &v1.RoleList{} }), + func() *authorizationv1.Role { return &authorizationv1.Role{} }, + func() *authorizationv1.RoleList { return &authorizationv1.RoleList{} }, + ), } } diff --git a/authorization/clientset/versioned/typed/authorization/v1/rolebinding.go b/authorization/clientset/versioned/typed/authorization/v1/rolebinding.go index b0331f9980..f8f9a53a76 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/rolebinding.go +++ b/authorization/clientset/versioned/typed/authorization/v1/rolebinding.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" - authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" + applyconfigurationsauthorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type RoleBindingsGetter interface { // RoleBindingInterface has methods to work with RoleBinding resources. type RoleBindingInterface interface { - Create(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.CreateOptions) (*v1.RoleBinding, error) - Update(ctx context.Context, roleBinding *v1.RoleBinding, opts metav1.UpdateOptions) (*v1.RoleBinding, error) + Create(ctx context.Context, roleBinding *authorizationv1.RoleBinding, opts metav1.CreateOptions) (*authorizationv1.RoleBinding, error) + Update(ctx context.Context, roleBinding *authorizationv1.RoleBinding, opts metav1.UpdateOptions) (*authorizationv1.RoleBinding, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RoleBinding, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RoleBindingList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*authorizationv1.RoleBinding, error) + List(ctx context.Context, opts metav1.ListOptions) (*authorizationv1.RoleBindingList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBinding, err error) - Apply(ctx context.Context, roleBinding *authorizationv1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RoleBinding, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *authorizationv1.RoleBinding, err error) + Apply(ctx context.Context, roleBinding *applyconfigurationsauthorizationv1.RoleBindingApplyConfiguration, opts metav1.ApplyOptions) (result *authorizationv1.RoleBinding, err error) RoleBindingExpansion } // roleBindings implements RoleBindingInterface type roleBindings struct { - *gentype.ClientWithListAndApply[*v1.RoleBinding, *v1.RoleBindingList, *authorizationv1.RoleBindingApplyConfiguration] + *gentype.ClientWithListAndApply[*authorizationv1.RoleBinding, *authorizationv1.RoleBindingList, *applyconfigurationsauthorizationv1.RoleBindingApplyConfiguration] } // newRoleBindings returns a RoleBindings func newRoleBindings(c *AuthorizationV1Client, namespace string) *roleBindings { return &roleBindings{ - gentype.NewClientWithListAndApply[*v1.RoleBinding, *v1.RoleBindingList, *authorizationv1.RoleBindingApplyConfiguration]( + gentype.NewClientWithListAndApply[*authorizationv1.RoleBinding, *authorizationv1.RoleBindingList, *applyconfigurationsauthorizationv1.RoleBindingApplyConfiguration]( "rolebindings", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.RoleBinding { return &v1.RoleBinding{} }, - func() *v1.RoleBindingList { return &v1.RoleBindingList{} }), + func() *authorizationv1.RoleBinding { return &authorizationv1.RoleBinding{} }, + func() *authorizationv1.RoleBindingList { return &authorizationv1.RoleBindingList{} }, + ), } } diff --git a/authorization/clientset/versioned/typed/authorization/v1/rolebindingrestriction.go b/authorization/clientset/versioned/typed/authorization/v1/rolebindingrestriction.go index d4d22acdc0..28269c0a84 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/rolebindingrestriction.go +++ b/authorization/clientset/versioned/typed/authorization/v1/rolebindingrestriction.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" - authorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" + applyconfigurationsauthorizationv1 "github.com/openshift/client-go/authorization/applyconfigurations/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,35 @@ type RoleBindingRestrictionsGetter interface { // RoleBindingRestrictionInterface has methods to work with RoleBindingRestriction resources. type RoleBindingRestrictionInterface interface { - Create(ctx context.Context, roleBindingRestriction *v1.RoleBindingRestriction, opts metav1.CreateOptions) (*v1.RoleBindingRestriction, error) - Update(ctx context.Context, roleBindingRestriction *v1.RoleBindingRestriction, opts metav1.UpdateOptions) (*v1.RoleBindingRestriction, error) + Create(ctx context.Context, roleBindingRestriction *authorizationv1.RoleBindingRestriction, opts metav1.CreateOptions) (*authorizationv1.RoleBindingRestriction, error) + Update(ctx context.Context, roleBindingRestriction *authorizationv1.RoleBindingRestriction, opts metav1.UpdateOptions) (*authorizationv1.RoleBindingRestriction, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RoleBindingRestriction, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RoleBindingRestrictionList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*authorizationv1.RoleBindingRestriction, error) + List(ctx context.Context, opts metav1.ListOptions) (*authorizationv1.RoleBindingRestrictionList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RoleBindingRestriction, err error) - Apply(ctx context.Context, roleBindingRestriction *authorizationv1.RoleBindingRestrictionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RoleBindingRestriction, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *authorizationv1.RoleBindingRestriction, err error) + Apply(ctx context.Context, roleBindingRestriction *applyconfigurationsauthorizationv1.RoleBindingRestrictionApplyConfiguration, opts metav1.ApplyOptions) (result *authorizationv1.RoleBindingRestriction, err error) RoleBindingRestrictionExpansion } // roleBindingRestrictions implements RoleBindingRestrictionInterface type roleBindingRestrictions struct { - *gentype.ClientWithListAndApply[*v1.RoleBindingRestriction, *v1.RoleBindingRestrictionList, *authorizationv1.RoleBindingRestrictionApplyConfiguration] + *gentype.ClientWithListAndApply[*authorizationv1.RoleBindingRestriction, *authorizationv1.RoleBindingRestrictionList, *applyconfigurationsauthorizationv1.RoleBindingRestrictionApplyConfiguration] } // newRoleBindingRestrictions returns a RoleBindingRestrictions func newRoleBindingRestrictions(c *AuthorizationV1Client, namespace string) *roleBindingRestrictions { return &roleBindingRestrictions{ - gentype.NewClientWithListAndApply[*v1.RoleBindingRestriction, *v1.RoleBindingRestrictionList, *authorizationv1.RoleBindingRestrictionApplyConfiguration]( + gentype.NewClientWithListAndApply[*authorizationv1.RoleBindingRestriction, *authorizationv1.RoleBindingRestrictionList, *applyconfigurationsauthorizationv1.RoleBindingRestrictionApplyConfiguration]( "rolebindingrestrictions", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.RoleBindingRestriction { return &v1.RoleBindingRestriction{} }, - func() *v1.RoleBindingRestrictionList { return &v1.RoleBindingRestrictionList{} }), + func() *authorizationv1.RoleBindingRestriction { return &authorizationv1.RoleBindingRestriction{} }, + func() *authorizationv1.RoleBindingRestrictionList { + return &authorizationv1.RoleBindingRestrictionList{} + }, + ), } } diff --git a/authorization/clientset/versioned/typed/authorization/v1/selfsubjectrulesreview.go b/authorization/clientset/versioned/typed/authorization/v1/selfsubjectrulesreview.go index f3fec99aee..5a95570693 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/selfsubjectrulesreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/selfsubjectrulesreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type SelfSubjectRulesReviewsGetter interface { // SelfSubjectRulesReviewInterface has methods to work with SelfSubjectRulesReview resources. type SelfSubjectRulesReviewInterface interface { - Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (*v1.SelfSubjectRulesReview, error) + Create(ctx context.Context, selfSubjectRulesReview *authorizationv1.SelfSubjectRulesReview, opts metav1.CreateOptions) (*authorizationv1.SelfSubjectRulesReview, error) SelfSubjectRulesReviewExpansion } // selfSubjectRulesReviews implements SelfSubjectRulesReviewInterface type selfSubjectRulesReviews struct { - *gentype.Client[*v1.SelfSubjectRulesReview] + *gentype.Client[*authorizationv1.SelfSubjectRulesReview] } // newSelfSubjectRulesReviews returns a SelfSubjectRulesReviews func newSelfSubjectRulesReviews(c *AuthorizationV1Client, namespace string) *selfSubjectRulesReviews { return &selfSubjectRulesReviews{ - gentype.NewClient[*v1.SelfSubjectRulesReview]( + gentype.NewClient[*authorizationv1.SelfSubjectRulesReview]( "selfsubjectrulesreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.SelfSubjectRulesReview { return &v1.SelfSubjectRulesReview{} }), + func() *authorizationv1.SelfSubjectRulesReview { return &authorizationv1.SelfSubjectRulesReview{} }, + ), } } diff --git a/authorization/clientset/versioned/typed/authorization/v1/subjectaccessreview.go b/authorization/clientset/versioned/typed/authorization/v1/subjectaccessreview.go index 48d64f4c74..241ba05c83 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/subjectaccessreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/subjectaccessreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,31 +19,32 @@ type SubjectAccessReviewsGetter interface { // SubjectAccessReviewInterface has methods to work with SubjectAccessReview resources. type SubjectAccessReviewInterface interface { - Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (*v1.SubjectAccessReviewResponse, error) + Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, opts metav1.CreateOptions) (*authorizationv1.SubjectAccessReviewResponse, error) SubjectAccessReviewExpansion } // subjectAccessReviews implements SubjectAccessReviewInterface type subjectAccessReviews struct { - *gentype.Client[*v1.SubjectAccessReview] + *gentype.Client[*authorizationv1.SubjectAccessReview] } // newSubjectAccessReviews returns a SubjectAccessReviews func newSubjectAccessReviews(c *AuthorizationV1Client) *subjectAccessReviews { return &subjectAccessReviews{ - gentype.NewClient[*v1.SubjectAccessReview]( + gentype.NewClient[*authorizationv1.SubjectAccessReview]( "subjectaccessreviews", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.SubjectAccessReview { return &v1.SubjectAccessReview{} }), + func() *authorizationv1.SubjectAccessReview { return &authorizationv1.SubjectAccessReview{} }, + ), } } // Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReviewResponse, and an error, if there is any. -func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReviewResponse, err error) { - result = &v1.SubjectAccessReviewResponse{} +func (c *subjectAccessReviews) Create(ctx context.Context, subjectAccessReview *authorizationv1.SubjectAccessReview, opts metav1.CreateOptions) (result *authorizationv1.SubjectAccessReviewResponse, err error) { + result = &authorizationv1.SubjectAccessReviewResponse{} err = c.GetClient().Post(). Resource("subjectaccessreviews"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/authorization/clientset/versioned/typed/authorization/v1/subjectrulesreview.go b/authorization/clientset/versioned/typed/authorization/v1/subjectrulesreview.go index 70d8ed8c9c..f09652ad99 100644 --- a/authorization/clientset/versioned/typed/authorization/v1/subjectrulesreview.go +++ b/authorization/clientset/versioned/typed/authorization/v1/subjectrulesreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/authorization/v1" + authorizationv1 "github.com/openshift/api/authorization/v1" scheme "github.com/openshift/client-go/authorization/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type SubjectRulesReviewsGetter interface { // SubjectRulesReviewInterface has methods to work with SubjectRulesReview resources. type SubjectRulesReviewInterface interface { - Create(ctx context.Context, subjectRulesReview *v1.SubjectRulesReview, opts metav1.CreateOptions) (*v1.SubjectRulesReview, error) + Create(ctx context.Context, subjectRulesReview *authorizationv1.SubjectRulesReview, opts metav1.CreateOptions) (*authorizationv1.SubjectRulesReview, error) SubjectRulesReviewExpansion } // subjectRulesReviews implements SubjectRulesReviewInterface type subjectRulesReviews struct { - *gentype.Client[*v1.SubjectRulesReview] + *gentype.Client[*authorizationv1.SubjectRulesReview] } // newSubjectRulesReviews returns a SubjectRulesReviews func newSubjectRulesReviews(c *AuthorizationV1Client, namespace string) *subjectRulesReviews { return &subjectRulesReviews{ - gentype.NewClient[*v1.SubjectRulesReview]( + gentype.NewClient[*authorizationv1.SubjectRulesReview]( "subjectrulesreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.SubjectRulesReview { return &v1.SubjectRulesReview{} }), + func() *authorizationv1.SubjectRulesReview { return &authorizationv1.SubjectRulesReview{} }, + ), } } diff --git a/authorization/informers/externalversions/authorization/v1/clusterrole.go b/authorization/informers/externalversions/authorization/v1/clusterrole.go index f58334174b..3fbe8fac56 100644 --- a/authorization/informers/externalversions/authorization/v1/clusterrole.go +++ b/authorization/informers/externalversions/authorization/v1/clusterrole.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - authorizationv1 "github.com/openshift/api/authorization/v1" + apiauthorizationv1 "github.com/openshift/api/authorization/v1" versioned "github.com/openshift/client-go/authorization/clientset/versioned" internalinterfaces "github.com/openshift/client-go/authorization/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/authorization/listers/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/listers/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterRoles. type ClusterRoleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterRoleLister + Lister() authorizationv1.ClusterRoleLister } type clusterRoleInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterRoleInformer(client versioned.Interface, resyncPeriod tim return client.AuthorizationV1().ClusterRoles().Watch(context.TODO(), options) }, }, - &authorizationv1.ClusterRole{}, + &apiauthorizationv1.ClusterRole{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterRoleInformer) defaultInformer(client versioned.Interface, resync } func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&authorizationv1.ClusterRole{}, f.defaultInformer) + return f.factory.InformerFor(&apiauthorizationv1.ClusterRole{}, f.defaultInformer) } -func (f *clusterRoleInformer) Lister() v1.ClusterRoleLister { - return v1.NewClusterRoleLister(f.Informer().GetIndexer()) +func (f *clusterRoleInformer) Lister() authorizationv1.ClusterRoleLister { + return authorizationv1.NewClusterRoleLister(f.Informer().GetIndexer()) } diff --git a/authorization/informers/externalversions/authorization/v1/clusterrolebinding.go b/authorization/informers/externalversions/authorization/v1/clusterrolebinding.go index b66ea22a24..9d477c4fd0 100644 --- a/authorization/informers/externalversions/authorization/v1/clusterrolebinding.go +++ b/authorization/informers/externalversions/authorization/v1/clusterrolebinding.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - authorizationv1 "github.com/openshift/api/authorization/v1" + apiauthorizationv1 "github.com/openshift/api/authorization/v1" versioned "github.com/openshift/client-go/authorization/clientset/versioned" internalinterfaces "github.com/openshift/client-go/authorization/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/authorization/listers/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/listers/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterRoleBindings. type ClusterRoleBindingInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterRoleBindingLister + Lister() authorizationv1.ClusterRoleBindingLister } type clusterRoleBindingInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterRoleBindingInformer(client versioned.Interface, resyncPer return client.AuthorizationV1().ClusterRoleBindings().Watch(context.TODO(), options) }, }, - &authorizationv1.ClusterRoleBinding{}, + &apiauthorizationv1.ClusterRoleBinding{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterRoleBindingInformer) defaultInformer(client versioned.Interface, } func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&authorizationv1.ClusterRoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&apiauthorizationv1.ClusterRoleBinding{}, f.defaultInformer) } -func (f *clusterRoleBindingInformer) Lister() v1.ClusterRoleBindingLister { - return v1.NewClusterRoleBindingLister(f.Informer().GetIndexer()) +func (f *clusterRoleBindingInformer) Lister() authorizationv1.ClusterRoleBindingLister { + return authorizationv1.NewClusterRoleBindingLister(f.Informer().GetIndexer()) } diff --git a/authorization/informers/externalversions/authorization/v1/role.go b/authorization/informers/externalversions/authorization/v1/role.go index d422c78276..b75793a356 100644 --- a/authorization/informers/externalversions/authorization/v1/role.go +++ b/authorization/informers/externalversions/authorization/v1/role.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - authorizationv1 "github.com/openshift/api/authorization/v1" + apiauthorizationv1 "github.com/openshift/api/authorization/v1" versioned "github.com/openshift/client-go/authorization/clientset/versioned" internalinterfaces "github.com/openshift/client-go/authorization/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/authorization/listers/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/listers/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Roles. type RoleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.RoleLister + Lister() authorizationv1.RoleLister } type roleInformer struct { @@ -55,7 +55,7 @@ func NewFilteredRoleInformer(client versioned.Interface, namespace string, resyn return client.AuthorizationV1().Roles(namespace).Watch(context.TODO(), options) }, }, - &authorizationv1.Role{}, + &apiauthorizationv1.Role{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *roleInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *roleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&authorizationv1.Role{}, f.defaultInformer) + return f.factory.InformerFor(&apiauthorizationv1.Role{}, f.defaultInformer) } -func (f *roleInformer) Lister() v1.RoleLister { - return v1.NewRoleLister(f.Informer().GetIndexer()) +func (f *roleInformer) Lister() authorizationv1.RoleLister { + return authorizationv1.NewRoleLister(f.Informer().GetIndexer()) } diff --git a/authorization/informers/externalversions/authorization/v1/rolebinding.go b/authorization/informers/externalversions/authorization/v1/rolebinding.go index 80afa1f3a2..91d68fb1ca 100644 --- a/authorization/informers/externalversions/authorization/v1/rolebinding.go +++ b/authorization/informers/externalversions/authorization/v1/rolebinding.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - authorizationv1 "github.com/openshift/api/authorization/v1" + apiauthorizationv1 "github.com/openshift/api/authorization/v1" versioned "github.com/openshift/client-go/authorization/clientset/versioned" internalinterfaces "github.com/openshift/client-go/authorization/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/authorization/listers/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/listers/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // RoleBindings. type RoleBindingInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.RoleBindingLister + Lister() authorizationv1.RoleBindingLister } type roleBindingInformer struct { @@ -55,7 +55,7 @@ func NewFilteredRoleBindingInformer(client versioned.Interface, namespace string return client.AuthorizationV1().RoleBindings(namespace).Watch(context.TODO(), options) }, }, - &authorizationv1.RoleBinding{}, + &apiauthorizationv1.RoleBinding{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *roleBindingInformer) defaultInformer(client versioned.Interface, resync } func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&authorizationv1.RoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&apiauthorizationv1.RoleBinding{}, f.defaultInformer) } -func (f *roleBindingInformer) Lister() v1.RoleBindingLister { - return v1.NewRoleBindingLister(f.Informer().GetIndexer()) +func (f *roleBindingInformer) Lister() authorizationv1.RoleBindingLister { + return authorizationv1.NewRoleBindingLister(f.Informer().GetIndexer()) } diff --git a/authorization/informers/externalversions/authorization/v1/rolebindingrestriction.go b/authorization/informers/externalversions/authorization/v1/rolebindingrestriction.go index 1f6b462476..577c59e9b1 100644 --- a/authorization/informers/externalversions/authorization/v1/rolebindingrestriction.go +++ b/authorization/informers/externalversions/authorization/v1/rolebindingrestriction.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - authorizationv1 "github.com/openshift/api/authorization/v1" + apiauthorizationv1 "github.com/openshift/api/authorization/v1" versioned "github.com/openshift/client-go/authorization/clientset/versioned" internalinterfaces "github.com/openshift/client-go/authorization/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/authorization/listers/authorization/v1" + authorizationv1 "github.com/openshift/client-go/authorization/listers/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // RoleBindingRestrictions. type RoleBindingRestrictionInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.RoleBindingRestrictionLister + Lister() authorizationv1.RoleBindingRestrictionLister } type roleBindingRestrictionInformer struct { @@ -55,7 +55,7 @@ func NewFilteredRoleBindingRestrictionInformer(client versioned.Interface, names return client.AuthorizationV1().RoleBindingRestrictions(namespace).Watch(context.TODO(), options) }, }, - &authorizationv1.RoleBindingRestriction{}, + &apiauthorizationv1.RoleBindingRestriction{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *roleBindingRestrictionInformer) defaultInformer(client versioned.Interf } func (f *roleBindingRestrictionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&authorizationv1.RoleBindingRestriction{}, f.defaultInformer) + return f.factory.InformerFor(&apiauthorizationv1.RoleBindingRestriction{}, f.defaultInformer) } -func (f *roleBindingRestrictionInformer) Lister() v1.RoleBindingRestrictionLister { - return v1.NewRoleBindingRestrictionLister(f.Informer().GetIndexer()) +func (f *roleBindingRestrictionInformer) Lister() authorizationv1.RoleBindingRestrictionLister { + return authorizationv1.NewRoleBindingRestrictionLister(f.Informer().GetIndexer()) } diff --git a/authorization/informers/externalversions/generic.go b/authorization/informers/externalversions/generic.go index ed77429a85..5c01f7cc0d 100644 --- a/authorization/informers/externalversions/generic.go +++ b/authorization/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/authorization/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/authorization/listers/authorization/v1/clusterrole.go b/authorization/listers/authorization/v1/clusterrole.go index 070029d942..909d13f3b2 100644 --- a/authorization/listers/authorization/v1/clusterrole.go +++ b/authorization/listers/authorization/v1/clusterrole.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/authorization/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + authorizationv1 "github.com/openshift/api/authorization/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterRoleLister helps list ClusterRoles. @@ -14,19 +14,19 @@ import ( type ClusterRoleLister interface { // List lists all ClusterRoles in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterRole, err error) + List(selector labels.Selector) (ret []*authorizationv1.ClusterRole, err error) // Get retrieves the ClusterRole from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterRole, error) + Get(name string) (*authorizationv1.ClusterRole, error) ClusterRoleListerExpansion } // clusterRoleLister implements the ClusterRoleLister interface. type clusterRoleLister struct { - listers.ResourceIndexer[*v1.ClusterRole] + listers.ResourceIndexer[*authorizationv1.ClusterRole] } // NewClusterRoleLister returns a new ClusterRoleLister. func NewClusterRoleLister(indexer cache.Indexer) ClusterRoleLister { - return &clusterRoleLister{listers.New[*v1.ClusterRole](indexer, v1.Resource("clusterrole"))} + return &clusterRoleLister{listers.New[*authorizationv1.ClusterRole](indexer, authorizationv1.Resource("clusterrole"))} } diff --git a/authorization/listers/authorization/v1/clusterrolebinding.go b/authorization/listers/authorization/v1/clusterrolebinding.go index 2cce3c458b..0526894f87 100644 --- a/authorization/listers/authorization/v1/clusterrolebinding.go +++ b/authorization/listers/authorization/v1/clusterrolebinding.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/authorization/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + authorizationv1 "github.com/openshift/api/authorization/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterRoleBindingLister helps list ClusterRoleBindings. @@ -14,19 +14,19 @@ import ( type ClusterRoleBindingLister interface { // List lists all ClusterRoleBindings in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterRoleBinding, err error) + List(selector labels.Selector) (ret []*authorizationv1.ClusterRoleBinding, err error) // Get retrieves the ClusterRoleBinding from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterRoleBinding, error) + Get(name string) (*authorizationv1.ClusterRoleBinding, error) ClusterRoleBindingListerExpansion } // clusterRoleBindingLister implements the ClusterRoleBindingLister interface. type clusterRoleBindingLister struct { - listers.ResourceIndexer[*v1.ClusterRoleBinding] + listers.ResourceIndexer[*authorizationv1.ClusterRoleBinding] } // NewClusterRoleBindingLister returns a new ClusterRoleBindingLister. func NewClusterRoleBindingLister(indexer cache.Indexer) ClusterRoleBindingLister { - return &clusterRoleBindingLister{listers.New[*v1.ClusterRoleBinding](indexer, v1.Resource("clusterrolebinding"))} + return &clusterRoleBindingLister{listers.New[*authorizationv1.ClusterRoleBinding](indexer, authorizationv1.Resource("clusterrolebinding"))} } diff --git a/authorization/listers/authorization/v1/role.go b/authorization/listers/authorization/v1/role.go index 7c04f802b0..da2d60f1ee 100644 --- a/authorization/listers/authorization/v1/role.go +++ b/authorization/listers/authorization/v1/role.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/authorization/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + authorizationv1 "github.com/openshift/api/authorization/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RoleLister helps list Roles. @@ -14,7 +14,7 @@ import ( type RoleLister interface { // List lists all Roles in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Role, err error) + List(selector labels.Selector) (ret []*authorizationv1.Role, err error) // Roles returns an object that can list and get Roles. Roles(namespace string) RoleNamespaceLister RoleListerExpansion @@ -22,17 +22,17 @@ type RoleLister interface { // roleLister implements the RoleLister interface. type roleLister struct { - listers.ResourceIndexer[*v1.Role] + listers.ResourceIndexer[*authorizationv1.Role] } // NewRoleLister returns a new RoleLister. func NewRoleLister(indexer cache.Indexer) RoleLister { - return &roleLister{listers.New[*v1.Role](indexer, v1.Resource("role"))} + return &roleLister{listers.New[*authorizationv1.Role](indexer, authorizationv1.Resource("role"))} } // Roles returns an object that can list and get Roles. func (s *roleLister) Roles(namespace string) RoleNamespaceLister { - return roleNamespaceLister{listers.NewNamespaced[*v1.Role](s.ResourceIndexer, namespace)} + return roleNamespaceLister{listers.NewNamespaced[*authorizationv1.Role](s.ResourceIndexer, namespace)} } // RoleNamespaceLister helps list and get Roles. @@ -40,15 +40,15 @@ func (s *roleLister) Roles(namespace string) RoleNamespaceLister { type RoleNamespaceLister interface { // List lists all Roles in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Role, err error) + List(selector labels.Selector) (ret []*authorizationv1.Role, err error) // Get retrieves the Role from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Role, error) + Get(name string) (*authorizationv1.Role, error) RoleNamespaceListerExpansion } // roleNamespaceLister implements the RoleNamespaceLister // interface. type roleNamespaceLister struct { - listers.ResourceIndexer[*v1.Role] + listers.ResourceIndexer[*authorizationv1.Role] } diff --git a/authorization/listers/authorization/v1/rolebinding.go b/authorization/listers/authorization/v1/rolebinding.go index 6df30ec50c..85acdacece 100644 --- a/authorization/listers/authorization/v1/rolebinding.go +++ b/authorization/listers/authorization/v1/rolebinding.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/authorization/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + authorizationv1 "github.com/openshift/api/authorization/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RoleBindingLister helps list RoleBindings. @@ -14,7 +14,7 @@ import ( type RoleBindingLister interface { // List lists all RoleBindings in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.RoleBinding, err error) + List(selector labels.Selector) (ret []*authorizationv1.RoleBinding, err error) // RoleBindings returns an object that can list and get RoleBindings. RoleBindings(namespace string) RoleBindingNamespaceLister RoleBindingListerExpansion @@ -22,17 +22,17 @@ type RoleBindingLister interface { // roleBindingLister implements the RoleBindingLister interface. type roleBindingLister struct { - listers.ResourceIndexer[*v1.RoleBinding] + listers.ResourceIndexer[*authorizationv1.RoleBinding] } // NewRoleBindingLister returns a new RoleBindingLister. func NewRoleBindingLister(indexer cache.Indexer) RoleBindingLister { - return &roleBindingLister{listers.New[*v1.RoleBinding](indexer, v1.Resource("rolebinding"))} + return &roleBindingLister{listers.New[*authorizationv1.RoleBinding](indexer, authorizationv1.Resource("rolebinding"))} } // RoleBindings returns an object that can list and get RoleBindings. func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceLister { - return roleBindingNamespaceLister{listers.NewNamespaced[*v1.RoleBinding](s.ResourceIndexer, namespace)} + return roleBindingNamespaceLister{listers.NewNamespaced[*authorizationv1.RoleBinding](s.ResourceIndexer, namespace)} } // RoleBindingNamespaceLister helps list and get RoleBindings. @@ -40,15 +40,15 @@ func (s *roleBindingLister) RoleBindings(namespace string) RoleBindingNamespaceL type RoleBindingNamespaceLister interface { // List lists all RoleBindings in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.RoleBinding, err error) + List(selector labels.Selector) (ret []*authorizationv1.RoleBinding, err error) // Get retrieves the RoleBinding from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.RoleBinding, error) + Get(name string) (*authorizationv1.RoleBinding, error) RoleBindingNamespaceListerExpansion } // roleBindingNamespaceLister implements the RoleBindingNamespaceLister // interface. type roleBindingNamespaceLister struct { - listers.ResourceIndexer[*v1.RoleBinding] + listers.ResourceIndexer[*authorizationv1.RoleBinding] } diff --git a/authorization/listers/authorization/v1/rolebindingrestriction.go b/authorization/listers/authorization/v1/rolebindingrestriction.go index 40ac47dc74..6b720253f4 100644 --- a/authorization/listers/authorization/v1/rolebindingrestriction.go +++ b/authorization/listers/authorization/v1/rolebindingrestriction.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/authorization/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + authorizationv1 "github.com/openshift/api/authorization/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RoleBindingRestrictionLister helps list RoleBindingRestrictions. @@ -14,7 +14,7 @@ import ( type RoleBindingRestrictionLister interface { // List lists all RoleBindingRestrictions in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.RoleBindingRestriction, err error) + List(selector labels.Selector) (ret []*authorizationv1.RoleBindingRestriction, err error) // RoleBindingRestrictions returns an object that can list and get RoleBindingRestrictions. RoleBindingRestrictions(namespace string) RoleBindingRestrictionNamespaceLister RoleBindingRestrictionListerExpansion @@ -22,17 +22,17 @@ type RoleBindingRestrictionLister interface { // roleBindingRestrictionLister implements the RoleBindingRestrictionLister interface. type roleBindingRestrictionLister struct { - listers.ResourceIndexer[*v1.RoleBindingRestriction] + listers.ResourceIndexer[*authorizationv1.RoleBindingRestriction] } // NewRoleBindingRestrictionLister returns a new RoleBindingRestrictionLister. func NewRoleBindingRestrictionLister(indexer cache.Indexer) RoleBindingRestrictionLister { - return &roleBindingRestrictionLister{listers.New[*v1.RoleBindingRestriction](indexer, v1.Resource("rolebindingrestriction"))} + return &roleBindingRestrictionLister{listers.New[*authorizationv1.RoleBindingRestriction](indexer, authorizationv1.Resource("rolebindingrestriction"))} } // RoleBindingRestrictions returns an object that can list and get RoleBindingRestrictions. func (s *roleBindingRestrictionLister) RoleBindingRestrictions(namespace string) RoleBindingRestrictionNamespaceLister { - return roleBindingRestrictionNamespaceLister{listers.NewNamespaced[*v1.RoleBindingRestriction](s.ResourceIndexer, namespace)} + return roleBindingRestrictionNamespaceLister{listers.NewNamespaced[*authorizationv1.RoleBindingRestriction](s.ResourceIndexer, namespace)} } // RoleBindingRestrictionNamespaceLister helps list and get RoleBindingRestrictions. @@ -40,15 +40,15 @@ func (s *roleBindingRestrictionLister) RoleBindingRestrictions(namespace string) type RoleBindingRestrictionNamespaceLister interface { // List lists all RoleBindingRestrictions in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.RoleBindingRestriction, err error) + List(selector labels.Selector) (ret []*authorizationv1.RoleBindingRestriction, err error) // Get retrieves the RoleBindingRestriction from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.RoleBindingRestriction, error) + Get(name string) (*authorizationv1.RoleBindingRestriction, error) RoleBindingRestrictionNamespaceListerExpansion } // roleBindingRestrictionNamespaceLister implements the RoleBindingRestrictionNamespaceLister // interface. type roleBindingRestrictionNamespaceLister struct { - listers.ResourceIndexer[*v1.RoleBindingRestriction] + listers.ResourceIndexer[*authorizationv1.RoleBindingRestriction] } diff --git a/build/applyconfigurations/build/v1/bitbucketwebhookcause.go b/build/applyconfigurations/build/v1/bitbucketwebhookcause.go index e79d8c77c9..2a40f7f544 100644 --- a/build/applyconfigurations/build/v1/bitbucketwebhookcause.go +++ b/build/applyconfigurations/build/v1/bitbucketwebhookcause.go @@ -18,7 +18,7 @@ func BitbucketWebHookCause() *BitbucketWebHookCauseApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Revision field is set to the value of the last call. func (b *BitbucketWebHookCauseApplyConfiguration) WithRevision(value *SourceRevisionApplyConfiguration) *BitbucketWebHookCauseApplyConfiguration { - b.Revision = value + b.CommonWebHookCauseApplyConfiguration.Revision = value return b } @@ -26,6 +26,6 @@ func (b *BitbucketWebHookCauseApplyConfiguration) WithRevision(value *SourceRevi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Secret field is set to the value of the last call. func (b *BitbucketWebHookCauseApplyConfiguration) WithSecret(value string) *BitbucketWebHookCauseApplyConfiguration { - b.Secret = &value + b.CommonWebHookCauseApplyConfiguration.Secret = &value return b } diff --git a/build/applyconfigurations/build/v1/build.go b/build/applyconfigurations/build/v1/build.go index b4a1a9741c..679d04d161 100644 --- a/build/applyconfigurations/build/v1/build.go +++ b/build/applyconfigurations/build/v1/build.go @@ -3,21 +3,21 @@ package v1 import ( - apibuildv1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" internal "github.com/openshift/client-go/build/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // BuildApplyConfiguration represents a declarative configuration of the Build type for use // with apply. type BuildApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *BuildSpecApplyConfiguration `json:"spec,omitempty"` - Status *BuildStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *BuildSpecApplyConfiguration `json:"spec,omitempty"` + Status *BuildStatusApplyConfiguration `json:"status,omitempty"` } // Build constructs a declarative configuration of the Build type for use with @@ -42,18 +42,18 @@ func Build(name, namespace string) *BuildApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractBuild(build *apibuildv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { +func ExtractBuild(build *buildv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { return extractBuild(build, fieldManager, "") } // ExtractBuildStatus is the same as ExtractBuild except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractBuildStatus(build *apibuildv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { +func ExtractBuildStatus(build *buildv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { return extractBuild(build, fieldManager, "status") } -func extractBuild(build *apibuildv1.Build, fieldManager string, subresource string) (*BuildApplyConfiguration, error) { +func extractBuild(build *buildv1.Build, fieldManager string, subresource string) (*BuildApplyConfiguration, error) { b := &BuildApplyConfiguration{} err := managedfields.ExtractInto(build, internal.Parser().Type("com.github.openshift.api.build.v1.Build"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractBuild(build *apibuildv1.Build, fieldManager string, subresource stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *BuildApplyConfiguration) WithKind(value string) *BuildApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *BuildApplyConfiguration) WithKind(value string) *BuildApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *BuildApplyConfiguration) WithAPIVersion(value string) *BuildApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *BuildApplyConfiguration) WithAPIVersion(value string) *BuildApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *BuildApplyConfiguration) WithName(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *BuildApplyConfiguration) WithName(value string) *BuildApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *BuildApplyConfiguration) WithGenerateName(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *BuildApplyConfiguration) WithGenerateName(value string) *BuildApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *BuildApplyConfiguration) WithNamespace(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *BuildApplyConfiguration) WithNamespace(value string) *BuildApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *BuildApplyConfiguration) WithUID(value types.UID) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *BuildApplyConfiguration) WithUID(value types.UID) *BuildApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *BuildApplyConfiguration) WithResourceVersion(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *BuildApplyConfiguration) WithResourceVersion(value string) *BuildApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *BuildApplyConfiguration) WithGeneration(value int64) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BuildApplyConfiguration { +func (b *BuildApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BuildApplyConfiguration { +func (b *BuildApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *BuildApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Buil // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *BuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *BuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *B // overwriting an existing map entries in Labels field with the same key. func (b *BuildApplyConfiguration) WithLabels(entries map[string]string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *BuildApplyConfiguration) WithLabels(entries map[string]string) *BuildAp // overwriting an existing map entries in Annotations field with the same key. func (b *BuildApplyConfiguration) WithAnnotations(entries map[string]string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *BuildApplyConfiguration) WithAnnotations(entries map[string]string) *Bu // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BuildApplyConfiguration { +func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *BuildApplyConfiguration) WithFinalizers(values ...string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *BuildApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *BuildApplyConfiguration) WithStatus(value *BuildStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *BuildApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/build/applyconfigurations/build/v1/buildcondition.go b/build/applyconfigurations/build/v1/buildcondition.go index 42c600f649..0f58e891b8 100644 --- a/build/applyconfigurations/build/v1/buildcondition.go +++ b/build/applyconfigurations/build/v1/buildcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,12 +11,12 @@ import ( // BuildConditionApplyConfiguration represents a declarative configuration of the BuildCondition type for use // with apply. type BuildConditionApplyConfiguration struct { - Type *v1.BuildConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *buildv1.BuildConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // BuildConditionApplyConfiguration constructs a declarative configuration of the BuildCondition type for use with @@ -28,7 +28,7 @@ func BuildCondition() *BuildConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *BuildConditionApplyConfiguration) WithType(value v1.BuildConditionType) *BuildConditionApplyConfiguration { +func (b *BuildConditionApplyConfiguration) WithType(value buildv1.BuildConditionType) *BuildConditionApplyConfiguration { b.Type = &value return b } diff --git a/build/applyconfigurations/build/v1/buildconfig.go b/build/applyconfigurations/build/v1/buildconfig.go index fb8f37aa9f..2408fc551c 100644 --- a/build/applyconfigurations/build/v1/buildconfig.go +++ b/build/applyconfigurations/build/v1/buildconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apibuildv1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" internal "github.com/openshift/client-go/build/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // BuildConfigApplyConfiguration represents a declarative configuration of the BuildConfig type for use // with apply. type BuildConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *BuildConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *BuildConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *BuildConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *BuildConfigStatusApplyConfiguration `json:"status,omitempty"` } // BuildConfig constructs a declarative configuration of the BuildConfig type for use with @@ -42,18 +42,18 @@ func BuildConfig(name, namespace string) *BuildConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractBuildConfig(buildConfig *apibuildv1.BuildConfig, fieldManager string) (*BuildConfigApplyConfiguration, error) { +func ExtractBuildConfig(buildConfig *buildv1.BuildConfig, fieldManager string) (*BuildConfigApplyConfiguration, error) { return extractBuildConfig(buildConfig, fieldManager, "") } // ExtractBuildConfigStatus is the same as ExtractBuildConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractBuildConfigStatus(buildConfig *apibuildv1.BuildConfig, fieldManager string) (*BuildConfigApplyConfiguration, error) { +func ExtractBuildConfigStatus(buildConfig *buildv1.BuildConfig, fieldManager string) (*BuildConfigApplyConfiguration, error) { return extractBuildConfig(buildConfig, fieldManager, "status") } -func extractBuildConfig(buildConfig *apibuildv1.BuildConfig, fieldManager string, subresource string) (*BuildConfigApplyConfiguration, error) { +func extractBuildConfig(buildConfig *buildv1.BuildConfig, fieldManager string, subresource string) (*BuildConfigApplyConfiguration, error) { b := &BuildConfigApplyConfiguration{} err := managedfields.ExtractInto(buildConfig, internal.Parser().Type("com.github.openshift.api.build.v1.BuildConfig"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractBuildConfig(buildConfig *apibuildv1.BuildConfig, fieldManager string // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithKind(value string) *BuildConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *BuildConfigApplyConfiguration) WithKind(value string) *BuildConfigApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithAPIVersion(value string) *BuildConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *BuildConfigApplyConfiguration) WithAPIVersion(value string) *BuildConfi // If called multiple times, the Name field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithName(value string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *BuildConfigApplyConfiguration) WithName(value string) *BuildConfigApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithGenerateName(value string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *BuildConfigApplyConfiguration) WithGenerateName(value string) *BuildCon // If called multiple times, the Namespace field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithNamespace(value string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *BuildConfigApplyConfiguration) WithNamespace(value string) *BuildConfig // If called multiple times, the UID field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithUID(value types.UID) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *BuildConfigApplyConfiguration) WithUID(value types.UID) *BuildConfigApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithResourceVersion(value string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *BuildConfigApplyConfiguration) WithResourceVersion(value string) *Build // If called multiple times, the Generation field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithGeneration(value int64) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BuildConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BuildConfigApplyConfiguration { +func (b *BuildConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BuildConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BuildConfigApplyConfiguration { +func (b *BuildConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *BuildConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *BuildConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *BuildConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *BuildConfigApplyConfiguration) WithLabels(entries map[string]string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *BuildConfigApplyConfiguration) WithLabels(entries map[string]string) *B // overwriting an existing map entries in Annotations field with the same key. func (b *BuildConfigApplyConfiguration) WithAnnotations(entries map[string]string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *BuildConfigApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BuildConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BuildConfigApplyConfiguration { +func (b *BuildConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *BuildConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *BuildConfigApplyConfiguration) WithFinalizers(values ...string) *BuildConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *BuildConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *BuildConfigApplyConfiguration) WithStatus(value *BuildConfigStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *BuildConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/build/applyconfigurations/build/v1/buildconfigspec.go b/build/applyconfigurations/build/v1/buildconfigspec.go index 1e6bcab059..07a5a0e1ac 100644 --- a/build/applyconfigurations/build/v1/buildconfigspec.go +++ b/build/applyconfigurations/build/v1/buildconfigspec.go @@ -48,7 +48,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithRunPolicy(value buildv1.BuildRun // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServiceAccount field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithServiceAccount(value string) *BuildConfigSpecApplyConfiguration { - b.ServiceAccount = &value + b.CommonSpecApplyConfiguration.ServiceAccount = &value return b } @@ -56,7 +56,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithServiceAccount(value string) *Bu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Source field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithSource(value *BuildSourceApplyConfiguration) *BuildConfigSpecApplyConfiguration { - b.Source = value + b.CommonSpecApplyConfiguration.Source = value return b } @@ -64,7 +64,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithSource(value *BuildSourceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Revision field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithRevision(value *SourceRevisionApplyConfiguration) *BuildConfigSpecApplyConfiguration { - b.Revision = value + b.CommonSpecApplyConfiguration.Revision = value return b } @@ -72,7 +72,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithRevision(value *SourceRevisionAp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Strategy field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithStrategy(value *BuildStrategyApplyConfiguration) *BuildConfigSpecApplyConfiguration { - b.Strategy = value + b.CommonSpecApplyConfiguration.Strategy = value return b } @@ -80,7 +80,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithStrategy(value *BuildStrategyApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Output field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithOutput(value *BuildOutputApplyConfiguration) *BuildConfigSpecApplyConfiguration { - b.Output = value + b.CommonSpecApplyConfiguration.Output = value return b } @@ -88,7 +88,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithOutput(value *BuildOutputApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resources field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *BuildConfigSpecApplyConfiguration { - b.Resources = &value + b.CommonSpecApplyConfiguration.Resources = &value return b } @@ -96,7 +96,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithResources(value corev1.ResourceR // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PostCommit field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithPostCommit(value *BuildPostCommitSpecApplyConfiguration) *BuildConfigSpecApplyConfiguration { - b.PostCommit = value + b.CommonSpecApplyConfiguration.PostCommit = value return b } @@ -104,7 +104,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithPostCommit(value *BuildPostCommi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CompletionDeadlineSeconds field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithCompletionDeadlineSeconds(value int64) *BuildConfigSpecApplyConfiguration { - b.CompletionDeadlineSeconds = &value + b.CommonSpecApplyConfiguration.CompletionDeadlineSeconds = &value return b } @@ -112,7 +112,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithCompletionDeadlineSeconds(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeSelector field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithNodeSelector(value buildv1.OptionalNodeSelector) *BuildConfigSpecApplyConfiguration { - b.NodeSelector = &value + b.CommonSpecApplyConfiguration.NodeSelector = &value return b } @@ -120,7 +120,7 @@ func (b *BuildConfigSpecApplyConfiguration) WithNodeSelector(value buildv1.Optio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MountTrustedCA field is set to the value of the last call. func (b *BuildConfigSpecApplyConfiguration) WithMountTrustedCA(value bool) *BuildConfigSpecApplyConfiguration { - b.MountTrustedCA = &value + b.CommonSpecApplyConfiguration.MountTrustedCA = &value return b } diff --git a/build/applyconfigurations/build/v1/buildoutput.go b/build/applyconfigurations/build/v1/buildoutput.go index 7dca6dc217..0becc3d82a 100644 --- a/build/applyconfigurations/build/v1/buildoutput.go +++ b/build/applyconfigurations/build/v1/buildoutput.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // BuildOutputApplyConfiguration represents a declarative configuration of the BuildOutput type for use // with apply. type BuildOutputApplyConfiguration struct { - To *v1.ObjectReference `json:"to,omitempty"` - PushSecret *v1.LocalObjectReference `json:"pushSecret,omitempty"` + To *corev1.ObjectReference `json:"to,omitempty"` + PushSecret *corev1.LocalObjectReference `json:"pushSecret,omitempty"` ImageLabels []ImageLabelApplyConfiguration `json:"imageLabels,omitempty"` } @@ -23,7 +23,7 @@ func BuildOutput() *BuildOutputApplyConfiguration { // WithTo sets the To field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the To field is set to the value of the last call. -func (b *BuildOutputApplyConfiguration) WithTo(value v1.ObjectReference) *BuildOutputApplyConfiguration { +func (b *BuildOutputApplyConfiguration) WithTo(value corev1.ObjectReference) *BuildOutputApplyConfiguration { b.To = &value return b } @@ -31,7 +31,7 @@ func (b *BuildOutputApplyConfiguration) WithTo(value v1.ObjectReference) *BuildO // WithPushSecret sets the PushSecret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PushSecret field is set to the value of the last call. -func (b *BuildOutputApplyConfiguration) WithPushSecret(value v1.LocalObjectReference) *BuildOutputApplyConfiguration { +func (b *BuildOutputApplyConfiguration) WithPushSecret(value corev1.LocalObjectReference) *BuildOutputApplyConfiguration { b.PushSecret = &value return b } diff --git a/build/applyconfigurations/build/v1/buildsource.go b/build/applyconfigurations/build/v1/buildsource.go index 2640fdb97f..d42919a7d8 100644 --- a/build/applyconfigurations/build/v1/buildsource.go +++ b/build/applyconfigurations/build/v1/buildsource.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" corev1 "k8s.io/api/core/v1" ) // BuildSourceApplyConfiguration represents a declarative configuration of the BuildSource type for use // with apply. type BuildSourceApplyConfiguration struct { - Type *v1.BuildSourceType `json:"type,omitempty"` + Type *buildv1.BuildSourceType `json:"type,omitempty"` Binary *BinaryBuildSourceApplyConfiguration `json:"binary,omitempty"` Dockerfile *string `json:"dockerfile,omitempty"` Git *GitBuildSourceApplyConfiguration `json:"git,omitempty"` @@ -30,7 +30,7 @@ func BuildSource() *BuildSourceApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *BuildSourceApplyConfiguration) WithType(value v1.BuildSourceType) *BuildSourceApplyConfiguration { +func (b *BuildSourceApplyConfiguration) WithType(value buildv1.BuildSourceType) *BuildSourceApplyConfiguration { b.Type = &value return b } diff --git a/build/applyconfigurations/build/v1/buildspec.go b/build/applyconfigurations/build/v1/buildspec.go index c79f5f91c2..3cb68d7988 100644 --- a/build/applyconfigurations/build/v1/buildspec.go +++ b/build/applyconfigurations/build/v1/buildspec.go @@ -24,7 +24,7 @@ func BuildSpec() *BuildSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServiceAccount field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithServiceAccount(value string) *BuildSpecApplyConfiguration { - b.ServiceAccount = &value + b.CommonSpecApplyConfiguration.ServiceAccount = &value return b } @@ -32,7 +32,7 @@ func (b *BuildSpecApplyConfiguration) WithServiceAccount(value string) *BuildSpe // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Source field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithSource(value *BuildSourceApplyConfiguration) *BuildSpecApplyConfiguration { - b.Source = value + b.CommonSpecApplyConfiguration.Source = value return b } @@ -40,7 +40,7 @@ func (b *BuildSpecApplyConfiguration) WithSource(value *BuildSourceApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Revision field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithRevision(value *SourceRevisionApplyConfiguration) *BuildSpecApplyConfiguration { - b.Revision = value + b.CommonSpecApplyConfiguration.Revision = value return b } @@ -48,7 +48,7 @@ func (b *BuildSpecApplyConfiguration) WithRevision(value *SourceRevisionApplyCon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Strategy field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithStrategy(value *BuildStrategyApplyConfiguration) *BuildSpecApplyConfiguration { - b.Strategy = value + b.CommonSpecApplyConfiguration.Strategy = value return b } @@ -56,7 +56,7 @@ func (b *BuildSpecApplyConfiguration) WithStrategy(value *BuildStrategyApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Output field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithOutput(value *BuildOutputApplyConfiguration) *BuildSpecApplyConfiguration { - b.Output = value + b.CommonSpecApplyConfiguration.Output = value return b } @@ -64,7 +64,7 @@ func (b *BuildSpecApplyConfiguration) WithOutput(value *BuildOutputApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resources field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *BuildSpecApplyConfiguration { - b.Resources = &value + b.CommonSpecApplyConfiguration.Resources = &value return b } @@ -72,7 +72,7 @@ func (b *BuildSpecApplyConfiguration) WithResources(value corev1.ResourceRequire // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PostCommit field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithPostCommit(value *BuildPostCommitSpecApplyConfiguration) *BuildSpecApplyConfiguration { - b.PostCommit = value + b.CommonSpecApplyConfiguration.PostCommit = value return b } @@ -80,7 +80,7 @@ func (b *BuildSpecApplyConfiguration) WithPostCommit(value *BuildPostCommitSpecA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CompletionDeadlineSeconds field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithCompletionDeadlineSeconds(value int64) *BuildSpecApplyConfiguration { - b.CompletionDeadlineSeconds = &value + b.CommonSpecApplyConfiguration.CompletionDeadlineSeconds = &value return b } @@ -88,7 +88,7 @@ func (b *BuildSpecApplyConfiguration) WithCompletionDeadlineSeconds(value int64) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeSelector field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithNodeSelector(value buildv1.OptionalNodeSelector) *BuildSpecApplyConfiguration { - b.NodeSelector = &value + b.CommonSpecApplyConfiguration.NodeSelector = &value return b } @@ -96,7 +96,7 @@ func (b *BuildSpecApplyConfiguration) WithNodeSelector(value buildv1.OptionalNod // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MountTrustedCA field is set to the value of the last call. func (b *BuildSpecApplyConfiguration) WithMountTrustedCA(value bool) *BuildSpecApplyConfiguration { - b.MountTrustedCA = &value + b.CommonSpecApplyConfiguration.MountTrustedCA = &value return b } diff --git a/build/applyconfigurations/build/v1/buildstatus.go b/build/applyconfigurations/build/v1/buildstatus.go index 4d67da2b07..7124372c15 100644 --- a/build/applyconfigurations/build/v1/buildstatus.go +++ b/build/applyconfigurations/build/v1/buildstatus.go @@ -5,7 +5,7 @@ package v1 import ( time "time" - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -13,9 +13,9 @@ import ( // BuildStatusApplyConfiguration represents a declarative configuration of the BuildStatus type for use // with apply. type BuildStatusApplyConfiguration struct { - Phase *v1.BuildPhase `json:"phase,omitempty"` + Phase *buildv1.BuildPhase `json:"phase,omitempty"` Cancelled *bool `json:"cancelled,omitempty"` - Reason *v1.StatusReason `json:"reason,omitempty"` + Reason *buildv1.StatusReason `json:"reason,omitempty"` Message *string `json:"message,omitempty"` StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"` @@ -37,7 +37,7 @@ func BuildStatus() *BuildStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *BuildStatusApplyConfiguration) WithPhase(value v1.BuildPhase) *BuildStatusApplyConfiguration { +func (b *BuildStatusApplyConfiguration) WithPhase(value buildv1.BuildPhase) *BuildStatusApplyConfiguration { b.Phase = &value return b } @@ -53,7 +53,7 @@ func (b *BuildStatusApplyConfiguration) WithCancelled(value bool) *BuildStatusAp // WithReason sets the Reason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Reason field is set to the value of the last call. -func (b *BuildStatusApplyConfiguration) WithReason(value v1.StatusReason) *BuildStatusApplyConfiguration { +func (b *BuildStatusApplyConfiguration) WithReason(value buildv1.StatusReason) *BuildStatusApplyConfiguration { b.Reason = &value return b } diff --git a/build/applyconfigurations/build/v1/buildstrategy.go b/build/applyconfigurations/build/v1/buildstrategy.go index 9ead11f51b..5ad290331f 100644 --- a/build/applyconfigurations/build/v1/buildstrategy.go +++ b/build/applyconfigurations/build/v1/buildstrategy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" ) // BuildStrategyApplyConfiguration represents a declarative configuration of the BuildStrategy type for use // with apply. type BuildStrategyApplyConfiguration struct { - Type *v1.BuildStrategyType `json:"type,omitempty"` + Type *buildv1.BuildStrategyType `json:"type,omitempty"` DockerStrategy *DockerBuildStrategyApplyConfiguration `json:"dockerStrategy,omitempty"` SourceStrategy *SourceBuildStrategyApplyConfiguration `json:"sourceStrategy,omitempty"` CustomStrategy *CustomBuildStrategyApplyConfiguration `json:"customStrategy,omitempty"` @@ -25,7 +25,7 @@ func BuildStrategy() *BuildStrategyApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *BuildStrategyApplyConfiguration) WithType(value v1.BuildStrategyType) *BuildStrategyApplyConfiguration { +func (b *BuildStrategyApplyConfiguration) WithType(value buildv1.BuildStrategyType) *BuildStrategyApplyConfiguration { b.Type = &value return b } diff --git a/build/applyconfigurations/build/v1/buildtriggerpolicy.go b/build/applyconfigurations/build/v1/buildtriggerpolicy.go index 1793b2c643..4cbcbff484 100644 --- a/build/applyconfigurations/build/v1/buildtriggerpolicy.go +++ b/build/applyconfigurations/build/v1/buildtriggerpolicy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" ) // BuildTriggerPolicyApplyConfiguration represents a declarative configuration of the BuildTriggerPolicy type for use // with apply. type BuildTriggerPolicyApplyConfiguration struct { - Type *v1.BuildTriggerType `json:"type,omitempty"` + Type *buildv1.BuildTriggerType `json:"type,omitempty"` GitHubWebHook *WebHookTriggerApplyConfiguration `json:"github,omitempty"` GenericWebHook *WebHookTriggerApplyConfiguration `json:"generic,omitempty"` ImageChange *ImageChangeTriggerApplyConfiguration `json:"imageChange,omitempty"` @@ -26,7 +26,7 @@ func BuildTriggerPolicy() *BuildTriggerPolicyApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *BuildTriggerPolicyApplyConfiguration) WithType(value v1.BuildTriggerType) *BuildTriggerPolicyApplyConfiguration { +func (b *BuildTriggerPolicyApplyConfiguration) WithType(value buildv1.BuildTriggerType) *BuildTriggerPolicyApplyConfiguration { b.Type = &value return b } diff --git a/build/applyconfigurations/build/v1/buildvolumesource.go b/build/applyconfigurations/build/v1/buildvolumesource.go index 713c6f7df2..96e8f7a1c2 100644 --- a/build/applyconfigurations/build/v1/buildvolumesource.go +++ b/build/applyconfigurations/build/v1/buildvolumesource.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" corev1 "k8s.io/api/core/v1" ) // BuildVolumeSourceApplyConfiguration represents a declarative configuration of the BuildVolumeSource type for use // with apply. type BuildVolumeSourceApplyConfiguration struct { - Type *v1.BuildVolumeSourceType `json:"type,omitempty"` - Secret *corev1.SecretVolumeSource `json:"secret,omitempty"` - ConfigMap *corev1.ConfigMapVolumeSource `json:"configMap,omitempty"` - CSI *corev1.CSIVolumeSource `json:"csi,omitempty"` + Type *buildv1.BuildVolumeSourceType `json:"type,omitempty"` + Secret *corev1.SecretVolumeSource `json:"secret,omitempty"` + ConfigMap *corev1.ConfigMapVolumeSource `json:"configMap,omitempty"` + CSI *corev1.CSIVolumeSource `json:"csi,omitempty"` } // BuildVolumeSourceApplyConfiguration constructs a declarative configuration of the BuildVolumeSource type for use with @@ -25,7 +25,7 @@ func BuildVolumeSource() *BuildVolumeSourceApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *BuildVolumeSourceApplyConfiguration) WithType(value v1.BuildVolumeSourceType) *BuildVolumeSourceApplyConfiguration { +func (b *BuildVolumeSourceApplyConfiguration) WithType(value buildv1.BuildVolumeSourceType) *BuildVolumeSourceApplyConfiguration { b.Type = &value return b } diff --git a/build/applyconfigurations/build/v1/configmapbuildsource.go b/build/applyconfigurations/build/v1/configmapbuildsource.go index c687551ff2..420b86656f 100644 --- a/build/applyconfigurations/build/v1/configmapbuildsource.go +++ b/build/applyconfigurations/build/v1/configmapbuildsource.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ConfigMapBuildSourceApplyConfiguration represents a declarative configuration of the ConfigMapBuildSource type for use // with apply. type ConfigMapBuildSourceApplyConfiguration struct { - ConfigMap *v1.LocalObjectReference `json:"configMap,omitempty"` - DestinationDir *string `json:"destinationDir,omitempty"` + ConfigMap *corev1.LocalObjectReference `json:"configMap,omitempty"` + DestinationDir *string `json:"destinationDir,omitempty"` } // ConfigMapBuildSourceApplyConfiguration constructs a declarative configuration of the ConfigMapBuildSource type for use with @@ -22,7 +22,7 @@ func ConfigMapBuildSource() *ConfigMapBuildSourceApplyConfiguration { // WithConfigMap sets the ConfigMap field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ConfigMap field is set to the value of the last call. -func (b *ConfigMapBuildSourceApplyConfiguration) WithConfigMap(value v1.LocalObjectReference) *ConfigMapBuildSourceApplyConfiguration { +func (b *ConfigMapBuildSourceApplyConfiguration) WithConfigMap(value corev1.LocalObjectReference) *ConfigMapBuildSourceApplyConfiguration { b.ConfigMap = &value return b } diff --git a/build/applyconfigurations/build/v1/custombuildstrategy.go b/build/applyconfigurations/build/v1/custombuildstrategy.go index 47ecb3ac47..b445ef5c24 100644 --- a/build/applyconfigurations/build/v1/custombuildstrategy.go +++ b/build/applyconfigurations/build/v1/custombuildstrategy.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // CustomBuildStrategyApplyConfiguration represents a declarative configuration of the CustomBuildStrategy type for use // with apply. type CustomBuildStrategyApplyConfiguration struct { - From *v1.ObjectReference `json:"from,omitempty"` - PullSecret *v1.LocalObjectReference `json:"pullSecret,omitempty"` - Env []v1.EnvVar `json:"env,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` + PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty"` + Env []corev1.EnvVar `json:"env,omitempty"` ExposeDockerSocket *bool `json:"exposeDockerSocket,omitempty"` ForcePull *bool `json:"forcePull,omitempty"` Secrets []SecretSpecApplyConfiguration `json:"secrets,omitempty"` @@ -27,7 +27,7 @@ func CustomBuildStrategy() *CustomBuildStrategyApplyConfiguration { // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *CustomBuildStrategyApplyConfiguration) WithFrom(value v1.ObjectReference) *CustomBuildStrategyApplyConfiguration { +func (b *CustomBuildStrategyApplyConfiguration) WithFrom(value corev1.ObjectReference) *CustomBuildStrategyApplyConfiguration { b.From = &value return b } @@ -35,7 +35,7 @@ func (b *CustomBuildStrategyApplyConfiguration) WithFrom(value v1.ObjectReferenc // WithPullSecret sets the PullSecret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PullSecret field is set to the value of the last call. -func (b *CustomBuildStrategyApplyConfiguration) WithPullSecret(value v1.LocalObjectReference) *CustomBuildStrategyApplyConfiguration { +func (b *CustomBuildStrategyApplyConfiguration) WithPullSecret(value corev1.LocalObjectReference) *CustomBuildStrategyApplyConfiguration { b.PullSecret = &value return b } @@ -43,7 +43,7 @@ func (b *CustomBuildStrategyApplyConfiguration) WithPullSecret(value v1.LocalObj // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. -func (b *CustomBuildStrategyApplyConfiguration) WithEnv(values ...v1.EnvVar) *CustomBuildStrategyApplyConfiguration { +func (b *CustomBuildStrategyApplyConfiguration) WithEnv(values ...corev1.EnvVar) *CustomBuildStrategyApplyConfiguration { for i := range values { b.Env = append(b.Env, values[i]) } diff --git a/build/applyconfigurations/build/v1/dockerbuildstrategy.go b/build/applyconfigurations/build/v1/dockerbuildstrategy.go index c3cd85bbc2..c37b95463f 100644 --- a/build/applyconfigurations/build/v1/dockerbuildstrategy.go +++ b/build/applyconfigurations/build/v1/dockerbuildstrategy.go @@ -4,19 +4,19 @@ package v1 import ( buildv1 "github.com/openshift/api/build/v1" - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // DockerBuildStrategyApplyConfiguration represents a declarative configuration of the DockerBuildStrategy type for use // with apply. type DockerBuildStrategyApplyConfiguration struct { - From *v1.ObjectReference `json:"from,omitempty"` - PullSecret *v1.LocalObjectReference `json:"pullSecret,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` + PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty"` NoCache *bool `json:"noCache,omitempty"` - Env []v1.EnvVar `json:"env,omitempty"` + Env []corev1.EnvVar `json:"env,omitempty"` ForcePull *bool `json:"forcePull,omitempty"` DockerfilePath *string `json:"dockerfilePath,omitempty"` - BuildArgs []v1.EnvVar `json:"buildArgs,omitempty"` + BuildArgs []corev1.EnvVar `json:"buildArgs,omitempty"` ImageOptimizationPolicy *buildv1.ImageOptimizationPolicy `json:"imageOptimizationPolicy,omitempty"` Volumes []BuildVolumeApplyConfiguration `json:"volumes,omitempty"` } @@ -30,7 +30,7 @@ func DockerBuildStrategy() *DockerBuildStrategyApplyConfiguration { // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *DockerBuildStrategyApplyConfiguration) WithFrom(value v1.ObjectReference) *DockerBuildStrategyApplyConfiguration { +func (b *DockerBuildStrategyApplyConfiguration) WithFrom(value corev1.ObjectReference) *DockerBuildStrategyApplyConfiguration { b.From = &value return b } @@ -38,7 +38,7 @@ func (b *DockerBuildStrategyApplyConfiguration) WithFrom(value v1.ObjectReferenc // WithPullSecret sets the PullSecret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PullSecret field is set to the value of the last call. -func (b *DockerBuildStrategyApplyConfiguration) WithPullSecret(value v1.LocalObjectReference) *DockerBuildStrategyApplyConfiguration { +func (b *DockerBuildStrategyApplyConfiguration) WithPullSecret(value corev1.LocalObjectReference) *DockerBuildStrategyApplyConfiguration { b.PullSecret = &value return b } @@ -54,7 +54,7 @@ func (b *DockerBuildStrategyApplyConfiguration) WithNoCache(value bool) *DockerB // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. -func (b *DockerBuildStrategyApplyConfiguration) WithEnv(values ...v1.EnvVar) *DockerBuildStrategyApplyConfiguration { +func (b *DockerBuildStrategyApplyConfiguration) WithEnv(values ...corev1.EnvVar) *DockerBuildStrategyApplyConfiguration { for i := range values { b.Env = append(b.Env, values[i]) } @@ -80,7 +80,7 @@ func (b *DockerBuildStrategyApplyConfiguration) WithDockerfilePath(value string) // WithBuildArgs adds the given value to the BuildArgs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the BuildArgs field. -func (b *DockerBuildStrategyApplyConfiguration) WithBuildArgs(values ...v1.EnvVar) *DockerBuildStrategyApplyConfiguration { +func (b *DockerBuildStrategyApplyConfiguration) WithBuildArgs(values ...corev1.EnvVar) *DockerBuildStrategyApplyConfiguration { for i := range values { b.BuildArgs = append(b.BuildArgs, values[i]) } diff --git a/build/applyconfigurations/build/v1/gitbuildsource.go b/build/applyconfigurations/build/v1/gitbuildsource.go index 15063a3875..f0426254bf 100644 --- a/build/applyconfigurations/build/v1/gitbuildsource.go +++ b/build/applyconfigurations/build/v1/gitbuildsource.go @@ -36,7 +36,7 @@ func (b *GitBuildSourceApplyConfiguration) WithRef(value string) *GitBuildSource // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HTTPProxy field is set to the value of the last call. func (b *GitBuildSourceApplyConfiguration) WithHTTPProxy(value string) *GitBuildSourceApplyConfiguration { - b.HTTPProxy = &value + b.ProxyConfigApplyConfiguration.HTTPProxy = &value return b } @@ -44,7 +44,7 @@ func (b *GitBuildSourceApplyConfiguration) WithHTTPProxy(value string) *GitBuild // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HTTPSProxy field is set to the value of the last call. func (b *GitBuildSourceApplyConfiguration) WithHTTPSProxy(value string) *GitBuildSourceApplyConfiguration { - b.HTTPSProxy = &value + b.ProxyConfigApplyConfiguration.HTTPSProxy = &value return b } @@ -52,6 +52,6 @@ func (b *GitBuildSourceApplyConfiguration) WithHTTPSProxy(value string) *GitBuil // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NoProxy field is set to the value of the last call. func (b *GitBuildSourceApplyConfiguration) WithNoProxy(value string) *GitBuildSourceApplyConfiguration { - b.NoProxy = &value + b.ProxyConfigApplyConfiguration.NoProxy = &value return b } diff --git a/build/applyconfigurations/build/v1/gitlabwebhookcause.go b/build/applyconfigurations/build/v1/gitlabwebhookcause.go index 3ac4f08683..db55e91b8d 100644 --- a/build/applyconfigurations/build/v1/gitlabwebhookcause.go +++ b/build/applyconfigurations/build/v1/gitlabwebhookcause.go @@ -18,7 +18,7 @@ func GitLabWebHookCause() *GitLabWebHookCauseApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Revision field is set to the value of the last call. func (b *GitLabWebHookCauseApplyConfiguration) WithRevision(value *SourceRevisionApplyConfiguration) *GitLabWebHookCauseApplyConfiguration { - b.Revision = value + b.CommonWebHookCauseApplyConfiguration.Revision = value return b } @@ -26,6 +26,6 @@ func (b *GitLabWebHookCauseApplyConfiguration) WithRevision(value *SourceRevisio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Secret field is set to the value of the last call. func (b *GitLabWebHookCauseApplyConfiguration) WithSecret(value string) *GitLabWebHookCauseApplyConfiguration { - b.Secret = &value + b.CommonWebHookCauseApplyConfiguration.Secret = &value return b } diff --git a/build/applyconfigurations/build/v1/imagechangecause.go b/build/applyconfigurations/build/v1/imagechangecause.go index 34b6098734..7c0bf8ca3f 100644 --- a/build/applyconfigurations/build/v1/imagechangecause.go +++ b/build/applyconfigurations/build/v1/imagechangecause.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ImageChangeCauseApplyConfiguration represents a declarative configuration of the ImageChangeCause type for use // with apply. type ImageChangeCauseApplyConfiguration struct { - ImageID *string `json:"imageID,omitempty"` - FromRef *v1.ObjectReference `json:"fromRef,omitempty"` + ImageID *string `json:"imageID,omitempty"` + FromRef *corev1.ObjectReference `json:"fromRef,omitempty"` } // ImageChangeCauseApplyConfiguration constructs a declarative configuration of the ImageChangeCause type for use with @@ -30,7 +30,7 @@ func (b *ImageChangeCauseApplyConfiguration) WithImageID(value string) *ImageCha // WithFromRef sets the FromRef field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FromRef field is set to the value of the last call. -func (b *ImageChangeCauseApplyConfiguration) WithFromRef(value v1.ObjectReference) *ImageChangeCauseApplyConfiguration { +func (b *ImageChangeCauseApplyConfiguration) WithFromRef(value corev1.ObjectReference) *ImageChangeCauseApplyConfiguration { b.FromRef = &value return b } diff --git a/build/applyconfigurations/build/v1/imagechangetrigger.go b/build/applyconfigurations/build/v1/imagechangetrigger.go index 7fe3862116..fe8b27ade8 100644 --- a/build/applyconfigurations/build/v1/imagechangetrigger.go +++ b/build/applyconfigurations/build/v1/imagechangetrigger.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ImageChangeTriggerApplyConfiguration represents a declarative configuration of the ImageChangeTrigger type for use // with apply. type ImageChangeTriggerApplyConfiguration struct { - LastTriggeredImageID *string `json:"lastTriggeredImageID,omitempty"` - From *v1.ObjectReference `json:"from,omitempty"` - Paused *bool `json:"paused,omitempty"` + LastTriggeredImageID *string `json:"lastTriggeredImageID,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` + Paused *bool `json:"paused,omitempty"` } // ImageChangeTriggerApplyConfiguration constructs a declarative configuration of the ImageChangeTrigger type for use with @@ -31,7 +31,7 @@ func (b *ImageChangeTriggerApplyConfiguration) WithLastTriggeredImageID(value st // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *ImageChangeTriggerApplyConfiguration) WithFrom(value v1.ObjectReference) *ImageChangeTriggerApplyConfiguration { +func (b *ImageChangeTriggerApplyConfiguration) WithFrom(value corev1.ObjectReference) *ImageChangeTriggerApplyConfiguration { b.From = &value return b } diff --git a/build/applyconfigurations/build/v1/imagesource.go b/build/applyconfigurations/build/v1/imagesource.go index c49a14487f..fb46f9affa 100644 --- a/build/applyconfigurations/build/v1/imagesource.go +++ b/build/applyconfigurations/build/v1/imagesource.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ImageSourceApplyConfiguration represents a declarative configuration of the ImageSource type for use // with apply. type ImageSourceApplyConfiguration struct { - From *v1.ObjectReference `json:"from,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` As []string `json:"as,omitempty"` Paths []ImageSourcePathApplyConfiguration `json:"paths,omitempty"` - PullSecret *v1.LocalObjectReference `json:"pullSecret,omitempty"` + PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty"` } // ImageSourceApplyConfiguration constructs a declarative configuration of the ImageSource type for use with @@ -24,7 +24,7 @@ func ImageSource() *ImageSourceApplyConfiguration { // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *ImageSourceApplyConfiguration) WithFrom(value v1.ObjectReference) *ImageSourceApplyConfiguration { +func (b *ImageSourceApplyConfiguration) WithFrom(value corev1.ObjectReference) *ImageSourceApplyConfiguration { b.From = &value return b } @@ -55,7 +55,7 @@ func (b *ImageSourceApplyConfiguration) WithPaths(values ...*ImageSourcePathAppl // WithPullSecret sets the PullSecret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PullSecret field is set to the value of the last call. -func (b *ImageSourceApplyConfiguration) WithPullSecret(value v1.LocalObjectReference) *ImageSourceApplyConfiguration { +func (b *ImageSourceApplyConfiguration) WithPullSecret(value corev1.LocalObjectReference) *ImageSourceApplyConfiguration { b.PullSecret = &value return b } diff --git a/build/applyconfigurations/build/v1/jenkinspipelinebuildstrategy.go b/build/applyconfigurations/build/v1/jenkinspipelinebuildstrategy.go index 00f7de00a1..940caa1b30 100644 --- a/build/applyconfigurations/build/v1/jenkinspipelinebuildstrategy.go +++ b/build/applyconfigurations/build/v1/jenkinspipelinebuildstrategy.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // JenkinsPipelineBuildStrategyApplyConfiguration represents a declarative configuration of the JenkinsPipelineBuildStrategy type for use // with apply. type JenkinsPipelineBuildStrategyApplyConfiguration struct { - JenkinsfilePath *string `json:"jenkinsfilePath,omitempty"` - Jenkinsfile *string `json:"jenkinsfile,omitempty"` - Env []v1.EnvVar `json:"env,omitempty"` + JenkinsfilePath *string `json:"jenkinsfilePath,omitempty"` + Jenkinsfile *string `json:"jenkinsfile,omitempty"` + Env []corev1.EnvVar `json:"env,omitempty"` } // JenkinsPipelineBuildStrategyApplyConfiguration constructs a declarative configuration of the JenkinsPipelineBuildStrategy type for use with @@ -39,7 +39,7 @@ func (b *JenkinsPipelineBuildStrategyApplyConfiguration) WithJenkinsfile(value s // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. -func (b *JenkinsPipelineBuildStrategyApplyConfiguration) WithEnv(values ...v1.EnvVar) *JenkinsPipelineBuildStrategyApplyConfiguration { +func (b *JenkinsPipelineBuildStrategyApplyConfiguration) WithEnv(values ...corev1.EnvVar) *JenkinsPipelineBuildStrategyApplyConfiguration { for i := range values { b.Env = append(b.Env, values[i]) } diff --git a/build/applyconfigurations/build/v1/secretbuildsource.go b/build/applyconfigurations/build/v1/secretbuildsource.go index f64fbdf23f..7c6d9c83a2 100644 --- a/build/applyconfigurations/build/v1/secretbuildsource.go +++ b/build/applyconfigurations/build/v1/secretbuildsource.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // SecretBuildSourceApplyConfiguration represents a declarative configuration of the SecretBuildSource type for use // with apply. type SecretBuildSourceApplyConfiguration struct { - Secret *v1.LocalObjectReference `json:"secret,omitempty"` - DestinationDir *string `json:"destinationDir,omitempty"` + Secret *corev1.LocalObjectReference `json:"secret,omitempty"` + DestinationDir *string `json:"destinationDir,omitempty"` } // SecretBuildSourceApplyConfiguration constructs a declarative configuration of the SecretBuildSource type for use with @@ -22,7 +22,7 @@ func SecretBuildSource() *SecretBuildSourceApplyConfiguration { // WithSecret sets the Secret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Secret field is set to the value of the last call. -func (b *SecretBuildSourceApplyConfiguration) WithSecret(value v1.LocalObjectReference) *SecretBuildSourceApplyConfiguration { +func (b *SecretBuildSourceApplyConfiguration) WithSecret(value corev1.LocalObjectReference) *SecretBuildSourceApplyConfiguration { b.Secret = &value return b } diff --git a/build/applyconfigurations/build/v1/secretspec.go b/build/applyconfigurations/build/v1/secretspec.go index 1ddb792bb1..b46ebed223 100644 --- a/build/applyconfigurations/build/v1/secretspec.go +++ b/build/applyconfigurations/build/v1/secretspec.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // SecretSpecApplyConfiguration represents a declarative configuration of the SecretSpec type for use // with apply. type SecretSpecApplyConfiguration struct { - SecretSource *v1.LocalObjectReference `json:"secretSource,omitempty"` - MountPath *string `json:"mountPath,omitempty"` + SecretSource *corev1.LocalObjectReference `json:"secretSource,omitempty"` + MountPath *string `json:"mountPath,omitempty"` } // SecretSpecApplyConfiguration constructs a declarative configuration of the SecretSpec type for use with @@ -22,7 +22,7 @@ func SecretSpec() *SecretSpecApplyConfiguration { // WithSecretSource sets the SecretSource field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SecretSource field is set to the value of the last call. -func (b *SecretSpecApplyConfiguration) WithSecretSource(value v1.LocalObjectReference) *SecretSpecApplyConfiguration { +func (b *SecretSpecApplyConfiguration) WithSecretSource(value corev1.LocalObjectReference) *SecretSpecApplyConfiguration { b.SecretSource = &value return b } diff --git a/build/applyconfigurations/build/v1/sourcebuildstrategy.go b/build/applyconfigurations/build/v1/sourcebuildstrategy.go index f3784d48f2..ade973c2ef 100644 --- a/build/applyconfigurations/build/v1/sourcebuildstrategy.go +++ b/build/applyconfigurations/build/v1/sourcebuildstrategy.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // SourceBuildStrategyApplyConfiguration represents a declarative configuration of the SourceBuildStrategy type for use // with apply. type SourceBuildStrategyApplyConfiguration struct { - From *v1.ObjectReference `json:"from,omitempty"` - PullSecret *v1.LocalObjectReference `json:"pullSecret,omitempty"` - Env []v1.EnvVar `json:"env,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` + PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty"` + Env []corev1.EnvVar `json:"env,omitempty"` Scripts *string `json:"scripts,omitempty"` Incremental *bool `json:"incremental,omitempty"` ForcePull *bool `json:"forcePull,omitempty"` @@ -27,7 +27,7 @@ func SourceBuildStrategy() *SourceBuildStrategyApplyConfiguration { // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *SourceBuildStrategyApplyConfiguration) WithFrom(value v1.ObjectReference) *SourceBuildStrategyApplyConfiguration { +func (b *SourceBuildStrategyApplyConfiguration) WithFrom(value corev1.ObjectReference) *SourceBuildStrategyApplyConfiguration { b.From = &value return b } @@ -35,7 +35,7 @@ func (b *SourceBuildStrategyApplyConfiguration) WithFrom(value v1.ObjectReferenc // WithPullSecret sets the PullSecret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PullSecret field is set to the value of the last call. -func (b *SourceBuildStrategyApplyConfiguration) WithPullSecret(value v1.LocalObjectReference) *SourceBuildStrategyApplyConfiguration { +func (b *SourceBuildStrategyApplyConfiguration) WithPullSecret(value corev1.LocalObjectReference) *SourceBuildStrategyApplyConfiguration { b.PullSecret = &value return b } @@ -43,7 +43,7 @@ func (b *SourceBuildStrategyApplyConfiguration) WithPullSecret(value v1.LocalObj // WithEnv adds the given value to the Env field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Env field. -func (b *SourceBuildStrategyApplyConfiguration) WithEnv(values ...v1.EnvVar) *SourceBuildStrategyApplyConfiguration { +func (b *SourceBuildStrategyApplyConfiguration) WithEnv(values ...corev1.EnvVar) *SourceBuildStrategyApplyConfiguration { for i := range values { b.Env = append(b.Env, values[i]) } diff --git a/build/applyconfigurations/build/v1/sourcerevision.go b/build/applyconfigurations/build/v1/sourcerevision.go index ac35c4c5cd..e99261ac85 100644 --- a/build/applyconfigurations/build/v1/sourcerevision.go +++ b/build/applyconfigurations/build/v1/sourcerevision.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" ) // SourceRevisionApplyConfiguration represents a declarative configuration of the SourceRevision type for use // with apply. type SourceRevisionApplyConfiguration struct { - Type *v1.BuildSourceType `json:"type,omitempty"` + Type *buildv1.BuildSourceType `json:"type,omitempty"` Git *GitSourceRevisionApplyConfiguration `json:"git,omitempty"` } @@ -22,7 +22,7 @@ func SourceRevision() *SourceRevisionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SourceRevisionApplyConfiguration) WithType(value v1.BuildSourceType) *SourceRevisionApplyConfiguration { +func (b *SourceRevisionApplyConfiguration) WithType(value buildv1.BuildSourceType) *SourceRevisionApplyConfiguration { b.Type = &value return b } diff --git a/build/applyconfigurations/build/v1/stageinfo.go b/build/applyconfigurations/build/v1/stageinfo.go index 34a416bbb7..1f7e390bb4 100644 --- a/build/applyconfigurations/build/v1/stageinfo.go +++ b/build/applyconfigurations/build/v1/stageinfo.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // StageInfoApplyConfiguration represents a declarative configuration of the StageInfo type for use // with apply. type StageInfoApplyConfiguration struct { - Name *v1.StageName `json:"name,omitempty"` + Name *buildv1.StageName `json:"name,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` DurationMilliseconds *int64 `json:"durationMilliseconds,omitempty"` Steps []StepInfoApplyConfiguration `json:"steps,omitempty"` @@ -25,7 +25,7 @@ func StageInfo() *StageInfoApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *StageInfoApplyConfiguration) WithName(value v1.StageName) *StageInfoApplyConfiguration { +func (b *StageInfoApplyConfiguration) WithName(value buildv1.StageName) *StageInfoApplyConfiguration { b.Name = &value return b } diff --git a/build/applyconfigurations/build/v1/stepinfo.go b/build/applyconfigurations/build/v1/stepinfo.go index 149dc9a357..4049aa5e53 100644 --- a/build/applyconfigurations/build/v1/stepinfo.go +++ b/build/applyconfigurations/build/v1/stepinfo.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" + buildv1 "github.com/openshift/api/build/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // StepInfoApplyConfiguration represents a declarative configuration of the StepInfo type for use // with apply. type StepInfoApplyConfiguration struct { - Name *v1.StepName `json:"name,omitempty"` - StartTime *metav1.Time `json:"startTime,omitempty"` - DurationMilliseconds *int64 `json:"durationMilliseconds,omitempty"` + Name *buildv1.StepName `json:"name,omitempty"` + StartTime *metav1.Time `json:"startTime,omitempty"` + DurationMilliseconds *int64 `json:"durationMilliseconds,omitempty"` } // StepInfoApplyConfiguration constructs a declarative configuration of the StepInfo type for use with @@ -24,7 +24,7 @@ func StepInfo() *StepInfoApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *StepInfoApplyConfiguration) WithName(value v1.StepName) *StepInfoApplyConfiguration { +func (b *StepInfoApplyConfiguration) WithName(value buildv1.StepName) *StepInfoApplyConfiguration { b.Name = &value return b } diff --git a/build/applyconfigurations/internal/internal.go b/build/applyconfigurations/internal/internal.go index e2a7f320ec..4b1e370810 100644 --- a/build/applyconfigurations/internal/internal.go +++ b/build/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/build/clientset/versioned/clientset.go b/build/clientset/versioned/clientset.go index 8f5337fd18..ef55d34604 100644 --- a/build/clientset/versioned/clientset.go +++ b/build/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" buildv1 "github.com/openshift/client-go/build/clientset/versioned/typed/build/v1" discovery "k8s.io/client-go/discovery" diff --git a/build/clientset/versioned/typed/build/v1/build.go b/build/clientset/versioned/typed/build/v1/build.go index 4687b84614..4be0e1f0aa 100644 --- a/build/clientset/versioned/typed/build/v1/build.go +++ b/build/clientset/versioned/typed/build/v1/build.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/build/v1" - buildv1 "github.com/openshift/client-go/build/applyconfigurations/build/v1" + buildv1 "github.com/openshift/api/build/v1" + applyconfigurationsbuildv1 "github.com/openshift/client-go/build/applyconfigurations/build/v1" scheme "github.com/openshift/client-go/build/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,46 +22,47 @@ type BuildsGetter interface { // BuildInterface has methods to work with Build resources. type BuildInterface interface { - Create(ctx context.Context, build *v1.Build, opts metav1.CreateOptions) (*v1.Build, error) - Update(ctx context.Context, build *v1.Build, opts metav1.UpdateOptions) (*v1.Build, error) + Create(ctx context.Context, build *buildv1.Build, opts metav1.CreateOptions) (*buildv1.Build, error) + Update(ctx context.Context, build *buildv1.Build, opts metav1.UpdateOptions) (*buildv1.Build, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, build *v1.Build, opts metav1.UpdateOptions) (*v1.Build, error) + UpdateStatus(ctx context.Context, build *buildv1.Build, opts metav1.UpdateOptions) (*buildv1.Build, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Build, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.BuildList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*buildv1.Build, error) + List(ctx context.Context, opts metav1.ListOptions) (*buildv1.BuildList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Build, err error) - Apply(ctx context.Context, build *buildv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Build, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *buildv1.Build, err error) + Apply(ctx context.Context, build *applyconfigurationsbuildv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *buildv1.Build, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, build *buildv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Build, err error) - UpdateDetails(ctx context.Context, buildName string, build *v1.Build, opts metav1.UpdateOptions) (*v1.Build, error) - Clone(ctx context.Context, buildName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (*v1.Build, error) + ApplyStatus(ctx context.Context, build *applyconfigurationsbuildv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *buildv1.Build, err error) + UpdateDetails(ctx context.Context, buildName string, build *buildv1.Build, opts metav1.UpdateOptions) (*buildv1.Build, error) + Clone(ctx context.Context, buildName string, buildRequest *buildv1.BuildRequest, opts metav1.CreateOptions) (*buildv1.Build, error) BuildExpansion } // builds implements BuildInterface type builds struct { - *gentype.ClientWithListAndApply[*v1.Build, *v1.BuildList, *buildv1.BuildApplyConfiguration] + *gentype.ClientWithListAndApply[*buildv1.Build, *buildv1.BuildList, *applyconfigurationsbuildv1.BuildApplyConfiguration] } // newBuilds returns a Builds func newBuilds(c *BuildV1Client, namespace string) *builds { return &builds{ - gentype.NewClientWithListAndApply[*v1.Build, *v1.BuildList, *buildv1.BuildApplyConfiguration]( + gentype.NewClientWithListAndApply[*buildv1.Build, *buildv1.BuildList, *applyconfigurationsbuildv1.BuildApplyConfiguration]( "builds", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Build { return &v1.Build{} }, - func() *v1.BuildList { return &v1.BuildList{} }), + func() *buildv1.Build { return &buildv1.Build{} }, + func() *buildv1.BuildList { return &buildv1.BuildList{} }, + ), } } // UpdateDetails takes the top resource name and the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. -func (c *builds) UpdateDetails(ctx context.Context, buildName string, build *v1.Build, opts metav1.UpdateOptions) (result *v1.Build, err error) { - result = &v1.Build{} +func (c *builds) UpdateDetails(ctx context.Context, buildName string, build *buildv1.Build, opts metav1.UpdateOptions) (result *buildv1.Build, err error) { + result = &buildv1.Build{} err = c.GetClient().Put(). Namespace(c.GetNamespace()). Resource("builds"). @@ -75,8 +76,8 @@ func (c *builds) UpdateDetails(ctx context.Context, buildName string, build *v1. } // Clone takes the representation of a buildRequest and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *builds) Clone(ctx context.Context, buildName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (result *v1.Build, err error) { - result = &v1.Build{} +func (c *builds) Clone(ctx context.Context, buildName string, buildRequest *buildv1.BuildRequest, opts metav1.CreateOptions) (result *buildv1.Build, err error) { + result = &buildv1.Build{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). Resource("builds"). diff --git a/build/clientset/versioned/typed/build/v1/build_client.go b/build/clientset/versioned/typed/build/v1/build_client.go index dcd0a5549c..c8e5a1f365 100644 --- a/build/clientset/versioned/typed/build/v1/build_client.go +++ b/build/clientset/versioned/typed/build/v1/build_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/build/v1" - "github.com/openshift/client-go/build/clientset/versioned/scheme" + buildv1 "github.com/openshift/api/build/v1" + scheme "github.com/openshift/client-go/build/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *BuildV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := buildv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/build/clientset/versioned/typed/build/v1/buildconfig.go b/build/clientset/versioned/typed/build/v1/buildconfig.go index fd18055a28..16bd942026 100644 --- a/build/clientset/versioned/typed/build/v1/buildconfig.go +++ b/build/clientset/versioned/typed/build/v1/buildconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/build/v1" - buildv1 "github.com/openshift/client-go/build/applyconfigurations/build/v1" + buildv1 "github.com/openshift/api/build/v1" + applyconfigurationsbuildv1 "github.com/openshift/client-go/build/applyconfigurations/build/v1" scheme "github.com/openshift/client-go/build/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,45 +22,46 @@ type BuildConfigsGetter interface { // BuildConfigInterface has methods to work with BuildConfig resources. type BuildConfigInterface interface { - Create(ctx context.Context, buildConfig *v1.BuildConfig, opts metav1.CreateOptions) (*v1.BuildConfig, error) - Update(ctx context.Context, buildConfig *v1.BuildConfig, opts metav1.UpdateOptions) (*v1.BuildConfig, error) + Create(ctx context.Context, buildConfig *buildv1.BuildConfig, opts metav1.CreateOptions) (*buildv1.BuildConfig, error) + Update(ctx context.Context, buildConfig *buildv1.BuildConfig, opts metav1.UpdateOptions) (*buildv1.BuildConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, buildConfig *v1.BuildConfig, opts metav1.UpdateOptions) (*v1.BuildConfig, error) + UpdateStatus(ctx context.Context, buildConfig *buildv1.BuildConfig, opts metav1.UpdateOptions) (*buildv1.BuildConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.BuildConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.BuildConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*buildv1.BuildConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*buildv1.BuildConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.BuildConfig, err error) - Apply(ctx context.Context, buildConfig *buildv1.BuildConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.BuildConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *buildv1.BuildConfig, err error) + Apply(ctx context.Context, buildConfig *applyconfigurationsbuildv1.BuildConfigApplyConfiguration, opts metav1.ApplyOptions) (result *buildv1.BuildConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, buildConfig *buildv1.BuildConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.BuildConfig, err error) - Instantiate(ctx context.Context, buildConfigName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (*v1.Build, error) + ApplyStatus(ctx context.Context, buildConfig *applyconfigurationsbuildv1.BuildConfigApplyConfiguration, opts metav1.ApplyOptions) (result *buildv1.BuildConfig, err error) + Instantiate(ctx context.Context, buildConfigName string, buildRequest *buildv1.BuildRequest, opts metav1.CreateOptions) (*buildv1.Build, error) BuildConfigExpansion } // buildConfigs implements BuildConfigInterface type buildConfigs struct { - *gentype.ClientWithListAndApply[*v1.BuildConfig, *v1.BuildConfigList, *buildv1.BuildConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*buildv1.BuildConfig, *buildv1.BuildConfigList, *applyconfigurationsbuildv1.BuildConfigApplyConfiguration] } // newBuildConfigs returns a BuildConfigs func newBuildConfigs(c *BuildV1Client, namespace string) *buildConfigs { return &buildConfigs{ - gentype.NewClientWithListAndApply[*v1.BuildConfig, *v1.BuildConfigList, *buildv1.BuildConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*buildv1.BuildConfig, *buildv1.BuildConfigList, *applyconfigurationsbuildv1.BuildConfigApplyConfiguration]( "buildconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.BuildConfig { return &v1.BuildConfig{} }, - func() *v1.BuildConfigList { return &v1.BuildConfigList{} }), + func() *buildv1.BuildConfig { return &buildv1.BuildConfig{} }, + func() *buildv1.BuildConfigList { return &buildv1.BuildConfigList{} }, + ), } } // Instantiate takes the representation of a buildRequest and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *buildConfigs) Instantiate(ctx context.Context, buildConfigName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (result *v1.Build, err error) { - result = &v1.Build{} +func (c *buildConfigs) Instantiate(ctx context.Context, buildConfigName string, buildRequest *buildv1.BuildRequest, opts metav1.CreateOptions) (result *buildv1.Build, err error) { + result = &buildv1.Build{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). Resource("buildconfigs"). diff --git a/build/clientset/versioned/typed/build/v1/fake/fake_build.go b/build/clientset/versioned/typed/build/v1/fake/fake_build.go index 99087786a0..930212ebf3 100644 --- a/build/clientset/versioned/typed/build/v1/fake/fake_build.go +++ b/build/clientset/versioned/typed/build/v1/fake/fake_build.go @@ -3,188 +3,44 @@ package fake import ( - "context" - json "encoding/json" - "fmt" + context "context" v1 "github.com/openshift/api/build/v1" buildv1 "github.com/openshift/client-go/build/applyconfigurations/build/v1" + typedbuildv1 "github.com/openshift/client-go/build/clientset/versioned/typed/build/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeBuilds implements BuildInterface -type FakeBuilds struct { +// fakeBuilds implements BuildInterface +type fakeBuilds struct { + *gentype.FakeClientWithListAndApply[*v1.Build, *v1.BuildList, *buildv1.BuildApplyConfiguration] Fake *FakeBuildV1 - ns string } -var buildsResource = v1.SchemeGroupVersion.WithResource("builds") - -var buildsKind = v1.SchemeGroupVersion.WithKind("Build") - -// Get takes name of the build, and returns the corresponding build object, and an error if there is any. -func (c *FakeBuilds) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(buildsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// List takes label and field selectors, and returns the list of Builds that match those selectors. -func (c *FakeBuilds) List(ctx context.Context, opts metav1.ListOptions) (result *v1.BuildList, err error) { - emptyResult := &v1.BuildList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(buildsResource, buildsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.BuildList{ListMeta: obj.(*v1.BuildList).ListMeta} - for _, item := range obj.(*v1.BuildList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested builds. -func (c *FakeBuilds) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(buildsResource, c.ns, opts)) - -} - -// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Create(ctx context.Context, build *v1.Build, opts metav1.CreateOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(buildsResource, c.ns, build, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Update(ctx context.Context, build *v1.Build, opts metav1.UpdateOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(buildsResource, c.ns, build, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeBuilds(fake *FakeBuildV1, namespace string) typedbuildv1.BuildInterface { + return &fakeBuilds{ + gentype.NewFakeClientWithListAndApply[*v1.Build, *v1.BuildList, *buildv1.BuildApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("builds"), + v1.SchemeGroupVersion.WithKind("Build"), + func() *v1.Build { return &v1.Build{} }, + func() *v1.BuildList { return &v1.BuildList{} }, + func(dst, src *v1.BuildList) { dst.ListMeta = src.ListMeta }, + func(list *v1.BuildList) []*v1.Build { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.BuildList, items []*v1.Build) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Build), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBuilds) UpdateStatus(ctx context.Context, build *v1.Build, opts metav1.UpdateOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(buildsResource, "status", c.ns, build, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// Delete takes name of the build and deletes it. Returns an error if one occurs. -func (c *FakeBuilds) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(buildsResource, c.ns, name, opts), &v1.Build{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeBuilds) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(buildsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.BuildList{}) - return err -} - -// Patch applies the patch and returns the patched build. -func (c *FakeBuilds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(buildsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied build. -func (c *FakeBuilds) Apply(ctx context.Context, build *buildv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Build, err error) { - if build == nil { - return nil, fmt.Errorf("build provided to Apply must not be nil") - } - data, err := json.Marshal(build) - if err != nil { - return nil, err - } - name := build.Name - if name == nil { - return nil, fmt.Errorf("build.Name must be provided to Apply") - } - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(buildsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeBuilds) ApplyStatus(ctx context.Context, build *buildv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Build, err error) { - if build == nil { - return nil, fmt.Errorf("build provided to Apply must not be nil") - } - data, err := json.Marshal(build) - if err != nil { - return nil, err - } - name := build.Name - if name == nil { - return nil, fmt.Errorf("build.Name must be provided to Apply") - } - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(buildsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err } // UpdateDetails takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) UpdateDetails(ctx context.Context, buildName string, build *v1.Build, opts metav1.UpdateOptions) (result *v1.Build, err error) { +func (c *fakeBuilds) UpdateDetails(ctx context.Context, buildName string, build *v1.Build, opts metav1.UpdateOptions) (result *v1.Build, err error) { emptyResult := &v1.Build{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(buildsResource, "details", c.ns, build, opts), &v1.Build{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(c.Resource(), "details", c.Namespace(), build, opts), &v1.Build{}) if obj == nil { return emptyResult, err @@ -193,10 +49,10 @@ func (c *FakeBuilds) UpdateDetails(ctx context.Context, buildName string, build } // Clone takes the representation of a buildRequest and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Clone(ctx context.Context, buildName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (result *v1.Build, err error) { +func (c *fakeBuilds) Clone(ctx context.Context, buildName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (result *v1.Build, err error) { emptyResult := &v1.Build{} obj, err := c.Fake. - Invokes(testing.NewCreateSubresourceActionWithOptions(buildsResource, buildName, "clone", c.ns, buildRequest, opts), emptyResult) + Invokes(testing.NewCreateSubresourceActionWithOptions(c.Resource(), buildName, "clone", c.Namespace(), buildRequest, opts), emptyResult) if obj == nil { return emptyResult, err diff --git a/build/clientset/versioned/typed/build/v1/fake/fake_build_client.go b/build/clientset/versioned/typed/build/v1/fake/fake_build_client.go index 31cdb947c4..b5ad07c110 100644 --- a/build/clientset/versioned/typed/build/v1/fake/fake_build_client.go +++ b/build/clientset/versioned/typed/build/v1/fake/fake_build_client.go @@ -13,11 +13,11 @@ type FakeBuildV1 struct { } func (c *FakeBuildV1) Builds(namespace string) v1.BuildInterface { - return &FakeBuilds{c, namespace} + return newFakeBuilds(c, namespace) } func (c *FakeBuildV1) BuildConfigs(namespace string) v1.BuildConfigInterface { - return &FakeBuildConfigs{c, namespace} + return newFakeBuildConfigs(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/build/clientset/versioned/typed/build/v1/fake/fake_buildconfig.go b/build/clientset/versioned/typed/build/v1/fake/fake_buildconfig.go index 357a794968..dfa520dd4f 100644 --- a/build/clientset/versioned/typed/build/v1/fake/fake_buildconfig.go +++ b/build/clientset/versioned/typed/build/v1/fake/fake_buildconfig.go @@ -3,188 +3,44 @@ package fake import ( - "context" - json "encoding/json" - "fmt" + context "context" v1 "github.com/openshift/api/build/v1" buildv1 "github.com/openshift/client-go/build/applyconfigurations/build/v1" + typedbuildv1 "github.com/openshift/client-go/build/clientset/versioned/typed/build/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeBuildConfigs implements BuildConfigInterface -type FakeBuildConfigs struct { +// fakeBuildConfigs implements BuildConfigInterface +type fakeBuildConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.BuildConfig, *v1.BuildConfigList, *buildv1.BuildConfigApplyConfiguration] Fake *FakeBuildV1 - ns string } -var buildconfigsResource = v1.SchemeGroupVersion.WithResource("buildconfigs") - -var buildconfigsKind = v1.SchemeGroupVersion.WithKind("BuildConfig") - -// Get takes name of the buildConfig, and returns the corresponding buildConfig object, and an error if there is any. -func (c *FakeBuildConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.BuildConfig, err error) { - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(buildconfigsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BuildConfig), err -} - -// List takes label and field selectors, and returns the list of BuildConfigs that match those selectors. -func (c *FakeBuildConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.BuildConfigList, err error) { - emptyResult := &v1.BuildConfigList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(buildconfigsResource, buildconfigsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.BuildConfigList{ListMeta: obj.(*v1.BuildConfigList).ListMeta} - for _, item := range obj.(*v1.BuildConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested buildConfigs. -func (c *FakeBuildConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(buildconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a buildConfig and creates it. Returns the server's representation of the buildConfig, and an error, if there is any. -func (c *FakeBuildConfigs) Create(ctx context.Context, buildConfig *v1.BuildConfig, opts metav1.CreateOptions) (result *v1.BuildConfig, err error) { - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(buildconfigsResource, c.ns, buildConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BuildConfig), err -} - -// Update takes the representation of a buildConfig and updates it. Returns the server's representation of the buildConfig, and an error, if there is any. -func (c *FakeBuildConfigs) Update(ctx context.Context, buildConfig *v1.BuildConfig, opts metav1.UpdateOptions) (result *v1.BuildConfig, err error) { - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(buildconfigsResource, c.ns, buildConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BuildConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBuildConfigs) UpdateStatus(ctx context.Context, buildConfig *v1.BuildConfig, opts metav1.UpdateOptions) (result *v1.BuildConfig, err error) { - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(buildconfigsResource, "status", c.ns, buildConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BuildConfig), err -} - -// Delete takes name of the buildConfig and deletes it. Returns an error if one occurs. -func (c *FakeBuildConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(buildconfigsResource, c.ns, name, opts), &v1.BuildConfig{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeBuildConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(buildconfigsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.BuildConfigList{}) - return err -} - -// Patch applies the patch and returns the patched buildConfig. -func (c *FakeBuildConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.BuildConfig, err error) { - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(buildconfigsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BuildConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied buildConfig. -func (c *FakeBuildConfigs) Apply(ctx context.Context, buildConfig *buildv1.BuildConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.BuildConfig, err error) { - if buildConfig == nil { - return nil, fmt.Errorf("buildConfig provided to Apply must not be nil") - } - data, err := json.Marshal(buildConfig) - if err != nil { - return nil, err - } - name := buildConfig.Name - if name == nil { - return nil, fmt.Errorf("buildConfig.Name must be provided to Apply") - } - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(buildconfigsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BuildConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeBuildConfigs) ApplyStatus(ctx context.Context, buildConfig *buildv1.BuildConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.BuildConfig, err error) { - if buildConfig == nil { - return nil, fmt.Errorf("buildConfig provided to Apply must not be nil") - } - data, err := json.Marshal(buildConfig) - if err != nil { - return nil, err - } - name := buildConfig.Name - if name == nil { - return nil, fmt.Errorf("buildConfig.Name must be provided to Apply") - } - emptyResult := &v1.BuildConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(buildconfigsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeBuildConfigs(fake *FakeBuildV1, namespace string) typedbuildv1.BuildConfigInterface { + return &fakeBuildConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.BuildConfig, *v1.BuildConfigList, *buildv1.BuildConfigApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("buildconfigs"), + v1.SchemeGroupVersion.WithKind("BuildConfig"), + func() *v1.BuildConfig { return &v1.BuildConfig{} }, + func() *v1.BuildConfigList { return &v1.BuildConfigList{} }, + func(dst, src *v1.BuildConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.BuildConfigList) []*v1.BuildConfig { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.BuildConfigList, items []*v1.BuildConfig) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.BuildConfig), err } // Instantiate takes the representation of a buildRequest and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuildConfigs) Instantiate(ctx context.Context, buildConfigName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (result *v1.Build, err error) { +func (c *fakeBuildConfigs) Instantiate(ctx context.Context, buildConfigName string, buildRequest *v1.BuildRequest, opts metav1.CreateOptions) (result *v1.Build, err error) { emptyResult := &v1.Build{} obj, err := c.Fake. - Invokes(testing.NewCreateSubresourceActionWithOptions(buildconfigsResource, buildConfigName, "instantiate", c.ns, buildRequest, opts), emptyResult) + Invokes(testing.NewCreateSubresourceActionWithOptions(c.Resource(), buildConfigName, "instantiate", c.Namespace(), buildRequest, opts), emptyResult) if obj == nil { return emptyResult, err diff --git a/build/informers/externalversions/build/v1/build.go b/build/informers/externalversions/build/v1/build.go index 2055ed96f5..c5188ee3dd 100644 --- a/build/informers/externalversions/build/v1/build.go +++ b/build/informers/externalversions/build/v1/build.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - buildv1 "github.com/openshift/api/build/v1" + apibuildv1 "github.com/openshift/api/build/v1" versioned "github.com/openshift/client-go/build/clientset/versioned" internalinterfaces "github.com/openshift/client-go/build/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/build/listers/build/v1" + buildv1 "github.com/openshift/client-go/build/listers/build/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Builds. type BuildInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.BuildLister + Lister() buildv1.BuildLister } type buildInformer struct { @@ -55,7 +55,7 @@ func NewFilteredBuildInformer(client versioned.Interface, namespace string, resy return client.BuildV1().Builds(namespace).Watch(context.TODO(), options) }, }, - &buildv1.Build{}, + &apibuildv1.Build{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *buildInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *buildInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&buildv1.Build{}, f.defaultInformer) + return f.factory.InformerFor(&apibuildv1.Build{}, f.defaultInformer) } -func (f *buildInformer) Lister() v1.BuildLister { - return v1.NewBuildLister(f.Informer().GetIndexer()) +func (f *buildInformer) Lister() buildv1.BuildLister { + return buildv1.NewBuildLister(f.Informer().GetIndexer()) } diff --git a/build/informers/externalversions/build/v1/buildconfig.go b/build/informers/externalversions/build/v1/buildconfig.go index 28012f8c6d..b25b203eb9 100644 --- a/build/informers/externalversions/build/v1/buildconfig.go +++ b/build/informers/externalversions/build/v1/buildconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - buildv1 "github.com/openshift/api/build/v1" + apibuildv1 "github.com/openshift/api/build/v1" versioned "github.com/openshift/client-go/build/clientset/versioned" internalinterfaces "github.com/openshift/client-go/build/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/build/listers/build/v1" + buildv1 "github.com/openshift/client-go/build/listers/build/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // BuildConfigs. type BuildConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.BuildConfigLister + Lister() buildv1.BuildConfigLister } type buildConfigInformer struct { @@ -55,7 +55,7 @@ func NewFilteredBuildConfigInformer(client versioned.Interface, namespace string return client.BuildV1().BuildConfigs(namespace).Watch(context.TODO(), options) }, }, - &buildv1.BuildConfig{}, + &apibuildv1.BuildConfig{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *buildConfigInformer) defaultInformer(client versioned.Interface, resync } func (f *buildConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&buildv1.BuildConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apibuildv1.BuildConfig{}, f.defaultInformer) } -func (f *buildConfigInformer) Lister() v1.BuildConfigLister { - return v1.NewBuildConfigLister(f.Informer().GetIndexer()) +func (f *buildConfigInformer) Lister() buildv1.BuildConfigLister { + return buildv1.NewBuildConfigLister(f.Informer().GetIndexer()) } diff --git a/build/informers/externalversions/generic.go b/build/informers/externalversions/generic.go index e8b2035b70..47b3adf999 100644 --- a/build/informers/externalversions/generic.go +++ b/build/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/build/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/build/listers/build/v1/build.go b/build/listers/build/v1/build.go index 2a9a4fa686..2b85d47404 100644 --- a/build/listers/build/v1/build.go +++ b/build/listers/build/v1/build.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + buildv1 "github.com/openshift/api/build/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // BuildLister helps list Builds. @@ -14,7 +14,7 @@ import ( type BuildLister interface { // List lists all Builds in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Build, err error) + List(selector labels.Selector) (ret []*buildv1.Build, err error) // Builds returns an object that can list and get Builds. Builds(namespace string) BuildNamespaceLister BuildListerExpansion @@ -22,17 +22,17 @@ type BuildLister interface { // buildLister implements the BuildLister interface. type buildLister struct { - listers.ResourceIndexer[*v1.Build] + listers.ResourceIndexer[*buildv1.Build] } // NewBuildLister returns a new BuildLister. func NewBuildLister(indexer cache.Indexer) BuildLister { - return &buildLister{listers.New[*v1.Build](indexer, v1.Resource("build"))} + return &buildLister{listers.New[*buildv1.Build](indexer, buildv1.Resource("build"))} } // Builds returns an object that can list and get Builds. func (s *buildLister) Builds(namespace string) BuildNamespaceLister { - return buildNamespaceLister{listers.NewNamespaced[*v1.Build](s.ResourceIndexer, namespace)} + return buildNamespaceLister{listers.NewNamespaced[*buildv1.Build](s.ResourceIndexer, namespace)} } // BuildNamespaceLister helps list and get Builds. @@ -40,15 +40,15 @@ func (s *buildLister) Builds(namespace string) BuildNamespaceLister { type BuildNamespaceLister interface { // List lists all Builds in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Build, err error) + List(selector labels.Selector) (ret []*buildv1.Build, err error) // Get retrieves the Build from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Build, error) + Get(name string) (*buildv1.Build, error) BuildNamespaceListerExpansion } // buildNamespaceLister implements the BuildNamespaceLister // interface. type buildNamespaceLister struct { - listers.ResourceIndexer[*v1.Build] + listers.ResourceIndexer[*buildv1.Build] } diff --git a/build/listers/build/v1/buildconfig.go b/build/listers/build/v1/buildconfig.go index b4366077f9..96de9d5e2f 100644 --- a/build/listers/build/v1/buildconfig.go +++ b/build/listers/build/v1/buildconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/build/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + buildv1 "github.com/openshift/api/build/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // BuildConfigLister helps list BuildConfigs. @@ -14,7 +14,7 @@ import ( type BuildConfigLister interface { // List lists all BuildConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.BuildConfig, err error) + List(selector labels.Selector) (ret []*buildv1.BuildConfig, err error) // BuildConfigs returns an object that can list and get BuildConfigs. BuildConfigs(namespace string) BuildConfigNamespaceLister BuildConfigListerExpansion @@ -22,17 +22,17 @@ type BuildConfigLister interface { // buildConfigLister implements the BuildConfigLister interface. type buildConfigLister struct { - listers.ResourceIndexer[*v1.BuildConfig] + listers.ResourceIndexer[*buildv1.BuildConfig] } // NewBuildConfigLister returns a new BuildConfigLister. func NewBuildConfigLister(indexer cache.Indexer) BuildConfigLister { - return &buildConfigLister{listers.New[*v1.BuildConfig](indexer, v1.Resource("buildconfig"))} + return &buildConfigLister{listers.New[*buildv1.BuildConfig](indexer, buildv1.Resource("buildconfig"))} } // BuildConfigs returns an object that can list and get BuildConfigs. func (s *buildConfigLister) BuildConfigs(namespace string) BuildConfigNamespaceLister { - return buildConfigNamespaceLister{listers.NewNamespaced[*v1.BuildConfig](s.ResourceIndexer, namespace)} + return buildConfigNamespaceLister{listers.NewNamespaced[*buildv1.BuildConfig](s.ResourceIndexer, namespace)} } // BuildConfigNamespaceLister helps list and get BuildConfigs. @@ -40,15 +40,15 @@ func (s *buildConfigLister) BuildConfigs(namespace string) BuildConfigNamespaceL type BuildConfigNamespaceLister interface { // List lists all BuildConfigs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.BuildConfig, err error) + List(selector labels.Selector) (ret []*buildv1.BuildConfig, err error) // Get retrieves the BuildConfig from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.BuildConfig, error) + Get(name string) (*buildv1.BuildConfig, error) BuildConfigNamespaceListerExpansion } // buildConfigNamespaceLister implements the BuildConfigNamespaceLister // interface. type buildConfigNamespaceLister struct { - listers.ResourceIndexer[*v1.BuildConfig] + listers.ResourceIndexer[*buildv1.BuildConfig] } diff --git a/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfig.go b/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfig.go index 40bd2aae58..0dc8b2b069 100644 --- a/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfig.go +++ b/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apicloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" + cloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" internal "github.com/openshift/client-go/cloudnetwork/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CloudPrivateIPConfigApplyConfiguration represents a declarative configuration of the CloudPrivateIPConfig type for use // with apply. type CloudPrivateIPConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CloudPrivateIPConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *CloudPrivateIPConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CloudPrivateIPConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *CloudPrivateIPConfigStatusApplyConfiguration `json:"status,omitempty"` } // CloudPrivateIPConfig constructs a declarative configuration of the CloudPrivateIPConfig type for use with @@ -41,18 +41,18 @@ func CloudPrivateIPConfig(name string) *CloudPrivateIPConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractCloudPrivateIPConfig(cloudPrivateIPConfig *apicloudnetworkv1.CloudPrivateIPConfig, fieldManager string) (*CloudPrivateIPConfigApplyConfiguration, error) { +func ExtractCloudPrivateIPConfig(cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfig, fieldManager string) (*CloudPrivateIPConfigApplyConfiguration, error) { return extractCloudPrivateIPConfig(cloudPrivateIPConfig, fieldManager, "") } // ExtractCloudPrivateIPConfigStatus is the same as ExtractCloudPrivateIPConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractCloudPrivateIPConfigStatus(cloudPrivateIPConfig *apicloudnetworkv1.CloudPrivateIPConfig, fieldManager string) (*CloudPrivateIPConfigApplyConfiguration, error) { +func ExtractCloudPrivateIPConfigStatus(cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfig, fieldManager string) (*CloudPrivateIPConfigApplyConfiguration, error) { return extractCloudPrivateIPConfig(cloudPrivateIPConfig, fieldManager, "status") } -func extractCloudPrivateIPConfig(cloudPrivateIPConfig *apicloudnetworkv1.CloudPrivateIPConfig, fieldManager string, subresource string) (*CloudPrivateIPConfigApplyConfiguration, error) { +func extractCloudPrivateIPConfig(cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfig, fieldManager string, subresource string) (*CloudPrivateIPConfigApplyConfiguration, error) { b := &CloudPrivateIPConfigApplyConfiguration{} err := managedfields.ExtractInto(cloudPrivateIPConfig, internal.Parser().Type("com.github.openshift.api.cloudnetwork.v1.CloudPrivateIPConfig"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractCloudPrivateIPConfig(cloudPrivateIPConfig *apicloudnetworkv1.CloudPr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithKind(value string) *CloudPrivateIPConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithKind(value string) *CloudPr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithAPIVersion(value string) *CloudPrivateIPConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithAPIVersion(value string) *C // If called multiple times, the Name field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithName(value string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithName(value string) *CloudPr // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithGenerateName(value string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithNamespace(value string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithNamespace(value string) *Cl // If called multiple times, the UID field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithUID(value types.UID) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithUID(value types.UID) *Cloud // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithResourceVersion(value string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithResourceVersion(value strin // If called multiple times, the Generation field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithGeneration(value int64) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CloudPrivateIPConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CloudPrivateIPConfigApplyConfiguration { +func (b *CloudPrivateIPConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CloudPrivateIPConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CloudPrivateIPConfigApplyConfiguration { +func (b *CloudPrivateIPConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithDeletionTimestamp(value met // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CloudPrivateIPConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithDeletionGracePeriodSeconds( // overwriting an existing map entries in Labels field with the same key. func (b *CloudPrivateIPConfigApplyConfiguration) WithLabels(entries map[string]string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithLabels(entries map[string]s // overwriting an existing map entries in Annotations field with the same key. func (b *CloudPrivateIPConfigApplyConfiguration) WithAnnotations(entries map[string]string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithAnnotations(entries map[str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CloudPrivateIPConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CloudPrivateIPConfigApplyConfiguration { +func (b *CloudPrivateIPConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithOwnerReferences(values ...* func (b *CloudPrivateIPConfigApplyConfiguration) WithFinalizers(values ...string) *CloudPrivateIPConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CloudPrivateIPConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *CloudPrivateIPConfigApplyConfiguration) WithStatus(value *CloudPrivateI // GetName retrieves the value of the Name field in the declarative configuration. func (b *CloudPrivateIPConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfigstatus.go b/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfigstatus.go index 0d23e0df51..64f965a4ec 100644 --- a/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfigstatus.go +++ b/cloudnetwork/applyconfigurations/cloudnetwork/v1/cloudprivateipconfigstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CloudPrivateIPConfigStatusApplyConfiguration represents a declarative configuration of the CloudPrivateIPConfigStatus type for use // with apply. type CloudPrivateIPConfigStatusApplyConfiguration struct { - Node *string `json:"node,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Node *string `json:"node,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // CloudPrivateIPConfigStatusApplyConfiguration constructs a declarative configuration of the CloudPrivateIPConfigStatus type for use with @@ -30,7 +30,7 @@ func (b *CloudPrivateIPConfigStatusApplyConfiguration) WithNode(value string) *C // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CloudPrivateIPConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *CloudPrivateIPConfigStatusApplyConfiguration { +func (b *CloudPrivateIPConfigStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *CloudPrivateIPConfigStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/cloudnetwork/applyconfigurations/internal/internal.go b/cloudnetwork/applyconfigurations/internal/internal.go index 6549b09b1f..6d24b074a2 100644 --- a/cloudnetwork/applyconfigurations/internal/internal.go +++ b/cloudnetwork/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/cloudnetwork/clientset/versioned/clientset.go b/cloudnetwork/clientset/versioned/clientset.go index ff123da0ba..45d09aeb10 100644 --- a/cloudnetwork/clientset/versioned/clientset.go +++ b/cloudnetwork/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" cloudv1 "github.com/openshift/client-go/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1" discovery "k8s.io/client-go/discovery" diff --git a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudnetwork_client.go b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudnetwork_client.go index 66bc0eb762..893d187e00 100644 --- a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudnetwork_client.go +++ b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudnetwork_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/cloudnetwork/v1" - "github.com/openshift/client-go/cloudnetwork/clientset/versioned/scheme" + cloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" + scheme "github.com/openshift/client-go/cloudnetwork/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *CloudV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := cloudnetworkv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudprivateipconfig.go b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudprivateipconfig.go index eac163eed9..199cc6b63e 100644 --- a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudprivateipconfig.go +++ b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/cloudprivateipconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/cloudnetwork/v1" - cloudnetworkv1 "github.com/openshift/client-go/cloudnetwork/applyconfigurations/cloudnetwork/v1" + cloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" + applyconfigurationscloudnetworkv1 "github.com/openshift/client-go/cloudnetwork/applyconfigurations/cloudnetwork/v1" scheme "github.com/openshift/client-go/cloudnetwork/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type CloudPrivateIPConfigsGetter interface { // CloudPrivateIPConfigInterface has methods to work with CloudPrivateIPConfig resources. type CloudPrivateIPConfigInterface interface { - Create(ctx context.Context, cloudPrivateIPConfig *v1.CloudPrivateIPConfig, opts metav1.CreateOptions) (*v1.CloudPrivateIPConfig, error) - Update(ctx context.Context, cloudPrivateIPConfig *v1.CloudPrivateIPConfig, opts metav1.UpdateOptions) (*v1.CloudPrivateIPConfig, error) + Create(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfig, opts metav1.CreateOptions) (*cloudnetworkv1.CloudPrivateIPConfig, error) + Update(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfig, opts metav1.UpdateOptions) (*cloudnetworkv1.CloudPrivateIPConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, cloudPrivateIPConfig *v1.CloudPrivateIPConfig, opts metav1.UpdateOptions) (*v1.CloudPrivateIPConfig, error) + UpdateStatus(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfig, opts metav1.UpdateOptions) (*cloudnetworkv1.CloudPrivateIPConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CloudPrivateIPConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CloudPrivateIPConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*cloudnetworkv1.CloudPrivateIPConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*cloudnetworkv1.CloudPrivateIPConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CloudPrivateIPConfig, err error) - Apply(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudPrivateIPConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *cloudnetworkv1.CloudPrivateIPConfig, err error) + Apply(ctx context.Context, cloudPrivateIPConfig *applyconfigurationscloudnetworkv1.CloudPrivateIPConfigApplyConfiguration, opts metav1.ApplyOptions) (result *cloudnetworkv1.CloudPrivateIPConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudPrivateIPConfig, err error) + ApplyStatus(ctx context.Context, cloudPrivateIPConfig *applyconfigurationscloudnetworkv1.CloudPrivateIPConfigApplyConfiguration, opts metav1.ApplyOptions) (result *cloudnetworkv1.CloudPrivateIPConfig, err error) CloudPrivateIPConfigExpansion } // cloudPrivateIPConfigs implements CloudPrivateIPConfigInterface type cloudPrivateIPConfigs struct { - *gentype.ClientWithListAndApply[*v1.CloudPrivateIPConfig, *v1.CloudPrivateIPConfigList, *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*cloudnetworkv1.CloudPrivateIPConfig, *cloudnetworkv1.CloudPrivateIPConfigList, *applyconfigurationscloudnetworkv1.CloudPrivateIPConfigApplyConfiguration] } // newCloudPrivateIPConfigs returns a CloudPrivateIPConfigs func newCloudPrivateIPConfigs(c *CloudV1Client) *cloudPrivateIPConfigs { return &cloudPrivateIPConfigs{ - gentype.NewClientWithListAndApply[*v1.CloudPrivateIPConfig, *v1.CloudPrivateIPConfigList, *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*cloudnetworkv1.CloudPrivateIPConfig, *cloudnetworkv1.CloudPrivateIPConfigList, *applyconfigurationscloudnetworkv1.CloudPrivateIPConfigApplyConfiguration]( "cloudprivateipconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.CloudPrivateIPConfig { return &v1.CloudPrivateIPConfig{} }, - func() *v1.CloudPrivateIPConfigList { return &v1.CloudPrivateIPConfigList{} }), + func() *cloudnetworkv1.CloudPrivateIPConfig { return &cloudnetworkv1.CloudPrivateIPConfig{} }, + func() *cloudnetworkv1.CloudPrivateIPConfigList { return &cloudnetworkv1.CloudPrivateIPConfigList{} }, + ), } } diff --git a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudnetwork_client.go b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudnetwork_client.go index 46eb28b510..859ec5bcc8 100644 --- a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudnetwork_client.go +++ b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudnetwork_client.go @@ -13,7 +13,7 @@ type FakeCloudV1 struct { } func (c *FakeCloudV1) CloudPrivateIPConfigs() v1.CloudPrivateIPConfigInterface { - return &FakeCloudPrivateIPConfigs{c} + return newFakeCloudPrivateIPConfigs(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudprivateipconfig.go b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudprivateipconfig.go index 53fe689c95..88b97dfd50 100644 --- a/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudprivateipconfig.go +++ b/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1/fake/fake_cloudprivateipconfig.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/cloudnetwork/v1" cloudnetworkv1 "github.com/openshift/client-go/cloudnetwork/applyconfigurations/cloudnetwork/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedcloudnetworkv1 "github.com/openshift/client-go/cloudnetwork/clientset/versioned/typed/cloudnetwork/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeCloudPrivateIPConfigs implements CloudPrivateIPConfigInterface -type FakeCloudPrivateIPConfigs struct { +// fakeCloudPrivateIPConfigs implements CloudPrivateIPConfigInterface +type fakeCloudPrivateIPConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.CloudPrivateIPConfig, *v1.CloudPrivateIPConfigList, *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration] Fake *FakeCloudV1 } -var cloudprivateipconfigsResource = v1.SchemeGroupVersion.WithResource("cloudprivateipconfigs") - -var cloudprivateipconfigsKind = v1.SchemeGroupVersion.WithKind("CloudPrivateIPConfig") - -// Get takes name of the cloudPrivateIPConfig, and returns the corresponding cloudPrivateIPConfig object, and an error if there is any. -func (c *FakeCloudPrivateIPConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CloudPrivateIPConfig, err error) { - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(cloudprivateipconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudPrivateIPConfig), err -} - -// List takes label and field selectors, and returns the list of CloudPrivateIPConfigs that match those selectors. -func (c *FakeCloudPrivateIPConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CloudPrivateIPConfigList, err error) { - emptyResult := &v1.CloudPrivateIPConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(cloudprivateipconfigsResource, cloudprivateipconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.CloudPrivateIPConfigList{ListMeta: obj.(*v1.CloudPrivateIPConfigList).ListMeta} - for _, item := range obj.(*v1.CloudPrivateIPConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cloudPrivateIPConfigs. -func (c *FakeCloudPrivateIPConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(cloudprivateipconfigsResource, opts)) -} - -// Create takes the representation of a cloudPrivateIPConfig and creates it. Returns the server's representation of the cloudPrivateIPConfig, and an error, if there is any. -func (c *FakeCloudPrivateIPConfigs) Create(ctx context.Context, cloudPrivateIPConfig *v1.CloudPrivateIPConfig, opts metav1.CreateOptions) (result *v1.CloudPrivateIPConfig, err error) { - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(cloudprivateipconfigsResource, cloudPrivateIPConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudPrivateIPConfig), err -} - -// Update takes the representation of a cloudPrivateIPConfig and updates it. Returns the server's representation of the cloudPrivateIPConfig, and an error, if there is any. -func (c *FakeCloudPrivateIPConfigs) Update(ctx context.Context, cloudPrivateIPConfig *v1.CloudPrivateIPConfig, opts metav1.UpdateOptions) (result *v1.CloudPrivateIPConfig, err error) { - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(cloudprivateipconfigsResource, cloudPrivateIPConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudPrivateIPConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCloudPrivateIPConfigs) UpdateStatus(ctx context.Context, cloudPrivateIPConfig *v1.CloudPrivateIPConfig, opts metav1.UpdateOptions) (result *v1.CloudPrivateIPConfig, err error) { - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(cloudprivateipconfigsResource, "status", cloudPrivateIPConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudPrivateIPConfig), err -} - -// Delete takes name of the cloudPrivateIPConfig and deletes it. Returns an error if one occurs. -func (c *FakeCloudPrivateIPConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(cloudprivateipconfigsResource, name, opts), &v1.CloudPrivateIPConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCloudPrivateIPConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(cloudprivateipconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.CloudPrivateIPConfigList{}) - return err -} - -// Patch applies the patch and returns the patched cloudPrivateIPConfig. -func (c *FakeCloudPrivateIPConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CloudPrivateIPConfig, err error) { - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(cloudprivateipconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudPrivateIPConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied cloudPrivateIPConfig. -func (c *FakeCloudPrivateIPConfigs) Apply(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudPrivateIPConfig, err error) { - if cloudPrivateIPConfig == nil { - return nil, fmt.Errorf("cloudPrivateIPConfig provided to Apply must not be nil") - } - data, err := json.Marshal(cloudPrivateIPConfig) - if err != nil { - return nil, err - } - name := cloudPrivateIPConfig.Name - if name == nil { - return nil, fmt.Errorf("cloudPrivateIPConfig.Name must be provided to Apply") - } - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(cloudprivateipconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudPrivateIPConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCloudPrivateIPConfigs) ApplyStatus(ctx context.Context, cloudPrivateIPConfig *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudPrivateIPConfig, err error) { - if cloudPrivateIPConfig == nil { - return nil, fmt.Errorf("cloudPrivateIPConfig provided to Apply must not be nil") - } - data, err := json.Marshal(cloudPrivateIPConfig) - if err != nil { - return nil, err - } - name := cloudPrivateIPConfig.Name - if name == nil { - return nil, fmt.Errorf("cloudPrivateIPConfig.Name must be provided to Apply") - } - emptyResult := &v1.CloudPrivateIPConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(cloudprivateipconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeCloudPrivateIPConfigs(fake *FakeCloudV1) typedcloudnetworkv1.CloudPrivateIPConfigInterface { + return &fakeCloudPrivateIPConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.CloudPrivateIPConfig, *v1.CloudPrivateIPConfigList, *cloudnetworkv1.CloudPrivateIPConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("cloudprivateipconfigs"), + v1.SchemeGroupVersion.WithKind("CloudPrivateIPConfig"), + func() *v1.CloudPrivateIPConfig { return &v1.CloudPrivateIPConfig{} }, + func() *v1.CloudPrivateIPConfigList { return &v1.CloudPrivateIPConfigList{} }, + func(dst, src *v1.CloudPrivateIPConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.CloudPrivateIPConfigList) []*v1.CloudPrivateIPConfig { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.CloudPrivateIPConfigList, items []*v1.CloudPrivateIPConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.CloudPrivateIPConfig), err } diff --git a/cloudnetwork/informers/externalversions/cloudnetwork/v1/cloudprivateipconfig.go b/cloudnetwork/informers/externalversions/cloudnetwork/v1/cloudprivateipconfig.go index 1486101d87..9658528348 100644 --- a/cloudnetwork/informers/externalversions/cloudnetwork/v1/cloudprivateipconfig.go +++ b/cloudnetwork/informers/externalversions/cloudnetwork/v1/cloudprivateipconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - cloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" + apicloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" versioned "github.com/openshift/client-go/cloudnetwork/clientset/versioned" internalinterfaces "github.com/openshift/client-go/cloudnetwork/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/cloudnetwork/listers/cloudnetwork/v1" + cloudnetworkv1 "github.com/openshift/client-go/cloudnetwork/listers/cloudnetwork/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // CloudPrivateIPConfigs. type CloudPrivateIPConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.CloudPrivateIPConfigLister + Lister() cloudnetworkv1.CloudPrivateIPConfigLister } type cloudPrivateIPConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredCloudPrivateIPConfigInformer(client versioned.Interface, resyncP return client.CloudV1().CloudPrivateIPConfigs().Watch(context.TODO(), options) }, }, - &cloudnetworkv1.CloudPrivateIPConfig{}, + &apicloudnetworkv1.CloudPrivateIPConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *cloudPrivateIPConfigInformer) defaultInformer(client versioned.Interfac } func (f *cloudPrivateIPConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&cloudnetworkv1.CloudPrivateIPConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apicloudnetworkv1.CloudPrivateIPConfig{}, f.defaultInformer) } -func (f *cloudPrivateIPConfigInformer) Lister() v1.CloudPrivateIPConfigLister { - return v1.NewCloudPrivateIPConfigLister(f.Informer().GetIndexer()) +func (f *cloudPrivateIPConfigInformer) Lister() cloudnetworkv1.CloudPrivateIPConfigLister { + return cloudnetworkv1.NewCloudPrivateIPConfigLister(f.Informer().GetIndexer()) } diff --git a/cloudnetwork/informers/externalversions/generic.go b/cloudnetwork/informers/externalversions/generic.go index 02954841d0..e761534803 100644 --- a/cloudnetwork/informers/externalversions/generic.go +++ b/cloudnetwork/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/cloudnetwork/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/cloudnetwork/listers/cloudnetwork/v1/cloudprivateipconfig.go b/cloudnetwork/listers/cloudnetwork/v1/cloudprivateipconfig.go index c08be54d8c..b9f1f6f4bc 100644 --- a/cloudnetwork/listers/cloudnetwork/v1/cloudprivateipconfig.go +++ b/cloudnetwork/listers/cloudnetwork/v1/cloudprivateipconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/cloudnetwork/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + cloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CloudPrivateIPConfigLister helps list CloudPrivateIPConfigs. @@ -14,19 +14,19 @@ import ( type CloudPrivateIPConfigLister interface { // List lists all CloudPrivateIPConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.CloudPrivateIPConfig, err error) + List(selector labels.Selector) (ret []*cloudnetworkv1.CloudPrivateIPConfig, err error) // Get retrieves the CloudPrivateIPConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.CloudPrivateIPConfig, error) + Get(name string) (*cloudnetworkv1.CloudPrivateIPConfig, error) CloudPrivateIPConfigListerExpansion } // cloudPrivateIPConfigLister implements the CloudPrivateIPConfigLister interface. type cloudPrivateIPConfigLister struct { - listers.ResourceIndexer[*v1.CloudPrivateIPConfig] + listers.ResourceIndexer[*cloudnetworkv1.CloudPrivateIPConfig] } // NewCloudPrivateIPConfigLister returns a new CloudPrivateIPConfigLister. func NewCloudPrivateIPConfigLister(indexer cache.Indexer) CloudPrivateIPConfigLister { - return &cloudPrivateIPConfigLister{listers.New[*v1.CloudPrivateIPConfig](indexer, v1.Resource("cloudprivateipconfig"))} + return &cloudPrivateIPConfigLister{listers.New[*cloudnetworkv1.CloudPrivateIPConfig](indexer, cloudnetworkv1.Resource("cloudprivateipconfig"))} } diff --git a/config/applyconfigurations/config/v1/apiserver.go b/config/applyconfigurations/config/v1/apiserver.go index e10ae5c76f..0d2c3e4f8d 100644 --- a/config/applyconfigurations/config/v1/apiserver.go +++ b/config/applyconfigurations/config/v1/apiserver.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // APIServerApplyConfiguration represents a declarative configuration of the APIServer type for use // with apply. type APIServerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServerSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.APIServerStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *APIServerSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.APIServerStatus `json:"status,omitempty"` } // APIServer constructs a declarative configuration of the APIServer type for use with @@ -41,18 +41,18 @@ func APIServer(name string) *APIServerApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractAPIServer(aPIServer *apiconfigv1.APIServer, fieldManager string) (*APIServerApplyConfiguration, error) { +func ExtractAPIServer(aPIServer *configv1.APIServer, fieldManager string) (*APIServerApplyConfiguration, error) { return extractAPIServer(aPIServer, fieldManager, "") } // ExtractAPIServerStatus is the same as ExtractAPIServer except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractAPIServerStatus(aPIServer *apiconfigv1.APIServer, fieldManager string) (*APIServerApplyConfiguration, error) { +func ExtractAPIServerStatus(aPIServer *configv1.APIServer, fieldManager string) (*APIServerApplyConfiguration, error) { return extractAPIServer(aPIServer, fieldManager, "status") } -func extractAPIServer(aPIServer *apiconfigv1.APIServer, fieldManager string, subresource string) (*APIServerApplyConfiguration, error) { +func extractAPIServer(aPIServer *configv1.APIServer, fieldManager string, subresource string) (*APIServerApplyConfiguration, error) { b := &APIServerApplyConfiguration{} err := managedfields.ExtractInto(aPIServer, internal.Parser().Type("com.github.openshift.api.config.v1.APIServer"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractAPIServer(aPIServer *apiconfigv1.APIServer, fieldManager string, sub // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithKind(value string) *APIServerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *APIServerApplyConfiguration) WithKind(value string) *APIServerApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithAPIVersion(value string) *APIServerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *APIServerApplyConfiguration) WithAPIVersion(value string) *APIServerApp // If called multiple times, the Name field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithName(value string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *APIServerApplyConfiguration) WithName(value string) *APIServerApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithGenerateName(value string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *APIServerApplyConfiguration) WithGenerateName(value string) *APIServerA // If called multiple times, the Namespace field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithNamespace(value string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *APIServerApplyConfiguration) WithNamespace(value string) *APIServerAppl // If called multiple times, the UID field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithUID(value types.UID) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *APIServerApplyConfiguration) WithUID(value types.UID) *APIServerApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithResourceVersion(value string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *APIServerApplyConfiguration) WithResourceVersion(value string) *APIServ // If called multiple times, the Generation field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithGeneration(value int64) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServerApplyConfiguration { +func (b *APIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServerApplyConfiguration { +func (b *APIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *APIServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *APIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *APIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *APIServerApplyConfiguration) WithLabels(entries map[string]string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *APIServerApplyConfiguration) WithLabels(entries map[string]string) *API // overwriting an existing map entries in Annotations field with the same key. func (b *APIServerApplyConfiguration) WithAnnotations(entries map[string]string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *APIServerApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServerApplyConfiguration { +func (b *APIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *APIServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *APIServerApplyConfiguration) WithFinalizers(values ...string) *APIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *APIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *APIServerApplyConfiguration) WithSpec(value *APIServerSpecApplyConfigur // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithStatus(value apiconfigv1.APIServerStatus) *APIServerApplyConfiguration { +func (b *APIServerApplyConfiguration) WithStatus(value configv1.APIServerStatus) *APIServerApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *APIServerApplyConfiguration) WithStatus(value apiconfigv1.APIServerStat // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/apiserverencryption.go b/config/applyconfigurations/config/v1/apiserverencryption.go index a64f18bb4d..6f0deb125a 100644 --- a/config/applyconfigurations/config/v1/apiserverencryption.go +++ b/config/applyconfigurations/config/v1/apiserverencryption.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // APIServerEncryptionApplyConfiguration represents a declarative configuration of the APIServerEncryption type for use // with apply. type APIServerEncryptionApplyConfiguration struct { - Type *v1.EncryptionType `json:"type,omitempty"` + Type *configv1.EncryptionType `json:"type,omitempty"` } // APIServerEncryptionApplyConfiguration constructs a declarative configuration of the APIServerEncryption type for use with @@ -21,7 +21,7 @@ func APIServerEncryption() *APIServerEncryptionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *APIServerEncryptionApplyConfiguration) WithType(value v1.EncryptionType) *APIServerEncryptionApplyConfiguration { +func (b *APIServerEncryptionApplyConfiguration) WithType(value configv1.EncryptionType) *APIServerEncryptionApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/audit.go b/config/applyconfigurations/config/v1/audit.go index 49b2e6c79f..a07c9788c3 100644 --- a/config/applyconfigurations/config/v1/audit.go +++ b/config/applyconfigurations/config/v1/audit.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // AuditApplyConfiguration represents a declarative configuration of the Audit type for use // with apply. type AuditApplyConfiguration struct { - Profile *v1.AuditProfileType `json:"profile,omitempty"` + Profile *configv1.AuditProfileType `json:"profile,omitempty"` CustomRules []AuditCustomRuleApplyConfiguration `json:"customRules,omitempty"` } @@ -22,7 +22,7 @@ func Audit() *AuditApplyConfiguration { // WithProfile sets the Profile field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Profile field is set to the value of the last call. -func (b *AuditApplyConfiguration) WithProfile(value v1.AuditProfileType) *AuditApplyConfiguration { +func (b *AuditApplyConfiguration) WithProfile(value configv1.AuditProfileType) *AuditApplyConfiguration { b.Profile = &value return b } diff --git a/config/applyconfigurations/config/v1/auditcustomrule.go b/config/applyconfigurations/config/v1/auditcustomrule.go index 838f3a22f0..33a696d77f 100644 --- a/config/applyconfigurations/config/v1/auditcustomrule.go +++ b/config/applyconfigurations/config/v1/auditcustomrule.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // AuditCustomRuleApplyConfiguration represents a declarative configuration of the AuditCustomRule type for use // with apply. type AuditCustomRuleApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Profile *v1.AuditProfileType `json:"profile,omitempty"` + Group *string `json:"group,omitempty"` + Profile *configv1.AuditProfileType `json:"profile,omitempty"` } // AuditCustomRuleApplyConfiguration constructs a declarative configuration of the AuditCustomRule type for use with @@ -30,7 +30,7 @@ func (b *AuditCustomRuleApplyConfiguration) WithGroup(value string) *AuditCustom // WithProfile sets the Profile field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Profile field is set to the value of the last call. -func (b *AuditCustomRuleApplyConfiguration) WithProfile(value v1.AuditProfileType) *AuditCustomRuleApplyConfiguration { +func (b *AuditCustomRuleApplyConfiguration) WithProfile(value configv1.AuditProfileType) *AuditCustomRuleApplyConfiguration { b.Profile = &value return b } diff --git a/config/applyconfigurations/config/v1/authentication.go b/config/applyconfigurations/config/v1/authentication.go index b8fc3dfdfc..6ae8497a5b 100644 --- a/config/applyconfigurations/config/v1/authentication.go +++ b/config/applyconfigurations/config/v1/authentication.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // AuthenticationApplyConfiguration represents a declarative configuration of the Authentication type for use // with apply. type AuthenticationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *AuthenticationSpecApplyConfiguration `json:"spec,omitempty"` - Status *AuthenticationStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *AuthenticationSpecApplyConfiguration `json:"spec,omitempty"` + Status *AuthenticationStatusApplyConfiguration `json:"status,omitempty"` } // Authentication constructs a declarative configuration of the Authentication type for use with @@ -41,18 +41,18 @@ func Authentication(name string) *AuthenticationApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractAuthentication(authentication *apiconfigv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { +func ExtractAuthentication(authentication *configv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { return extractAuthentication(authentication, fieldManager, "") } // ExtractAuthenticationStatus is the same as ExtractAuthentication except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractAuthenticationStatus(authentication *apiconfigv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { +func ExtractAuthenticationStatus(authentication *configv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { return extractAuthentication(authentication, fieldManager, "status") } -func extractAuthentication(authentication *apiconfigv1.Authentication, fieldManager string, subresource string) (*AuthenticationApplyConfiguration, error) { +func extractAuthentication(authentication *configv1.Authentication, fieldManager string, subresource string) (*AuthenticationApplyConfiguration, error) { b := &AuthenticationApplyConfiguration{} err := managedfields.ExtractInto(authentication, internal.Parser().Type("com.github.openshift.api.config.v1.Authentication"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractAuthentication(authentication *apiconfigv1.Authentication, fieldMana // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithKind(value string) *AuthenticationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *AuthenticationApplyConfiguration) WithKind(value string) *Authenticatio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithAPIVersion(value string) *AuthenticationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *AuthenticationApplyConfiguration) WithAPIVersion(value string) *Authent // If called multiple times, the Name field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithName(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *AuthenticationApplyConfiguration) WithName(value string) *Authenticatio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithGenerateName(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *AuthenticationApplyConfiguration) WithGenerateName(value string) *Authe // If called multiple times, the Namespace field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithNamespace(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *AuthenticationApplyConfiguration) WithNamespace(value string) *Authenti // If called multiple times, the UID field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithUID(value types.UID) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *AuthenticationApplyConfiguration) WithUID(value types.UID) *Authenticat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithResourceVersion(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *AuthenticationApplyConfiguration) WithResourceVersion(value string) *Au // If called multiple times, the Generation field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithGeneration(value int64) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *AuthenticationApplyConfiguration { +func (b *AuthenticationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *AuthenticationApplyConfiguration { +func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *AuthenticationApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *AuthenticationApplyConfiguration) WithLabels(entries map[string]string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *AuthenticationApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *AuthenticationApplyConfiguration) WithAnnotations(entries map[string]string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *AuthenticationApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *AuthenticationApplyConfiguration { +func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *AuthenticationApplyConfiguration) WithFinalizers(values ...string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *AuthenticationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *AuthenticationApplyConfiguration) WithStatus(value *AuthenticationStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *AuthenticationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/authenticationspec.go b/config/applyconfigurations/config/v1/authenticationspec.go index 27cf2004f1..b2ac362786 100644 --- a/config/applyconfigurations/config/v1/authenticationspec.go +++ b/config/applyconfigurations/config/v1/authenticationspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // AuthenticationSpecApplyConfiguration represents a declarative configuration of the AuthenticationSpec type for use // with apply. type AuthenticationSpecApplyConfiguration struct { - Type *v1.AuthenticationType `json:"type,omitempty"` + Type *configv1.AuthenticationType `json:"type,omitempty"` OAuthMetadata *ConfigMapNameReferenceApplyConfiguration `json:"oauthMetadata,omitempty"` WebhookTokenAuthenticators []DeprecatedWebhookTokenAuthenticatorApplyConfiguration `json:"webhookTokenAuthenticators,omitempty"` WebhookTokenAuthenticator *WebhookTokenAuthenticatorApplyConfiguration `json:"webhookTokenAuthenticator,omitempty"` @@ -26,7 +26,7 @@ func AuthenticationSpec() *AuthenticationSpecApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithType(value v1.AuthenticationType) *AuthenticationSpecApplyConfiguration { +func (b *AuthenticationSpecApplyConfiguration) WithType(value configv1.AuthenticationType) *AuthenticationSpecApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/awsingressspec.go b/config/applyconfigurations/config/v1/awsingressspec.go index d7fe57934b..e67e671117 100644 --- a/config/applyconfigurations/config/v1/awsingressspec.go +++ b/config/applyconfigurations/config/v1/awsingressspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // AWSIngressSpecApplyConfiguration represents a declarative configuration of the AWSIngressSpec type for use // with apply. type AWSIngressSpecApplyConfiguration struct { - Type *v1.AWSLBType `json:"type,omitempty"` + Type *configv1.AWSLBType `json:"type,omitempty"` } // AWSIngressSpecApplyConfiguration constructs a declarative configuration of the AWSIngressSpec type for use with @@ -21,7 +21,7 @@ func AWSIngressSpec() *AWSIngressSpecApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AWSIngressSpecApplyConfiguration) WithType(value v1.AWSLBType) *AWSIngressSpecApplyConfiguration { +func (b *AWSIngressSpecApplyConfiguration) WithType(value configv1.AWSLBType) *AWSIngressSpecApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/azureplatformstatus.go b/config/applyconfigurations/config/v1/azureplatformstatus.go index 4426747345..5348a3c99f 100644 --- a/config/applyconfigurations/config/v1/azureplatformstatus.go +++ b/config/applyconfigurations/config/v1/azureplatformstatus.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // AzurePlatformStatusApplyConfiguration represents a declarative configuration of the AzurePlatformStatus type for use @@ -11,7 +11,7 @@ import ( type AzurePlatformStatusApplyConfiguration struct { ResourceGroupName *string `json:"resourceGroupName,omitempty"` NetworkResourceGroupName *string `json:"networkResourceGroupName,omitempty"` - CloudName *v1.AzureCloudEnvironment `json:"cloudName,omitempty"` + CloudName *configv1.AzureCloudEnvironment `json:"cloudName,omitempty"` ARMEndpoint *string `json:"armEndpoint,omitempty"` ResourceTags []AzureResourceTagApplyConfiguration `json:"resourceTags,omitempty"` } @@ -41,7 +41,7 @@ func (b *AzurePlatformStatusApplyConfiguration) WithNetworkResourceGroupName(val // WithCloudName sets the CloudName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CloudName field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithCloudName(value v1.AzureCloudEnvironment) *AzurePlatformStatusApplyConfiguration { +func (b *AzurePlatformStatusApplyConfiguration) WithCloudName(value configv1.AzureCloudEnvironment) *AzurePlatformStatusApplyConfiguration { b.CloudName = &value return b } diff --git a/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go b/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go index a78284764a..4a7405ad89 100644 --- a/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go +++ b/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // BareMetalPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the BareMetalPlatformLoadBalancer type for use // with apply. type BareMetalPlatformLoadBalancerApplyConfiguration struct { - Type *v1.PlatformLoadBalancerType `json:"type,omitempty"` + Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` } // BareMetalPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the BareMetalPlatformLoadBalancer type for use with @@ -21,7 +21,7 @@ func BareMetalPlatformLoadBalancer() *BareMetalPlatformLoadBalancerApplyConfigur // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *BareMetalPlatformLoadBalancerApplyConfiguration) WithType(value v1.PlatformLoadBalancerType) *BareMetalPlatformLoadBalancerApplyConfiguration { +func (b *BareMetalPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *BareMetalPlatformLoadBalancerApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/baremetalplatformspec.go b/config/applyconfigurations/config/v1/baremetalplatformspec.go index 3140b55481..81d8087751 100644 --- a/config/applyconfigurations/config/v1/baremetalplatformspec.go +++ b/config/applyconfigurations/config/v1/baremetalplatformspec.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // BareMetalPlatformSpecApplyConfiguration represents a declarative configuration of the BareMetalPlatformSpec type for use // with apply. type BareMetalPlatformSpecApplyConfiguration struct { - APIServerInternalIPs []v1.IP `json:"apiServerInternalIPs,omitempty"` - IngressIPs []v1.IP `json:"ingressIPs,omitempty"` - MachineNetworks []v1.CIDR `json:"machineNetworks,omitempty"` + APIServerInternalIPs []configv1.IP `json:"apiServerInternalIPs,omitempty"` + IngressIPs []configv1.IP `json:"ingressIPs,omitempty"` + MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` } // BareMetalPlatformSpecApplyConfiguration constructs a declarative configuration of the BareMetalPlatformSpec type for use with @@ -23,7 +23,7 @@ func BareMetalPlatformSpec() *BareMetalPlatformSpecApplyConfiguration { // WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *BareMetalPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...v1.IP) *BareMetalPlatformSpecApplyConfiguration { +func (b *BareMetalPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...configv1.IP) *BareMetalPlatformSpecApplyConfiguration { for i := range values { b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) } @@ -33,7 +33,7 @@ func (b *BareMetalPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(value // WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *BareMetalPlatformSpecApplyConfiguration) WithIngressIPs(values ...v1.IP) *BareMetalPlatformSpecApplyConfiguration { +func (b *BareMetalPlatformSpecApplyConfiguration) WithIngressIPs(values ...configv1.IP) *BareMetalPlatformSpecApplyConfiguration { for i := range values { b.IngressIPs = append(b.IngressIPs, values[i]) } @@ -43,7 +43,7 @@ func (b *BareMetalPlatformSpecApplyConfiguration) WithIngressIPs(values ...v1.IP // WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *BareMetalPlatformSpecApplyConfiguration) WithMachineNetworks(values ...v1.CIDR) *BareMetalPlatformSpecApplyConfiguration { +func (b *BareMetalPlatformSpecApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *BareMetalPlatformSpecApplyConfiguration { for i := range values { b.MachineNetworks = append(b.MachineNetworks, values[i]) } diff --git a/config/applyconfigurations/config/v1/basicauthidentityprovider.go b/config/applyconfigurations/config/v1/basicauthidentityprovider.go index 7cbd241d02..88f30314df 100644 --- a/config/applyconfigurations/config/v1/basicauthidentityprovider.go +++ b/config/applyconfigurations/config/v1/basicauthidentityprovider.go @@ -18,7 +18,7 @@ func BasicAuthIdentityProvider() *BasicAuthIdentityProviderApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the URL field is set to the value of the last call. func (b *BasicAuthIdentityProviderApplyConfiguration) WithURL(value string) *BasicAuthIdentityProviderApplyConfiguration { - b.URL = &value + b.OAuthRemoteConnectionInfoApplyConfiguration.URL = &value return b } @@ -26,7 +26,7 @@ func (b *BasicAuthIdentityProviderApplyConfiguration) WithURL(value string) *Bas // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CA field is set to the value of the last call. func (b *BasicAuthIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *BasicAuthIdentityProviderApplyConfiguration { - b.CA = value + b.OAuthRemoteConnectionInfoApplyConfiguration.CA = value return b } @@ -34,7 +34,7 @@ func (b *BasicAuthIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNam // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLSClientCert field is set to the value of the last call. func (b *BasicAuthIdentityProviderApplyConfiguration) WithTLSClientCert(value *SecretNameReferenceApplyConfiguration) *BasicAuthIdentityProviderApplyConfiguration { - b.TLSClientCert = value + b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientCert = value return b } @@ -42,6 +42,6 @@ func (b *BasicAuthIdentityProviderApplyConfiguration) WithTLSClientCert(value *S // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLSClientKey field is set to the value of the last call. func (b *BasicAuthIdentityProviderApplyConfiguration) WithTLSClientKey(value *SecretNameReferenceApplyConfiguration) *BasicAuthIdentityProviderApplyConfiguration { - b.TLSClientKey = value + b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientKey = value return b } diff --git a/config/applyconfigurations/config/v1/build.go b/config/applyconfigurations/config/v1/build.go index 06aa12e0f0..cdadabcae7 100644 --- a/config/applyconfigurations/config/v1/build.go +++ b/config/applyconfigurations/config/v1/build.go @@ -3,20 +3,20 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // BuildApplyConfiguration represents a declarative configuration of the Build type for use // with apply. type BuildApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *BuildSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *BuildSpecApplyConfiguration `json:"spec,omitempty"` } // Build constructs a declarative configuration of the Build type for use with @@ -40,18 +40,18 @@ func Build(name string) *BuildApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractBuild(build *apiconfigv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { +func ExtractBuild(build *configv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { return extractBuild(build, fieldManager, "") } // ExtractBuildStatus is the same as ExtractBuild except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractBuildStatus(build *apiconfigv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { +func ExtractBuildStatus(build *configv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { return extractBuild(build, fieldManager, "status") } -func extractBuild(build *apiconfigv1.Build, fieldManager string, subresource string) (*BuildApplyConfiguration, error) { +func extractBuild(build *configv1.Build, fieldManager string, subresource string) (*BuildApplyConfiguration, error) { b := &BuildApplyConfiguration{} err := managedfields.ExtractInto(build, internal.Parser().Type("com.github.openshift.api.config.v1.Build"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractBuild(build *apiconfigv1.Build, fieldManager string, subresource str // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *BuildApplyConfiguration) WithKind(value string) *BuildApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *BuildApplyConfiguration) WithKind(value string) *BuildApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *BuildApplyConfiguration) WithAPIVersion(value string) *BuildApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *BuildApplyConfiguration) WithAPIVersion(value string) *BuildApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *BuildApplyConfiguration) WithName(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *BuildApplyConfiguration) WithName(value string) *BuildApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *BuildApplyConfiguration) WithGenerateName(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *BuildApplyConfiguration) WithGenerateName(value string) *BuildApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *BuildApplyConfiguration) WithNamespace(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *BuildApplyConfiguration) WithNamespace(value string) *BuildApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *BuildApplyConfiguration) WithUID(value types.UID) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *BuildApplyConfiguration) WithUID(value types.UID) *BuildApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *BuildApplyConfiguration) WithResourceVersion(value string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *BuildApplyConfiguration) WithResourceVersion(value string) *BuildApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *BuildApplyConfiguration) WithGeneration(value int64) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BuildApplyConfiguration { +func (b *BuildApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BuildApplyConfiguration { +func (b *BuildApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *BuildApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Buil // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *BuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *BuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *B // overwriting an existing map entries in Labels field with the same key. func (b *BuildApplyConfiguration) WithLabels(entries map[string]string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *BuildApplyConfiguration) WithLabels(entries map[string]string) *BuildAp // overwriting an existing map entries in Annotations field with the same key. func (b *BuildApplyConfiguration) WithAnnotations(entries map[string]string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *BuildApplyConfiguration) WithAnnotations(entries map[string]string) *Bu // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BuildApplyConfiguration { +func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *BuildApplyConfiguration) WithFinalizers(values ...string) *BuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *BuildApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *BuildApplyConfiguration) WithSpec(value *BuildSpecApplyConfiguration) * // GetName retrieves the value of the Name field in the declarative configuration. func (b *BuildApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go b/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go index 60bf4ed6b1..79850b75e1 100644 --- a/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go +++ b/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // CloudControllerManagerStatusApplyConfiguration represents a declarative configuration of the CloudControllerManagerStatus type for use // with apply. type CloudControllerManagerStatusApplyConfiguration struct { - State *v1.CloudControllerManagerState `json:"state,omitempty"` + State *configv1.CloudControllerManagerState `json:"state,omitempty"` } // CloudControllerManagerStatusApplyConfiguration constructs a declarative configuration of the CloudControllerManagerStatus type for use with @@ -21,7 +21,7 @@ func CloudControllerManagerStatus() *CloudControllerManagerStatusApplyConfigurat // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *CloudControllerManagerStatusApplyConfiguration) WithState(value v1.CloudControllerManagerState) *CloudControllerManagerStatusApplyConfiguration { +func (b *CloudControllerManagerStatusApplyConfiguration) WithState(value configv1.CloudControllerManagerState) *CloudControllerManagerStatusApplyConfiguration { b.State = &value return b } diff --git a/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go b/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go index 5be77a3a33..d73faf3f20 100644 --- a/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go +++ b/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // CloudLoadBalancerConfigApplyConfiguration represents a declarative configuration of the CloudLoadBalancerConfig type for use // with apply. type CloudLoadBalancerConfigApplyConfiguration struct { - DNSType *v1.DNSType `json:"dnsType,omitempty"` + DNSType *configv1.DNSType `json:"dnsType,omitempty"` ClusterHosted *CloudLoadBalancerIPsApplyConfiguration `json:"clusterHosted,omitempty"` } @@ -22,7 +22,7 @@ func CloudLoadBalancerConfig() *CloudLoadBalancerConfigApplyConfiguration { // WithDNSType sets the DNSType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DNSType field is set to the value of the last call. -func (b *CloudLoadBalancerConfigApplyConfiguration) WithDNSType(value v1.DNSType) *CloudLoadBalancerConfigApplyConfiguration { +func (b *CloudLoadBalancerConfigApplyConfiguration) WithDNSType(value configv1.DNSType) *CloudLoadBalancerConfigApplyConfiguration { b.DNSType = &value return b } diff --git a/config/applyconfigurations/config/v1/cloudloadbalancerips.go b/config/applyconfigurations/config/v1/cloudloadbalancerips.go index baef188113..ce7f258509 100644 --- a/config/applyconfigurations/config/v1/cloudloadbalancerips.go +++ b/config/applyconfigurations/config/v1/cloudloadbalancerips.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // CloudLoadBalancerIPsApplyConfiguration represents a declarative configuration of the CloudLoadBalancerIPs type for use // with apply. type CloudLoadBalancerIPsApplyConfiguration struct { - APIIntLoadBalancerIPs []v1.IP `json:"apiIntLoadBalancerIPs,omitempty"` - APILoadBalancerIPs []v1.IP `json:"apiLoadBalancerIPs,omitempty"` - IngressLoadBalancerIPs []v1.IP `json:"ingressLoadBalancerIPs,omitempty"` + APIIntLoadBalancerIPs []configv1.IP `json:"apiIntLoadBalancerIPs,omitempty"` + APILoadBalancerIPs []configv1.IP `json:"apiLoadBalancerIPs,omitempty"` + IngressLoadBalancerIPs []configv1.IP `json:"ingressLoadBalancerIPs,omitempty"` } // CloudLoadBalancerIPsApplyConfiguration constructs a declarative configuration of the CloudLoadBalancerIPs type for use with @@ -23,7 +23,7 @@ func CloudLoadBalancerIPs() *CloudLoadBalancerIPsApplyConfiguration { // WithAPIIntLoadBalancerIPs adds the given value to the APIIntLoadBalancerIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the APIIntLoadBalancerIPs field. -func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPIIntLoadBalancerIPs(values ...v1.IP) *CloudLoadBalancerIPsApplyConfiguration { +func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPIIntLoadBalancerIPs(values ...configv1.IP) *CloudLoadBalancerIPsApplyConfiguration { for i := range values { b.APIIntLoadBalancerIPs = append(b.APIIntLoadBalancerIPs, values[i]) } @@ -33,7 +33,7 @@ func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPIIntLoadBalancerIPs(value // WithAPILoadBalancerIPs adds the given value to the APILoadBalancerIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the APILoadBalancerIPs field. -func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPILoadBalancerIPs(values ...v1.IP) *CloudLoadBalancerIPsApplyConfiguration { +func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPILoadBalancerIPs(values ...configv1.IP) *CloudLoadBalancerIPsApplyConfiguration { for i := range values { b.APILoadBalancerIPs = append(b.APILoadBalancerIPs, values[i]) } @@ -43,7 +43,7 @@ func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPILoadBalancerIPs(values . // WithIngressLoadBalancerIPs adds the given value to the IngressLoadBalancerIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the IngressLoadBalancerIPs field. -func (b *CloudLoadBalancerIPsApplyConfiguration) WithIngressLoadBalancerIPs(values ...v1.IP) *CloudLoadBalancerIPsApplyConfiguration { +func (b *CloudLoadBalancerIPsApplyConfiguration) WithIngressLoadBalancerIPs(values ...configv1.IP) *CloudLoadBalancerIPsApplyConfiguration { for i := range values { b.IngressLoadBalancerIPs = append(b.IngressLoadBalancerIPs, values[i]) } diff --git a/config/applyconfigurations/config/v1/clusteroperator.go b/config/applyconfigurations/config/v1/clusteroperator.go index 6371179a80..4bfa43805c 100644 --- a/config/applyconfigurations/config/v1/clusteroperator.go +++ b/config/applyconfigurations/config/v1/clusteroperator.go @@ -5,19 +5,19 @@ package v1 import ( configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterOperatorApplyConfiguration represents a declarative configuration of the ClusterOperator type for use // with apply. type ClusterOperatorApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *configv1.ClusterOperatorSpec `json:"spec,omitempty"` - Status *ClusterOperatorStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *configv1.ClusterOperatorSpec `json:"spec,omitempty"` + Status *ClusterOperatorStatusApplyConfiguration `json:"status,omitempty"` } // ClusterOperator constructs a declarative configuration of the ClusterOperator type for use with @@ -69,7 +69,7 @@ func extractClusterOperator(clusterOperator *configv1.ClusterOperator, fieldMana // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithKind(value string) *ClusterOperatorApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ClusterOperatorApplyConfiguration) WithKind(value string) *ClusterOpera // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithAPIVersion(value string) *ClusterOperatorApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ClusterOperatorApplyConfiguration) WithAPIVersion(value string) *Cluste // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithName(value string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ClusterOperatorApplyConfiguration) WithName(value string) *ClusterOpera // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithGenerateName(value string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ClusterOperatorApplyConfiguration) WithGenerateName(value string) *Clus // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithNamespace(value string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ClusterOperatorApplyConfiguration) WithNamespace(value string) *Cluster // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithUID(value types.UID) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ClusterOperatorApplyConfiguration) WithUID(value types.UID) *ClusterOpe // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithResourceVersion(value string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ClusterOperatorApplyConfiguration) WithResourceVersion(value string) *C // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithGeneration(value int64) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterOperatorApplyConfiguration { +func (b *ClusterOperatorApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterOperatorApplyConfiguration { +func (b *ClusterOperatorApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ClusterOperatorApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterOperatorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ClusterOperatorApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ClusterOperatorApplyConfiguration) WithLabels(entries map[string]string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ClusterOperatorApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterOperatorApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ClusterOperatorApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterOperatorApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterOperatorApplyConfiguration { +func (b *ClusterOperatorApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ClusterOperatorApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *ClusterOperatorApplyConfiguration) WithFinalizers(values ...string) *ClusterOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterOperatorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ClusterOperatorApplyConfiguration) WithStatus(value *ClusterOperatorSta // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterOperatorApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go b/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go index 557f75d2e4..3e58daa811 100644 --- a/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go +++ b/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go @@ -3,18 +3,18 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ClusterOperatorStatusConditionApplyConfiguration represents a declarative configuration of the ClusterOperatorStatusCondition type for use // with apply. type ClusterOperatorStatusConditionApplyConfiguration struct { - Type *v1.ClusterStatusConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *configv1.ClusterStatusConditionType `json:"type,omitempty"` + Status *configv1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ClusterOperatorStatusConditionApplyConfiguration constructs a declarative configuration of the ClusterOperatorStatusCondition type for use with @@ -26,7 +26,7 @@ func ClusterOperatorStatusCondition() *ClusterOperatorStatusConditionApplyConfig // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithType(value v1.ClusterStatusConditionType) *ClusterOperatorStatusConditionApplyConfiguration { +func (b *ClusterOperatorStatusConditionApplyConfiguration) WithType(value configv1.ClusterStatusConditionType) *ClusterOperatorStatusConditionApplyConfiguration { b.Type = &value return b } @@ -34,7 +34,7 @@ func (b *ClusterOperatorStatusConditionApplyConfiguration) WithType(value v1.Clu // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ClusterOperatorStatusConditionApplyConfiguration { +func (b *ClusterOperatorStatusConditionApplyConfiguration) WithStatus(value configv1.ConditionStatus) *ClusterOperatorStatusConditionApplyConfiguration { b.Status = &value return b } diff --git a/config/applyconfigurations/config/v1/clusterversion.go b/config/applyconfigurations/config/v1/clusterversion.go index 52f2e5cb88..69073ee5c9 100644 --- a/config/applyconfigurations/config/v1/clusterversion.go +++ b/config/applyconfigurations/config/v1/clusterversion.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterVersionApplyConfiguration represents a declarative configuration of the ClusterVersion type for use // with apply. type ClusterVersionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterVersionSpecApplyConfiguration `json:"spec,omitempty"` - Status *ClusterVersionStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ClusterVersionSpecApplyConfiguration `json:"spec,omitempty"` + Status *ClusterVersionStatusApplyConfiguration `json:"status,omitempty"` } // ClusterVersion constructs a declarative configuration of the ClusterVersion type for use with @@ -41,18 +41,18 @@ func ClusterVersion(name string) *ClusterVersionApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractClusterVersion(clusterVersion *apiconfigv1.ClusterVersion, fieldManager string) (*ClusterVersionApplyConfiguration, error) { +func ExtractClusterVersion(clusterVersion *configv1.ClusterVersion, fieldManager string) (*ClusterVersionApplyConfiguration, error) { return extractClusterVersion(clusterVersion, fieldManager, "") } // ExtractClusterVersionStatus is the same as ExtractClusterVersion except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractClusterVersionStatus(clusterVersion *apiconfigv1.ClusterVersion, fieldManager string) (*ClusterVersionApplyConfiguration, error) { +func ExtractClusterVersionStatus(clusterVersion *configv1.ClusterVersion, fieldManager string) (*ClusterVersionApplyConfiguration, error) { return extractClusterVersion(clusterVersion, fieldManager, "status") } -func extractClusterVersion(clusterVersion *apiconfigv1.ClusterVersion, fieldManager string, subresource string) (*ClusterVersionApplyConfiguration, error) { +func extractClusterVersion(clusterVersion *configv1.ClusterVersion, fieldManager string, subresource string) (*ClusterVersionApplyConfiguration, error) { b := &ClusterVersionApplyConfiguration{} err := managedfields.ExtractInto(clusterVersion, internal.Parser().Type("com.github.openshift.api.config.v1.ClusterVersion"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractClusterVersion(clusterVersion *apiconfigv1.ClusterVersion, fieldMana // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithKind(value string) *ClusterVersionApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ClusterVersionApplyConfiguration) WithKind(value string) *ClusterVersio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithAPIVersion(value string) *ClusterVersionApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ClusterVersionApplyConfiguration) WithAPIVersion(value string) *Cluster // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithName(value string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ClusterVersionApplyConfiguration) WithName(value string) *ClusterVersio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithGenerateName(value string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ClusterVersionApplyConfiguration) WithGenerateName(value string) *Clust // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithNamespace(value string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ClusterVersionApplyConfiguration) WithNamespace(value string) *ClusterV // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithUID(value types.UID) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ClusterVersionApplyConfiguration) WithUID(value types.UID) *ClusterVers // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithResourceVersion(value string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ClusterVersionApplyConfiguration) WithResourceVersion(value string) *Cl // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithGeneration(value int64) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterVersionApplyConfiguration { +func (b *ClusterVersionApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterVersionApplyConfiguration { +func (b *ClusterVersionApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ClusterVersionApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterVersionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ClusterVersionApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ClusterVersionApplyConfiguration) WithLabels(entries map[string]string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ClusterVersionApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterVersionApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ClusterVersionApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterVersionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterVersionApplyConfiguration { +func (b *ClusterVersionApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ClusterVersionApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ClusterVersionApplyConfiguration) WithFinalizers(values ...string) *ClusterVersionApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterVersionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ClusterVersionApplyConfiguration) WithStatus(value *ClusterVersionStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterVersionApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go b/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go index 254eb00e9d..feb03e3c36 100644 --- a/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go +++ b/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ClusterVersionCapabilitiesSpecApplyConfiguration represents a declarative configuration of the ClusterVersionCapabilitiesSpec type for use // with apply. type ClusterVersionCapabilitiesSpecApplyConfiguration struct { - BaselineCapabilitySet *v1.ClusterVersionCapabilitySet `json:"baselineCapabilitySet,omitempty"` - AdditionalEnabledCapabilities []v1.ClusterVersionCapability `json:"additionalEnabledCapabilities,omitempty"` + BaselineCapabilitySet *configv1.ClusterVersionCapabilitySet `json:"baselineCapabilitySet,omitempty"` + AdditionalEnabledCapabilities []configv1.ClusterVersionCapability `json:"additionalEnabledCapabilities,omitempty"` } // ClusterVersionCapabilitiesSpecApplyConfiguration constructs a declarative configuration of the ClusterVersionCapabilitiesSpec type for use with @@ -22,7 +22,7 @@ func ClusterVersionCapabilitiesSpec() *ClusterVersionCapabilitiesSpecApplyConfig // WithBaselineCapabilitySet sets the BaselineCapabilitySet field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the BaselineCapabilitySet field is set to the value of the last call. -func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithBaselineCapabilitySet(value v1.ClusterVersionCapabilitySet) *ClusterVersionCapabilitiesSpecApplyConfiguration { +func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithBaselineCapabilitySet(value configv1.ClusterVersionCapabilitySet) *ClusterVersionCapabilitiesSpecApplyConfiguration { b.BaselineCapabilitySet = &value return b } @@ -30,7 +30,7 @@ func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithBaselineCapabilit // WithAdditionalEnabledCapabilities adds the given value to the AdditionalEnabledCapabilities field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AdditionalEnabledCapabilities field. -func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithAdditionalEnabledCapabilities(values ...v1.ClusterVersionCapability) *ClusterVersionCapabilitiesSpecApplyConfiguration { +func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithAdditionalEnabledCapabilities(values ...configv1.ClusterVersionCapability) *ClusterVersionCapabilitiesSpecApplyConfiguration { for i := range values { b.AdditionalEnabledCapabilities = append(b.AdditionalEnabledCapabilities, values[i]) } diff --git a/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go b/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go index 05350241f1..2a8807fe2a 100644 --- a/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go +++ b/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ClusterVersionCapabilitiesStatusApplyConfiguration represents a declarative configuration of the ClusterVersionCapabilitiesStatus type for use // with apply. type ClusterVersionCapabilitiesStatusApplyConfiguration struct { - EnabledCapabilities []v1.ClusterVersionCapability `json:"enabledCapabilities,omitempty"` - KnownCapabilities []v1.ClusterVersionCapability `json:"knownCapabilities,omitempty"` + EnabledCapabilities []configv1.ClusterVersionCapability `json:"enabledCapabilities,omitempty"` + KnownCapabilities []configv1.ClusterVersionCapability `json:"knownCapabilities,omitempty"` } // ClusterVersionCapabilitiesStatusApplyConfiguration constructs a declarative configuration of the ClusterVersionCapabilitiesStatus type for use with @@ -22,7 +22,7 @@ func ClusterVersionCapabilitiesStatus() *ClusterVersionCapabilitiesStatusApplyCo // WithEnabledCapabilities adds the given value to the EnabledCapabilities field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the EnabledCapabilities field. -func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithEnabledCapabilities(values ...v1.ClusterVersionCapability) *ClusterVersionCapabilitiesStatusApplyConfiguration { +func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithEnabledCapabilities(values ...configv1.ClusterVersionCapability) *ClusterVersionCapabilitiesStatusApplyConfiguration { for i := range values { b.EnabledCapabilities = append(b.EnabledCapabilities, values[i]) } @@ -32,7 +32,7 @@ func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithEnabledCapabili // WithKnownCapabilities adds the given value to the KnownCapabilities field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the KnownCapabilities field. -func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithKnownCapabilities(values ...v1.ClusterVersionCapability) *ClusterVersionCapabilitiesStatusApplyConfiguration { +func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithKnownCapabilities(values ...configv1.ClusterVersionCapability) *ClusterVersionCapabilitiesStatusApplyConfiguration { for i := range values { b.KnownCapabilities = append(b.KnownCapabilities, values[i]) } diff --git a/config/applyconfigurations/config/v1/clusterversionspec.go b/config/applyconfigurations/config/v1/clusterversionspec.go index b440c613b5..926f295572 100644 --- a/config/applyconfigurations/config/v1/clusterversionspec.go +++ b/config/applyconfigurations/config/v1/clusterversionspec.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ClusterVersionSpecApplyConfiguration represents a declarative configuration of the ClusterVersionSpec type for use // with apply. type ClusterVersionSpecApplyConfiguration struct { - ClusterID *v1.ClusterID `json:"clusterID,omitempty"` + ClusterID *configv1.ClusterID `json:"clusterID,omitempty"` DesiredUpdate *UpdateApplyConfiguration `json:"desiredUpdate,omitempty"` - Upstream *v1.URL `json:"upstream,omitempty"` + Upstream *configv1.URL `json:"upstream,omitempty"` Channel *string `json:"channel,omitempty"` Capabilities *ClusterVersionCapabilitiesSpecApplyConfiguration `json:"capabilities,omitempty"` SignatureStores []SignatureStoreApplyConfiguration `json:"signatureStores,omitempty"` @@ -27,7 +27,7 @@ func ClusterVersionSpec() *ClusterVersionSpecApplyConfiguration { // WithClusterID sets the ClusterID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClusterID field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithClusterID(value v1.ClusterID) *ClusterVersionSpecApplyConfiguration { +func (b *ClusterVersionSpecApplyConfiguration) WithClusterID(value configv1.ClusterID) *ClusterVersionSpecApplyConfiguration { b.ClusterID = &value return b } @@ -43,7 +43,7 @@ func (b *ClusterVersionSpecApplyConfiguration) WithDesiredUpdate(value *UpdateAp // WithUpstream sets the Upstream field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Upstream field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithUpstream(value v1.URL) *ClusterVersionSpecApplyConfiguration { +func (b *ClusterVersionSpecApplyConfiguration) WithUpstream(value configv1.URL) *ClusterVersionSpecApplyConfiguration { b.Upstream = &value return b } diff --git a/config/applyconfigurations/config/v1/componentroutespec.go b/config/applyconfigurations/config/v1/componentroutespec.go index f8a2c5e518..beebd2b024 100644 --- a/config/applyconfigurations/config/v1/componentroutespec.go +++ b/config/applyconfigurations/config/v1/componentroutespec.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ComponentRouteSpecApplyConfiguration represents a declarative configuration of the ComponentRouteSpec type for use @@ -11,7 +11,7 @@ import ( type ComponentRouteSpecApplyConfiguration struct { Namespace *string `json:"namespace,omitempty"` Name *string `json:"name,omitempty"` - Hostname *v1.Hostname `json:"hostname,omitempty"` + Hostname *configv1.Hostname `json:"hostname,omitempty"` ServingCertKeyPairSecret *SecretNameReferenceApplyConfiguration `json:"servingCertKeyPairSecret,omitempty"` } @@ -40,7 +40,7 @@ func (b *ComponentRouteSpecApplyConfiguration) WithName(value string) *Component // WithHostname sets the Hostname field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Hostname field is set to the value of the last call. -func (b *ComponentRouteSpecApplyConfiguration) WithHostname(value v1.Hostname) *ComponentRouteSpecApplyConfiguration { +func (b *ComponentRouteSpecApplyConfiguration) WithHostname(value configv1.Hostname) *ComponentRouteSpecApplyConfiguration { b.Hostname = &value return b } diff --git a/config/applyconfigurations/config/v1/componentroutestatus.go b/config/applyconfigurations/config/v1/componentroutestatus.go index abf378c84c..ae95538821 100644 --- a/config/applyconfigurations/config/v1/componentroutestatus.go +++ b/config/applyconfigurations/config/v1/componentroutestatus.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -12,9 +12,9 @@ import ( type ComponentRouteStatusApplyConfiguration struct { Namespace *string `json:"namespace,omitempty"` Name *string `json:"name,omitempty"` - DefaultHostname *v1.Hostname `json:"defaultHostname,omitempty"` - ConsumingUsers []v1.ConsumingUser `json:"consumingUsers,omitempty"` - CurrentHostnames []v1.Hostname `json:"currentHostnames,omitempty"` + DefaultHostname *configv1.Hostname `json:"defaultHostname,omitempty"` + ConsumingUsers []configv1.ConsumingUser `json:"consumingUsers,omitempty"` + CurrentHostnames []configv1.Hostname `json:"currentHostnames,omitempty"` Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` RelatedObjects []ObjectReferenceApplyConfiguration `json:"relatedObjects,omitempty"` } @@ -44,7 +44,7 @@ func (b *ComponentRouteStatusApplyConfiguration) WithName(value string) *Compone // WithDefaultHostname sets the DefaultHostname field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DefaultHostname field is set to the value of the last call. -func (b *ComponentRouteStatusApplyConfiguration) WithDefaultHostname(value v1.Hostname) *ComponentRouteStatusApplyConfiguration { +func (b *ComponentRouteStatusApplyConfiguration) WithDefaultHostname(value configv1.Hostname) *ComponentRouteStatusApplyConfiguration { b.DefaultHostname = &value return b } @@ -52,7 +52,7 @@ func (b *ComponentRouteStatusApplyConfiguration) WithDefaultHostname(value v1.Ho // WithConsumingUsers adds the given value to the ConsumingUsers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ConsumingUsers field. -func (b *ComponentRouteStatusApplyConfiguration) WithConsumingUsers(values ...v1.ConsumingUser) *ComponentRouteStatusApplyConfiguration { +func (b *ComponentRouteStatusApplyConfiguration) WithConsumingUsers(values ...configv1.ConsumingUser) *ComponentRouteStatusApplyConfiguration { for i := range values { b.ConsumingUsers = append(b.ConsumingUsers, values[i]) } @@ -62,7 +62,7 @@ func (b *ComponentRouteStatusApplyConfiguration) WithConsumingUsers(values ...v1 // WithCurrentHostnames adds the given value to the CurrentHostnames field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the CurrentHostnames field. -func (b *ComponentRouteStatusApplyConfiguration) WithCurrentHostnames(values ...v1.Hostname) *ComponentRouteStatusApplyConfiguration { +func (b *ComponentRouteStatusApplyConfiguration) WithCurrentHostnames(values ...configv1.Hostname) *ComponentRouteStatusApplyConfiguration { for i := range values { b.CurrentHostnames = append(b.CurrentHostnames, values[i]) } diff --git a/config/applyconfigurations/config/v1/console.go b/config/applyconfigurations/config/v1/console.go index 58bf394da8..8e04091da8 100644 --- a/config/applyconfigurations/config/v1/console.go +++ b/config/applyconfigurations/config/v1/console.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleApplyConfiguration represents a declarative configuration of the Console type for use // with apply. type ConsoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleSpecApplyConfiguration `json:"spec,omitempty"` - Status *ConsoleStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleSpecApplyConfiguration `json:"spec,omitempty"` + Status *ConsoleStatusApplyConfiguration `json:"status,omitempty"` } // Console constructs a declarative configuration of the Console type for use with @@ -41,18 +41,18 @@ func Console(name string) *ConsoleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsole(console *apiconfigv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { +func ExtractConsole(console *configv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { return extractConsole(console, fieldManager, "") } // ExtractConsoleStatus is the same as ExtractConsole except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleStatus(console *apiconfigv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { +func ExtractConsoleStatus(console *configv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { return extractConsole(console, fieldManager, "status") } -func extractConsole(console *apiconfigv1.Console, fieldManager string, subresource string) (*ConsoleApplyConfiguration, error) { +func extractConsole(console *configv1.Console, fieldManager string, subresource string) (*ConsoleApplyConfiguration, error) { b := &ConsoleApplyConfiguration{} err := managedfields.ExtractInto(console, internal.Parser().Type("com.github.openshift.api.config.v1.Console"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractConsole(console *apiconfigv1.Console, fieldManager string, subresour // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithKind(value string) *ConsoleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ConsoleApplyConfiguration) WithKind(value string) *ConsoleApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithAPIVersion(value string) *ConsoleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ConsoleApplyConfiguration) WithAPIVersion(value string) *ConsoleApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithName(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ConsoleApplyConfiguration) WithName(value string) *ConsoleApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithGenerateName(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ConsoleApplyConfiguration) WithGenerateName(value string) *ConsoleApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithNamespace(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ConsoleApplyConfiguration) WithNamespace(value string) *ConsoleApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithUID(value types.UID) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ConsoleApplyConfiguration) WithUID(value types.UID) *ConsoleApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithResourceVersion(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ConsoleApplyConfiguration) WithResourceVersion(value string) *ConsoleAp // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithGeneration(value int64) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleApplyConfiguration { +func (b *ConsoleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleApplyConfiguration { +func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Co // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ConsoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ConsoleApplyConfiguration) WithLabels(entries map[string]string) *Conso // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ConsoleApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleApplyConfiguration { +func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *ConsoleApplyConfiguration) WithFinalizers(values ...string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ConsoleApplyConfiguration) WithStatus(value *ConsoleStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/customfeaturegates.go b/config/applyconfigurations/config/v1/customfeaturegates.go index a0a6482879..7cd70c7ee2 100644 --- a/config/applyconfigurations/config/v1/customfeaturegates.go +++ b/config/applyconfigurations/config/v1/customfeaturegates.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // CustomFeatureGatesApplyConfiguration represents a declarative configuration of the CustomFeatureGates type for use // with apply. type CustomFeatureGatesApplyConfiguration struct { - Enabled []v1.FeatureGateName `json:"enabled,omitempty"` - Disabled []v1.FeatureGateName `json:"disabled,omitempty"` + Enabled []configv1.FeatureGateName `json:"enabled,omitempty"` + Disabled []configv1.FeatureGateName `json:"disabled,omitempty"` } // CustomFeatureGatesApplyConfiguration constructs a declarative configuration of the CustomFeatureGates type for use with @@ -22,7 +22,7 @@ func CustomFeatureGates() *CustomFeatureGatesApplyConfiguration { // WithEnabled adds the given value to the Enabled field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Enabled field. -func (b *CustomFeatureGatesApplyConfiguration) WithEnabled(values ...v1.FeatureGateName) *CustomFeatureGatesApplyConfiguration { +func (b *CustomFeatureGatesApplyConfiguration) WithEnabled(values ...configv1.FeatureGateName) *CustomFeatureGatesApplyConfiguration { for i := range values { b.Enabled = append(b.Enabled, values[i]) } @@ -32,7 +32,7 @@ func (b *CustomFeatureGatesApplyConfiguration) WithEnabled(values ...v1.FeatureG // WithDisabled adds the given value to the Disabled field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Disabled field. -func (b *CustomFeatureGatesApplyConfiguration) WithDisabled(values ...v1.FeatureGateName) *CustomFeatureGatesApplyConfiguration { +func (b *CustomFeatureGatesApplyConfiguration) WithDisabled(values ...configv1.FeatureGateName) *CustomFeatureGatesApplyConfiguration { for i := range values { b.Disabled = append(b.Disabled, values[i]) } diff --git a/config/applyconfigurations/config/v1/customtlsprofile.go b/config/applyconfigurations/config/v1/customtlsprofile.go index f323e11b15..ae03671cd3 100644 --- a/config/applyconfigurations/config/v1/customtlsprofile.go +++ b/config/applyconfigurations/config/v1/customtlsprofile.go @@ -23,7 +23,7 @@ func CustomTLSProfile() *CustomTLSProfileApplyConfiguration { // If called multiple times, values provided by each call will be appended to the Ciphers field. func (b *CustomTLSProfileApplyConfiguration) WithCiphers(values ...string) *CustomTLSProfileApplyConfiguration { for i := range values { - b.Ciphers = append(b.Ciphers, values[i]) + b.TLSProfileSpecApplyConfiguration.Ciphers = append(b.TLSProfileSpecApplyConfiguration.Ciphers, values[i]) } return b } @@ -32,6 +32,6 @@ func (b *CustomTLSProfileApplyConfiguration) WithCiphers(values ...string) *Cust // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinTLSVersion field is set to the value of the last call. func (b *CustomTLSProfileApplyConfiguration) WithMinTLSVersion(value configv1.TLSProtocolVersion) *CustomTLSProfileApplyConfiguration { - b.MinTLSVersion = &value + b.TLSProfileSpecApplyConfiguration.MinTLSVersion = &value return b } diff --git a/config/applyconfigurations/config/v1/dns.go b/config/applyconfigurations/config/v1/dns.go index b01e456f5a..4ca934c965 100644 --- a/config/applyconfigurations/config/v1/dns.go +++ b/config/applyconfigurations/config/v1/dns.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // DNSApplyConfiguration represents a declarative configuration of the DNS type for use // with apply. type DNSApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DNSSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.DNSStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *DNSSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.DNSStatus `json:"status,omitempty"` } // DNS constructs a declarative configuration of the DNS type for use with @@ -41,18 +41,18 @@ func DNS(name string) *DNSApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractDNS(dNS *apiconfigv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { +func ExtractDNS(dNS *configv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { return extractDNS(dNS, fieldManager, "") } // ExtractDNSStatus is the same as ExtractDNS except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractDNSStatus(dNS *apiconfigv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { +func ExtractDNSStatus(dNS *configv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { return extractDNS(dNS, fieldManager, "status") } -func extractDNS(dNS *apiconfigv1.DNS, fieldManager string, subresource string) (*DNSApplyConfiguration, error) { +func extractDNS(dNS *configv1.DNS, fieldManager string, subresource string) (*DNSApplyConfiguration, error) { b := &DNSApplyConfiguration{} err := managedfields.ExtractInto(dNS, internal.Parser().Type("com.github.openshift.api.config.v1.DNS"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractDNS(dNS *apiconfigv1.DNS, fieldManager string, subresource string) ( // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *DNSApplyConfiguration) WithKind(value string) *DNSApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *DNSApplyConfiguration) WithKind(value string) *DNSApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *DNSApplyConfiguration) WithAPIVersion(value string) *DNSApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *DNSApplyConfiguration) WithAPIVersion(value string) *DNSApplyConfigurat // If called multiple times, the Name field is set to the value of the last call. func (b *DNSApplyConfiguration) WithName(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *DNSApplyConfiguration) WithName(value string) *DNSApplyConfiguration { // If called multiple times, the GenerateName field is set to the value of the last call. func (b *DNSApplyConfiguration) WithGenerateName(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *DNSApplyConfiguration) WithGenerateName(value string) *DNSApplyConfigur // If called multiple times, the Namespace field is set to the value of the last call. func (b *DNSApplyConfiguration) WithNamespace(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *DNSApplyConfiguration) WithNamespace(value string) *DNSApplyConfigurati // If called multiple times, the UID field is set to the value of the last call. func (b *DNSApplyConfiguration) WithUID(value types.UID) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *DNSApplyConfiguration) WithUID(value types.UID) *DNSApplyConfiguration // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *DNSApplyConfiguration) WithResourceVersion(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *DNSApplyConfiguration) WithResourceVersion(value string) *DNSApplyConfi // If called multiple times, the Generation field is set to the value of the last call. func (b *DNSApplyConfiguration) WithGeneration(value int64) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *DNSApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DNSApp // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *DNSApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *DNSApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNS // overwriting an existing map entries in Labels field with the same key. func (b *DNSApplyConfiguration) WithLabels(entries map[string]string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *DNSApplyConfiguration) WithLabels(entries map[string]string) *DNSApplyC // overwriting an existing map entries in Annotations field with the same key. func (b *DNSApplyConfiguration) WithAnnotations(entries map[string]string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *DNSApplyConfiguration) WithAnnotations(entries map[string]string) *DNSA // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference func (b *DNSApplyConfiguration) WithFinalizers(values ...string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *DNSApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *DNSApplyConfiguration) WithSpec(value *DNSSpecApplyConfiguration) *DNSA // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithStatus(value apiconfigv1.DNSStatus) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithStatus(value configv1.DNSStatus) *DNSApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *DNSApplyConfiguration) WithStatus(value apiconfigv1.DNSStatus) *DNSAppl // GetName retrieves the value of the Name field in the declarative configuration. func (b *DNSApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/dnsplatformspec.go b/config/applyconfigurations/config/v1/dnsplatformspec.go index fc15db1ef1..46bf616b26 100644 --- a/config/applyconfigurations/config/v1/dnsplatformspec.go +++ b/config/applyconfigurations/config/v1/dnsplatformspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // DNSPlatformSpecApplyConfiguration represents a declarative configuration of the DNSPlatformSpec type for use // with apply. type DNSPlatformSpecApplyConfiguration struct { - Type *v1.PlatformType `json:"type,omitempty"` + Type *configv1.PlatformType `json:"type,omitempty"` AWS *AWSDNSSpecApplyConfiguration `json:"aws,omitempty"` } @@ -22,7 +22,7 @@ func DNSPlatformSpec() *DNSPlatformSpecApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *DNSPlatformSpecApplyConfiguration) WithType(value v1.PlatformType) *DNSPlatformSpecApplyConfiguration { +func (b *DNSPlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *DNSPlatformSpecApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/featuregate.go b/config/applyconfigurations/config/v1/featuregate.go index b179452909..73ec533147 100644 --- a/config/applyconfigurations/config/v1/featuregate.go +++ b/config/applyconfigurations/config/v1/featuregate.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // FeatureGateApplyConfiguration represents a declarative configuration of the FeatureGate type for use // with apply. type FeatureGateApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *FeatureGateSpecApplyConfiguration `json:"spec,omitempty"` - Status *FeatureGateStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *FeatureGateSpecApplyConfiguration `json:"spec,omitempty"` + Status *FeatureGateStatusApplyConfiguration `json:"status,omitempty"` } // FeatureGate constructs a declarative configuration of the FeatureGate type for use with @@ -41,18 +41,18 @@ func FeatureGate(name string) *FeatureGateApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractFeatureGate(featureGate *apiconfigv1.FeatureGate, fieldManager string) (*FeatureGateApplyConfiguration, error) { +func ExtractFeatureGate(featureGate *configv1.FeatureGate, fieldManager string) (*FeatureGateApplyConfiguration, error) { return extractFeatureGate(featureGate, fieldManager, "") } // ExtractFeatureGateStatus is the same as ExtractFeatureGate except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractFeatureGateStatus(featureGate *apiconfigv1.FeatureGate, fieldManager string) (*FeatureGateApplyConfiguration, error) { +func ExtractFeatureGateStatus(featureGate *configv1.FeatureGate, fieldManager string) (*FeatureGateApplyConfiguration, error) { return extractFeatureGate(featureGate, fieldManager, "status") } -func extractFeatureGate(featureGate *apiconfigv1.FeatureGate, fieldManager string, subresource string) (*FeatureGateApplyConfiguration, error) { +func extractFeatureGate(featureGate *configv1.FeatureGate, fieldManager string, subresource string) (*FeatureGateApplyConfiguration, error) { b := &FeatureGateApplyConfiguration{} err := managedfields.ExtractInto(featureGate, internal.Parser().Type("com.github.openshift.api.config.v1.FeatureGate"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractFeatureGate(featureGate *apiconfigv1.FeatureGate, fieldManager strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithKind(value string) *FeatureGateApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *FeatureGateApplyConfiguration) WithKind(value string) *FeatureGateApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithAPIVersion(value string) *FeatureGateApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *FeatureGateApplyConfiguration) WithAPIVersion(value string) *FeatureGat // If called multiple times, the Name field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithName(value string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *FeatureGateApplyConfiguration) WithName(value string) *FeatureGateApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithGenerateName(value string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *FeatureGateApplyConfiguration) WithGenerateName(value string) *FeatureG // If called multiple times, the Namespace field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithNamespace(value string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *FeatureGateApplyConfiguration) WithNamespace(value string) *FeatureGate // If called multiple times, the UID field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithUID(value types.UID) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *FeatureGateApplyConfiguration) WithUID(value types.UID) *FeatureGateApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithResourceVersion(value string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *FeatureGateApplyConfiguration) WithResourceVersion(value string) *Featu // If called multiple times, the Generation field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithGeneration(value int64) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *FeatureGateApplyConfiguration { +func (b *FeatureGateApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *FeatureGateApplyConfiguration { +func (b *FeatureGateApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *FeatureGateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *FeatureGateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *FeatureGateApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *FeatureGateApplyConfiguration) WithLabels(entries map[string]string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *FeatureGateApplyConfiguration) WithLabels(entries map[string]string) *F // overwriting an existing map entries in Annotations field with the same key. func (b *FeatureGateApplyConfiguration) WithAnnotations(entries map[string]string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *FeatureGateApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *FeatureGateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *FeatureGateApplyConfiguration { +func (b *FeatureGateApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *FeatureGateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *FeatureGateApplyConfiguration) WithFinalizers(values ...string) *FeatureGateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *FeatureGateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *FeatureGateApplyConfiguration) WithStatus(value *FeatureGateStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *FeatureGateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/featuregateattributes.go b/config/applyconfigurations/config/v1/featuregateattributes.go index 200460a298..7884ec2872 100644 --- a/config/applyconfigurations/config/v1/featuregateattributes.go +++ b/config/applyconfigurations/config/v1/featuregateattributes.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // FeatureGateAttributesApplyConfiguration represents a declarative configuration of the FeatureGateAttributes type for use // with apply. type FeatureGateAttributesApplyConfiguration struct { - Name *v1.FeatureGateName `json:"name,omitempty"` + Name *configv1.FeatureGateName `json:"name,omitempty"` } // FeatureGateAttributesApplyConfiguration constructs a declarative configuration of the FeatureGateAttributes type for use with @@ -21,7 +21,7 @@ func FeatureGateAttributes() *FeatureGateAttributesApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *FeatureGateAttributesApplyConfiguration) WithName(value v1.FeatureGateName) *FeatureGateAttributesApplyConfiguration { +func (b *FeatureGateAttributesApplyConfiguration) WithName(value configv1.FeatureGateName) *FeatureGateAttributesApplyConfiguration { b.Name = &value return b } diff --git a/config/applyconfigurations/config/v1/featuregateselection.go b/config/applyconfigurations/config/v1/featuregateselection.go index 2aac4666ea..b79d3f883c 100644 --- a/config/applyconfigurations/config/v1/featuregateselection.go +++ b/config/applyconfigurations/config/v1/featuregateselection.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // FeatureGateSelectionApplyConfiguration represents a declarative configuration of the FeatureGateSelection type for use // with apply. type FeatureGateSelectionApplyConfiguration struct { - FeatureSet *v1.FeatureSet `json:"featureSet,omitempty"` + FeatureSet *configv1.FeatureSet `json:"featureSet,omitempty"` CustomNoUpgrade *CustomFeatureGatesApplyConfiguration `json:"customNoUpgrade,omitempty"` } @@ -22,7 +22,7 @@ func FeatureGateSelection() *FeatureGateSelectionApplyConfiguration { // WithFeatureSet sets the FeatureSet field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FeatureSet field is set to the value of the last call. -func (b *FeatureGateSelectionApplyConfiguration) WithFeatureSet(value v1.FeatureSet) *FeatureGateSelectionApplyConfiguration { +func (b *FeatureGateSelectionApplyConfiguration) WithFeatureSet(value configv1.FeatureSet) *FeatureGateSelectionApplyConfiguration { b.FeatureSet = &value return b } diff --git a/config/applyconfigurations/config/v1/featuregatespec.go b/config/applyconfigurations/config/v1/featuregatespec.go index 39b85b5dd9..d7e6f5e2b3 100644 --- a/config/applyconfigurations/config/v1/featuregatespec.go +++ b/config/applyconfigurations/config/v1/featuregatespec.go @@ -22,7 +22,7 @@ func FeatureGateSpec() *FeatureGateSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FeatureSet field is set to the value of the last call. func (b *FeatureGateSpecApplyConfiguration) WithFeatureSet(value configv1.FeatureSet) *FeatureGateSpecApplyConfiguration { - b.FeatureSet = &value + b.FeatureGateSelectionApplyConfiguration.FeatureSet = &value return b } @@ -30,6 +30,6 @@ func (b *FeatureGateSpecApplyConfiguration) WithFeatureSet(value configv1.Featur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CustomNoUpgrade field is set to the value of the last call. func (b *FeatureGateSpecApplyConfiguration) WithCustomNoUpgrade(value *CustomFeatureGatesApplyConfiguration) *FeatureGateSpecApplyConfiguration { - b.CustomNoUpgrade = value + b.FeatureGateSelectionApplyConfiguration.CustomNoUpgrade = value return b } diff --git a/config/applyconfigurations/config/v1/featuregatestatus.go b/config/applyconfigurations/config/v1/featuregatestatus.go index 2cc69267e3..705c3d0cff 100644 --- a/config/applyconfigurations/config/v1/featuregatestatus.go +++ b/config/applyconfigurations/config/v1/featuregatestatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // FeatureGateStatusApplyConfiguration represents a declarative configuration of the FeatureGateStatus type for use // with apply. type FeatureGateStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` FeatureGates []FeatureGateDetailsApplyConfiguration `json:"featureGates,omitempty"` } @@ -22,7 +22,7 @@ func FeatureGateStatus() *FeatureGateStatusApplyConfiguration { // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *FeatureGateStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *FeatureGateStatusApplyConfiguration { +func (b *FeatureGateStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *FeatureGateStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/config/applyconfigurations/config/v1/hubsourcestatus.go b/config/applyconfigurations/config/v1/hubsourcestatus.go index 4a8f0c437c..1688b1ce41 100644 --- a/config/applyconfigurations/config/v1/hubsourcestatus.go +++ b/config/applyconfigurations/config/v1/hubsourcestatus.go @@ -21,7 +21,7 @@ func HubSourceStatus() *HubSourceStatusApplyConfiguration { // If called multiple times, the Name field is set to the value of the last call. func (b *HubSourceStatusApplyConfiguration) WithName(value string) *HubSourceStatusApplyConfiguration { b.ensureHubSourceApplyConfigurationExists() - b.Name = &value + b.HubSourceApplyConfiguration.Name = &value return b } @@ -30,7 +30,7 @@ func (b *HubSourceStatusApplyConfiguration) WithName(value string) *HubSourceSta // If called multiple times, the Disabled field is set to the value of the last call. func (b *HubSourceStatusApplyConfiguration) WithDisabled(value bool) *HubSourceStatusApplyConfiguration { b.ensureHubSourceApplyConfigurationExists() - b.Disabled = &value + b.HubSourceApplyConfiguration.Disabled = &value return b } diff --git a/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go b/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go index b4b3be2ffa..48c17c9cb5 100644 --- a/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go +++ b/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // IBMCloudPlatformStatusApplyConfiguration represents a declarative configuration of the IBMCloudPlatformStatus type for use @@ -11,7 +11,7 @@ import ( type IBMCloudPlatformStatusApplyConfiguration struct { Location *string `json:"location,omitempty"` ResourceGroupName *string `json:"resourceGroupName,omitempty"` - ProviderType *v1.IBMCloudProviderType `json:"providerType,omitempty"` + ProviderType *configv1.IBMCloudProviderType `json:"providerType,omitempty"` CISInstanceCRN *string `json:"cisInstanceCRN,omitempty"` DNSInstanceCRN *string `json:"dnsInstanceCRN,omitempty"` ServiceEndpoints []IBMCloudServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` @@ -42,7 +42,7 @@ func (b *IBMCloudPlatformStatusApplyConfiguration) WithResourceGroupName(value s // WithProviderType sets the ProviderType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ProviderType field is set to the value of the last call. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithProviderType(value v1.IBMCloudProviderType) *IBMCloudPlatformStatusApplyConfiguration { +func (b *IBMCloudPlatformStatusApplyConfiguration) WithProviderType(value configv1.IBMCloudProviderType) *IBMCloudPlatformStatusApplyConfiguration { b.ProviderType = &value return b } diff --git a/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go b/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go index 2291040614..daec88ba5d 100644 --- a/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go +++ b/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // IBMCloudServiceEndpointApplyConfiguration represents a declarative configuration of the IBMCloudServiceEndpoint type for use // with apply. type IBMCloudServiceEndpointApplyConfiguration struct { - Name *v1.IBMCloudServiceName `json:"name,omitempty"` - URL *string `json:"url,omitempty"` + Name *configv1.IBMCloudServiceName `json:"name,omitempty"` + URL *string `json:"url,omitempty"` } // IBMCloudServiceEndpointApplyConfiguration constructs a declarative configuration of the IBMCloudServiceEndpoint type for use with @@ -22,7 +22,7 @@ func IBMCloudServiceEndpoint() *IBMCloudServiceEndpointApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *IBMCloudServiceEndpointApplyConfiguration) WithName(value v1.IBMCloudServiceName) *IBMCloudServiceEndpointApplyConfiguration { +func (b *IBMCloudServiceEndpointApplyConfiguration) WithName(value configv1.IBMCloudServiceName) *IBMCloudServiceEndpointApplyConfiguration { b.Name = &value return b } diff --git a/config/applyconfigurations/config/v1/identityprovider.go b/config/applyconfigurations/config/v1/identityprovider.go index 35edd9dff3..4e726d0859 100644 --- a/config/applyconfigurations/config/v1/identityprovider.go +++ b/config/applyconfigurations/config/v1/identityprovider.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // IdentityProviderApplyConfiguration represents a declarative configuration of the IdentityProvider type for use // with apply. type IdentityProviderApplyConfiguration struct { - Name *string `json:"name,omitempty"` - MappingMethod *v1.MappingMethodType `json:"mappingMethod,omitempty"` + Name *string `json:"name,omitempty"` + MappingMethod *configv1.MappingMethodType `json:"mappingMethod,omitempty"` IdentityProviderConfigApplyConfiguration `json:",inline"` } @@ -31,7 +31,7 @@ func (b *IdentityProviderApplyConfiguration) WithName(value string) *IdentityPro // WithMappingMethod sets the MappingMethod field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MappingMethod field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithMappingMethod(value v1.MappingMethodType) *IdentityProviderApplyConfiguration { +func (b *IdentityProviderApplyConfiguration) WithMappingMethod(value configv1.MappingMethodType) *IdentityProviderApplyConfiguration { b.MappingMethod = &value return b } @@ -39,8 +39,8 @@ func (b *IdentityProviderApplyConfiguration) WithMappingMethod(value v1.MappingM // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithType(value v1.IdentityProviderType) *IdentityProviderApplyConfiguration { - b.Type = &value +func (b *IdentityProviderApplyConfiguration) WithType(value configv1.IdentityProviderType) *IdentityProviderApplyConfiguration { + b.IdentityProviderConfigApplyConfiguration.Type = &value return b } @@ -48,7 +48,7 @@ func (b *IdentityProviderApplyConfiguration) WithType(value v1.IdentityProviderT // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the BasicAuth field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithBasicAuth(value *BasicAuthIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.BasicAuth = value + b.IdentityProviderConfigApplyConfiguration.BasicAuth = value return b } @@ -56,7 +56,7 @@ func (b *IdentityProviderApplyConfiguration) WithBasicAuth(value *BasicAuthIdent // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GitHub field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithGitHub(value *GitHubIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.GitHub = value + b.IdentityProviderConfigApplyConfiguration.GitHub = value return b } @@ -64,7 +64,7 @@ func (b *IdentityProviderApplyConfiguration) WithGitHub(value *GitHubIdentityPro // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GitLab field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithGitLab(value *GitLabIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.GitLab = value + b.IdentityProviderConfigApplyConfiguration.GitLab = value return b } @@ -72,7 +72,7 @@ func (b *IdentityProviderApplyConfiguration) WithGitLab(value *GitLabIdentityPro // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Google field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithGoogle(value *GoogleIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.Google = value + b.IdentityProviderConfigApplyConfiguration.Google = value return b } @@ -80,7 +80,7 @@ func (b *IdentityProviderApplyConfiguration) WithGoogle(value *GoogleIdentityPro // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HTPasswd field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithHTPasswd(value *HTPasswdIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.HTPasswd = value + b.IdentityProviderConfigApplyConfiguration.HTPasswd = value return b } @@ -88,7 +88,7 @@ func (b *IdentityProviderApplyConfiguration) WithHTPasswd(value *HTPasswdIdentit // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Keystone field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithKeystone(value *KeystoneIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.Keystone = value + b.IdentityProviderConfigApplyConfiguration.Keystone = value return b } @@ -96,7 +96,7 @@ func (b *IdentityProviderApplyConfiguration) WithKeystone(value *KeystoneIdentit // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LDAP field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithLDAP(value *LDAPIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.LDAP = value + b.IdentityProviderConfigApplyConfiguration.LDAP = value return b } @@ -104,7 +104,7 @@ func (b *IdentityProviderApplyConfiguration) WithLDAP(value *LDAPIdentityProvide // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OpenID field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithOpenID(value *OpenIDIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.OpenID = value + b.IdentityProviderConfigApplyConfiguration.OpenID = value return b } @@ -112,6 +112,6 @@ func (b *IdentityProviderApplyConfiguration) WithOpenID(value *OpenIDIdentityPro // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RequestHeader field is set to the value of the last call. func (b *IdentityProviderApplyConfiguration) WithRequestHeader(value *RequestHeaderIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.RequestHeader = value + b.IdentityProviderConfigApplyConfiguration.RequestHeader = value return b } diff --git a/config/applyconfigurations/config/v1/identityproviderconfig.go b/config/applyconfigurations/config/v1/identityproviderconfig.go index 208d23d560..1ff6d99a7b 100644 --- a/config/applyconfigurations/config/v1/identityproviderconfig.go +++ b/config/applyconfigurations/config/v1/identityproviderconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // IdentityProviderConfigApplyConfiguration represents a declarative configuration of the IdentityProviderConfig type for use // with apply. type IdentityProviderConfigApplyConfiguration struct { - Type *v1.IdentityProviderType `json:"type,omitempty"` + Type *configv1.IdentityProviderType `json:"type,omitempty"` BasicAuth *BasicAuthIdentityProviderApplyConfiguration `json:"basicAuth,omitempty"` GitHub *GitHubIdentityProviderApplyConfiguration `json:"github,omitempty"` GitLab *GitLabIdentityProviderApplyConfiguration `json:"gitlab,omitempty"` @@ -30,7 +30,7 @@ func IdentityProviderConfig() *IdentityProviderConfigApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithType(value v1.IdentityProviderType) *IdentityProviderConfigApplyConfiguration { +func (b *IdentityProviderConfigApplyConfiguration) WithType(value configv1.IdentityProviderType) *IdentityProviderConfigApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/image.go b/config/applyconfigurations/config/v1/image.go index 34f73ad729..63009029ec 100644 --- a/config/applyconfigurations/config/v1/image.go +++ b/config/applyconfigurations/config/v1/image.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageApplyConfiguration represents a declarative configuration of the Image type for use // with apply. type ImageApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageSpecApplyConfiguration `json:"spec,omitempty"` - Status *ImageStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImageSpecApplyConfiguration `json:"spec,omitempty"` + Status *ImageStatusApplyConfiguration `json:"status,omitempty"` } // Image constructs a declarative configuration of the Image type for use with @@ -41,18 +41,18 @@ func Image(name string) *ImageApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImage(image *apiconfigv1.Image, fieldManager string) (*ImageApplyConfiguration, error) { +func ExtractImage(image *configv1.Image, fieldManager string) (*ImageApplyConfiguration, error) { return extractImage(image, fieldManager, "") } // ExtractImageStatus is the same as ExtractImage except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageStatus(image *apiconfigv1.Image, fieldManager string) (*ImageApplyConfiguration, error) { +func ExtractImageStatus(image *configv1.Image, fieldManager string) (*ImageApplyConfiguration, error) { return extractImage(image, fieldManager, "status") } -func extractImage(image *apiconfigv1.Image, fieldManager string, subresource string) (*ImageApplyConfiguration, error) { +func extractImage(image *configv1.Image, fieldManager string, subresource string) (*ImageApplyConfiguration, error) { b := &ImageApplyConfiguration{} err := managedfields.ExtractInto(image, internal.Parser().Type("com.github.openshift.api.config.v1.Image"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractImage(image *apiconfigv1.Image, fieldManager string, subresource str // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageApplyConfiguration) WithKind(value string) *ImageApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ImageApplyConfiguration) WithKind(value string) *ImageApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageApplyConfiguration) WithAPIVersion(value string) *ImageApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ImageApplyConfiguration) WithAPIVersion(value string) *ImageApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *ImageApplyConfiguration) WithName(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ImageApplyConfiguration) WithName(value string) *ImageApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageApplyConfiguration) WithGenerateName(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ImageApplyConfiguration) WithGenerateName(value string) *ImageApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageApplyConfiguration) WithNamespace(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ImageApplyConfiguration) WithNamespace(value string) *ImageApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *ImageApplyConfiguration) WithUID(value types.UID) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ImageApplyConfiguration) WithUID(value types.UID) *ImageApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageApplyConfiguration) WithResourceVersion(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ImageApplyConfiguration) WithResourceVersion(value string) *ImageApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageApplyConfiguration) WithGeneration(value int64) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageApplyConfiguration { +func (b *ImageApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageApplyConfiguration { +func (b *ImageApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ImageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Imag // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ImageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *I // overwriting an existing map entries in Labels field with the same key. func (b *ImageApplyConfiguration) WithLabels(entries map[string]string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ImageApplyConfiguration) WithLabels(entries map[string]string) *ImageAp // overwriting an existing map entries in Annotations field with the same key. func (b *ImageApplyConfiguration) WithAnnotations(entries map[string]string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ImageApplyConfiguration) WithAnnotations(entries map[string]string) *Im // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageApplyConfiguration { +func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *ImageApplyConfiguration) WithFinalizers(values ...string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ImageApplyConfiguration) WithStatus(value *ImageStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/imagecontentpolicy.go b/config/applyconfigurations/config/v1/imagecontentpolicy.go index 9566569f9e..6d47fac038 100644 --- a/config/applyconfigurations/config/v1/imagecontentpolicy.go +++ b/config/applyconfigurations/config/v1/imagecontentpolicy.go @@ -3,20 +3,20 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageContentPolicyApplyConfiguration represents a declarative configuration of the ImageContentPolicy type for use // with apply. type ImageContentPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageContentPolicySpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImageContentPolicySpecApplyConfiguration `json:"spec,omitempty"` } // ImageContentPolicy constructs a declarative configuration of the ImageContentPolicy type for use with @@ -40,18 +40,18 @@ func ImageContentPolicy(name string) *ImageContentPolicyApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImageContentPolicy(imageContentPolicy *apiconfigv1.ImageContentPolicy, fieldManager string) (*ImageContentPolicyApplyConfiguration, error) { +func ExtractImageContentPolicy(imageContentPolicy *configv1.ImageContentPolicy, fieldManager string) (*ImageContentPolicyApplyConfiguration, error) { return extractImageContentPolicy(imageContentPolicy, fieldManager, "") } // ExtractImageContentPolicyStatus is the same as ExtractImageContentPolicy except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageContentPolicyStatus(imageContentPolicy *apiconfigv1.ImageContentPolicy, fieldManager string) (*ImageContentPolicyApplyConfiguration, error) { +func ExtractImageContentPolicyStatus(imageContentPolicy *configv1.ImageContentPolicy, fieldManager string) (*ImageContentPolicyApplyConfiguration, error) { return extractImageContentPolicy(imageContentPolicy, fieldManager, "status") } -func extractImageContentPolicy(imageContentPolicy *apiconfigv1.ImageContentPolicy, fieldManager string, subresource string) (*ImageContentPolicyApplyConfiguration, error) { +func extractImageContentPolicy(imageContentPolicy *configv1.ImageContentPolicy, fieldManager string, subresource string) (*ImageContentPolicyApplyConfiguration, error) { b := &ImageContentPolicyApplyConfiguration{} err := managedfields.ExtractInto(imageContentPolicy, internal.Parser().Type("com.github.openshift.api.config.v1.ImageContentPolicy"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractImageContentPolicy(imageContentPolicy *apiconfigv1.ImageContentPolic // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithKind(value string) *ImageContentPolicyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithKind(value string) *ImageCont // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithAPIVersion(value string) *ImageContentPolicyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithAPIVersion(value string) *Ima // If called multiple times, the Name field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithName(value string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithName(value string) *ImageCont // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithGenerateName(value string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithGenerateName(value string) *I // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithNamespace(value string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithNamespace(value string) *Imag // If called multiple times, the UID field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithUID(value types.UID) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithUID(value types.UID) *ImageCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithResourceVersion(value string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ImageContentPolicyApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithGeneration(value int64) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageContentPolicyApplyConfiguration { +func (b *ImageContentPolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageContentPolicyApplyConfiguration { +func (b *ImageContentPolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ImageContentPolicyApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageContentPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ImageContentPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *ImageContentPolicyApplyConfiguration) WithLabels(entries map[string]string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ImageContentPolicyApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *ImageContentPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ImageContentPolicyApplyConfiguration) WithAnnotations(entries map[strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageContentPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageContentPolicyApplyConfiguration { +func (b *ImageContentPolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ImageContentPolicyApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *ImageContentPolicyApplyConfiguration) WithFinalizers(values ...string) *ImageContentPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageContentPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ImageContentPolicyApplyConfiguration) WithSpec(value *ImageContentPolic // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageContentPolicyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/imagedigestmirrors.go b/config/applyconfigurations/config/v1/imagedigestmirrors.go index dc98896747..d6c57cb7f5 100644 --- a/config/applyconfigurations/config/v1/imagedigestmirrors.go +++ b/config/applyconfigurations/config/v1/imagedigestmirrors.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ImageDigestMirrorsApplyConfiguration represents a declarative configuration of the ImageDigestMirrors type for use // with apply. type ImageDigestMirrorsApplyConfiguration struct { - Source *string `json:"source,omitempty"` - Mirrors []v1.ImageMirror `json:"mirrors,omitempty"` - MirrorSourcePolicy *v1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` + Source *string `json:"source,omitempty"` + Mirrors []configv1.ImageMirror `json:"mirrors,omitempty"` + MirrorSourcePolicy *configv1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` } // ImageDigestMirrorsApplyConfiguration constructs a declarative configuration of the ImageDigestMirrors type for use with @@ -31,7 +31,7 @@ func (b *ImageDigestMirrorsApplyConfiguration) WithSource(value string) *ImageDi // WithMirrors adds the given value to the Mirrors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Mirrors field. -func (b *ImageDigestMirrorsApplyConfiguration) WithMirrors(values ...v1.ImageMirror) *ImageDigestMirrorsApplyConfiguration { +func (b *ImageDigestMirrorsApplyConfiguration) WithMirrors(values ...configv1.ImageMirror) *ImageDigestMirrorsApplyConfiguration { for i := range values { b.Mirrors = append(b.Mirrors, values[i]) } @@ -41,7 +41,7 @@ func (b *ImageDigestMirrorsApplyConfiguration) WithMirrors(values ...v1.ImageMir // WithMirrorSourcePolicy sets the MirrorSourcePolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MirrorSourcePolicy field is set to the value of the last call. -func (b *ImageDigestMirrorsApplyConfiguration) WithMirrorSourcePolicy(value v1.MirrorSourcePolicy) *ImageDigestMirrorsApplyConfiguration { +func (b *ImageDigestMirrorsApplyConfiguration) WithMirrorSourcePolicy(value configv1.MirrorSourcePolicy) *ImageDigestMirrorsApplyConfiguration { b.MirrorSourcePolicy = &value return b } diff --git a/config/applyconfigurations/config/v1/imagedigestmirrorset.go b/config/applyconfigurations/config/v1/imagedigestmirrorset.go index 80140961b7..f3c5ca21a4 100644 --- a/config/applyconfigurations/config/v1/imagedigestmirrorset.go +++ b/config/applyconfigurations/config/v1/imagedigestmirrorset.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageDigestMirrorSetApplyConfiguration represents a declarative configuration of the ImageDigestMirrorSet type for use // with apply. type ImageDigestMirrorSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageDigestMirrorSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.ImageDigestMirrorSetStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImageDigestMirrorSetSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.ImageDigestMirrorSetStatus `json:"status,omitempty"` } // ImageDigestMirrorSet constructs a declarative configuration of the ImageDigestMirrorSet type for use with @@ -41,18 +41,18 @@ func ImageDigestMirrorSet(name string) *ImageDigestMirrorSetApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImageDigestMirrorSet(imageDigestMirrorSet *apiconfigv1.ImageDigestMirrorSet, fieldManager string) (*ImageDigestMirrorSetApplyConfiguration, error) { +func ExtractImageDigestMirrorSet(imageDigestMirrorSet *configv1.ImageDigestMirrorSet, fieldManager string) (*ImageDigestMirrorSetApplyConfiguration, error) { return extractImageDigestMirrorSet(imageDigestMirrorSet, fieldManager, "") } // ExtractImageDigestMirrorSetStatus is the same as ExtractImageDigestMirrorSet except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageDigestMirrorSetStatus(imageDigestMirrorSet *apiconfigv1.ImageDigestMirrorSet, fieldManager string) (*ImageDigestMirrorSetApplyConfiguration, error) { +func ExtractImageDigestMirrorSetStatus(imageDigestMirrorSet *configv1.ImageDigestMirrorSet, fieldManager string) (*ImageDigestMirrorSetApplyConfiguration, error) { return extractImageDigestMirrorSet(imageDigestMirrorSet, fieldManager, "status") } -func extractImageDigestMirrorSet(imageDigestMirrorSet *apiconfigv1.ImageDigestMirrorSet, fieldManager string, subresource string) (*ImageDigestMirrorSetApplyConfiguration, error) { +func extractImageDigestMirrorSet(imageDigestMirrorSet *configv1.ImageDigestMirrorSet, fieldManager string, subresource string) (*ImageDigestMirrorSetApplyConfiguration, error) { b := &ImageDigestMirrorSetApplyConfiguration{} err := managedfields.ExtractInto(imageDigestMirrorSet, internal.Parser().Type("com.github.openshift.api.config.v1.ImageDigestMirrorSet"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractImageDigestMirrorSet(imageDigestMirrorSet *apiconfigv1.ImageDigestMi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithKind(value string) *ImageDigestMirrorSetApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithKind(value string) *ImageDi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithAPIVersion(value string) *ImageDigestMirrorSetApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithAPIVersion(value string) *I // If called multiple times, the Name field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithName(value string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithName(value string) *ImageDi // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithGenerateName(value string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithNamespace(value string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithNamespace(value string) *Im // If called multiple times, the UID field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithUID(value types.UID) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithUID(value types.UID) *Image // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithResourceVersion(value string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithResourceVersion(value strin // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithGeneration(value int64) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageDigestMirrorSetApplyConfiguration { +func (b *ImageDigestMirrorSetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageDigestMirrorSetApplyConfiguration { +func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionTimestamp(value met // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionGracePeriodSeconds( // overwriting an existing map entries in Labels field with the same key. func (b *ImageDigestMirrorSetApplyConfiguration) WithLabels(entries map[string]string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithLabels(entries map[string]s // overwriting an existing map entries in Annotations field with the same key. func (b *ImageDigestMirrorSetApplyConfiguration) WithAnnotations(entries map[string]string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithAnnotations(entries map[str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageDigestMirrorSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageDigestMirrorSetApplyConfiguration { +func (b *ImageDigestMirrorSetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithOwnerReferences(values ...* func (b *ImageDigestMirrorSetApplyConfiguration) WithFinalizers(values ...string) *ImageDigestMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageDigestMirrorSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithSpec(value *ImageDigestMirr // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithStatus(value apiconfigv1.ImageDigestMirrorSetStatus) *ImageDigestMirrorSetApplyConfiguration { +func (b *ImageDigestMirrorSetApplyConfiguration) WithStatus(value configv1.ImageDigestMirrorSetStatus) *ImageDigestMirrorSetApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *ImageDigestMirrorSetApplyConfiguration) WithStatus(value apiconfigv1.Im // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageDigestMirrorSetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/imagestatus.go b/config/applyconfigurations/config/v1/imagestatus.go index 601accbe64..cbf8a208a9 100644 --- a/config/applyconfigurations/config/v1/imagestatus.go +++ b/config/applyconfigurations/config/v1/imagestatus.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ImageStatusApplyConfiguration represents a declarative configuration of the ImageStatus type for use // with apply. type ImageStatusApplyConfiguration struct { - InternalRegistryHostname *string `json:"internalRegistryHostname,omitempty"` - ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` - ImageStreamImportMode *v1.ImportModeType `json:"imageStreamImportMode,omitempty"` + InternalRegistryHostname *string `json:"internalRegistryHostname,omitempty"` + ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` + ImageStreamImportMode *configv1.ImportModeType `json:"imageStreamImportMode,omitempty"` } // ImageStatusApplyConfiguration constructs a declarative configuration of the ImageStatus type for use with @@ -41,7 +41,7 @@ func (b *ImageStatusApplyConfiguration) WithExternalRegistryHostnames(values ... // WithImageStreamImportMode sets the ImageStreamImportMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ImageStreamImportMode field is set to the value of the last call. -func (b *ImageStatusApplyConfiguration) WithImageStreamImportMode(value v1.ImportModeType) *ImageStatusApplyConfiguration { +func (b *ImageStatusApplyConfiguration) WithImageStreamImportMode(value configv1.ImportModeType) *ImageStatusApplyConfiguration { b.ImageStreamImportMode = &value return b } diff --git a/config/applyconfigurations/config/v1/imagetagmirrors.go b/config/applyconfigurations/config/v1/imagetagmirrors.go index bede604d88..e0baa99fc5 100644 --- a/config/applyconfigurations/config/v1/imagetagmirrors.go +++ b/config/applyconfigurations/config/v1/imagetagmirrors.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ImageTagMirrorsApplyConfiguration represents a declarative configuration of the ImageTagMirrors type for use // with apply. type ImageTagMirrorsApplyConfiguration struct { - Source *string `json:"source,omitempty"` - Mirrors []v1.ImageMirror `json:"mirrors,omitempty"` - MirrorSourcePolicy *v1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` + Source *string `json:"source,omitempty"` + Mirrors []configv1.ImageMirror `json:"mirrors,omitempty"` + MirrorSourcePolicy *configv1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` } // ImageTagMirrorsApplyConfiguration constructs a declarative configuration of the ImageTagMirrors type for use with @@ -31,7 +31,7 @@ func (b *ImageTagMirrorsApplyConfiguration) WithSource(value string) *ImageTagMi // WithMirrors adds the given value to the Mirrors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Mirrors field. -func (b *ImageTagMirrorsApplyConfiguration) WithMirrors(values ...v1.ImageMirror) *ImageTagMirrorsApplyConfiguration { +func (b *ImageTagMirrorsApplyConfiguration) WithMirrors(values ...configv1.ImageMirror) *ImageTagMirrorsApplyConfiguration { for i := range values { b.Mirrors = append(b.Mirrors, values[i]) } @@ -41,7 +41,7 @@ func (b *ImageTagMirrorsApplyConfiguration) WithMirrors(values ...v1.ImageMirror // WithMirrorSourcePolicy sets the MirrorSourcePolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MirrorSourcePolicy field is set to the value of the last call. -func (b *ImageTagMirrorsApplyConfiguration) WithMirrorSourcePolicy(value v1.MirrorSourcePolicy) *ImageTagMirrorsApplyConfiguration { +func (b *ImageTagMirrorsApplyConfiguration) WithMirrorSourcePolicy(value configv1.MirrorSourcePolicy) *ImageTagMirrorsApplyConfiguration { b.MirrorSourcePolicy = &value return b } diff --git a/config/applyconfigurations/config/v1/imagetagmirrorset.go b/config/applyconfigurations/config/v1/imagetagmirrorset.go index 37432fac00..b8a9de1921 100644 --- a/config/applyconfigurations/config/v1/imagetagmirrorset.go +++ b/config/applyconfigurations/config/v1/imagetagmirrorset.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageTagMirrorSetApplyConfiguration represents a declarative configuration of the ImageTagMirrorSet type for use // with apply. type ImageTagMirrorSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageTagMirrorSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.ImageTagMirrorSetStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImageTagMirrorSetSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.ImageTagMirrorSetStatus `json:"status,omitempty"` } // ImageTagMirrorSet constructs a declarative configuration of the ImageTagMirrorSet type for use with @@ -41,18 +41,18 @@ func ImageTagMirrorSet(name string) *ImageTagMirrorSetApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImageTagMirrorSet(imageTagMirrorSet *apiconfigv1.ImageTagMirrorSet, fieldManager string) (*ImageTagMirrorSetApplyConfiguration, error) { +func ExtractImageTagMirrorSet(imageTagMirrorSet *configv1.ImageTagMirrorSet, fieldManager string) (*ImageTagMirrorSetApplyConfiguration, error) { return extractImageTagMirrorSet(imageTagMirrorSet, fieldManager, "") } // ExtractImageTagMirrorSetStatus is the same as ExtractImageTagMirrorSet except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageTagMirrorSetStatus(imageTagMirrorSet *apiconfigv1.ImageTagMirrorSet, fieldManager string) (*ImageTagMirrorSetApplyConfiguration, error) { +func ExtractImageTagMirrorSetStatus(imageTagMirrorSet *configv1.ImageTagMirrorSet, fieldManager string) (*ImageTagMirrorSetApplyConfiguration, error) { return extractImageTagMirrorSet(imageTagMirrorSet, fieldManager, "status") } -func extractImageTagMirrorSet(imageTagMirrorSet *apiconfigv1.ImageTagMirrorSet, fieldManager string, subresource string) (*ImageTagMirrorSetApplyConfiguration, error) { +func extractImageTagMirrorSet(imageTagMirrorSet *configv1.ImageTagMirrorSet, fieldManager string, subresource string) (*ImageTagMirrorSetApplyConfiguration, error) { b := &ImageTagMirrorSetApplyConfiguration{} err := managedfields.ExtractInto(imageTagMirrorSet, internal.Parser().Type("com.github.openshift.api.config.v1.ImageTagMirrorSet"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractImageTagMirrorSet(imageTagMirrorSet *apiconfigv1.ImageTagMirrorSet, // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithKind(value string) *ImageTagMirrorSetApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithKind(value string) *ImageTagMi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithAPIVersion(value string) *ImageTagMirrorSetApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithAPIVersion(value string) *Imag // If called multiple times, the Name field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithName(value string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithName(value string) *ImageTagMi // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithGenerateName(value string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithGenerateName(value string) *Im // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithNamespace(value string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithNamespace(value string) *Image // If called multiple times, the UID field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithUID(value types.UID) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithUID(value types.UID) *ImageTag // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithResourceVersion(value string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithGeneration(value int64) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageTagMirrorSetApplyConfiguration { +func (b *ImageTagMirrorSetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageTagMirrorSetApplyConfiguration { +func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionTimestamp(value metav1 // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionGracePeriodSeconds(val // overwriting an existing map entries in Labels field with the same key. func (b *ImageTagMirrorSetApplyConfiguration) WithLabels(entries map[string]string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithLabels(entries map[string]stri // overwriting an existing map entries in Annotations field with the same key. func (b *ImageTagMirrorSetApplyConfiguration) WithAnnotations(entries map[string]string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithAnnotations(entries map[string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageTagMirrorSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageTagMirrorSetApplyConfiguration { +func (b *ImageTagMirrorSetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *ImageTagMirrorSetApplyConfiguration) WithFinalizers(values ...string) *ImageTagMirrorSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageTagMirrorSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithSpec(value *ImageTagMirrorSetS // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithStatus(value apiconfigv1.ImageTagMirrorSetStatus) *ImageTagMirrorSetApplyConfiguration { +func (b *ImageTagMirrorSetApplyConfiguration) WithStatus(value configv1.ImageTagMirrorSetStatus) *ImageTagMirrorSetApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *ImageTagMirrorSetApplyConfiguration) WithStatus(value apiconfigv1.Image // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageTagMirrorSetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/infrastructure.go b/config/applyconfigurations/config/v1/infrastructure.go index 5d9551be6c..970391cfad 100644 --- a/config/applyconfigurations/config/v1/infrastructure.go +++ b/config/applyconfigurations/config/v1/infrastructure.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // InfrastructureApplyConfiguration represents a declarative configuration of the Infrastructure type for use // with apply. type InfrastructureApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *InfrastructureSpecApplyConfiguration `json:"spec,omitempty"` - Status *InfrastructureStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *InfrastructureSpecApplyConfiguration `json:"spec,omitempty"` + Status *InfrastructureStatusApplyConfiguration `json:"status,omitempty"` } // Infrastructure constructs a declarative configuration of the Infrastructure type for use with @@ -41,18 +41,18 @@ func Infrastructure(name string) *InfrastructureApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractInfrastructure(infrastructure *apiconfigv1.Infrastructure, fieldManager string) (*InfrastructureApplyConfiguration, error) { +func ExtractInfrastructure(infrastructure *configv1.Infrastructure, fieldManager string) (*InfrastructureApplyConfiguration, error) { return extractInfrastructure(infrastructure, fieldManager, "") } // ExtractInfrastructureStatus is the same as ExtractInfrastructure except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractInfrastructureStatus(infrastructure *apiconfigv1.Infrastructure, fieldManager string) (*InfrastructureApplyConfiguration, error) { +func ExtractInfrastructureStatus(infrastructure *configv1.Infrastructure, fieldManager string) (*InfrastructureApplyConfiguration, error) { return extractInfrastructure(infrastructure, fieldManager, "status") } -func extractInfrastructure(infrastructure *apiconfigv1.Infrastructure, fieldManager string, subresource string) (*InfrastructureApplyConfiguration, error) { +func extractInfrastructure(infrastructure *configv1.Infrastructure, fieldManager string, subresource string) (*InfrastructureApplyConfiguration, error) { b := &InfrastructureApplyConfiguration{} err := managedfields.ExtractInto(infrastructure, internal.Parser().Type("com.github.openshift.api.config.v1.Infrastructure"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractInfrastructure(infrastructure *apiconfigv1.Infrastructure, fieldMana // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithKind(value string) *InfrastructureApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *InfrastructureApplyConfiguration) WithKind(value string) *Infrastructur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithAPIVersion(value string) *InfrastructureApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *InfrastructureApplyConfiguration) WithAPIVersion(value string) *Infrast // If called multiple times, the Name field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithName(value string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *InfrastructureApplyConfiguration) WithName(value string) *Infrastructur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithGenerateName(value string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *InfrastructureApplyConfiguration) WithGenerateName(value string) *Infra // If called multiple times, the Namespace field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithNamespace(value string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *InfrastructureApplyConfiguration) WithNamespace(value string) *Infrastr // If called multiple times, the UID field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithUID(value types.UID) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *InfrastructureApplyConfiguration) WithUID(value types.UID) *Infrastruct // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithResourceVersion(value string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *InfrastructureApplyConfiguration) WithResourceVersion(value string) *In // If called multiple times, the Generation field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithGeneration(value int64) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithCreationTimestamp(value metav1.Time) *InfrastructureApplyConfiguration { +func (b *InfrastructureApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *InfrastructureApplyConfiguration { +func (b *InfrastructureApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *InfrastructureApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *InfrastructureApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *InfrastructureApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *InfrastructureApplyConfiguration) WithLabels(entries map[string]string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *InfrastructureApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *InfrastructureApplyConfiguration) WithAnnotations(entries map[string]string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *InfrastructureApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InfrastructureApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *InfrastructureApplyConfiguration { +func (b *InfrastructureApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *InfrastructureApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *InfrastructureApplyConfiguration) WithFinalizers(values ...string) *InfrastructureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *InfrastructureApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *InfrastructureApplyConfiguration) WithStatus(value *InfrastructureStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *InfrastructureApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/infrastructurestatus.go b/config/applyconfigurations/config/v1/infrastructurestatus.go index 89f5496df6..5b5d8288c2 100644 --- a/config/applyconfigurations/config/v1/infrastructurestatus.go +++ b/config/applyconfigurations/config/v1/infrastructurestatus.go @@ -3,21 +3,21 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // InfrastructureStatusApplyConfiguration represents a declarative configuration of the InfrastructureStatus type for use // with apply. type InfrastructureStatusApplyConfiguration struct { InfrastructureName *string `json:"infrastructureName,omitempty"` - Platform *v1.PlatformType `json:"platform,omitempty"` + Platform *configv1.PlatformType `json:"platform,omitempty"` PlatformStatus *PlatformStatusApplyConfiguration `json:"platformStatus,omitempty"` EtcdDiscoveryDomain *string `json:"etcdDiscoveryDomain,omitempty"` APIServerURL *string `json:"apiServerURL,omitempty"` APIServerInternalURL *string `json:"apiServerInternalURI,omitempty"` - ControlPlaneTopology *v1.TopologyMode `json:"controlPlaneTopology,omitempty"` - InfrastructureTopology *v1.TopologyMode `json:"infrastructureTopology,omitempty"` - CPUPartitioning *v1.CPUPartitioningMode `json:"cpuPartitioning,omitempty"` + ControlPlaneTopology *configv1.TopologyMode `json:"controlPlaneTopology,omitempty"` + InfrastructureTopology *configv1.TopologyMode `json:"infrastructureTopology,omitempty"` + CPUPartitioning *configv1.CPUPartitioningMode `json:"cpuPartitioning,omitempty"` } // InfrastructureStatusApplyConfiguration constructs a declarative configuration of the InfrastructureStatus type for use with @@ -37,7 +37,7 @@ func (b *InfrastructureStatusApplyConfiguration) WithInfrastructureName(value st // WithPlatform sets the Platform field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Platform field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithPlatform(value v1.PlatformType) *InfrastructureStatusApplyConfiguration { +func (b *InfrastructureStatusApplyConfiguration) WithPlatform(value configv1.PlatformType) *InfrastructureStatusApplyConfiguration { b.Platform = &value return b } @@ -77,7 +77,7 @@ func (b *InfrastructureStatusApplyConfiguration) WithAPIServerInternalURL(value // WithControlPlaneTopology sets the ControlPlaneTopology field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ControlPlaneTopology field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithControlPlaneTopology(value v1.TopologyMode) *InfrastructureStatusApplyConfiguration { +func (b *InfrastructureStatusApplyConfiguration) WithControlPlaneTopology(value configv1.TopologyMode) *InfrastructureStatusApplyConfiguration { b.ControlPlaneTopology = &value return b } @@ -85,7 +85,7 @@ func (b *InfrastructureStatusApplyConfiguration) WithControlPlaneTopology(value // WithInfrastructureTopology sets the InfrastructureTopology field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the InfrastructureTopology field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithInfrastructureTopology(value v1.TopologyMode) *InfrastructureStatusApplyConfiguration { +func (b *InfrastructureStatusApplyConfiguration) WithInfrastructureTopology(value configv1.TopologyMode) *InfrastructureStatusApplyConfiguration { b.InfrastructureTopology = &value return b } @@ -93,7 +93,7 @@ func (b *InfrastructureStatusApplyConfiguration) WithInfrastructureTopology(valu // WithCPUPartitioning sets the CPUPartitioning field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CPUPartitioning field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithCPUPartitioning(value v1.CPUPartitioningMode) *InfrastructureStatusApplyConfiguration { +func (b *InfrastructureStatusApplyConfiguration) WithCPUPartitioning(value configv1.CPUPartitioningMode) *InfrastructureStatusApplyConfiguration { b.CPUPartitioning = &value return b } diff --git a/config/applyconfigurations/config/v1/ingress.go b/config/applyconfigurations/config/v1/ingress.go index b8780886d0..945bacf8a8 100644 --- a/config/applyconfigurations/config/v1/ingress.go +++ b/config/applyconfigurations/config/v1/ingress.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // IngressApplyConfiguration represents a declarative configuration of the Ingress type for use // with apply. type IngressApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` - Status *IngressStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` + Status *IngressStatusApplyConfiguration `json:"status,omitempty"` } // Ingress constructs a declarative configuration of the Ingress type for use with @@ -41,18 +41,18 @@ func Ingress(name string) *IngressApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractIngress(ingress *apiconfigv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { +func ExtractIngress(ingress *configv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { return extractIngress(ingress, fieldManager, "") } // ExtractIngressStatus is the same as ExtractIngress except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractIngressStatus(ingress *apiconfigv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { +func ExtractIngressStatus(ingress *configv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { return extractIngress(ingress, fieldManager, "status") } -func extractIngress(ingress *apiconfigv1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { +func extractIngress(ingress *configv1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { b := &IngressApplyConfiguration{} err := managedfields.ExtractInto(ingress, internal.Parser().Type("com.github.openshift.api.config.v1.Ingress"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractIngress(ingress *apiconfigv1.Ingress, fieldManager string, subresour // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *IngressApplyConfiguration) WithKind(value string) *IngressApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *IngressApplyConfiguration) WithKind(value string) *IngressApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *IngressApplyConfiguration) WithAPIVersion(value string) *IngressApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *IngressApplyConfiguration) WithAPIVersion(value string) *IngressApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *IngressApplyConfiguration) WithName(value string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *IngressApplyConfiguration) WithName(value string) *IngressApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *IngressApplyConfiguration) WithGenerateName(value string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *IngressApplyConfiguration) WithGenerateName(value string) *IngressApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *IngressApplyConfiguration) WithUID(value types.UID) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *IngressApplyConfiguration) WithUID(value types.UID) *IngressApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *IngressApplyConfiguration) WithResourceVersion(value string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *IngressApplyConfiguration) WithResourceVersion(value string) *IngressAp // If called multiple times, the Generation field is set to the value of the last call. func (b *IngressApplyConfiguration) WithGeneration(value int64) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithCreationTimestamp(value metav1.Time) *IngressApplyConfiguration { +func (b *IngressApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *IngressApplyConfiguration { +func (b *IngressApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *IngressApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *In // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *IngressApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *IngressApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *IngressApplyConfiguration) WithLabels(entries map[string]string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *IngressApplyConfiguration) WithLabels(entries map[string]string) *Ingre // overwriting an existing map entries in Annotations field with the same key. func (b *IngressApplyConfiguration) WithAnnotations(entries map[string]string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *IngressApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *IngressApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *IngressApplyConfiguration { +func (b *IngressApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *IngressApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *IngressApplyConfiguration) WithStatus(value *IngressStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *IngressApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/ingressplatformspec.go b/config/applyconfigurations/config/v1/ingressplatformspec.go index f3e25215be..ed5c265315 100644 --- a/config/applyconfigurations/config/v1/ingressplatformspec.go +++ b/config/applyconfigurations/config/v1/ingressplatformspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // IngressPlatformSpecApplyConfiguration represents a declarative configuration of the IngressPlatformSpec type for use // with apply. type IngressPlatformSpecApplyConfiguration struct { - Type *v1.PlatformType `json:"type,omitempty"` + Type *configv1.PlatformType `json:"type,omitempty"` AWS *AWSIngressSpecApplyConfiguration `json:"aws,omitempty"` } @@ -22,7 +22,7 @@ func IngressPlatformSpec() *IngressPlatformSpecApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *IngressPlatformSpecApplyConfiguration) WithType(value v1.PlatformType) *IngressPlatformSpecApplyConfiguration { +func (b *IngressPlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *IngressPlatformSpecApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/keystoneidentityprovider.go b/config/applyconfigurations/config/v1/keystoneidentityprovider.go index 88204c69a7..abbb9ef152 100644 --- a/config/applyconfigurations/config/v1/keystoneidentityprovider.go +++ b/config/applyconfigurations/config/v1/keystoneidentityprovider.go @@ -19,7 +19,7 @@ func KeystoneIdentityProvider() *KeystoneIdentityProviderApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the URL field is set to the value of the last call. func (b *KeystoneIdentityProviderApplyConfiguration) WithURL(value string) *KeystoneIdentityProviderApplyConfiguration { - b.URL = &value + b.OAuthRemoteConnectionInfoApplyConfiguration.URL = &value return b } @@ -27,7 +27,7 @@ func (b *KeystoneIdentityProviderApplyConfiguration) WithURL(value string) *Keys // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CA field is set to the value of the last call. func (b *KeystoneIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *KeystoneIdentityProviderApplyConfiguration { - b.CA = value + b.OAuthRemoteConnectionInfoApplyConfiguration.CA = value return b } @@ -35,7 +35,7 @@ func (b *KeystoneIdentityProviderApplyConfiguration) WithCA(value *ConfigMapName // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLSClientCert field is set to the value of the last call. func (b *KeystoneIdentityProviderApplyConfiguration) WithTLSClientCert(value *SecretNameReferenceApplyConfiguration) *KeystoneIdentityProviderApplyConfiguration { - b.TLSClientCert = value + b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientCert = value return b } @@ -43,7 +43,7 @@ func (b *KeystoneIdentityProviderApplyConfiguration) WithTLSClientCert(value *Se // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLSClientKey field is set to the value of the last call. func (b *KeystoneIdentityProviderApplyConfiguration) WithTLSClientKey(value *SecretNameReferenceApplyConfiguration) *KeystoneIdentityProviderApplyConfiguration { - b.TLSClientKey = value + b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientKey = value return b } diff --git a/config/applyconfigurations/config/v1/network.go b/config/applyconfigurations/config/v1/network.go index a42f3a9ea0..195594eadd 100644 --- a/config/applyconfigurations/config/v1/network.go +++ b/config/applyconfigurations/config/v1/network.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NetworkApplyConfiguration represents a declarative configuration of the Network type for use // with apply. type NetworkApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkSpecApplyConfiguration `json:"spec,omitempty"` - Status *NetworkStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *NetworkSpecApplyConfiguration `json:"spec,omitempty"` + Status *NetworkStatusApplyConfiguration `json:"status,omitempty"` } // Network constructs a declarative configuration of the Network type for use with @@ -41,18 +41,18 @@ func Network(name string) *NetworkApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractNetwork(network *apiconfigv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { +func ExtractNetwork(network *configv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { return extractNetwork(network, fieldManager, "") } // ExtractNetworkStatus is the same as ExtractNetwork except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractNetworkStatus(network *apiconfigv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { +func ExtractNetworkStatus(network *configv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { return extractNetwork(network, fieldManager, "status") } -func extractNetwork(network *apiconfigv1.Network, fieldManager string, subresource string) (*NetworkApplyConfiguration, error) { +func extractNetwork(network *configv1.Network, fieldManager string, subresource string) (*NetworkApplyConfiguration, error) { b := &NetworkApplyConfiguration{} err := managedfields.ExtractInto(network, internal.Parser().Type("com.github.openshift.api.config.v1.Network"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractNetwork(network *apiconfigv1.Network, fieldManager string, subresour // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithKind(value string) *NetworkApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *NetworkApplyConfiguration) WithKind(value string) *NetworkApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithAPIVersion(value string) *NetworkApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *NetworkApplyConfiguration) WithAPIVersion(value string) *NetworkApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithName(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *NetworkApplyConfiguration) WithName(value string) *NetworkApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithGenerateName(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *NetworkApplyConfiguration) WithGenerateName(value string) *NetworkApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithNamespace(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *NetworkApplyConfiguration) WithNamespace(value string) *NetworkApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithUID(value types.UID) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *NetworkApplyConfiguration) WithUID(value types.UID) *NetworkApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithResourceVersion(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *NetworkApplyConfiguration) WithResourceVersion(value string) *NetworkAp // If called multiple times, the Generation field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithGeneration(value int64) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NetworkApplyConfiguration { +func (b *NetworkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NetworkApplyConfiguration { +func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Ne // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *NetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *NetworkApplyConfiguration) WithLabels(entries map[string]string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *NetworkApplyConfiguration) WithLabels(entries map[string]string) *Netwo // overwriting an existing map entries in Annotations field with the same key. func (b *NetworkApplyConfiguration) WithAnnotations(entries map[string]string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *NetworkApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NetworkApplyConfiguration { +func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *NetworkApplyConfiguration) WithFinalizers(values ...string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *NetworkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *NetworkApplyConfiguration) WithStatus(value *NetworkStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *NetworkApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/networkdiagnostics.go b/config/applyconfigurations/config/v1/networkdiagnostics.go index 6f75e0385e..a2624dc5bc 100644 --- a/config/applyconfigurations/config/v1/networkdiagnostics.go +++ b/config/applyconfigurations/config/v1/networkdiagnostics.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // NetworkDiagnosticsApplyConfiguration represents a declarative configuration of the NetworkDiagnostics type for use // with apply. type NetworkDiagnosticsApplyConfiguration struct { - Mode *v1.NetworkDiagnosticsMode `json:"mode,omitempty"` + Mode *configv1.NetworkDiagnosticsMode `json:"mode,omitempty"` SourcePlacement *NetworkDiagnosticsSourcePlacementApplyConfiguration `json:"sourcePlacement,omitempty"` TargetPlacement *NetworkDiagnosticsTargetPlacementApplyConfiguration `json:"targetPlacement,omitempty"` } @@ -23,7 +23,7 @@ func NetworkDiagnostics() *NetworkDiagnosticsApplyConfiguration { // WithMode sets the Mode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Mode field is set to the value of the last call. -func (b *NetworkDiagnosticsApplyConfiguration) WithMode(value v1.NetworkDiagnosticsMode) *NetworkDiagnosticsApplyConfiguration { +func (b *NetworkDiagnosticsApplyConfiguration) WithMode(value configv1.NetworkDiagnosticsMode) *NetworkDiagnosticsApplyConfiguration { b.Mode = &value return b } diff --git a/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go b/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go index 2b280a828f..a1960ba9fe 100644 --- a/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go +++ b/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NetworkDiagnosticsSourcePlacementApplyConfiguration represents a declarative configuration of the NetworkDiagnosticsSourcePlacement type for use // with apply. type NetworkDiagnosticsSourcePlacementApplyConfiguration struct { - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []v1.Toleration `json:"tolerations,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } // NetworkDiagnosticsSourcePlacementApplyConfiguration constructs a declarative configuration of the NetworkDiagnosticsSourcePlacement type for use with @@ -36,7 +36,7 @@ func (b *NetworkDiagnosticsSourcePlacementApplyConfiguration) WithNodeSelector(e // WithTolerations adds the given value to the Tolerations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *NetworkDiagnosticsSourcePlacementApplyConfiguration) WithTolerations(values ...v1.Toleration) *NetworkDiagnosticsSourcePlacementApplyConfiguration { +func (b *NetworkDiagnosticsSourcePlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *NetworkDiagnosticsSourcePlacementApplyConfiguration { for i := range values { b.Tolerations = append(b.Tolerations, values[i]) } diff --git a/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go b/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go index 6fee4c7956..ba0dbab8a0 100644 --- a/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go +++ b/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NetworkDiagnosticsTargetPlacementApplyConfiguration represents a declarative configuration of the NetworkDiagnosticsTargetPlacement type for use // with apply. type NetworkDiagnosticsTargetPlacementApplyConfiguration struct { - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []v1.Toleration `json:"tolerations,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } // NetworkDiagnosticsTargetPlacementApplyConfiguration constructs a declarative configuration of the NetworkDiagnosticsTargetPlacement type for use with @@ -36,7 +36,7 @@ func (b *NetworkDiagnosticsTargetPlacementApplyConfiguration) WithNodeSelector(e // WithTolerations adds the given value to the Tolerations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *NetworkDiagnosticsTargetPlacementApplyConfiguration) WithTolerations(values ...v1.Toleration) *NetworkDiagnosticsTargetPlacementApplyConfiguration { +func (b *NetworkDiagnosticsTargetPlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *NetworkDiagnosticsTargetPlacementApplyConfiguration { for i := range values { b.Tolerations = append(b.Tolerations, values[i]) } diff --git a/config/applyconfigurations/config/v1/node.go b/config/applyconfigurations/config/v1/node.go index ac4deeb66c..6117056235 100644 --- a/config/applyconfigurations/config/v1/node.go +++ b/config/applyconfigurations/config/v1/node.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NodeApplyConfiguration represents a declarative configuration of the Node type for use // with apply. type NodeApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` - Status *NodeStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` + Status *NodeStatusApplyConfiguration `json:"status,omitempty"` } // Node constructs a declarative configuration of the Node type for use with @@ -41,18 +41,18 @@ func Node(name string) *NodeApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractNode(node *apiconfigv1.Node, fieldManager string) (*NodeApplyConfiguration, error) { +func ExtractNode(node *configv1.Node, fieldManager string) (*NodeApplyConfiguration, error) { return extractNode(node, fieldManager, "") } // ExtractNodeStatus is the same as ExtractNode except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractNodeStatus(node *apiconfigv1.Node, fieldManager string) (*NodeApplyConfiguration, error) { +func ExtractNodeStatus(node *configv1.Node, fieldManager string) (*NodeApplyConfiguration, error) { return extractNode(node, fieldManager, "status") } -func extractNode(node *apiconfigv1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { +func extractNode(node *configv1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { b := &NodeApplyConfiguration{} err := managedfields.ExtractInto(node, internal.Parser().Type("com.github.openshift.api.config.v1.Node"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractNode(node *apiconfigv1.Node, fieldManager string, subresource string // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NodeApplyConfiguration) WithKind(value string) *NodeApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *NodeApplyConfiguration) WithKind(value string) *NodeApplyConfiguration // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NodeApplyConfiguration) WithAPIVersion(value string) *NodeApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *NodeApplyConfiguration) WithAPIVersion(value string) *NodeApplyConfigur // If called multiple times, the Name field is set to the value of the last call. func (b *NodeApplyConfiguration) WithName(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *NodeApplyConfiguration) WithName(value string) *NodeApplyConfiguration // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NodeApplyConfiguration) WithGenerateName(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *NodeApplyConfiguration) WithGenerateName(value string) *NodeApplyConfig // If called multiple times, the Namespace field is set to the value of the last call. func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfigura // If called multiple times, the UID field is set to the value of the last call. func (b *NodeApplyConfiguration) WithUID(value types.UID) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *NodeApplyConfiguration) WithUID(value types.UID) *NodeApplyConfiguratio // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NodeApplyConfiguration) WithResourceVersion(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *NodeApplyConfiguration) WithResourceVersion(value string) *NodeApplyCon // If called multiple times, the Generation field is set to the value of the last call. func (b *NodeApplyConfiguration) WithGeneration(value int64) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NodeApplyConfiguration { +func (b *NodeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NodeApplyConfiguration { +func (b *NodeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *NodeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NodeA // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *NodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *No // overwriting an existing map entries in Labels field with the same key. func (b *NodeApplyConfiguration) WithLabels(entries map[string]string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *NodeApplyConfiguration) WithLabels(entries map[string]string) *NodeAppl // overwriting an existing map entries in Annotations field with the same key. func (b *NodeApplyConfiguration) WithAnnotations(entries map[string]string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *NodeApplyConfiguration) WithAnnotations(entries map[string]string) *Nod // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NodeApplyConfiguration { +func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenc func (b *NodeApplyConfiguration) WithFinalizers(values ...string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *NodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *NodeApplyConfiguration) WithStatus(value *NodeStatusApplyConfiguration) // GetName retrieves the value of the Name field in the declarative configuration. func (b *NodeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/nodespec.go b/config/applyconfigurations/config/v1/nodespec.go index f1c513f4cb..a0732e78a3 100644 --- a/config/applyconfigurations/config/v1/nodespec.go +++ b/config/applyconfigurations/config/v1/nodespec.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // NodeSpecApplyConfiguration represents a declarative configuration of the NodeSpec type for use // with apply. type NodeSpecApplyConfiguration struct { - CgroupMode *v1.CgroupMode `json:"cgroupMode,omitempty"` - WorkerLatencyProfile *v1.WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` - MinimumKubeletVersion *string `json:"minimumKubeletVersion,omitempty"` + CgroupMode *configv1.CgroupMode `json:"cgroupMode,omitempty"` + WorkerLatencyProfile *configv1.WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` + MinimumKubeletVersion *string `json:"minimumKubeletVersion,omitempty"` } // NodeSpecApplyConfiguration constructs a declarative configuration of the NodeSpec type for use with @@ -23,7 +23,7 @@ func NodeSpec() *NodeSpecApplyConfiguration { // WithCgroupMode sets the CgroupMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CgroupMode field is set to the value of the last call. -func (b *NodeSpecApplyConfiguration) WithCgroupMode(value v1.CgroupMode) *NodeSpecApplyConfiguration { +func (b *NodeSpecApplyConfiguration) WithCgroupMode(value configv1.CgroupMode) *NodeSpecApplyConfiguration { b.CgroupMode = &value return b } @@ -31,7 +31,7 @@ func (b *NodeSpecApplyConfiguration) WithCgroupMode(value v1.CgroupMode) *NodeSp // WithWorkerLatencyProfile sets the WorkerLatencyProfile field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the WorkerLatencyProfile field is set to the value of the last call. -func (b *NodeSpecApplyConfiguration) WithWorkerLatencyProfile(value v1.WorkerLatencyProfileType) *NodeSpecApplyConfiguration { +func (b *NodeSpecApplyConfiguration) WithWorkerLatencyProfile(value configv1.WorkerLatencyProfileType) *NodeSpecApplyConfiguration { b.WorkerLatencyProfile = &value return b } diff --git a/config/applyconfigurations/config/v1/nodestatus.go b/config/applyconfigurations/config/v1/nodestatus.go index e36466526e..ee6ebd99ee 100644 --- a/config/applyconfigurations/config/v1/nodestatus.go +++ b/config/applyconfigurations/config/v1/nodestatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use // with apply. type NodeStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with @@ -21,7 +21,7 @@ func NodeStatus() *NodeStatusApplyConfiguration { // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *NodeStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *NodeStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go b/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go index 3578f512b4..84d3b7ade3 100644 --- a/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go +++ b/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // NutanixPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the NutanixPlatformLoadBalancer type for use // with apply. type NutanixPlatformLoadBalancerApplyConfiguration struct { - Type *v1.PlatformLoadBalancerType `json:"type,omitempty"` + Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` } // NutanixPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the NutanixPlatformLoadBalancer type for use with @@ -21,7 +21,7 @@ func NutanixPlatformLoadBalancer() *NutanixPlatformLoadBalancerApplyConfiguratio // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NutanixPlatformLoadBalancerApplyConfiguration) WithType(value v1.PlatformLoadBalancerType) *NutanixPlatformLoadBalancerApplyConfiguration { +func (b *NutanixPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *NutanixPlatformLoadBalancerApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/nutanixresourceidentifier.go b/config/applyconfigurations/config/v1/nutanixresourceidentifier.go index f06b7c5d9d..5e9b095d83 100644 --- a/config/applyconfigurations/config/v1/nutanixresourceidentifier.go +++ b/config/applyconfigurations/config/v1/nutanixresourceidentifier.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // NutanixResourceIdentifierApplyConfiguration represents a declarative configuration of the NutanixResourceIdentifier type for use // with apply. type NutanixResourceIdentifierApplyConfiguration struct { - Type *v1.NutanixIdentifierType `json:"type,omitempty"` - UUID *string `json:"uuid,omitempty"` - Name *string `json:"name,omitempty"` + Type *configv1.NutanixIdentifierType `json:"type,omitempty"` + UUID *string `json:"uuid,omitempty"` + Name *string `json:"name,omitempty"` } // NutanixResourceIdentifierApplyConfiguration constructs a declarative configuration of the NutanixResourceIdentifier type for use with @@ -23,7 +23,7 @@ func NutanixResourceIdentifier() *NutanixResourceIdentifierApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NutanixResourceIdentifierApplyConfiguration) WithType(value v1.NutanixIdentifierType) *NutanixResourceIdentifierApplyConfiguration { +func (b *NutanixResourceIdentifierApplyConfiguration) WithType(value configv1.NutanixIdentifierType) *NutanixResourceIdentifierApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/oauth.go b/config/applyconfigurations/config/v1/oauth.go index 61d6739c48..1c9589c080 100644 --- a/config/applyconfigurations/config/v1/oauth.go +++ b/config/applyconfigurations/config/v1/oauth.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OAuthApplyConfiguration represents a declarative configuration of the OAuth type for use // with apply. type OAuthApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OAuthSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.OAuthStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OAuthSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.OAuthStatus `json:"status,omitempty"` } // OAuth constructs a declarative configuration of the OAuth type for use with @@ -41,18 +41,18 @@ func OAuth(name string) *OAuthApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractOAuth(oAuth *apiconfigv1.OAuth, fieldManager string) (*OAuthApplyConfiguration, error) { +func ExtractOAuth(oAuth *configv1.OAuth, fieldManager string) (*OAuthApplyConfiguration, error) { return extractOAuth(oAuth, fieldManager, "") } // ExtractOAuthStatus is the same as ExtractOAuth except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractOAuthStatus(oAuth *apiconfigv1.OAuth, fieldManager string) (*OAuthApplyConfiguration, error) { +func ExtractOAuthStatus(oAuth *configv1.OAuth, fieldManager string) (*OAuthApplyConfiguration, error) { return extractOAuth(oAuth, fieldManager, "status") } -func extractOAuth(oAuth *apiconfigv1.OAuth, fieldManager string, subresource string) (*OAuthApplyConfiguration, error) { +func extractOAuth(oAuth *configv1.OAuth, fieldManager string, subresource string) (*OAuthApplyConfiguration, error) { b := &OAuthApplyConfiguration{} err := managedfields.ExtractInto(oAuth, internal.Parser().Type("com.github.openshift.api.config.v1.OAuth"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractOAuth(oAuth *apiconfigv1.OAuth, fieldManager string, subresource str // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithKind(value string) *OAuthApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *OAuthApplyConfiguration) WithKind(value string) *OAuthApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithAPIVersion(value string) *OAuthApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *OAuthApplyConfiguration) WithAPIVersion(value string) *OAuthApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithName(value string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *OAuthApplyConfiguration) WithName(value string) *OAuthApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithGenerateName(value string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *OAuthApplyConfiguration) WithGenerateName(value string) *OAuthApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithNamespace(value string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *OAuthApplyConfiguration) WithNamespace(value string) *OAuthApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithUID(value types.UID) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *OAuthApplyConfiguration) WithUID(value types.UID) *OAuthApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithResourceVersion(value string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *OAuthApplyConfiguration) WithResourceVersion(value string) *OAuthApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithGeneration(value int64) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OAuthApplyConfiguration { +func (b *OAuthApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OAuthApplyConfiguration { +func (b *OAuthApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *OAuthApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OAut // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OAuthApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *OAuthApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *O // overwriting an existing map entries in Labels field with the same key. func (b *OAuthApplyConfiguration) WithLabels(entries map[string]string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *OAuthApplyConfiguration) WithLabels(entries map[string]string) *OAuthAp // overwriting an existing map entries in Annotations field with the same key. func (b *OAuthApplyConfiguration) WithAnnotations(entries map[string]string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *OAuthApplyConfiguration) WithAnnotations(entries map[string]string) *OA // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OAuthApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OAuthApplyConfiguration { +func (b *OAuthApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *OAuthApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *OAuthApplyConfiguration) WithFinalizers(values ...string) *OAuthApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OAuthApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *OAuthApplyConfiguration) WithSpec(value *OAuthSpecApplyConfiguration) * // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithStatus(value apiconfigv1.OAuthStatus) *OAuthApplyConfiguration { +func (b *OAuthApplyConfiguration) WithStatus(value configv1.OAuthStatus) *OAuthApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *OAuthApplyConfiguration) WithStatus(value apiconfigv1.OAuthStatus) *OAu // GetName retrieves the value of the Name field in the declarative configuration. func (b *OAuthApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/openidclaims.go b/config/applyconfigurations/config/v1/openidclaims.go index 18c2a768f7..8f11192c5b 100644 --- a/config/applyconfigurations/config/v1/openidclaims.go +++ b/config/applyconfigurations/config/v1/openidclaims.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // OpenIDClaimsApplyConfiguration represents a declarative configuration of the OpenIDClaims type for use // with apply. type OpenIDClaimsApplyConfiguration struct { - PreferredUsername []string `json:"preferredUsername,omitempty"` - Name []string `json:"name,omitempty"` - Email []string `json:"email,omitempty"` - Groups []v1.OpenIDClaim `json:"groups,omitempty"` + PreferredUsername []string `json:"preferredUsername,omitempty"` + Name []string `json:"name,omitempty"` + Email []string `json:"email,omitempty"` + Groups []configv1.OpenIDClaim `json:"groups,omitempty"` } // OpenIDClaimsApplyConfiguration constructs a declarative configuration of the OpenIDClaims type for use with @@ -54,7 +54,7 @@ func (b *OpenIDClaimsApplyConfiguration) WithEmail(values ...string) *OpenIDClai // WithGroups adds the given value to the Groups field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Groups field. -func (b *OpenIDClaimsApplyConfiguration) WithGroups(values ...v1.OpenIDClaim) *OpenIDClaimsApplyConfiguration { +func (b *OpenIDClaimsApplyConfiguration) WithGroups(values ...configv1.OpenIDClaim) *OpenIDClaimsApplyConfiguration { for i := range values { b.Groups = append(b.Groups, values[i]) } diff --git a/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go b/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go index 3e4990789f..f65d682d57 100644 --- a/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go +++ b/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // OpenStackPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the OpenStackPlatformLoadBalancer type for use // with apply. type OpenStackPlatformLoadBalancerApplyConfiguration struct { - Type *v1.PlatformLoadBalancerType `json:"type,omitempty"` + Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` } // OpenStackPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the OpenStackPlatformLoadBalancer type for use with @@ -21,7 +21,7 @@ func OpenStackPlatformLoadBalancer() *OpenStackPlatformLoadBalancerApplyConfigur // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *OpenStackPlatformLoadBalancerApplyConfiguration) WithType(value v1.PlatformLoadBalancerType) *OpenStackPlatformLoadBalancerApplyConfiguration { +func (b *OpenStackPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *OpenStackPlatformLoadBalancerApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/openstackplatformspec.go b/config/applyconfigurations/config/v1/openstackplatformspec.go index 393a1bb939..af43c83306 100644 --- a/config/applyconfigurations/config/v1/openstackplatformspec.go +++ b/config/applyconfigurations/config/v1/openstackplatformspec.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // OpenStackPlatformSpecApplyConfiguration represents a declarative configuration of the OpenStackPlatformSpec type for use // with apply. type OpenStackPlatformSpecApplyConfiguration struct { - APIServerInternalIPs []v1.IP `json:"apiServerInternalIPs,omitempty"` - IngressIPs []v1.IP `json:"ingressIPs,omitempty"` - MachineNetworks []v1.CIDR `json:"machineNetworks,omitempty"` + APIServerInternalIPs []configv1.IP `json:"apiServerInternalIPs,omitempty"` + IngressIPs []configv1.IP `json:"ingressIPs,omitempty"` + MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` } // OpenStackPlatformSpecApplyConfiguration constructs a declarative configuration of the OpenStackPlatformSpec type for use with @@ -23,7 +23,7 @@ func OpenStackPlatformSpec() *OpenStackPlatformSpecApplyConfiguration { // WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *OpenStackPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...v1.IP) *OpenStackPlatformSpecApplyConfiguration { +func (b *OpenStackPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...configv1.IP) *OpenStackPlatformSpecApplyConfiguration { for i := range values { b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) } @@ -33,7 +33,7 @@ func (b *OpenStackPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(value // WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *OpenStackPlatformSpecApplyConfiguration) WithIngressIPs(values ...v1.IP) *OpenStackPlatformSpecApplyConfiguration { +func (b *OpenStackPlatformSpecApplyConfiguration) WithIngressIPs(values ...configv1.IP) *OpenStackPlatformSpecApplyConfiguration { for i := range values { b.IngressIPs = append(b.IngressIPs, values[i]) } @@ -43,7 +43,7 @@ func (b *OpenStackPlatformSpecApplyConfiguration) WithIngressIPs(values ...v1.IP // WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *OpenStackPlatformSpecApplyConfiguration) WithMachineNetworks(values ...v1.CIDR) *OpenStackPlatformSpecApplyConfiguration { +func (b *OpenStackPlatformSpecApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *OpenStackPlatformSpecApplyConfiguration { for i := range values { b.MachineNetworks = append(b.MachineNetworks, values[i]) } diff --git a/config/applyconfigurations/config/v1/operatorhub.go b/config/applyconfigurations/config/v1/operatorhub.go index bda9b75e8b..df95eb84d9 100644 --- a/config/applyconfigurations/config/v1/operatorhub.go +++ b/config/applyconfigurations/config/v1/operatorhub.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OperatorHubApplyConfiguration represents a declarative configuration of the OperatorHub type for use // with apply. type OperatorHubApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OperatorHubSpecApplyConfiguration `json:"spec,omitempty"` - Status *OperatorHubStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OperatorHubSpecApplyConfiguration `json:"spec,omitempty"` + Status *OperatorHubStatusApplyConfiguration `json:"status,omitempty"` } // OperatorHub constructs a declarative configuration of the OperatorHub type for use with @@ -41,18 +41,18 @@ func OperatorHub(name string) *OperatorHubApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractOperatorHub(operatorHub *apiconfigv1.OperatorHub, fieldManager string) (*OperatorHubApplyConfiguration, error) { +func ExtractOperatorHub(operatorHub *configv1.OperatorHub, fieldManager string) (*OperatorHubApplyConfiguration, error) { return extractOperatorHub(operatorHub, fieldManager, "") } // ExtractOperatorHubStatus is the same as ExtractOperatorHub except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractOperatorHubStatus(operatorHub *apiconfigv1.OperatorHub, fieldManager string) (*OperatorHubApplyConfiguration, error) { +func ExtractOperatorHubStatus(operatorHub *configv1.OperatorHub, fieldManager string) (*OperatorHubApplyConfiguration, error) { return extractOperatorHub(operatorHub, fieldManager, "status") } -func extractOperatorHub(operatorHub *apiconfigv1.OperatorHub, fieldManager string, subresource string) (*OperatorHubApplyConfiguration, error) { +func extractOperatorHub(operatorHub *configv1.OperatorHub, fieldManager string, subresource string) (*OperatorHubApplyConfiguration, error) { b := &OperatorHubApplyConfiguration{} err := managedfields.ExtractInto(operatorHub, internal.Parser().Type("com.github.openshift.api.config.v1.OperatorHub"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractOperatorHub(operatorHub *apiconfigv1.OperatorHub, fieldManager strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithKind(value string) *OperatorHubApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *OperatorHubApplyConfiguration) WithKind(value string) *OperatorHubApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithAPIVersion(value string) *OperatorHubApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *OperatorHubApplyConfiguration) WithAPIVersion(value string) *OperatorHu // If called multiple times, the Name field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithName(value string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *OperatorHubApplyConfiguration) WithName(value string) *OperatorHubApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithGenerateName(value string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *OperatorHubApplyConfiguration) WithGenerateName(value string) *Operator // If called multiple times, the Namespace field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithNamespace(value string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *OperatorHubApplyConfiguration) WithNamespace(value string) *OperatorHub // If called multiple times, the UID field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithUID(value types.UID) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *OperatorHubApplyConfiguration) WithUID(value types.UID) *OperatorHubApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithResourceVersion(value string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *OperatorHubApplyConfiguration) WithResourceVersion(value string) *Opera // If called multiple times, the Generation field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithGeneration(value int64) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OperatorHubApplyConfiguration { +func (b *OperatorHubApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OperatorHubApplyConfiguration { +func (b *OperatorHubApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *OperatorHubApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OperatorHubApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *OperatorHubApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *OperatorHubApplyConfiguration) WithLabels(entries map[string]string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *OperatorHubApplyConfiguration) WithLabels(entries map[string]string) *O // overwriting an existing map entries in Annotations field with the same key. func (b *OperatorHubApplyConfiguration) WithAnnotations(entries map[string]string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *OperatorHubApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OperatorHubApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OperatorHubApplyConfiguration { +func (b *OperatorHubApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *OperatorHubApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *OperatorHubApplyConfiguration) WithFinalizers(values ...string) *OperatorHubApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OperatorHubApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *OperatorHubApplyConfiguration) WithStatus(value *OperatorHubStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *OperatorHubApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go b/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go index b679a55fd0..e81d48044d 100644 --- a/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go +++ b/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // OvirtPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the OvirtPlatformLoadBalancer type for use // with apply. type OvirtPlatformLoadBalancerApplyConfiguration struct { - Type *v1.PlatformLoadBalancerType `json:"type,omitempty"` + Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` } // OvirtPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the OvirtPlatformLoadBalancer type for use with @@ -21,7 +21,7 @@ func OvirtPlatformLoadBalancer() *OvirtPlatformLoadBalancerApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *OvirtPlatformLoadBalancerApplyConfiguration) WithType(value v1.PlatformLoadBalancerType) *OvirtPlatformLoadBalancerApplyConfiguration { +func (b *OvirtPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *OvirtPlatformLoadBalancerApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/platformspec.go b/config/applyconfigurations/config/v1/platformspec.go index 6ff5bcf0cb..517ac0bfc6 100644 --- a/config/applyconfigurations/config/v1/platformspec.go +++ b/config/applyconfigurations/config/v1/platformspec.go @@ -3,25 +3,25 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // PlatformSpecApplyConfiguration represents a declarative configuration of the PlatformSpec type for use // with apply. type PlatformSpecApplyConfiguration struct { - Type *v1.PlatformType `json:"type,omitempty"` + Type *configv1.PlatformType `json:"type,omitempty"` AWS *AWSPlatformSpecApplyConfiguration `json:"aws,omitempty"` - Azure *v1.AzurePlatformSpec `json:"azure,omitempty"` - GCP *v1.GCPPlatformSpec `json:"gcp,omitempty"` + Azure *configv1.AzurePlatformSpec `json:"azure,omitempty"` + GCP *configv1.GCPPlatformSpec `json:"gcp,omitempty"` BareMetal *BareMetalPlatformSpecApplyConfiguration `json:"baremetal,omitempty"` OpenStack *OpenStackPlatformSpecApplyConfiguration `json:"openstack,omitempty"` - Ovirt *v1.OvirtPlatformSpec `json:"ovirt,omitempty"` + Ovirt *configv1.OvirtPlatformSpec `json:"ovirt,omitempty"` VSphere *VSpherePlatformSpecApplyConfiguration `json:"vsphere,omitempty"` - IBMCloud *v1.IBMCloudPlatformSpec `json:"ibmcloud,omitempty"` - Kubevirt *v1.KubevirtPlatformSpec `json:"kubevirt,omitempty"` - EquinixMetal *v1.EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"` + IBMCloud *configv1.IBMCloudPlatformSpec `json:"ibmcloud,omitempty"` + Kubevirt *configv1.KubevirtPlatformSpec `json:"kubevirt,omitempty"` + EquinixMetal *configv1.EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"` PowerVS *PowerVSPlatformSpecApplyConfiguration `json:"powervs,omitempty"` - AlibabaCloud *v1.AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"` + AlibabaCloud *configv1.AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"` Nutanix *NutanixPlatformSpecApplyConfiguration `json:"nutanix,omitempty"` External *ExternalPlatformSpecApplyConfiguration `json:"external,omitempty"` } @@ -35,7 +35,7 @@ func PlatformSpec() *PlatformSpecApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithType(value v1.PlatformType) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *PlatformSpecApplyConfiguration { b.Type = &value return b } @@ -51,7 +51,7 @@ func (b *PlatformSpecApplyConfiguration) WithAWS(value *AWSPlatformSpecApplyConf // WithAzure sets the Azure field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Azure field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithAzure(value v1.AzurePlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithAzure(value configv1.AzurePlatformSpec) *PlatformSpecApplyConfiguration { b.Azure = &value return b } @@ -59,7 +59,7 @@ func (b *PlatformSpecApplyConfiguration) WithAzure(value v1.AzurePlatformSpec) * // WithGCP sets the GCP field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GCP field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithGCP(value v1.GCPPlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithGCP(value configv1.GCPPlatformSpec) *PlatformSpecApplyConfiguration { b.GCP = &value return b } @@ -83,7 +83,7 @@ func (b *PlatformSpecApplyConfiguration) WithOpenStack(value *OpenStackPlatformS // WithOvirt sets the Ovirt field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Ovirt field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithOvirt(value v1.OvirtPlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithOvirt(value configv1.OvirtPlatformSpec) *PlatformSpecApplyConfiguration { b.Ovirt = &value return b } @@ -99,7 +99,7 @@ func (b *PlatformSpecApplyConfiguration) WithVSphere(value *VSpherePlatformSpecA // WithIBMCloud sets the IBMCloud field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IBMCloud field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithIBMCloud(value v1.IBMCloudPlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithIBMCloud(value configv1.IBMCloudPlatformSpec) *PlatformSpecApplyConfiguration { b.IBMCloud = &value return b } @@ -107,7 +107,7 @@ func (b *PlatformSpecApplyConfiguration) WithIBMCloud(value v1.IBMCloudPlatformS // WithKubevirt sets the Kubevirt field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kubevirt field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithKubevirt(value v1.KubevirtPlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithKubevirt(value configv1.KubevirtPlatformSpec) *PlatformSpecApplyConfiguration { b.Kubevirt = &value return b } @@ -115,7 +115,7 @@ func (b *PlatformSpecApplyConfiguration) WithKubevirt(value v1.KubevirtPlatformS // WithEquinixMetal sets the EquinixMetal field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EquinixMetal field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithEquinixMetal(value v1.EquinixMetalPlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithEquinixMetal(value configv1.EquinixMetalPlatformSpec) *PlatformSpecApplyConfiguration { b.EquinixMetal = &value return b } @@ -131,7 +131,7 @@ func (b *PlatformSpecApplyConfiguration) WithPowerVS(value *PowerVSPlatformSpecA // WithAlibabaCloud sets the AlibabaCloud field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AlibabaCloud field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithAlibabaCloud(value v1.AlibabaCloudPlatformSpec) *PlatformSpecApplyConfiguration { +func (b *PlatformSpecApplyConfiguration) WithAlibabaCloud(value configv1.AlibabaCloudPlatformSpec) *PlatformSpecApplyConfiguration { b.AlibabaCloud = &value return b } diff --git a/config/applyconfigurations/config/v1/platformstatus.go b/config/applyconfigurations/config/v1/platformstatus.go index 6519ef8b02..e470ebd96a 100644 --- a/config/applyconfigurations/config/v1/platformstatus.go +++ b/config/applyconfigurations/config/v1/platformstatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // PlatformStatusApplyConfiguration represents a declarative configuration of the PlatformStatus type for use // with apply. type PlatformStatusApplyConfiguration struct { - Type *v1.PlatformType `json:"type,omitempty"` + Type *configv1.PlatformType `json:"type,omitempty"` AWS *AWSPlatformStatusApplyConfiguration `json:"aws,omitempty"` Azure *AzurePlatformStatusApplyConfiguration `json:"azure,omitempty"` GCP *GCPPlatformStatusApplyConfiguration `json:"gcp,omitempty"` @@ -35,7 +35,7 @@ func PlatformStatus() *PlatformStatusApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithType(value v1.PlatformType) *PlatformStatusApplyConfiguration { +func (b *PlatformStatusApplyConfiguration) WithType(value configv1.PlatformType) *PlatformStatusApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/prefixedclaimmapping.go b/config/applyconfigurations/config/v1/prefixedclaimmapping.go index bf10a68916..2455204339 100644 --- a/config/applyconfigurations/config/v1/prefixedclaimmapping.go +++ b/config/applyconfigurations/config/v1/prefixedclaimmapping.go @@ -19,7 +19,7 @@ func PrefixedClaimMapping() *PrefixedClaimMappingApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Claim field is set to the value of the last call. func (b *PrefixedClaimMappingApplyConfiguration) WithClaim(value string) *PrefixedClaimMappingApplyConfiguration { - b.Claim = &value + b.TokenClaimMappingApplyConfiguration.Claim = &value return b } diff --git a/config/applyconfigurations/config/v1/profilecustomizations.go b/config/applyconfigurations/config/v1/profilecustomizations.go index f0e90acc97..c2392bab98 100644 --- a/config/applyconfigurations/config/v1/profilecustomizations.go +++ b/config/applyconfigurations/config/v1/profilecustomizations.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ProfileCustomizationsApplyConfiguration represents a declarative configuration of the ProfileCustomizations type for use // with apply. type ProfileCustomizationsApplyConfiguration struct { - DynamicResourceAllocation *v1.DRAEnablement `json:"dynamicResourceAllocation,omitempty"` + DynamicResourceAllocation *configv1.DRAEnablement `json:"dynamicResourceAllocation,omitempty"` } // ProfileCustomizationsApplyConfiguration constructs a declarative configuration of the ProfileCustomizations type for use with @@ -21,7 +21,7 @@ func ProfileCustomizations() *ProfileCustomizationsApplyConfiguration { // WithDynamicResourceAllocation sets the DynamicResourceAllocation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DynamicResourceAllocation field is set to the value of the last call. -func (b *ProfileCustomizationsApplyConfiguration) WithDynamicResourceAllocation(value v1.DRAEnablement) *ProfileCustomizationsApplyConfiguration { +func (b *ProfileCustomizationsApplyConfiguration) WithDynamicResourceAllocation(value configv1.DRAEnablement) *ProfileCustomizationsApplyConfiguration { b.DynamicResourceAllocation = &value return b } diff --git a/config/applyconfigurations/config/v1/project.go b/config/applyconfigurations/config/v1/project.go index 864277b594..5c040bae4d 100644 --- a/config/applyconfigurations/config/v1/project.go +++ b/config/applyconfigurations/config/v1/project.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ProjectApplyConfiguration represents a declarative configuration of the Project type for use // with apply. type ProjectApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ProjectSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.ProjectStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ProjectSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.ProjectStatus `json:"status,omitempty"` } // Project constructs a declarative configuration of the Project type for use with @@ -41,18 +41,18 @@ func Project(name string) *ProjectApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractProject(project *apiconfigv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { +func ExtractProject(project *configv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { return extractProject(project, fieldManager, "") } // ExtractProjectStatus is the same as ExtractProject except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractProjectStatus(project *apiconfigv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { +func ExtractProjectStatus(project *configv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { return extractProject(project, fieldManager, "status") } -func extractProject(project *apiconfigv1.Project, fieldManager string, subresource string) (*ProjectApplyConfiguration, error) { +func extractProject(project *configv1.Project, fieldManager string, subresource string) (*ProjectApplyConfiguration, error) { b := &ProjectApplyConfiguration{} err := managedfields.ExtractInto(project, internal.Parser().Type("com.github.openshift.api.config.v1.Project"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractProject(project *apiconfigv1.Project, fieldManager string, subresour // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithKind(value string) *ProjectApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ProjectApplyConfiguration) WithKind(value string) *ProjectApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithAPIVersion(value string) *ProjectApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ProjectApplyConfiguration) WithAPIVersion(value string) *ProjectApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithName(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ProjectApplyConfiguration) WithName(value string) *ProjectApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithGenerateName(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ProjectApplyConfiguration) WithGenerateName(value string) *ProjectApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithNamespace(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ProjectApplyConfiguration) WithNamespace(value string) *ProjectApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithUID(value types.UID) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ProjectApplyConfiguration) WithUID(value types.UID) *ProjectApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithResourceVersion(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ProjectApplyConfiguration) WithResourceVersion(value string) *ProjectAp // If called multiple times, the Generation field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithGeneration(value int64) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Pr // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ProjectApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *ProjectApplyConfiguration) WithLabels(entries map[string]string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ProjectApplyConfiguration) WithLabels(entries map[string]string) *Proje // overwriting an existing map entries in Annotations field with the same key. func (b *ProjectApplyConfiguration) WithAnnotations(entries map[string]string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ProjectApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *ProjectApplyConfiguration) WithFinalizers(values ...string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ProjectApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *ProjectApplyConfiguration) WithSpec(value *ProjectSpecApplyConfiguratio // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithStatus(value apiconfigv1.ProjectStatus) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithStatus(value configv1.ProjectStatus) *ProjectApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *ProjectApplyConfiguration) WithStatus(value apiconfigv1.ProjectStatus) // GetName retrieves the value of the Name field in the declarative configuration. func (b *ProjectApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/proxy.go b/config/applyconfigurations/config/v1/proxy.go index fdfe260f52..7184cbd082 100644 --- a/config/applyconfigurations/config/v1/proxy.go +++ b/config/applyconfigurations/config/v1/proxy.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ProxyApplyConfiguration represents a declarative configuration of the Proxy type for use // with apply. type ProxyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ProxySpecApplyConfiguration `json:"spec,omitempty"` - Status *ProxyStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ProxySpecApplyConfiguration `json:"spec,omitempty"` + Status *ProxyStatusApplyConfiguration `json:"status,omitempty"` } // Proxy constructs a declarative configuration of the Proxy type for use with @@ -41,18 +41,18 @@ func Proxy(name string) *ProxyApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractProxy(proxy *apiconfigv1.Proxy, fieldManager string) (*ProxyApplyConfiguration, error) { +func ExtractProxy(proxy *configv1.Proxy, fieldManager string) (*ProxyApplyConfiguration, error) { return extractProxy(proxy, fieldManager, "") } // ExtractProxyStatus is the same as ExtractProxy except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractProxyStatus(proxy *apiconfigv1.Proxy, fieldManager string) (*ProxyApplyConfiguration, error) { +func ExtractProxyStatus(proxy *configv1.Proxy, fieldManager string) (*ProxyApplyConfiguration, error) { return extractProxy(proxy, fieldManager, "status") } -func extractProxy(proxy *apiconfigv1.Proxy, fieldManager string, subresource string) (*ProxyApplyConfiguration, error) { +func extractProxy(proxy *configv1.Proxy, fieldManager string, subresource string) (*ProxyApplyConfiguration, error) { b := &ProxyApplyConfiguration{} err := managedfields.ExtractInto(proxy, internal.Parser().Type("com.github.openshift.api.config.v1.Proxy"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractProxy(proxy *apiconfigv1.Proxy, fieldManager string, subresource str // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithKind(value string) *ProxyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ProxyApplyConfiguration) WithKind(value string) *ProxyApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithAPIVersion(value string) *ProxyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ProxyApplyConfiguration) WithAPIVersion(value string) *ProxyApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithName(value string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ProxyApplyConfiguration) WithName(value string) *ProxyApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithGenerateName(value string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ProxyApplyConfiguration) WithGenerateName(value string) *ProxyApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithNamespace(value string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ProxyApplyConfiguration) WithNamespace(value string) *ProxyApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithUID(value types.UID) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ProxyApplyConfiguration) WithUID(value types.UID) *ProxyApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithResourceVersion(value string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ProxyApplyConfiguration) WithResourceVersion(value string) *ProxyApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithGeneration(value int64) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ProxyApplyConfiguration { +func (b *ProxyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ProxyApplyConfiguration { +func (b *ProxyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ProxyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Prox // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ProxyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ProxyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *P // overwriting an existing map entries in Labels field with the same key. func (b *ProxyApplyConfiguration) WithLabels(entries map[string]string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ProxyApplyConfiguration) WithLabels(entries map[string]string) *ProxyAp // overwriting an existing map entries in Annotations field with the same key. func (b *ProxyApplyConfiguration) WithAnnotations(entries map[string]string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ProxyApplyConfiguration) WithAnnotations(entries map[string]string) *Pr // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ProxyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ProxyApplyConfiguration { +func (b *ProxyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ProxyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *ProxyApplyConfiguration) WithFinalizers(values ...string) *ProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ProxyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ProxyApplyConfiguration) WithStatus(value *ProxyStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *ProxyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/release.go b/config/applyconfigurations/config/v1/release.go index 9247e46a05..c8275fcde2 100644 --- a/config/applyconfigurations/config/v1/release.go +++ b/config/applyconfigurations/config/v1/release.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ReleaseApplyConfiguration represents a declarative configuration of the Release type for use // with apply. type ReleaseApplyConfiguration struct { - Architecture *v1.ClusterVersionArchitecture `json:"architecture,omitempty"` - Version *string `json:"version,omitempty"` - Image *string `json:"image,omitempty"` - URL *v1.URL `json:"url,omitempty"` - Channels []string `json:"channels,omitempty"` + Architecture *configv1.ClusterVersionArchitecture `json:"architecture,omitempty"` + Version *string `json:"version,omitempty"` + Image *string `json:"image,omitempty"` + URL *configv1.URL `json:"url,omitempty"` + Channels []string `json:"channels,omitempty"` } // ReleaseApplyConfiguration constructs a declarative configuration of the Release type for use with @@ -25,7 +25,7 @@ func Release() *ReleaseApplyConfiguration { // WithArchitecture sets the Architecture field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Architecture field is set to the value of the last call. -func (b *ReleaseApplyConfiguration) WithArchitecture(value v1.ClusterVersionArchitecture) *ReleaseApplyConfiguration { +func (b *ReleaseApplyConfiguration) WithArchitecture(value configv1.ClusterVersionArchitecture) *ReleaseApplyConfiguration { b.Architecture = &value return b } @@ -49,7 +49,7 @@ func (b *ReleaseApplyConfiguration) WithImage(value string) *ReleaseApplyConfigu // WithURL sets the URL field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the URL field is set to the value of the last call. -func (b *ReleaseApplyConfiguration) WithURL(value v1.URL) *ReleaseApplyConfiguration { +func (b *ReleaseApplyConfiguration) WithURL(value configv1.URL) *ReleaseApplyConfiguration { b.URL = &value return b } diff --git a/config/applyconfigurations/config/v1/repositorydigestmirrors.go b/config/applyconfigurations/config/v1/repositorydigestmirrors.go index f903170f36..96f7240951 100644 --- a/config/applyconfigurations/config/v1/repositorydigestmirrors.go +++ b/config/applyconfigurations/config/v1/repositorydigestmirrors.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // RepositoryDigestMirrorsApplyConfiguration represents a declarative configuration of the RepositoryDigestMirrors type for use // with apply. type RepositoryDigestMirrorsApplyConfiguration struct { - Source *string `json:"source,omitempty"` - AllowMirrorByTags *bool `json:"allowMirrorByTags,omitempty"` - Mirrors []v1.Mirror `json:"mirrors,omitempty"` + Source *string `json:"source,omitempty"` + AllowMirrorByTags *bool `json:"allowMirrorByTags,omitempty"` + Mirrors []configv1.Mirror `json:"mirrors,omitempty"` } // RepositoryDigestMirrorsApplyConfiguration constructs a declarative configuration of the RepositoryDigestMirrors type for use with @@ -39,7 +39,7 @@ func (b *RepositoryDigestMirrorsApplyConfiguration) WithAllowMirrorByTags(value // WithMirrors adds the given value to the Mirrors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Mirrors field. -func (b *RepositoryDigestMirrorsApplyConfiguration) WithMirrors(values ...v1.Mirror) *RepositoryDigestMirrorsApplyConfiguration { +func (b *RepositoryDigestMirrorsApplyConfiguration) WithMirrors(values ...configv1.Mirror) *RepositoryDigestMirrorsApplyConfiguration { for i := range values { b.Mirrors = append(b.Mirrors, values[i]) } diff --git a/config/applyconfigurations/config/v1/requiredhstspolicy.go b/config/applyconfigurations/config/v1/requiredhstspolicy.go index a9ffe1350d..c68466123a 100644 --- a/config/applyconfigurations/config/v1/requiredhstspolicy.go +++ b/config/applyconfigurations/config/v1/requiredhstspolicy.go @@ -3,18 +3,18 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + configv1 "github.com/openshift/api/config/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RequiredHSTSPolicyApplyConfiguration represents a declarative configuration of the RequiredHSTSPolicy type for use // with apply. type RequiredHSTSPolicyApplyConfiguration struct { - NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - DomainPatterns []string `json:"domainPatterns,omitempty"` - MaxAge *MaxAgePolicyApplyConfiguration `json:"maxAge,omitempty"` - PreloadPolicy *apiconfigv1.PreloadPolicy `json:"preloadPolicy,omitempty"` - IncludeSubDomainsPolicy *apiconfigv1.IncludeSubDomainsPolicy `json:"includeSubDomainsPolicy,omitempty"` + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + DomainPatterns []string `json:"domainPatterns,omitempty"` + MaxAge *MaxAgePolicyApplyConfiguration `json:"maxAge,omitempty"` + PreloadPolicy *configv1.PreloadPolicy `json:"preloadPolicy,omitempty"` + IncludeSubDomainsPolicy *configv1.IncludeSubDomainsPolicy `json:"includeSubDomainsPolicy,omitempty"` } // RequiredHSTSPolicyApplyConfiguration constructs a declarative configuration of the RequiredHSTSPolicy type for use with @@ -26,7 +26,7 @@ func RequiredHSTSPolicy() *RequiredHSTSPolicyApplyConfiguration { // WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NamespaceSelector field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *RequiredHSTSPolicyApplyConfiguration { +func (b *RequiredHSTSPolicyApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *RequiredHSTSPolicyApplyConfiguration { b.NamespaceSelector = value return b } @@ -52,7 +52,7 @@ func (b *RequiredHSTSPolicyApplyConfiguration) WithMaxAge(value *MaxAgePolicyApp // WithPreloadPolicy sets the PreloadPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PreloadPolicy field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithPreloadPolicy(value apiconfigv1.PreloadPolicy) *RequiredHSTSPolicyApplyConfiguration { +func (b *RequiredHSTSPolicyApplyConfiguration) WithPreloadPolicy(value configv1.PreloadPolicy) *RequiredHSTSPolicyApplyConfiguration { b.PreloadPolicy = &value return b } @@ -60,7 +60,7 @@ func (b *RequiredHSTSPolicyApplyConfiguration) WithPreloadPolicy(value apiconfig // WithIncludeSubDomainsPolicy sets the IncludeSubDomainsPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IncludeSubDomainsPolicy field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithIncludeSubDomainsPolicy(value apiconfigv1.IncludeSubDomainsPolicy) *RequiredHSTSPolicyApplyConfiguration { +func (b *RequiredHSTSPolicyApplyConfiguration) WithIncludeSubDomainsPolicy(value configv1.IncludeSubDomainsPolicy) *RequiredHSTSPolicyApplyConfiguration { b.IncludeSubDomainsPolicy = &value return b } diff --git a/config/applyconfigurations/config/v1/scheduler.go b/config/applyconfigurations/config/v1/scheduler.go index 33e73fab9b..fa2323d724 100644 --- a/config/applyconfigurations/config/v1/scheduler.go +++ b/config/applyconfigurations/config/v1/scheduler.go @@ -3,21 +3,21 @@ package v1 import ( - apiconfigv1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // SchedulerApplyConfiguration represents a declarative configuration of the Scheduler type for use // with apply. type SchedulerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *SchedulerSpecApplyConfiguration `json:"spec,omitempty"` - Status *apiconfigv1.SchedulerStatus `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *SchedulerSpecApplyConfiguration `json:"spec,omitempty"` + Status *configv1.SchedulerStatus `json:"status,omitempty"` } // Scheduler constructs a declarative configuration of the Scheduler type for use with @@ -41,18 +41,18 @@ func Scheduler(name string) *SchedulerApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractScheduler(scheduler *apiconfigv1.Scheduler, fieldManager string) (*SchedulerApplyConfiguration, error) { +func ExtractScheduler(scheduler *configv1.Scheduler, fieldManager string) (*SchedulerApplyConfiguration, error) { return extractScheduler(scheduler, fieldManager, "") } // ExtractSchedulerStatus is the same as ExtractScheduler except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractSchedulerStatus(scheduler *apiconfigv1.Scheduler, fieldManager string) (*SchedulerApplyConfiguration, error) { +func ExtractSchedulerStatus(scheduler *configv1.Scheduler, fieldManager string) (*SchedulerApplyConfiguration, error) { return extractScheduler(scheduler, fieldManager, "status") } -func extractScheduler(scheduler *apiconfigv1.Scheduler, fieldManager string, subresource string) (*SchedulerApplyConfiguration, error) { +func extractScheduler(scheduler *configv1.Scheduler, fieldManager string, subresource string) (*SchedulerApplyConfiguration, error) { b := &SchedulerApplyConfiguration{} err := managedfields.ExtractInto(scheduler, internal.Parser().Type("com.github.openshift.api.config.v1.Scheduler"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractScheduler(scheduler *apiconfigv1.Scheduler, fieldManager string, sub // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithKind(value string) *SchedulerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *SchedulerApplyConfiguration) WithKind(value string) *SchedulerApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithAPIVersion(value string) *SchedulerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *SchedulerApplyConfiguration) WithAPIVersion(value string) *SchedulerApp // If called multiple times, the Name field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithName(value string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *SchedulerApplyConfiguration) WithName(value string) *SchedulerApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithGenerateName(value string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *SchedulerApplyConfiguration) WithGenerateName(value string) *SchedulerA // If called multiple times, the Namespace field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithNamespace(value string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *SchedulerApplyConfiguration) WithNamespace(value string) *SchedulerAppl // If called multiple times, the UID field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithUID(value types.UID) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *SchedulerApplyConfiguration) WithUID(value types.UID) *SchedulerApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithResourceVersion(value string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *SchedulerApplyConfiguration) WithResourceVersion(value string) *Schedul // If called multiple times, the Generation field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithGeneration(value int64) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SchedulerApplyConfiguration { +func (b *SchedulerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SchedulerApplyConfiguration { +func (b *SchedulerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *SchedulerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *SchedulerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *SchedulerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *SchedulerApplyConfiguration) WithLabels(entries map[string]string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *SchedulerApplyConfiguration) WithLabels(entries map[string]string) *Sch // overwriting an existing map entries in Annotations field with the same key. func (b *SchedulerApplyConfiguration) WithAnnotations(entries map[string]string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *SchedulerApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *SchedulerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SchedulerApplyConfiguration { +func (b *SchedulerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *SchedulerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *SchedulerApplyConfiguration) WithFinalizers(values ...string) *SchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *SchedulerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -234,7 +234,7 @@ func (b *SchedulerApplyConfiguration) WithSpec(value *SchedulerSpecApplyConfigur // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithStatus(value apiconfigv1.SchedulerStatus) *SchedulerApplyConfiguration { +func (b *SchedulerApplyConfiguration) WithStatus(value configv1.SchedulerStatus) *SchedulerApplyConfiguration { b.Status = &value return b } @@ -242,5 +242,5 @@ func (b *SchedulerApplyConfiguration) WithStatus(value apiconfigv1.SchedulerStat // GetName retrieves the value of the Name field in the declarative configuration. func (b *SchedulerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1/tlsprofilespec.go b/config/applyconfigurations/config/v1/tlsprofilespec.go index c874fcf0c8..43590d0ef3 100644 --- a/config/applyconfigurations/config/v1/tlsprofilespec.go +++ b/config/applyconfigurations/config/v1/tlsprofilespec.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // TLSProfileSpecApplyConfiguration represents a declarative configuration of the TLSProfileSpec type for use // with apply. type TLSProfileSpecApplyConfiguration struct { - Ciphers []string `json:"ciphers,omitempty"` - MinTLSVersion *v1.TLSProtocolVersion `json:"minTLSVersion,omitempty"` + Ciphers []string `json:"ciphers,omitempty"` + MinTLSVersion *configv1.TLSProtocolVersion `json:"minTLSVersion,omitempty"` } // TLSProfileSpecApplyConfiguration constructs a declarative configuration of the TLSProfileSpec type for use with @@ -32,7 +32,7 @@ func (b *TLSProfileSpecApplyConfiguration) WithCiphers(values ...string) *TLSPro // WithMinTLSVersion sets the MinTLSVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MinTLSVersion field is set to the value of the last call. -func (b *TLSProfileSpecApplyConfiguration) WithMinTLSVersion(value v1.TLSProtocolVersion) *TLSProfileSpecApplyConfiguration { +func (b *TLSProfileSpecApplyConfiguration) WithMinTLSVersion(value configv1.TLSProtocolVersion) *TLSProfileSpecApplyConfiguration { b.MinTLSVersion = &value return b } diff --git a/config/applyconfigurations/config/v1/tlssecurityprofile.go b/config/applyconfigurations/config/v1/tlssecurityprofile.go index 004632489f..e5806e33c4 100644 --- a/config/applyconfigurations/config/v1/tlssecurityprofile.go +++ b/config/applyconfigurations/config/v1/tlssecurityprofile.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // TLSSecurityProfileApplyConfiguration represents a declarative configuration of the TLSSecurityProfile type for use // with apply. type TLSSecurityProfileApplyConfiguration struct { - Type *v1.TLSProfileType `json:"type,omitempty"` - Old *v1.OldTLSProfile `json:"old,omitempty"` - Intermediate *v1.IntermediateTLSProfile `json:"intermediate,omitempty"` - Modern *v1.ModernTLSProfile `json:"modern,omitempty"` + Type *configv1.TLSProfileType `json:"type,omitempty"` + Old *configv1.OldTLSProfile `json:"old,omitempty"` + Intermediate *configv1.IntermediateTLSProfile `json:"intermediate,omitempty"` + Modern *configv1.ModernTLSProfile `json:"modern,omitempty"` Custom *CustomTLSProfileApplyConfiguration `json:"custom,omitempty"` } @@ -25,7 +25,7 @@ func TLSSecurityProfile() *TLSSecurityProfileApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithType(value v1.TLSProfileType) *TLSSecurityProfileApplyConfiguration { +func (b *TLSSecurityProfileApplyConfiguration) WithType(value configv1.TLSProfileType) *TLSSecurityProfileApplyConfiguration { b.Type = &value return b } @@ -33,7 +33,7 @@ func (b *TLSSecurityProfileApplyConfiguration) WithType(value v1.TLSProfileType) // WithOld sets the Old field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Old field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithOld(value v1.OldTLSProfile) *TLSSecurityProfileApplyConfiguration { +func (b *TLSSecurityProfileApplyConfiguration) WithOld(value configv1.OldTLSProfile) *TLSSecurityProfileApplyConfiguration { b.Old = &value return b } @@ -41,7 +41,7 @@ func (b *TLSSecurityProfileApplyConfiguration) WithOld(value v1.OldTLSProfile) * // WithIntermediate sets the Intermediate field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Intermediate field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithIntermediate(value v1.IntermediateTLSProfile) *TLSSecurityProfileApplyConfiguration { +func (b *TLSSecurityProfileApplyConfiguration) WithIntermediate(value configv1.IntermediateTLSProfile) *TLSSecurityProfileApplyConfiguration { b.Intermediate = &value return b } @@ -49,7 +49,7 @@ func (b *TLSSecurityProfileApplyConfiguration) WithIntermediate(value v1.Interme // WithModern sets the Modern field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Modern field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithModern(value v1.ModernTLSProfile) *TLSSecurityProfileApplyConfiguration { +func (b *TLSSecurityProfileApplyConfiguration) WithModern(value configv1.ModernTLSProfile) *TLSSecurityProfileApplyConfiguration { b.Modern = &value return b } diff --git a/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go b/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go index ad9968eefe..74e9f61091 100644 --- a/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go +++ b/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // TokenClaimValidationRuleApplyConfiguration represents a declarative configuration of the TokenClaimValidationRule type for use // with apply. type TokenClaimValidationRuleApplyConfiguration struct { - Type *v1.TokenValidationRuleType `json:"type,omitempty"` + Type *configv1.TokenValidationRuleType `json:"type,omitempty"` RequiredClaim *TokenRequiredClaimApplyConfiguration `json:"requiredClaim,omitempty"` } @@ -22,7 +22,7 @@ func TokenClaimValidationRule() *TokenClaimValidationRuleApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *TokenClaimValidationRuleApplyConfiguration) WithType(value v1.TokenValidationRuleType) *TokenClaimValidationRuleApplyConfiguration { +func (b *TokenClaimValidationRuleApplyConfiguration) WithType(value configv1.TokenValidationRuleType) *TokenClaimValidationRuleApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/tokenconfig.go b/config/applyconfigurations/config/v1/tokenconfig.go index 7a103935e3..e1b6c4b511 100644 --- a/config/applyconfigurations/config/v1/tokenconfig.go +++ b/config/applyconfigurations/config/v1/tokenconfig.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // TokenConfigApplyConfiguration represents a declarative configuration of the TokenConfig type for use // with apply. type TokenConfigApplyConfiguration struct { - AccessTokenMaxAgeSeconds *int32 `json:"accessTokenMaxAgeSeconds,omitempty"` - AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` - AccessTokenInactivityTimeout *v1.Duration `json:"accessTokenInactivityTimeout,omitempty"` + AccessTokenMaxAgeSeconds *int32 `json:"accessTokenMaxAgeSeconds,omitempty"` + AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` + AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"` } // TokenConfigApplyConfiguration constructs a declarative configuration of the TokenConfig type for use with @@ -39,7 +39,7 @@ func (b *TokenConfigApplyConfiguration) WithAccessTokenInactivityTimeoutSeconds( // WithAccessTokenInactivityTimeout sets the AccessTokenInactivityTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AccessTokenInactivityTimeout field is set to the value of the last call. -func (b *TokenConfigApplyConfiguration) WithAccessTokenInactivityTimeout(value v1.Duration) *TokenConfigApplyConfiguration { +func (b *TokenConfigApplyConfiguration) WithAccessTokenInactivityTimeout(value metav1.Duration) *TokenConfigApplyConfiguration { b.AccessTokenInactivityTimeout = &value return b } diff --git a/config/applyconfigurations/config/v1/tokenissuer.go b/config/applyconfigurations/config/v1/tokenissuer.go index 0811ca729a..68f590abc6 100644 --- a/config/applyconfigurations/config/v1/tokenissuer.go +++ b/config/applyconfigurations/config/v1/tokenissuer.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // TokenIssuerApplyConfiguration represents a declarative configuration of the TokenIssuer type for use // with apply. type TokenIssuerApplyConfiguration struct { URL *string `json:"issuerURL,omitempty"` - Audiences []v1.TokenAudience `json:"audiences,omitempty"` + Audiences []configv1.TokenAudience `json:"audiences,omitempty"` CertificateAuthority *ConfigMapNameReferenceApplyConfiguration `json:"issuerCertificateAuthority,omitempty"` } @@ -31,7 +31,7 @@ func (b *TokenIssuerApplyConfiguration) WithURL(value string) *TokenIssuerApplyC // WithAudiences adds the given value to the Audiences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Audiences field. -func (b *TokenIssuerApplyConfiguration) WithAudiences(values ...v1.TokenAudience) *TokenIssuerApplyConfiguration { +func (b *TokenIssuerApplyConfiguration) WithAudiences(values ...configv1.TokenAudience) *TokenIssuerApplyConfiguration { for i := range values { b.Audiences = append(b.Audiences, values[i]) } diff --git a/config/applyconfigurations/config/v1/update.go b/config/applyconfigurations/config/v1/update.go index 1d1547d87a..004d1bac22 100644 --- a/config/applyconfigurations/config/v1/update.go +++ b/config/applyconfigurations/config/v1/update.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // UpdateApplyConfiguration represents a declarative configuration of the Update type for use // with apply. type UpdateApplyConfiguration struct { - Architecture *v1.ClusterVersionArchitecture `json:"architecture,omitempty"` - Version *string `json:"version,omitempty"` - Image *string `json:"image,omitempty"` - Force *bool `json:"force,omitempty"` + Architecture *configv1.ClusterVersionArchitecture `json:"architecture,omitempty"` + Version *string `json:"version,omitempty"` + Image *string `json:"image,omitempty"` + Force *bool `json:"force,omitempty"` } // UpdateApplyConfiguration constructs a declarative configuration of the Update type for use with @@ -24,7 +24,7 @@ func Update() *UpdateApplyConfiguration { // WithArchitecture sets the Architecture field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Architecture field is set to the value of the last call. -func (b *UpdateApplyConfiguration) WithArchitecture(value v1.ClusterVersionArchitecture) *UpdateApplyConfiguration { +func (b *UpdateApplyConfiguration) WithArchitecture(value configv1.ClusterVersionArchitecture) *UpdateApplyConfiguration { b.Architecture = &value return b } diff --git a/config/applyconfigurations/config/v1/updatehistory.go b/config/applyconfigurations/config/v1/updatehistory.go index 6a4deaf3fb..b7998eb610 100644 --- a/config/applyconfigurations/config/v1/updatehistory.go +++ b/config/applyconfigurations/config/v1/updatehistory.go @@ -3,20 +3,20 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // UpdateHistoryApplyConfiguration represents a declarative configuration of the UpdateHistory type for use // with apply. type UpdateHistoryApplyConfiguration struct { - State *v1.UpdateState `json:"state,omitempty"` - StartedTime *metav1.Time `json:"startedTime,omitempty"` - CompletionTime *metav1.Time `json:"completionTime,omitempty"` - Version *string `json:"version,omitempty"` - Image *string `json:"image,omitempty"` - Verified *bool `json:"verified,omitempty"` - AcceptedRisks *string `json:"acceptedRisks,omitempty"` + State *configv1.UpdateState `json:"state,omitempty"` + StartedTime *metav1.Time `json:"startedTime,omitempty"` + CompletionTime *metav1.Time `json:"completionTime,omitempty"` + Version *string `json:"version,omitempty"` + Image *string `json:"image,omitempty"` + Verified *bool `json:"verified,omitempty"` + AcceptedRisks *string `json:"acceptedRisks,omitempty"` } // UpdateHistoryApplyConfiguration constructs a declarative configuration of the UpdateHistory type for use with @@ -28,7 +28,7 @@ func UpdateHistory() *UpdateHistoryApplyConfiguration { // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithState(value v1.UpdateState) *UpdateHistoryApplyConfiguration { +func (b *UpdateHistoryApplyConfiguration) WithState(value configv1.UpdateState) *UpdateHistoryApplyConfiguration { b.State = &value return b } diff --git a/config/applyconfigurations/config/v1/usernameclaimmapping.go b/config/applyconfigurations/config/v1/usernameclaimmapping.go index daec7fb46a..e90a90117f 100644 --- a/config/applyconfigurations/config/v1/usernameclaimmapping.go +++ b/config/applyconfigurations/config/v1/usernameclaimmapping.go @@ -24,7 +24,7 @@ func UsernameClaimMapping() *UsernameClaimMappingApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Claim field is set to the value of the last call. func (b *UsernameClaimMappingApplyConfiguration) WithClaim(value string) *UsernameClaimMappingApplyConfiguration { - b.Claim = &value + b.TokenClaimMappingApplyConfiguration.Claim = &value return b } diff --git a/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go b/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go index 316e8e4d62..bf923d8298 100644 --- a/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go +++ b/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // VSphereFailureDomainRegionAffinityApplyConfiguration represents a declarative configuration of the VSphereFailureDomainRegionAffinity type for use // with apply. type VSphereFailureDomainRegionAffinityApplyConfiguration struct { - Type *v1.VSphereFailureDomainRegionType `json:"type,omitempty"` + Type *configv1.VSphereFailureDomainRegionType `json:"type,omitempty"` } // VSphereFailureDomainRegionAffinityApplyConfiguration constructs a declarative configuration of the VSphereFailureDomainRegionAffinity type for use with @@ -21,7 +21,7 @@ func VSphereFailureDomainRegionAffinity() *VSphereFailureDomainRegionAffinityApp // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *VSphereFailureDomainRegionAffinityApplyConfiguration) WithType(value v1.VSphereFailureDomainRegionType) *VSphereFailureDomainRegionAffinityApplyConfiguration { +func (b *VSphereFailureDomainRegionAffinityApplyConfiguration) WithType(value configv1.VSphereFailureDomainRegionType) *VSphereFailureDomainRegionAffinityApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go b/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go index a00c370f13..5bbbe95560 100644 --- a/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go +++ b/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // VSphereFailureDomainZoneAffinityApplyConfiguration represents a declarative configuration of the VSphereFailureDomainZoneAffinity type for use // with apply. type VSphereFailureDomainZoneAffinityApplyConfiguration struct { - Type *v1.VSphereFailureDomainZoneType `json:"type,omitempty"` + Type *configv1.VSphereFailureDomainZoneType `json:"type,omitempty"` HostGroup *VSphereFailureDomainHostGroupApplyConfiguration `json:"hostGroup,omitempty"` } @@ -22,7 +22,7 @@ func VSphereFailureDomainZoneAffinity() *VSphereFailureDomainZoneAffinityApplyCo // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *VSphereFailureDomainZoneAffinityApplyConfiguration) WithType(value v1.VSphereFailureDomainZoneType) *VSphereFailureDomainZoneAffinityApplyConfiguration { +func (b *VSphereFailureDomainZoneAffinityApplyConfiguration) WithType(value configv1.VSphereFailureDomainZoneType) *VSphereFailureDomainZoneAffinityApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go b/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go index d1dcebec4d..9eb2f57aab 100644 --- a/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go +++ b/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // VSpherePlatformLoadBalancerApplyConfiguration represents a declarative configuration of the VSpherePlatformLoadBalancer type for use // with apply. type VSpherePlatformLoadBalancerApplyConfiguration struct { - Type *v1.PlatformLoadBalancerType `json:"type,omitempty"` + Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` } // VSpherePlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the VSpherePlatformLoadBalancer type for use with @@ -21,7 +21,7 @@ func VSpherePlatformLoadBalancer() *VSpherePlatformLoadBalancerApplyConfiguratio // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *VSpherePlatformLoadBalancerApplyConfiguration) WithType(value v1.PlatformLoadBalancerType) *VSpherePlatformLoadBalancerApplyConfiguration { +func (b *VSpherePlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *VSpherePlatformLoadBalancerApplyConfiguration { b.Type = &value return b } diff --git a/config/applyconfigurations/config/v1alpha1/backup.go b/config/applyconfigurations/config/v1alpha1/backup.go index e5a58f2640..b4982de150 100644 --- a/config/applyconfigurations/config/v1alpha1/backup.go +++ b/config/applyconfigurations/config/v1alpha1/backup.go @@ -69,7 +69,7 @@ func extractBackup(backup *configv1alpha1.Backup, fieldManager string, subresour // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *BackupApplyConfiguration) WithKind(value string) *BackupApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *BackupApplyConfiguration) WithKind(value string) *BackupApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *BackupApplyConfiguration) WithAPIVersion(value string) *BackupApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *BackupApplyConfiguration) WithAPIVersion(value string) *BackupApplyConf // If called multiple times, the Name field is set to the value of the last call. func (b *BackupApplyConfiguration) WithName(value string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *BackupApplyConfiguration) WithName(value string) *BackupApplyConfigurat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *BackupApplyConfiguration) WithGenerateName(value string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *BackupApplyConfiguration) WithGenerateName(value string) *BackupApplyCo // If called multiple times, the Namespace field is set to the value of the last call. func (b *BackupApplyConfiguration) WithNamespace(value string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *BackupApplyConfiguration) WithNamespace(value string) *BackupApplyConfi // If called multiple times, the UID field is set to the value of the last call. func (b *BackupApplyConfiguration) WithUID(value types.UID) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *BackupApplyConfiguration) WithUID(value types.UID) *BackupApplyConfigur // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *BackupApplyConfiguration) WithResourceVersion(value string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *BackupApplyConfiguration) WithResourceVersion(value string) *BackupAppl // If called multiple times, the Generation field is set to the value of the last call. func (b *BackupApplyConfiguration) WithGeneration(value int64) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *BackupApplyConfiguration) WithGeneration(value int64) *BackupApplyConfi // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *BackupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *BackupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Bac // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *BackupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *BackupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Bac // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *BackupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *BackupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) * // overwriting an existing map entries in Labels field with the same key. func (b *BackupApplyConfiguration) WithLabels(entries map[string]string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *BackupApplyConfiguration) WithLabels(entries map[string]string) *Backup // overwriting an existing map entries in Annotations field with the same key. func (b *BackupApplyConfiguration) WithAnnotations(entries map[string]string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *BackupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefere if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *BackupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefere func (b *BackupApplyConfiguration) WithFinalizers(values ...string) *BackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *BackupApplyConfiguration) WithStatus(value configv1alpha1.BackupStatus) // GetName retrieves the value of the Name field in the declarative configuration. func (b *BackupApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1alpha1/clusterimagepolicy.go b/config/applyconfigurations/config/v1alpha1/clusterimagepolicy.go index 1e462c3c5f..f3d7fdb775 100644 --- a/config/applyconfigurations/config/v1alpha1/clusterimagepolicy.go +++ b/config/applyconfigurations/config/v1alpha1/clusterimagepolicy.go @@ -69,7 +69,7 @@ func extractClusterImagePolicy(clusterImagePolicy *configv1alpha1.ClusterImagePo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithKind(value string) *ClusterImagePolicyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithKind(value string) *ClusterIm // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithAPIVersion(value string) *ClusterImagePolicyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithAPIVersion(value string) *Clu // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithName(value string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithName(value string) *ClusterIm // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithGenerateName(value string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithGenerateName(value string) *C // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithNamespace(value string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithNamespace(value string) *Clus // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithUID(value types.UID) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithUID(value types.UID) *Cluster // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithResourceVersion(value string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithGeneration(value int64) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithGeneration(value int64) *Clus // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithCreationTimestamp(value metav // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterImagePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ClusterImagePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *ClusterImagePolicyApplyConfiguration) WithLabels(entries map[string]string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ClusterImagePolicyApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterImagePolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithOwnerReferences(values ...*v1 if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *ClusterImagePolicyApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *ClusterImagePolicyApplyConfiguration) WithFinalizers(values ...string) *ClusterImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *ClusterImagePolicyApplyConfiguration) WithStatus(value *ClusterImagePol // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterImagePolicyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1alpha1/clusterimagepolicyspec.go b/config/applyconfigurations/config/v1alpha1/clusterimagepolicyspec.go index bbb25ceb65..e4a3470c45 100644 --- a/config/applyconfigurations/config/v1alpha1/clusterimagepolicyspec.go +++ b/config/applyconfigurations/config/v1alpha1/clusterimagepolicyspec.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // ClusterImagePolicySpecApplyConfiguration represents a declarative configuration of the ClusterImagePolicySpec type for use // with apply. type ClusterImagePolicySpecApplyConfiguration struct { - Scopes []v1alpha1.ImageScope `json:"scopes,omitempty"` - Policy *PolicyApplyConfiguration `json:"policy,omitempty"` + Scopes []configv1alpha1.ImageScope `json:"scopes,omitempty"` + Policy *PolicyApplyConfiguration `json:"policy,omitempty"` } // ClusterImagePolicySpecApplyConfiguration constructs a declarative configuration of the ClusterImagePolicySpec type for use with @@ -22,7 +22,7 @@ func ClusterImagePolicySpec() *ClusterImagePolicySpecApplyConfiguration { // WithScopes adds the given value to the Scopes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *ClusterImagePolicySpecApplyConfiguration) WithScopes(values ...v1alpha1.ImageScope) *ClusterImagePolicySpecApplyConfiguration { +func (b *ClusterImagePolicySpecApplyConfiguration) WithScopes(values ...configv1alpha1.ImageScope) *ClusterImagePolicySpecApplyConfiguration { for i := range values { b.Scopes = append(b.Scopes, values[i]) } diff --git a/config/applyconfigurations/config/v1alpha1/gatherconfig.go b/config/applyconfigurations/config/v1alpha1/gatherconfig.go index 0f3edbd9f6..e870fe6c26 100644 --- a/config/applyconfigurations/config/v1alpha1/gatherconfig.go +++ b/config/applyconfigurations/config/v1alpha1/gatherconfig.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // GatherConfigApplyConfiguration represents a declarative configuration of the GatherConfig type for use // with apply. type GatherConfigApplyConfiguration struct { - DataPolicy *v1alpha1.DataPolicy `json:"dataPolicy,omitempty"` - DisabledGatherers []string `json:"disabledGatherers,omitempty"` + DataPolicy *configv1alpha1.DataPolicy `json:"dataPolicy,omitempty"` + DisabledGatherers []string `json:"disabledGatherers,omitempty"` } // GatherConfigApplyConfiguration constructs a declarative configuration of the GatherConfig type for use with @@ -22,7 +22,7 @@ func GatherConfig() *GatherConfigApplyConfiguration { // WithDataPolicy sets the DataPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DataPolicy field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithDataPolicy(value v1alpha1.DataPolicy) *GatherConfigApplyConfiguration { +func (b *GatherConfigApplyConfiguration) WithDataPolicy(value configv1alpha1.DataPolicy) *GatherConfigApplyConfiguration { b.DataPolicy = &value return b } diff --git a/config/applyconfigurations/config/v1alpha1/imagepolicy.go b/config/applyconfigurations/config/v1alpha1/imagepolicy.go index f08aa7e472..6595aa782a 100644 --- a/config/applyconfigurations/config/v1alpha1/imagepolicy.go +++ b/config/applyconfigurations/config/v1alpha1/imagepolicy.go @@ -71,7 +71,7 @@ func extractImagePolicy(imagePolicy *configv1alpha1.ImagePolicy, fieldManager st // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithKind(value string) *ImagePolicyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *ImagePolicyApplyConfiguration) WithKind(value string) *ImagePolicyApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithAPIVersion(value string) *ImagePolicyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *ImagePolicyApplyConfiguration) WithAPIVersion(value string) *ImagePolic // If called multiple times, the Name field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithName(value string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *ImagePolicyApplyConfiguration) WithName(value string) *ImagePolicyApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithGenerateName(value string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *ImagePolicyApplyConfiguration) WithGenerateName(value string) *ImagePol // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithNamespace(value string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *ImagePolicyApplyConfiguration) WithNamespace(value string) *ImagePolicy // If called multiple times, the UID field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithUID(value types.UID) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *ImagePolicyApplyConfiguration) WithUID(value types.UID) *ImagePolicyApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithResourceVersion(value string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *ImagePolicyApplyConfiguration) WithResourceVersion(value string) *Image // If called multiple times, the Generation field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithGeneration(value int64) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *ImagePolicyApplyConfiguration) WithGeneration(value int64) *ImagePolicy // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *ImagePolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *ImagePolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImagePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *ImagePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *ImagePolicyApplyConfiguration) WithLabels(entries map[string]string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *ImagePolicyApplyConfiguration) WithLabels(entries map[string]string) *I // overwriting an existing map entries in Annotations field with the same key. func (b *ImagePolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *ImagePolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *ImagePolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *ImagePolicyApplyConfiguration) WithFinalizers(values ...string) *ImagePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *ImagePolicyApplyConfiguration) WithStatus(value *ImagePolicyStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImagePolicyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1alpha1/imagepolicyspec.go b/config/applyconfigurations/config/v1alpha1/imagepolicyspec.go index 1c706d99fe..ac08e9cf4e 100644 --- a/config/applyconfigurations/config/v1alpha1/imagepolicyspec.go +++ b/config/applyconfigurations/config/v1alpha1/imagepolicyspec.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // ImagePolicySpecApplyConfiguration represents a declarative configuration of the ImagePolicySpec type for use // with apply. type ImagePolicySpecApplyConfiguration struct { - Scopes []v1alpha1.ImageScope `json:"scopes,omitempty"` - Policy *PolicyApplyConfiguration `json:"policy,omitempty"` + Scopes []configv1alpha1.ImageScope `json:"scopes,omitempty"` + Policy *PolicyApplyConfiguration `json:"policy,omitempty"` } // ImagePolicySpecApplyConfiguration constructs a declarative configuration of the ImagePolicySpec type for use with @@ -22,7 +22,7 @@ func ImagePolicySpec() *ImagePolicySpecApplyConfiguration { // WithScopes adds the given value to the Scopes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *ImagePolicySpecApplyConfiguration) WithScopes(values ...v1alpha1.ImageScope) *ImagePolicySpecApplyConfiguration { +func (b *ImagePolicySpecApplyConfiguration) WithScopes(values ...configv1alpha1.ImageScope) *ImagePolicySpecApplyConfiguration { for i := range values { b.Scopes = append(b.Scopes, values[i]) } diff --git a/config/applyconfigurations/config/v1alpha1/insightsdatagather.go b/config/applyconfigurations/config/v1alpha1/insightsdatagather.go index d743eec8d4..cf4ae1f006 100644 --- a/config/applyconfigurations/config/v1alpha1/insightsdatagather.go +++ b/config/applyconfigurations/config/v1alpha1/insightsdatagather.go @@ -69,7 +69,7 @@ func extractInsightsDataGather(insightsDataGather *configv1alpha1.InsightsDataGa // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithKind(value string) *InsightsDataGatherApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithKind(value string) *InsightsD // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithAPIVersion(value string) *InsightsDataGatherApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithAPIVersion(value string) *Ins // If called multiple times, the Name field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithName(value string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithName(value string) *InsightsD // If called multiple times, the GenerateName field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithGenerateName(value string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithGenerateName(value string) *I // If called multiple times, the Namespace field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithNamespace(value string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithNamespace(value string) *Insi // If called multiple times, the UID field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithUID(value types.UID) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithUID(value types.UID) *Insight // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithResourceVersion(value string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithGeneration(value int64) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithGeneration(value int64) *Insi // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithCreationTimestamp(value metav1.Time) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithCreationTimestamp(value metav // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *InsightsDataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *InsightsDataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *InsightsDataGatherApplyConfiguration) WithLabels(entries map[string]string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *InsightsDataGatherApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *InsightsDataGatherApplyConfiguration) WithAnnotations(entries map[string]string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithOwnerReferences(values ...*v1 if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *InsightsDataGatherApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *InsightsDataGatherApplyConfiguration) WithFinalizers(values ...string) *InsightsDataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *InsightsDataGatherApplyConfiguration) WithStatus(value configv1alpha1.I // GetName retrieves the value of the Name field in the declarative configuration. func (b *InsightsDataGatherApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/config/applyconfigurations/config/v1alpha1/policyidentity.go b/config/applyconfigurations/config/v1alpha1/policyidentity.go index 157c04281b..c03a2d6634 100644 --- a/config/applyconfigurations/config/v1alpha1/policyidentity.go +++ b/config/applyconfigurations/config/v1alpha1/policyidentity.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // PolicyIdentityApplyConfiguration represents a declarative configuration of the PolicyIdentity type for use // with apply. type PolicyIdentityApplyConfiguration struct { - MatchPolicy *v1alpha1.IdentityMatchPolicy `json:"matchPolicy,omitempty"` + MatchPolicy *configv1alpha1.IdentityMatchPolicy `json:"matchPolicy,omitempty"` PolicyMatchExactRepository *PolicyMatchExactRepositoryApplyConfiguration `json:"exactRepository,omitempty"` PolicyMatchRemapIdentity *PolicyMatchRemapIdentityApplyConfiguration `json:"remapIdentity,omitempty"` } @@ -23,7 +23,7 @@ func PolicyIdentity() *PolicyIdentityApplyConfiguration { // WithMatchPolicy sets the MatchPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MatchPolicy field is set to the value of the last call. -func (b *PolicyIdentityApplyConfiguration) WithMatchPolicy(value v1alpha1.IdentityMatchPolicy) *PolicyIdentityApplyConfiguration { +func (b *PolicyIdentityApplyConfiguration) WithMatchPolicy(value configv1alpha1.IdentityMatchPolicy) *PolicyIdentityApplyConfiguration { b.MatchPolicy = &value return b } diff --git a/config/applyconfigurations/config/v1alpha1/policymatchexactrepository.go b/config/applyconfigurations/config/v1alpha1/policymatchexactrepository.go index 8b0499ddba..58870d5eb8 100644 --- a/config/applyconfigurations/config/v1alpha1/policymatchexactrepository.go +++ b/config/applyconfigurations/config/v1alpha1/policymatchexactrepository.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // PolicyMatchExactRepositoryApplyConfiguration represents a declarative configuration of the PolicyMatchExactRepository type for use // with apply. type PolicyMatchExactRepositoryApplyConfiguration struct { - Repository *v1alpha1.IdentityRepositoryPrefix `json:"repository,omitempty"` + Repository *configv1alpha1.IdentityRepositoryPrefix `json:"repository,omitempty"` } // PolicyMatchExactRepositoryApplyConfiguration constructs a declarative configuration of the PolicyMatchExactRepository type for use with @@ -21,7 +21,7 @@ func PolicyMatchExactRepository() *PolicyMatchExactRepositoryApplyConfiguration // WithRepository sets the Repository field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Repository field is set to the value of the last call. -func (b *PolicyMatchExactRepositoryApplyConfiguration) WithRepository(value v1alpha1.IdentityRepositoryPrefix) *PolicyMatchExactRepositoryApplyConfiguration { +func (b *PolicyMatchExactRepositoryApplyConfiguration) WithRepository(value configv1alpha1.IdentityRepositoryPrefix) *PolicyMatchExactRepositoryApplyConfiguration { b.Repository = &value return b } diff --git a/config/applyconfigurations/config/v1alpha1/policymatchremapidentity.go b/config/applyconfigurations/config/v1alpha1/policymatchremapidentity.go index bfe573c9a6..09075d0bea 100644 --- a/config/applyconfigurations/config/v1alpha1/policymatchremapidentity.go +++ b/config/applyconfigurations/config/v1alpha1/policymatchremapidentity.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // PolicyMatchRemapIdentityApplyConfiguration represents a declarative configuration of the PolicyMatchRemapIdentity type for use // with apply. type PolicyMatchRemapIdentityApplyConfiguration struct { - Prefix *v1alpha1.IdentityRepositoryPrefix `json:"prefix,omitempty"` - SignedPrefix *v1alpha1.IdentityRepositoryPrefix `json:"signedPrefix,omitempty"` + Prefix *configv1alpha1.IdentityRepositoryPrefix `json:"prefix,omitempty"` + SignedPrefix *configv1alpha1.IdentityRepositoryPrefix `json:"signedPrefix,omitempty"` } // PolicyMatchRemapIdentityApplyConfiguration constructs a declarative configuration of the PolicyMatchRemapIdentity type for use with @@ -22,7 +22,7 @@ func PolicyMatchRemapIdentity() *PolicyMatchRemapIdentityApplyConfiguration { // WithPrefix sets the Prefix field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Prefix field is set to the value of the last call. -func (b *PolicyMatchRemapIdentityApplyConfiguration) WithPrefix(value v1alpha1.IdentityRepositoryPrefix) *PolicyMatchRemapIdentityApplyConfiguration { +func (b *PolicyMatchRemapIdentityApplyConfiguration) WithPrefix(value configv1alpha1.IdentityRepositoryPrefix) *PolicyMatchRemapIdentityApplyConfiguration { b.Prefix = &value return b } @@ -30,7 +30,7 @@ func (b *PolicyMatchRemapIdentityApplyConfiguration) WithPrefix(value v1alpha1.I // WithSignedPrefix sets the SignedPrefix field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SignedPrefix field is set to the value of the last call. -func (b *PolicyMatchRemapIdentityApplyConfiguration) WithSignedPrefix(value v1alpha1.IdentityRepositoryPrefix) *PolicyMatchRemapIdentityApplyConfiguration { +func (b *PolicyMatchRemapIdentityApplyConfiguration) WithSignedPrefix(value configv1alpha1.IdentityRepositoryPrefix) *PolicyMatchRemapIdentityApplyConfiguration { b.SignedPrefix = &value return b } diff --git a/config/applyconfigurations/config/v1alpha1/policyrootoftrust.go b/config/applyconfigurations/config/v1alpha1/policyrootoftrust.go index ca4c73f6a9..c525e16670 100644 --- a/config/applyconfigurations/config/v1alpha1/policyrootoftrust.go +++ b/config/applyconfigurations/config/v1alpha1/policyrootoftrust.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // PolicyRootOfTrustApplyConfiguration represents a declarative configuration of the PolicyRootOfTrust type for use // with apply. type PolicyRootOfTrustApplyConfiguration struct { - PolicyType *v1alpha1.PolicyType `json:"policyType,omitempty"` + PolicyType *configv1alpha1.PolicyType `json:"policyType,omitempty"` PublicKey *PublicKeyApplyConfiguration `json:"publicKey,omitempty"` FulcioCAWithRekor *FulcioCAWithRekorApplyConfiguration `json:"fulcioCAWithRekor,omitempty"` } @@ -23,7 +23,7 @@ func PolicyRootOfTrust() *PolicyRootOfTrustApplyConfiguration { // WithPolicyType sets the PolicyType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PolicyType field is set to the value of the last call. -func (b *PolicyRootOfTrustApplyConfiguration) WithPolicyType(value v1alpha1.PolicyType) *PolicyRootOfTrustApplyConfiguration { +func (b *PolicyRootOfTrustApplyConfiguration) WithPolicyType(value configv1alpha1.PolicyType) *PolicyRootOfTrustApplyConfiguration { b.PolicyType = &value return b } diff --git a/config/applyconfigurations/config/v1alpha1/retentionpolicy.go b/config/applyconfigurations/config/v1alpha1/retentionpolicy.go index 8fe865a97d..981fb25737 100644 --- a/config/applyconfigurations/config/v1alpha1/retentionpolicy.go +++ b/config/applyconfigurations/config/v1alpha1/retentionpolicy.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" ) // RetentionPolicyApplyConfiguration represents a declarative configuration of the RetentionPolicy type for use // with apply. type RetentionPolicyApplyConfiguration struct { - RetentionType *v1alpha1.RetentionType `json:"retentionType,omitempty"` + RetentionType *configv1alpha1.RetentionType `json:"retentionType,omitempty"` RetentionNumber *RetentionNumberConfigApplyConfiguration `json:"retentionNumber,omitempty"` RetentionSize *RetentionSizeConfigApplyConfiguration `json:"retentionSize,omitempty"` } @@ -23,7 +23,7 @@ func RetentionPolicy() *RetentionPolicyApplyConfiguration { // WithRetentionType sets the RetentionType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RetentionType field is set to the value of the last call. -func (b *RetentionPolicyApplyConfiguration) WithRetentionType(value v1alpha1.RetentionType) *RetentionPolicyApplyConfiguration { +func (b *RetentionPolicyApplyConfiguration) WithRetentionType(value configv1alpha1.RetentionType) *RetentionPolicyApplyConfiguration { b.RetentionType = &value return b } diff --git a/config/applyconfigurations/internal/internal.go b/config/applyconfigurations/internal/internal.go index aef94942c4..2cfbb4beb5 100644 --- a/config/applyconfigurations/internal/internal.go +++ b/config/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/config/clientset/versioned/clientset.go b/config/clientset/versioned/clientset.go index 29896542d0..f9ed357b64 100644 --- a/config/clientset/versioned/clientset.go +++ b/config/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" configv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" configv1alpha1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1" diff --git a/config/clientset/versioned/typed/config/v1/apiserver.go b/config/clientset/versioned/typed/config/v1/apiserver.go index 5751cebe79..20e56733a6 100644 --- a/config/clientset/versioned/typed/config/v1/apiserver.go +++ b/config/clientset/versioned/typed/config/v1/apiserver.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type APIServersGetter interface { // APIServerInterface has methods to work with APIServer resources. type APIServerInterface interface { - Create(ctx context.Context, aPIServer *v1.APIServer, opts metav1.CreateOptions) (*v1.APIServer, error) - Update(ctx context.Context, aPIServer *v1.APIServer, opts metav1.UpdateOptions) (*v1.APIServer, error) + Create(ctx context.Context, aPIServer *configv1.APIServer, opts metav1.CreateOptions) (*configv1.APIServer, error) + Update(ctx context.Context, aPIServer *configv1.APIServer, opts metav1.UpdateOptions) (*configv1.APIServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServer *v1.APIServer, opts metav1.UpdateOptions) (*v1.APIServer, error) + UpdateStatus(ctx context.Context, aPIServer *configv1.APIServer, opts metav1.UpdateOptions) (*configv1.APIServer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.APIServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.APIServerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.APIServer, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.APIServerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIServer, err error) - Apply(ctx context.Context, aPIServer *configv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.APIServer, err error) + Apply(ctx context.Context, aPIServer *applyconfigurationsconfigv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.APIServer, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServer *configv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIServer, err error) + ApplyStatus(ctx context.Context, aPIServer *applyconfigurationsconfigv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.APIServer, err error) APIServerExpansion } // aPIServers implements APIServerInterface type aPIServers struct { - *gentype.ClientWithListAndApply[*v1.APIServer, *v1.APIServerList, *configv1.APIServerApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.APIServer, *configv1.APIServerList, *applyconfigurationsconfigv1.APIServerApplyConfiguration] } // newAPIServers returns a APIServers func newAPIServers(c *ConfigV1Client) *aPIServers { return &aPIServers{ - gentype.NewClientWithListAndApply[*v1.APIServer, *v1.APIServerList, *configv1.APIServerApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.APIServer, *configv1.APIServerList, *applyconfigurationsconfigv1.APIServerApplyConfiguration]( "apiservers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.APIServer { return &v1.APIServer{} }, - func() *v1.APIServerList { return &v1.APIServerList{} }), + func() *configv1.APIServer { return &configv1.APIServer{} }, + func() *configv1.APIServerList { return &configv1.APIServerList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/authentication.go b/config/clientset/versioned/typed/config/v1/authentication.go index 89b1779b3c..f2f9cae610 100644 --- a/config/clientset/versioned/typed/config/v1/authentication.go +++ b/config/clientset/versioned/typed/config/v1/authentication.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type AuthenticationsGetter interface { // AuthenticationInterface has methods to work with Authentication resources. type AuthenticationInterface interface { - Create(ctx context.Context, authentication *v1.Authentication, opts metav1.CreateOptions) (*v1.Authentication, error) - Update(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (*v1.Authentication, error) + Create(ctx context.Context, authentication *configv1.Authentication, opts metav1.CreateOptions) (*configv1.Authentication, error) + Update(ctx context.Context, authentication *configv1.Authentication, opts metav1.UpdateOptions) (*configv1.Authentication, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (*v1.Authentication, error) + UpdateStatus(ctx context.Context, authentication *configv1.Authentication, opts metav1.UpdateOptions) (*configv1.Authentication, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Authentication, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.AuthenticationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Authentication, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.AuthenticationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Authentication, err error) - Apply(ctx context.Context, authentication *configv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Authentication, err error) + Apply(ctx context.Context, authentication *applyconfigurationsconfigv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Authentication, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, authentication *configv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) + ApplyStatus(ctx context.Context, authentication *applyconfigurationsconfigv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Authentication, err error) AuthenticationExpansion } // authentications implements AuthenticationInterface type authentications struct { - *gentype.ClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *configv1.AuthenticationApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Authentication, *configv1.AuthenticationList, *applyconfigurationsconfigv1.AuthenticationApplyConfiguration] } // newAuthentications returns a Authentications func newAuthentications(c *ConfigV1Client) *authentications { return &authentications{ - gentype.NewClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *configv1.AuthenticationApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Authentication, *configv1.AuthenticationList, *applyconfigurationsconfigv1.AuthenticationApplyConfiguration]( "authentications", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Authentication { return &v1.Authentication{} }, - func() *v1.AuthenticationList { return &v1.AuthenticationList{} }), + func() *configv1.Authentication { return &configv1.Authentication{} }, + func() *configv1.AuthenticationList { return &configv1.AuthenticationList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/build.go b/config/clientset/versioned/typed/config/v1/build.go index 2ecfb68d91..6e144b1f21 100644 --- a/config/clientset/versioned/typed/config/v1/build.go +++ b/config/clientset/versioned/typed/config/v1/build.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type BuildsGetter interface { // BuildInterface has methods to work with Build resources. type BuildInterface interface { - Create(ctx context.Context, build *v1.Build, opts metav1.CreateOptions) (*v1.Build, error) - Update(ctx context.Context, build *v1.Build, opts metav1.UpdateOptions) (*v1.Build, error) + Create(ctx context.Context, build *configv1.Build, opts metav1.CreateOptions) (*configv1.Build, error) + Update(ctx context.Context, build *configv1.Build, opts metav1.UpdateOptions) (*configv1.Build, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Build, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.BuildList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Build, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.BuildList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Build, err error) - Apply(ctx context.Context, build *configv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Build, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Build, err error) + Apply(ctx context.Context, build *applyconfigurationsconfigv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Build, err error) BuildExpansion } // builds implements BuildInterface type builds struct { - *gentype.ClientWithListAndApply[*v1.Build, *v1.BuildList, *configv1.BuildApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Build, *configv1.BuildList, *applyconfigurationsconfigv1.BuildApplyConfiguration] } // newBuilds returns a Builds func newBuilds(c *ConfigV1Client) *builds { return &builds{ - gentype.NewClientWithListAndApply[*v1.Build, *v1.BuildList, *configv1.BuildApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Build, *configv1.BuildList, *applyconfigurationsconfigv1.BuildApplyConfiguration]( "builds", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Build { return &v1.Build{} }, - func() *v1.BuildList { return &v1.BuildList{} }), + func() *configv1.Build { return &configv1.Build{} }, + func() *configv1.BuildList { return &configv1.BuildList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/clusteroperator.go b/config/clientset/versioned/typed/config/v1/clusteroperator.go index b1015c40db..a2f03a5020 100644 --- a/config/clientset/versioned/typed/config/v1/clusteroperator.go +++ b/config/clientset/versioned/typed/config/v1/clusteroperator.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ClusterOperatorsGetter interface { // ClusterOperatorInterface has methods to work with ClusterOperator resources. type ClusterOperatorInterface interface { - Create(ctx context.Context, clusterOperator *v1.ClusterOperator, opts metav1.CreateOptions) (*v1.ClusterOperator, error) - Update(ctx context.Context, clusterOperator *v1.ClusterOperator, opts metav1.UpdateOptions) (*v1.ClusterOperator, error) + Create(ctx context.Context, clusterOperator *configv1.ClusterOperator, opts metav1.CreateOptions) (*configv1.ClusterOperator, error) + Update(ctx context.Context, clusterOperator *configv1.ClusterOperator, opts metav1.UpdateOptions) (*configv1.ClusterOperator, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterOperator *v1.ClusterOperator, opts metav1.UpdateOptions) (*v1.ClusterOperator, error) + UpdateStatus(ctx context.Context, clusterOperator *configv1.ClusterOperator, opts metav1.UpdateOptions) (*configv1.ClusterOperator, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterOperator, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterOperatorList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ClusterOperator, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ClusterOperatorList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterOperator, err error) - Apply(ctx context.Context, clusterOperator *configv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterOperator, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ClusterOperator, err error) + Apply(ctx context.Context, clusterOperator *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterOperator, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterOperator *configv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterOperator, err error) + ApplyStatus(ctx context.Context, clusterOperator *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterOperator, err error) ClusterOperatorExpansion } // clusterOperators implements ClusterOperatorInterface type clusterOperators struct { - *gentype.ClientWithListAndApply[*v1.ClusterOperator, *v1.ClusterOperatorList, *configv1.ClusterOperatorApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.ClusterOperator, *configv1.ClusterOperatorList, *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration] } // newClusterOperators returns a ClusterOperators func newClusterOperators(c *ConfigV1Client) *clusterOperators { return &clusterOperators{ - gentype.NewClientWithListAndApply[*v1.ClusterOperator, *v1.ClusterOperatorList, *configv1.ClusterOperatorApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.ClusterOperator, *configv1.ClusterOperatorList, *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration]( "clusteroperators", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterOperator { return &v1.ClusterOperator{} }, - func() *v1.ClusterOperatorList { return &v1.ClusterOperatorList{} }), + func() *configv1.ClusterOperator { return &configv1.ClusterOperator{} }, + func() *configv1.ClusterOperatorList { return &configv1.ClusterOperatorList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/clusterversion.go b/config/clientset/versioned/typed/config/v1/clusterversion.go index 2b6717096f..cb03327d9b 100644 --- a/config/clientset/versioned/typed/config/v1/clusterversion.go +++ b/config/clientset/versioned/typed/config/v1/clusterversion.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ClusterVersionsGetter interface { // ClusterVersionInterface has methods to work with ClusterVersion resources. type ClusterVersionInterface interface { - Create(ctx context.Context, clusterVersion *v1.ClusterVersion, opts metav1.CreateOptions) (*v1.ClusterVersion, error) - Update(ctx context.Context, clusterVersion *v1.ClusterVersion, opts metav1.UpdateOptions) (*v1.ClusterVersion, error) + Create(ctx context.Context, clusterVersion *configv1.ClusterVersion, opts metav1.CreateOptions) (*configv1.ClusterVersion, error) + Update(ctx context.Context, clusterVersion *configv1.ClusterVersion, opts metav1.UpdateOptions) (*configv1.ClusterVersion, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterVersion *v1.ClusterVersion, opts metav1.UpdateOptions) (*v1.ClusterVersion, error) + UpdateStatus(ctx context.Context, clusterVersion *configv1.ClusterVersion, opts metav1.UpdateOptions) (*configv1.ClusterVersion, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterVersion, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterVersionList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ClusterVersion, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ClusterVersionList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterVersion, err error) - Apply(ctx context.Context, clusterVersion *configv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterVersion, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ClusterVersion, err error) + Apply(ctx context.Context, clusterVersion *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterVersion, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterVersion *configv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterVersion, err error) + ApplyStatus(ctx context.Context, clusterVersion *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterVersion, err error) ClusterVersionExpansion } // clusterVersions implements ClusterVersionInterface type clusterVersions struct { - *gentype.ClientWithListAndApply[*v1.ClusterVersion, *v1.ClusterVersionList, *configv1.ClusterVersionApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.ClusterVersion, *configv1.ClusterVersionList, *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration] } // newClusterVersions returns a ClusterVersions func newClusterVersions(c *ConfigV1Client) *clusterVersions { return &clusterVersions{ - gentype.NewClientWithListAndApply[*v1.ClusterVersion, *v1.ClusterVersionList, *configv1.ClusterVersionApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.ClusterVersion, *configv1.ClusterVersionList, *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration]( "clusterversions", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterVersion { return &v1.ClusterVersion{} }, - func() *v1.ClusterVersionList { return &v1.ClusterVersionList{} }), + func() *configv1.ClusterVersion { return &configv1.ClusterVersion{} }, + func() *configv1.ClusterVersionList { return &configv1.ClusterVersionList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/config_client.go b/config/clientset/versioned/typed/config/v1/config_client.go index de4f2fa32a..bbb0b312ee 100644 --- a/config/clientset/versioned/typed/config/v1/config_client.go +++ b/config/clientset/versioned/typed/config/v1/config_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/config/v1" - "github.com/openshift/client-go/config/clientset/versioned/scheme" + configv1 "github.com/openshift/api/config/v1" + scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -169,10 +169,10 @@ func New(c rest.Interface) *ConfigV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := configv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/config/clientset/versioned/typed/config/v1/console.go b/config/clientset/versioned/typed/config/v1/console.go index 994d5994dd..ead87be189 100644 --- a/config/clientset/versioned/typed/config/v1/console.go +++ b/config/clientset/versioned/typed/config/v1/console.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ConsolesGetter interface { // ConsoleInterface has methods to work with Console resources. type ConsoleInterface interface { - Create(ctx context.Context, console *v1.Console, opts metav1.CreateOptions) (*v1.Console, error) - Update(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (*v1.Console, error) + Create(ctx context.Context, console *configv1.Console, opts metav1.CreateOptions) (*configv1.Console, error) + Update(ctx context.Context, console *configv1.Console, opts metav1.UpdateOptions) (*configv1.Console, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (*v1.Console, error) + UpdateStatus(ctx context.Context, console *configv1.Console, opts metav1.UpdateOptions) (*configv1.Console, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Console, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Console, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ConsoleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Console, err error) - Apply(ctx context.Context, console *configv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Console, err error) + Apply(ctx context.Context, console *applyconfigurationsconfigv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Console, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, console *configv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) + ApplyStatus(ctx context.Context, console *applyconfigurationsconfigv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Console, err error) ConsoleExpansion } // consoles implements ConsoleInterface type consoles struct { - *gentype.ClientWithListAndApply[*v1.Console, *v1.ConsoleList, *configv1.ConsoleApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Console, *configv1.ConsoleList, *applyconfigurationsconfigv1.ConsoleApplyConfiguration] } // newConsoles returns a Consoles func newConsoles(c *ConfigV1Client) *consoles { return &consoles{ - gentype.NewClientWithListAndApply[*v1.Console, *v1.ConsoleList, *configv1.ConsoleApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Console, *configv1.ConsoleList, *applyconfigurationsconfigv1.ConsoleApplyConfiguration]( "consoles", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Console { return &v1.Console{} }, - func() *v1.ConsoleList { return &v1.ConsoleList{} }), + func() *configv1.Console { return &configv1.Console{} }, + func() *configv1.ConsoleList { return &configv1.ConsoleList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/dns.go b/config/clientset/versioned/typed/config/v1/dns.go index b91aa0d0d5..76efd86104 100644 --- a/config/clientset/versioned/typed/config/v1/dns.go +++ b/config/clientset/versioned/typed/config/v1/dns.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type DNSesGetter interface { // DNSInterface has methods to work with DNS resources. type DNSInterface interface { - Create(ctx context.Context, dNS *v1.DNS, opts metav1.CreateOptions) (*v1.DNS, error) - Update(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (*v1.DNS, error) + Create(ctx context.Context, dNS *configv1.DNS, opts metav1.CreateOptions) (*configv1.DNS, error) + Update(ctx context.Context, dNS *configv1.DNS, opts metav1.UpdateOptions) (*configv1.DNS, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (*v1.DNS, error) + UpdateStatus(ctx context.Context, dNS *configv1.DNS, opts metav1.UpdateOptions) (*configv1.DNS, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DNS, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.DNSList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.DNS, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.DNSList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNS, err error) - Apply(ctx context.Context, dNS *configv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.DNS, err error) + Apply(ctx context.Context, dNS *applyconfigurationsconfigv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.DNS, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, dNS *configv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) + ApplyStatus(ctx context.Context, dNS *applyconfigurationsconfigv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.DNS, err error) DNSExpansion } // dNSes implements DNSInterface type dNSes struct { - *gentype.ClientWithListAndApply[*v1.DNS, *v1.DNSList, *configv1.DNSApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.DNS, *configv1.DNSList, *applyconfigurationsconfigv1.DNSApplyConfiguration] } // newDNSes returns a DNSes func newDNSes(c *ConfigV1Client) *dNSes { return &dNSes{ - gentype.NewClientWithListAndApply[*v1.DNS, *v1.DNSList, *configv1.DNSApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.DNS, *configv1.DNSList, *applyconfigurationsconfigv1.DNSApplyConfiguration]( "dnses", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.DNS { return &v1.DNS{} }, - func() *v1.DNSList { return &v1.DNSList{} }), + func() *configv1.DNS { return &configv1.DNS{} }, + func() *configv1.DNSList { return &configv1.DNSList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_apiserver.go b/config/clientset/versioned/typed/config/v1/fake/fake_apiserver.go index e5e7c02cf7..577b67da93 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_apiserver.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_apiserver.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAPIServers implements APIServerInterface -type FakeAPIServers struct { +// fakeAPIServers implements APIServerInterface +type fakeAPIServers struct { + *gentype.FakeClientWithListAndApply[*v1.APIServer, *v1.APIServerList, *configv1.APIServerApplyConfiguration] Fake *FakeConfigV1 } -var apiserversResource = v1.SchemeGroupVersion.WithResource("apiservers") - -var apiserversKind = v1.SchemeGroupVersion.WithKind("APIServer") - -// Get takes name of the aPIServer, and returns the corresponding aPIServer object, and an error if there is any. -func (c *FakeAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.APIServer, err error) { - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(apiserversResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIServer), err -} - -// List takes label and field selectors, and returns the list of APIServers that match those selectors. -func (c *FakeAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.APIServerList, err error) { - emptyResult := &v1.APIServerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(apiserversResource, apiserversKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.APIServerList{ListMeta: obj.(*v1.APIServerList).ListMeta} - for _, item := range obj.(*v1.APIServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested aPIServers. -func (c *FakeAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(apiserversResource, opts)) -} - -// Create takes the representation of a aPIServer and creates it. Returns the server's representation of the aPIServer, and an error, if there is any. -func (c *FakeAPIServers) Create(ctx context.Context, aPIServer *v1.APIServer, opts metav1.CreateOptions) (result *v1.APIServer, err error) { - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(apiserversResource, aPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIServer), err -} - -// Update takes the representation of a aPIServer and updates it. Returns the server's representation of the aPIServer, and an error, if there is any. -func (c *FakeAPIServers) Update(ctx context.Context, aPIServer *v1.APIServer, opts metav1.UpdateOptions) (result *v1.APIServer, err error) { - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(apiserversResource, aPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIServer), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAPIServers) UpdateStatus(ctx context.Context, aPIServer *v1.APIServer, opts metav1.UpdateOptions) (result *v1.APIServer, err error) { - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(apiserversResource, "status", aPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIServer), err -} - -// Delete takes name of the aPIServer and deletes it. Returns an error if one occurs. -func (c *FakeAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(apiserversResource, name, opts), &v1.APIServer{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(apiserversResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.APIServerList{}) - return err -} - -// Patch applies the patch and returns the patched aPIServer. -func (c *FakeAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.APIServer, err error) { - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiserversResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIServer), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServer. -func (c *FakeAPIServers) Apply(ctx context.Context, aPIServer *configv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIServer, err error) { - if aPIServer == nil { - return nil, fmt.Errorf("aPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(aPIServer) - if err != nil { - return nil, err - } - name := aPIServer.Name - if name == nil { - return nil, fmt.Errorf("aPIServer.Name must be provided to Apply") - } - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.APIServer), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAPIServers) ApplyStatus(ctx context.Context, aPIServer *configv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.APIServer, err error) { - if aPIServer == nil { - return nil, fmt.Errorf("aPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(aPIServer) - if err != nil { - return nil, err - } - name := aPIServer.Name - if name == nil { - return nil, fmt.Errorf("aPIServer.Name must be provided to Apply") - } - emptyResult := &v1.APIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeAPIServers(fake *FakeConfigV1) typedconfigv1.APIServerInterface { + return &fakeAPIServers{ + gentype.NewFakeClientWithListAndApply[*v1.APIServer, *v1.APIServerList, *configv1.APIServerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("apiservers"), + v1.SchemeGroupVersion.WithKind("APIServer"), + func() *v1.APIServer { return &v1.APIServer{} }, + func() *v1.APIServerList { return &v1.APIServerList{} }, + func(dst, src *v1.APIServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.APIServerList) []*v1.APIServer { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.APIServerList, items []*v1.APIServer) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.APIServer), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_authentication.go b/config/clientset/versioned/typed/config/v1/fake/fake_authentication.go index 11e4117f34..f81b441439 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_authentication.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_authentication.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAuthentications implements AuthenticationInterface -type FakeAuthentications struct { +// fakeAuthentications implements AuthenticationInterface +type fakeAuthentications struct { + *gentype.FakeClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *configv1.AuthenticationApplyConfiguration] Fake *FakeConfigV1 } -var authenticationsResource = v1.SchemeGroupVersion.WithResource("authentications") - -var authenticationsKind = v1.SchemeGroupVersion.WithKind("Authentication") - -// Get takes name of the authentication, and returns the corresponding authentication object, and an error if there is any. -func (c *FakeAuthentications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(authenticationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// List takes label and field selectors, and returns the list of Authentications that match those selectors. -func (c *FakeAuthentications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AuthenticationList, err error) { - emptyResult := &v1.AuthenticationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(authenticationsResource, authenticationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.AuthenticationList{ListMeta: obj.(*v1.AuthenticationList).ListMeta} - for _, item := range obj.(*v1.AuthenticationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested authentications. -func (c *FakeAuthentications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(authenticationsResource, opts)) -} - -// Create takes the representation of a authentication and creates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Create(ctx context.Context, authentication *v1.Authentication, opts metav1.CreateOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(authenticationsResource, authentication, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// Update takes the representation of a authentication and updates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Update(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(authenticationsResource, authentication, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAuthentications) UpdateStatus(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(authenticationsResource, "status", authentication, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// Delete takes name of the authentication and deletes it. Returns an error if one occurs. -func (c *FakeAuthentications) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(authenticationsResource, name, opts), &v1.Authentication{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAuthentications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(authenticationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.AuthenticationList{}) - return err -} - -// Patch applies the patch and returns the patched authentication. -func (c *FakeAuthentications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(authenticationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied authentication. -func (c *FakeAuthentications) Apply(ctx context.Context, authentication *configv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { - if authentication == nil { - return nil, fmt.Errorf("authentication provided to Apply must not be nil") - } - data, err := json.Marshal(authentication) - if err != nil { - return nil, err - } - name := authentication.Name - if name == nil { - return nil, fmt.Errorf("authentication.Name must be provided to Apply") - } - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(authenticationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *configv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { - if authentication == nil { - return nil, fmt.Errorf("authentication provided to Apply must not be nil") - } - data, err := json.Marshal(authentication) - if err != nil { - return nil, err - } - name := authentication.Name - if name == nil { - return nil, fmt.Errorf("authentication.Name must be provided to Apply") - } - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(authenticationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeAuthentications(fake *FakeConfigV1) typedconfigv1.AuthenticationInterface { + return &fakeAuthentications{ + gentype.NewFakeClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *configv1.AuthenticationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("authentications"), + v1.SchemeGroupVersion.WithKind("Authentication"), + func() *v1.Authentication { return &v1.Authentication{} }, + func() *v1.AuthenticationList { return &v1.AuthenticationList{} }, + func(dst, src *v1.AuthenticationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.AuthenticationList) []*v1.Authentication { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.AuthenticationList, items []*v1.Authentication) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.Authentication), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_build.go b/config/clientset/versioned/typed/config/v1/fake/fake_build.go index 10576484cd..590e57d8e2 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_build.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_build.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeBuilds implements BuildInterface -type FakeBuilds struct { +// fakeBuilds implements BuildInterface +type fakeBuilds struct { + *gentype.FakeClientWithListAndApply[*v1.Build, *v1.BuildList, *configv1.BuildApplyConfiguration] Fake *FakeConfigV1 } -var buildsResource = v1.SchemeGroupVersion.WithResource("builds") - -var buildsKind = v1.SchemeGroupVersion.WithKind("Build") - -// Get takes name of the build, and returns the corresponding build object, and an error if there is any. -func (c *FakeBuilds) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(buildsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// List takes label and field selectors, and returns the list of Builds that match those selectors. -func (c *FakeBuilds) List(ctx context.Context, opts metav1.ListOptions) (result *v1.BuildList, err error) { - emptyResult := &v1.BuildList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(buildsResource, buildsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.BuildList{ListMeta: obj.(*v1.BuildList).ListMeta} - for _, item := range obj.(*v1.BuildList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested builds. -func (c *FakeBuilds) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(buildsResource, opts)) -} - -// Create takes the representation of a build and creates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Create(ctx context.Context, build *v1.Build, opts metav1.CreateOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(buildsResource, build, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// Update takes the representation of a build and updates it. Returns the server's representation of the build, and an error, if there is any. -func (c *FakeBuilds) Update(ctx context.Context, build *v1.Build, opts metav1.UpdateOptions) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(buildsResource, build, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// Delete takes name of the build and deletes it. Returns an error if one occurs. -func (c *FakeBuilds) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(buildsResource, name, opts), &v1.Build{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeBuilds) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(buildsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.BuildList{}) - return err -} - -// Patch applies the patch and returns the patched build. -func (c *FakeBuilds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Build, err error) { - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(buildsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Build), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied build. -func (c *FakeBuilds) Apply(ctx context.Context, build *configv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Build, err error) { - if build == nil { - return nil, fmt.Errorf("build provided to Apply must not be nil") - } - data, err := json.Marshal(build) - if err != nil { - return nil, err - } - name := build.Name - if name == nil { - return nil, fmt.Errorf("build.Name must be provided to Apply") - } - emptyResult := &v1.Build{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(buildsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeBuilds(fake *FakeConfigV1) typedconfigv1.BuildInterface { + return &fakeBuilds{ + gentype.NewFakeClientWithListAndApply[*v1.Build, *v1.BuildList, *configv1.BuildApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("builds"), + v1.SchemeGroupVersion.WithKind("Build"), + func() *v1.Build { return &v1.Build{} }, + func() *v1.BuildList { return &v1.BuildList{} }, + func(dst, src *v1.BuildList) { dst.ListMeta = src.ListMeta }, + func(list *v1.BuildList) []*v1.Build { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.BuildList, items []*v1.Build) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Build), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_clusteroperator.go b/config/clientset/versioned/typed/config/v1/fake/fake_clusteroperator.go index c9fa330194..ac5a30983d 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_clusteroperator.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_clusteroperator.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterOperators implements ClusterOperatorInterface -type FakeClusterOperators struct { +// fakeClusterOperators implements ClusterOperatorInterface +type fakeClusterOperators struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterOperator, *v1.ClusterOperatorList, *configv1.ClusterOperatorApplyConfiguration] Fake *FakeConfigV1 } -var clusteroperatorsResource = v1.SchemeGroupVersion.WithResource("clusteroperators") - -var clusteroperatorsKind = v1.SchemeGroupVersion.WithKind("ClusterOperator") - -// Get takes name of the clusterOperator, and returns the corresponding clusterOperator object, and an error if there is any. -func (c *FakeClusterOperators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterOperator, err error) { - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusteroperatorsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterOperator), err -} - -// List takes label and field selectors, and returns the list of ClusterOperators that match those selectors. -func (c *FakeClusterOperators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterOperatorList, err error) { - emptyResult := &v1.ClusterOperatorList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusteroperatorsResource, clusteroperatorsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterOperatorList{ListMeta: obj.(*v1.ClusterOperatorList).ListMeta} - for _, item := range obj.(*v1.ClusterOperatorList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterOperators. -func (c *FakeClusterOperators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusteroperatorsResource, opts)) -} - -// Create takes the representation of a clusterOperator and creates it. Returns the server's representation of the clusterOperator, and an error, if there is any. -func (c *FakeClusterOperators) Create(ctx context.Context, clusterOperator *v1.ClusterOperator, opts metav1.CreateOptions) (result *v1.ClusterOperator, err error) { - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusteroperatorsResource, clusterOperator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterOperator), err -} - -// Update takes the representation of a clusterOperator and updates it. Returns the server's representation of the clusterOperator, and an error, if there is any. -func (c *FakeClusterOperators) Update(ctx context.Context, clusterOperator *v1.ClusterOperator, opts metav1.UpdateOptions) (result *v1.ClusterOperator, err error) { - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusteroperatorsResource, clusterOperator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterOperator), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterOperators) UpdateStatus(ctx context.Context, clusterOperator *v1.ClusterOperator, opts metav1.UpdateOptions) (result *v1.ClusterOperator, err error) { - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(clusteroperatorsResource, "status", clusterOperator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterOperator), err -} - -// Delete takes name of the clusterOperator and deletes it. Returns an error if one occurs. -func (c *FakeClusterOperators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusteroperatorsResource, name, opts), &v1.ClusterOperator{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterOperators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusteroperatorsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterOperatorList{}) - return err -} - -// Patch applies the patch and returns the patched clusterOperator. -func (c *FakeClusterOperators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterOperator, err error) { - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusteroperatorsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterOperator), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterOperator. -func (c *FakeClusterOperators) Apply(ctx context.Context, clusterOperator *configv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterOperator, err error) { - if clusterOperator == nil { - return nil, fmt.Errorf("clusterOperator provided to Apply must not be nil") - } - data, err := json.Marshal(clusterOperator) - if err != nil { - return nil, err - } - name := clusterOperator.Name - if name == nil { - return nil, fmt.Errorf("clusterOperator.Name must be provided to Apply") - } - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusteroperatorsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterOperator), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterOperators) ApplyStatus(ctx context.Context, clusterOperator *configv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterOperator, err error) { - if clusterOperator == nil { - return nil, fmt.Errorf("clusterOperator provided to Apply must not be nil") - } - data, err := json.Marshal(clusterOperator) - if err != nil { - return nil, err - } - name := clusterOperator.Name - if name == nil { - return nil, fmt.Errorf("clusterOperator.Name must be provided to Apply") - } - emptyResult := &v1.ClusterOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusteroperatorsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterOperators(fake *FakeConfigV1) typedconfigv1.ClusterOperatorInterface { + return &fakeClusterOperators{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterOperator, *v1.ClusterOperatorList, *configv1.ClusterOperatorApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clusteroperators"), + v1.SchemeGroupVersion.WithKind("ClusterOperator"), + func() *v1.ClusterOperator { return &v1.ClusterOperator{} }, + func() *v1.ClusterOperatorList { return &v1.ClusterOperatorList{} }, + func(dst, src *v1.ClusterOperatorList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterOperatorList) []*v1.ClusterOperator { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ClusterOperatorList, items []*v1.ClusterOperator) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ClusterOperator), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_clusterversion.go b/config/clientset/versioned/typed/config/v1/fake/fake_clusterversion.go index 2505908774..6bb123d7f9 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_clusterversion.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_clusterversion.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterVersions implements ClusterVersionInterface -type FakeClusterVersions struct { +// fakeClusterVersions implements ClusterVersionInterface +type fakeClusterVersions struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterVersion, *v1.ClusterVersionList, *configv1.ClusterVersionApplyConfiguration] Fake *FakeConfigV1 } -var clusterversionsResource = v1.SchemeGroupVersion.WithResource("clusterversions") - -var clusterversionsKind = v1.SchemeGroupVersion.WithKind("ClusterVersion") - -// Get takes name of the clusterVersion, and returns the corresponding clusterVersion object, and an error if there is any. -func (c *FakeClusterVersions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterVersion, err error) { - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusterversionsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterVersion), err -} - -// List takes label and field selectors, and returns the list of ClusterVersions that match those selectors. -func (c *FakeClusterVersions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterVersionList, err error) { - emptyResult := &v1.ClusterVersionList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusterversionsResource, clusterversionsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterVersionList{ListMeta: obj.(*v1.ClusterVersionList).ListMeta} - for _, item := range obj.(*v1.ClusterVersionList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterVersions. -func (c *FakeClusterVersions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusterversionsResource, opts)) -} - -// Create takes the representation of a clusterVersion and creates it. Returns the server's representation of the clusterVersion, and an error, if there is any. -func (c *FakeClusterVersions) Create(ctx context.Context, clusterVersion *v1.ClusterVersion, opts metav1.CreateOptions) (result *v1.ClusterVersion, err error) { - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusterversionsResource, clusterVersion, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterVersion), err -} - -// Update takes the representation of a clusterVersion and updates it. Returns the server's representation of the clusterVersion, and an error, if there is any. -func (c *FakeClusterVersions) Update(ctx context.Context, clusterVersion *v1.ClusterVersion, opts metav1.UpdateOptions) (result *v1.ClusterVersion, err error) { - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusterversionsResource, clusterVersion, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterVersion), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterVersions) UpdateStatus(ctx context.Context, clusterVersion *v1.ClusterVersion, opts metav1.UpdateOptions) (result *v1.ClusterVersion, err error) { - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(clusterversionsResource, "status", clusterVersion, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterVersion), err -} - -// Delete takes name of the clusterVersion and deletes it. Returns an error if one occurs. -func (c *FakeClusterVersions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusterversionsResource, name, opts), &v1.ClusterVersion{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterVersions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusterversionsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterVersionList{}) - return err -} - -// Patch applies the patch and returns the patched clusterVersion. -func (c *FakeClusterVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterVersion, err error) { - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterversionsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterVersion), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterVersion. -func (c *FakeClusterVersions) Apply(ctx context.Context, clusterVersion *configv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterVersion, err error) { - if clusterVersion == nil { - return nil, fmt.Errorf("clusterVersion provided to Apply must not be nil") - } - data, err := json.Marshal(clusterVersion) - if err != nil { - return nil, err - } - name := clusterVersion.Name - if name == nil { - return nil, fmt.Errorf("clusterVersion.Name must be provided to Apply") - } - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterversionsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterVersion), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterVersions) ApplyStatus(ctx context.Context, clusterVersion *configv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterVersion, err error) { - if clusterVersion == nil { - return nil, fmt.Errorf("clusterVersion provided to Apply must not be nil") - } - data, err := json.Marshal(clusterVersion) - if err != nil { - return nil, err - } - name := clusterVersion.Name - if name == nil { - return nil, fmt.Errorf("clusterVersion.Name must be provided to Apply") - } - emptyResult := &v1.ClusterVersion{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterversionsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterVersions(fake *FakeConfigV1) typedconfigv1.ClusterVersionInterface { + return &fakeClusterVersions{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterVersion, *v1.ClusterVersionList, *configv1.ClusterVersionApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clusterversions"), + v1.SchemeGroupVersion.WithKind("ClusterVersion"), + func() *v1.ClusterVersion { return &v1.ClusterVersion{} }, + func() *v1.ClusterVersionList { return &v1.ClusterVersionList{} }, + func(dst, src *v1.ClusterVersionList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterVersionList) []*v1.ClusterVersion { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ClusterVersionList, items []*v1.ClusterVersion) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ClusterVersion), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go b/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go index b105e491cf..6253194636 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go @@ -13,87 +13,87 @@ type FakeConfigV1 struct { } func (c *FakeConfigV1) APIServers() v1.APIServerInterface { - return &FakeAPIServers{c} + return newFakeAPIServers(c) } func (c *FakeConfigV1) Authentications() v1.AuthenticationInterface { - return &FakeAuthentications{c} + return newFakeAuthentications(c) } func (c *FakeConfigV1) Builds() v1.BuildInterface { - return &FakeBuilds{c} + return newFakeBuilds(c) } func (c *FakeConfigV1) ClusterOperators() v1.ClusterOperatorInterface { - return &FakeClusterOperators{c} + return newFakeClusterOperators(c) } func (c *FakeConfigV1) ClusterVersions() v1.ClusterVersionInterface { - return &FakeClusterVersions{c} + return newFakeClusterVersions(c) } func (c *FakeConfigV1) Consoles() v1.ConsoleInterface { - return &FakeConsoles{c} + return newFakeConsoles(c) } func (c *FakeConfigV1) DNSes() v1.DNSInterface { - return &FakeDNSes{c} + return newFakeDNSes(c) } func (c *FakeConfigV1) FeatureGates() v1.FeatureGateInterface { - return &FakeFeatureGates{c} + return newFakeFeatureGates(c) } func (c *FakeConfigV1) Images() v1.ImageInterface { - return &FakeImages{c} + return newFakeImages(c) } func (c *FakeConfigV1) ImageContentPolicies() v1.ImageContentPolicyInterface { - return &FakeImageContentPolicies{c} + return newFakeImageContentPolicies(c) } func (c *FakeConfigV1) ImageDigestMirrorSets() v1.ImageDigestMirrorSetInterface { - return &FakeImageDigestMirrorSets{c} + return newFakeImageDigestMirrorSets(c) } func (c *FakeConfigV1) ImageTagMirrorSets() v1.ImageTagMirrorSetInterface { - return &FakeImageTagMirrorSets{c} + return newFakeImageTagMirrorSets(c) } func (c *FakeConfigV1) Infrastructures() v1.InfrastructureInterface { - return &FakeInfrastructures{c} + return newFakeInfrastructures(c) } func (c *FakeConfigV1) Ingresses() v1.IngressInterface { - return &FakeIngresses{c} + return newFakeIngresses(c) } func (c *FakeConfigV1) Networks() v1.NetworkInterface { - return &FakeNetworks{c} + return newFakeNetworks(c) } func (c *FakeConfigV1) Nodes() v1.NodeInterface { - return &FakeNodes{c} + return newFakeNodes(c) } func (c *FakeConfigV1) OAuths() v1.OAuthInterface { - return &FakeOAuths{c} + return newFakeOAuths(c) } func (c *FakeConfigV1) OperatorHubs() v1.OperatorHubInterface { - return &FakeOperatorHubs{c} + return newFakeOperatorHubs(c) } func (c *FakeConfigV1) Projects() v1.ProjectInterface { - return &FakeProjects{c} + return newFakeProjects(c) } func (c *FakeConfigV1) Proxies() v1.ProxyInterface { - return &FakeProxies{c} + return newFakeProxies(c) } func (c *FakeConfigV1) Schedulers() v1.SchedulerInterface { - return &FakeSchedulers{c} + return newFakeSchedulers(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_console.go b/config/clientset/versioned/typed/config/v1/fake/fake_console.go index 93da56fec2..1f1cbdd726 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_console.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_console.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoles implements ConsoleInterface -type FakeConsoles struct { +// fakeConsoles implements ConsoleInterface +type fakeConsoles struct { + *gentype.FakeClientWithListAndApply[*v1.Console, *v1.ConsoleList, *configv1.ConsoleApplyConfiguration] Fake *FakeConfigV1 } -var consolesResource = v1.SchemeGroupVersion.WithResource("consoles") - -var consolesKind = v1.SchemeGroupVersion.WithKind("Console") - -// Get takes name of the console, and returns the corresponding console object, and an error if there is any. -func (c *FakeConsoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// List takes label and field selectors, and returns the list of Consoles that match those selectors. -func (c *FakeConsoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleList, err error) { - emptyResult := &v1.ConsoleList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolesResource, consolesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleList{ListMeta: obj.(*v1.ConsoleList).ListMeta} - for _, item := range obj.(*v1.ConsoleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoles. -func (c *FakeConsoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolesResource, opts)) -} - -// Create takes the representation of a console and creates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Create(ctx context.Context, console *v1.Console, opts metav1.CreateOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolesResource, console, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// Update takes the representation of a console and updates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Update(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolesResource, console, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConsoles) UpdateStatus(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(consolesResource, "status", console, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// Delete takes name of the console and deletes it. Returns an error if one occurs. -func (c *FakeConsoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolesResource, name, opts), &v1.Console{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleList{}) - return err -} - -// Patch applies the patch and returns the patched console. -func (c *FakeConsoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied console. -func (c *FakeConsoles) Apply(ctx context.Context, console *configv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { - if console == nil { - return nil, fmt.Errorf("console provided to Apply must not be nil") - } - data, err := json.Marshal(console) - if err != nil { - return nil, err - } - name := console.Name - if name == nil { - return nil, fmt.Errorf("console.Name must be provided to Apply") - } - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *configv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { - if console == nil { - return nil, fmt.Errorf("console provided to Apply must not be nil") - } - data, err := json.Marshal(console) - if err != nil { - return nil, err - } - name := console.Name - if name == nil { - return nil, fmt.Errorf("console.Name must be provided to Apply") - } - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoles(fake *FakeConfigV1) typedconfigv1.ConsoleInterface { + return &fakeConsoles{ + gentype.NewFakeClientWithListAndApply[*v1.Console, *v1.ConsoleList, *configv1.ConsoleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoles"), + v1.SchemeGroupVersion.WithKind("Console"), + func() *v1.Console { return &v1.Console{} }, + func() *v1.ConsoleList { return &v1.ConsoleList{} }, + func(dst, src *v1.ConsoleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleList) []*v1.Console { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsoleList, items []*v1.Console) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Console), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_dns.go b/config/clientset/versioned/typed/config/v1/fake/fake_dns.go index f89edf6d62..5d998d6344 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_dns.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_dns.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeDNSes implements DNSInterface -type FakeDNSes struct { +// fakeDNSes implements DNSInterface +type fakeDNSes struct { + *gentype.FakeClientWithListAndApply[*v1.DNS, *v1.DNSList, *configv1.DNSApplyConfiguration] Fake *FakeConfigV1 } -var dnsesResource = v1.SchemeGroupVersion.WithResource("dnses") - -var dnsesKind = v1.SchemeGroupVersion.WithKind("DNS") - -// Get takes name of the dNS, and returns the corresponding dNS object, and an error if there is any. -func (c *FakeDNSes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(dnsesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// List takes label and field selectors, and returns the list of DNSes that match those selectors. -func (c *FakeDNSes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DNSList, err error) { - emptyResult := &v1.DNSList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(dnsesResource, dnsesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.DNSList{ListMeta: obj.(*v1.DNSList).ListMeta} - for _, item := range obj.(*v1.DNSList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dNSes. -func (c *FakeDNSes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(dnsesResource, opts)) -} - -// Create takes the representation of a dNS and creates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Create(ctx context.Context, dNS *v1.DNS, opts metav1.CreateOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(dnsesResource, dNS, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// Update takes the representation of a dNS and updates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Update(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(dnsesResource, dNS, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDNSes) UpdateStatus(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(dnsesResource, "status", dNS, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// Delete takes name of the dNS and deletes it. Returns an error if one occurs. -func (c *FakeDNSes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(dnsesResource, name, opts), &v1.DNS{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDNSes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(dnsesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.DNSList{}) - return err -} - -// Patch applies the patch and returns the patched dNS. -func (c *FakeDNSes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(dnsesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied dNS. -func (c *FakeDNSes) Apply(ctx context.Context, dNS *configv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { - if dNS == nil { - return nil, fmt.Errorf("dNS provided to Apply must not be nil") - } - data, err := json.Marshal(dNS) - if err != nil { - return nil, err - } - name := dNS.Name - if name == nil { - return nil, fmt.Errorf("dNS.Name must be provided to Apply") - } - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(dnsesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *configv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { - if dNS == nil { - return nil, fmt.Errorf("dNS provided to Apply must not be nil") - } - data, err := json.Marshal(dNS) - if err != nil { - return nil, err - } - name := dNS.Name - if name == nil { - return nil, fmt.Errorf("dNS.Name must be provided to Apply") - } - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(dnsesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeDNSes(fake *FakeConfigV1) typedconfigv1.DNSInterface { + return &fakeDNSes{ + gentype.NewFakeClientWithListAndApply[*v1.DNS, *v1.DNSList, *configv1.DNSApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("dnses"), + v1.SchemeGroupVersion.WithKind("DNS"), + func() *v1.DNS { return &v1.DNS{} }, + func() *v1.DNSList { return &v1.DNSList{} }, + func(dst, src *v1.DNSList) { dst.ListMeta = src.ListMeta }, + func(list *v1.DNSList) []*v1.DNS { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.DNSList, items []*v1.DNS) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.DNS), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go b/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go index ef23684bbd..21dcf2e639 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeFeatureGates implements FeatureGateInterface -type FakeFeatureGates struct { +// fakeFeatureGates implements FeatureGateInterface +type fakeFeatureGates struct { + *gentype.FakeClientWithListAndApply[*v1.FeatureGate, *v1.FeatureGateList, *configv1.FeatureGateApplyConfiguration] Fake *FakeConfigV1 } -var featuregatesResource = v1.SchemeGroupVersion.WithResource("featuregates") - -var featuregatesKind = v1.SchemeGroupVersion.WithKind("FeatureGate") - -// Get takes name of the featureGate, and returns the corresponding featureGate object, and an error if there is any. -func (c *FakeFeatureGates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.FeatureGate, err error) { - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(featuregatesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.FeatureGate), err -} - -// List takes label and field selectors, and returns the list of FeatureGates that match those selectors. -func (c *FakeFeatureGates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FeatureGateList, err error) { - emptyResult := &v1.FeatureGateList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(featuregatesResource, featuregatesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.FeatureGateList{ListMeta: obj.(*v1.FeatureGateList).ListMeta} - for _, item := range obj.(*v1.FeatureGateList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested featureGates. -func (c *FakeFeatureGates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(featuregatesResource, opts)) -} - -// Create takes the representation of a featureGate and creates it. Returns the server's representation of the featureGate, and an error, if there is any. -func (c *FakeFeatureGates) Create(ctx context.Context, featureGate *v1.FeatureGate, opts metav1.CreateOptions) (result *v1.FeatureGate, err error) { - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(featuregatesResource, featureGate, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.FeatureGate), err -} - -// Update takes the representation of a featureGate and updates it. Returns the server's representation of the featureGate, and an error, if there is any. -func (c *FakeFeatureGates) Update(ctx context.Context, featureGate *v1.FeatureGate, opts metav1.UpdateOptions) (result *v1.FeatureGate, err error) { - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(featuregatesResource, featureGate, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.FeatureGate), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFeatureGates) UpdateStatus(ctx context.Context, featureGate *v1.FeatureGate, opts metav1.UpdateOptions) (result *v1.FeatureGate, err error) { - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(featuregatesResource, "status", featureGate, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.FeatureGate), err -} - -// Delete takes name of the featureGate and deletes it. Returns an error if one occurs. -func (c *FakeFeatureGates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(featuregatesResource, name, opts), &v1.FeatureGate{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeFeatureGates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(featuregatesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.FeatureGateList{}) - return err -} - -// Patch applies the patch and returns the patched featureGate. -func (c *FakeFeatureGates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FeatureGate, err error) { - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(featuregatesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.FeatureGate), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied featureGate. -func (c *FakeFeatureGates) Apply(ctx context.Context, featureGate *configv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FeatureGate, err error) { - if featureGate == nil { - return nil, fmt.Errorf("featureGate provided to Apply must not be nil") - } - data, err := json.Marshal(featureGate) - if err != nil { - return nil, err - } - name := featureGate.Name - if name == nil { - return nil, fmt.Errorf("featureGate.Name must be provided to Apply") - } - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(featuregatesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.FeatureGate), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeFeatureGates) ApplyStatus(ctx context.Context, featureGate *configv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FeatureGate, err error) { - if featureGate == nil { - return nil, fmt.Errorf("featureGate provided to Apply must not be nil") - } - data, err := json.Marshal(featureGate) - if err != nil { - return nil, err - } - name := featureGate.Name - if name == nil { - return nil, fmt.Errorf("featureGate.Name must be provided to Apply") - } - emptyResult := &v1.FeatureGate{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(featuregatesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeFeatureGates(fake *FakeConfigV1) typedconfigv1.FeatureGateInterface { + return &fakeFeatureGates{ + gentype.NewFakeClientWithListAndApply[*v1.FeatureGate, *v1.FeatureGateList, *configv1.FeatureGateApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("featuregates"), + v1.SchemeGroupVersion.WithKind("FeatureGate"), + func() *v1.FeatureGate { return &v1.FeatureGate{} }, + func() *v1.FeatureGateList { return &v1.FeatureGateList{} }, + func(dst, src *v1.FeatureGateList) { dst.ListMeta = src.ListMeta }, + func(list *v1.FeatureGateList) []*v1.FeatureGate { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.FeatureGateList, items []*v1.FeatureGate) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.FeatureGate), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_image.go b/config/clientset/versioned/typed/config/v1/fake/fake_image.go index a6bcc09e9d..107a96071e 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_image.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_image.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImages implements ImageInterface -type FakeImages struct { +// fakeImages implements ImageInterface +type fakeImages struct { + *gentype.FakeClientWithListAndApply[*v1.Image, *v1.ImageList, *configv1.ImageApplyConfiguration] Fake *FakeConfigV1 } -var imagesResource = v1.SchemeGroupVersion.WithResource("images") - -var imagesKind = v1.SchemeGroupVersion.WithKind("Image") - -// Get takes name of the image, and returns the corresponding image object, and an error if there is any. -func (c *FakeImages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imagesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// List takes label and field selectors, and returns the list of Images that match those selectors. -func (c *FakeImages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageList, err error) { - emptyResult := &v1.ImageList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imagesResource, imagesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageList{ListMeta: obj.(*v1.ImageList).ListMeta} - for _, item := range obj.(*v1.ImageList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested images. -func (c *FakeImages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imagesResource, opts)) -} - -// Create takes the representation of a image and creates it. Returns the server's representation of the image, and an error, if there is any. -func (c *FakeImages) Create(ctx context.Context, image *v1.Image, opts metav1.CreateOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagesResource, image, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// Update takes the representation of a image and updates it. Returns the server's representation of the image, and an error, if there is any. -func (c *FakeImages) Update(ctx context.Context, image *v1.Image, opts metav1.UpdateOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imagesResource, image, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeImages) UpdateStatus(ctx context.Context, image *v1.Image, opts metav1.UpdateOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(imagesResource, "status", image, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// Delete takes name of the image and deletes it. Returns an error if one occurs. -func (c *FakeImages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagesResource, name, opts), &v1.Image{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imagesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImageList{}) - return err -} - -// Patch applies the patch and returns the patched image. -func (c *FakeImages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied image. -func (c *FakeImages) Apply(ctx context.Context, image *configv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Image, err error) { - if image == nil { - return nil, fmt.Errorf("image provided to Apply must not be nil") - } - data, err := json.Marshal(image) - if err != nil { - return nil, err - } - name := image.Name - if name == nil { - return nil, fmt.Errorf("image.Name must be provided to Apply") - } - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeImages) ApplyStatus(ctx context.Context, image *configv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Image, err error) { - if image == nil { - return nil, fmt.Errorf("image provided to Apply must not be nil") - } - data, err := json.Marshal(image) - if err != nil { - return nil, err - } - name := image.Name - if name == nil { - return nil, fmt.Errorf("image.Name must be provided to Apply") - } - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImages(fake *FakeConfigV1) typedconfigv1.ImageInterface { + return &fakeImages{ + gentype.NewFakeClientWithListAndApply[*v1.Image, *v1.ImageList, *configv1.ImageApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("images"), + v1.SchemeGroupVersion.WithKind("Image"), + func() *v1.Image { return &v1.Image{} }, + func() *v1.ImageList { return &v1.ImageList{} }, + func(dst, src *v1.ImageList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageList) []*v1.Image { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ImageList, items []*v1.Image) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Image), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_imagecontentpolicy.go b/config/clientset/versioned/typed/config/v1/fake/fake_imagecontentpolicy.go index 1905ae32d6..a0771c4229 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_imagecontentpolicy.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_imagecontentpolicy.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageContentPolicies implements ImageContentPolicyInterface -type FakeImageContentPolicies struct { +// fakeImageContentPolicies implements ImageContentPolicyInterface +type fakeImageContentPolicies struct { + *gentype.FakeClientWithListAndApply[*v1.ImageContentPolicy, *v1.ImageContentPolicyList, *configv1.ImageContentPolicyApplyConfiguration] Fake *FakeConfigV1 } -var imagecontentpoliciesResource = v1.SchemeGroupVersion.WithResource("imagecontentpolicies") - -var imagecontentpoliciesKind = v1.SchemeGroupVersion.WithKind("ImageContentPolicy") - -// Get takes name of the imageContentPolicy, and returns the corresponding imageContentPolicy object, and an error if there is any. -func (c *FakeImageContentPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageContentPolicy, err error) { - emptyResult := &v1.ImageContentPolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imagecontentpoliciesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageContentPolicy), err -} - -// List takes label and field selectors, and returns the list of ImageContentPolicies that match those selectors. -func (c *FakeImageContentPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageContentPolicyList, err error) { - emptyResult := &v1.ImageContentPolicyList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imagecontentpoliciesResource, imagecontentpoliciesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageContentPolicyList{ListMeta: obj.(*v1.ImageContentPolicyList).ListMeta} - for _, item := range obj.(*v1.ImageContentPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imageContentPolicies. -func (c *FakeImageContentPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imagecontentpoliciesResource, opts)) -} - -// Create takes the representation of a imageContentPolicy and creates it. Returns the server's representation of the imageContentPolicy, and an error, if there is any. -func (c *FakeImageContentPolicies) Create(ctx context.Context, imageContentPolicy *v1.ImageContentPolicy, opts metav1.CreateOptions) (result *v1.ImageContentPolicy, err error) { - emptyResult := &v1.ImageContentPolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagecontentpoliciesResource, imageContentPolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageContentPolicy), err -} - -// Update takes the representation of a imageContentPolicy and updates it. Returns the server's representation of the imageContentPolicy, and an error, if there is any. -func (c *FakeImageContentPolicies) Update(ctx context.Context, imageContentPolicy *v1.ImageContentPolicy, opts metav1.UpdateOptions) (result *v1.ImageContentPolicy, err error) { - emptyResult := &v1.ImageContentPolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imagecontentpoliciesResource, imageContentPolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageContentPolicy), err -} - -// Delete takes name of the imageContentPolicy and deletes it. Returns an error if one occurs. -func (c *FakeImageContentPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagecontentpoliciesResource, name, opts), &v1.ImageContentPolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImageContentPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imagecontentpoliciesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImageContentPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched imageContentPolicy. -func (c *FakeImageContentPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageContentPolicy, err error) { - emptyResult := &v1.ImageContentPolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagecontentpoliciesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageContentPolicy), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imageContentPolicy. -func (c *FakeImageContentPolicies) Apply(ctx context.Context, imageContentPolicy *configv1.ImageContentPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageContentPolicy, err error) { - if imageContentPolicy == nil { - return nil, fmt.Errorf("imageContentPolicy provided to Apply must not be nil") - } - data, err := json.Marshal(imageContentPolicy) - if err != nil { - return nil, err - } - name := imageContentPolicy.Name - if name == nil { - return nil, fmt.Errorf("imageContentPolicy.Name must be provided to Apply") - } - emptyResult := &v1.ImageContentPolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagecontentpoliciesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImageContentPolicies(fake *FakeConfigV1) typedconfigv1.ImageContentPolicyInterface { + return &fakeImageContentPolicies{ + gentype.NewFakeClientWithListAndApply[*v1.ImageContentPolicy, *v1.ImageContentPolicyList, *configv1.ImageContentPolicyApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("imagecontentpolicies"), + v1.SchemeGroupVersion.WithKind("ImageContentPolicy"), + func() *v1.ImageContentPolicy { return &v1.ImageContentPolicy{} }, + func() *v1.ImageContentPolicyList { return &v1.ImageContentPolicyList{} }, + func(dst, src *v1.ImageContentPolicyList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageContentPolicyList) []*v1.ImageContentPolicy { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ImageContentPolicyList, items []*v1.ImageContentPolicy) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ImageContentPolicy), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_imagedigestmirrorset.go b/config/clientset/versioned/typed/config/v1/fake/fake_imagedigestmirrorset.go index 25d147a43c..fda5bdcce2 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_imagedigestmirrorset.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_imagedigestmirrorset.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageDigestMirrorSets implements ImageDigestMirrorSetInterface -type FakeImageDigestMirrorSets struct { +// fakeImageDigestMirrorSets implements ImageDigestMirrorSetInterface +type fakeImageDigestMirrorSets struct { + *gentype.FakeClientWithListAndApply[*v1.ImageDigestMirrorSet, *v1.ImageDigestMirrorSetList, *configv1.ImageDigestMirrorSetApplyConfiguration] Fake *FakeConfigV1 } -var imagedigestmirrorsetsResource = v1.SchemeGroupVersion.WithResource("imagedigestmirrorsets") - -var imagedigestmirrorsetsKind = v1.SchemeGroupVersion.WithKind("ImageDigestMirrorSet") - -// Get takes name of the imageDigestMirrorSet, and returns the corresponding imageDigestMirrorSet object, and an error if there is any. -func (c *FakeImageDigestMirrorSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageDigestMirrorSet, err error) { - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imagedigestmirrorsetsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageDigestMirrorSet), err -} - -// List takes label and field selectors, and returns the list of ImageDigestMirrorSets that match those selectors. -func (c *FakeImageDigestMirrorSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageDigestMirrorSetList, err error) { - emptyResult := &v1.ImageDigestMirrorSetList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imagedigestmirrorsetsResource, imagedigestmirrorsetsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageDigestMirrorSetList{ListMeta: obj.(*v1.ImageDigestMirrorSetList).ListMeta} - for _, item := range obj.(*v1.ImageDigestMirrorSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imageDigestMirrorSets. -func (c *FakeImageDigestMirrorSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imagedigestmirrorsetsResource, opts)) -} - -// Create takes the representation of a imageDigestMirrorSet and creates it. Returns the server's representation of the imageDigestMirrorSet, and an error, if there is any. -func (c *FakeImageDigestMirrorSets) Create(ctx context.Context, imageDigestMirrorSet *v1.ImageDigestMirrorSet, opts metav1.CreateOptions) (result *v1.ImageDigestMirrorSet, err error) { - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagedigestmirrorsetsResource, imageDigestMirrorSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageDigestMirrorSet), err -} - -// Update takes the representation of a imageDigestMirrorSet and updates it. Returns the server's representation of the imageDigestMirrorSet, and an error, if there is any. -func (c *FakeImageDigestMirrorSets) Update(ctx context.Context, imageDigestMirrorSet *v1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (result *v1.ImageDigestMirrorSet, err error) { - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imagedigestmirrorsetsResource, imageDigestMirrorSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageDigestMirrorSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeImageDigestMirrorSets) UpdateStatus(ctx context.Context, imageDigestMirrorSet *v1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (result *v1.ImageDigestMirrorSet, err error) { - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(imagedigestmirrorsetsResource, "status", imageDigestMirrorSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageDigestMirrorSet), err -} - -// Delete takes name of the imageDigestMirrorSet and deletes it. Returns an error if one occurs. -func (c *FakeImageDigestMirrorSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagedigestmirrorsetsResource, name, opts), &v1.ImageDigestMirrorSet{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImageDigestMirrorSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imagedigestmirrorsetsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImageDigestMirrorSetList{}) - return err -} - -// Patch applies the patch and returns the patched imageDigestMirrorSet. -func (c *FakeImageDigestMirrorSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageDigestMirrorSet, err error) { - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagedigestmirrorsetsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageDigestMirrorSet), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imageDigestMirrorSet. -func (c *FakeImageDigestMirrorSets) Apply(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageDigestMirrorSet, err error) { - if imageDigestMirrorSet == nil { - return nil, fmt.Errorf("imageDigestMirrorSet provided to Apply must not be nil") - } - data, err := json.Marshal(imageDigestMirrorSet) - if err != nil { - return nil, err - } - name := imageDigestMirrorSet.Name - if name == nil { - return nil, fmt.Errorf("imageDigestMirrorSet.Name must be provided to Apply") - } - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagedigestmirrorsetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageDigestMirrorSet), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeImageDigestMirrorSets) ApplyStatus(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageDigestMirrorSet, err error) { - if imageDigestMirrorSet == nil { - return nil, fmt.Errorf("imageDigestMirrorSet provided to Apply must not be nil") - } - data, err := json.Marshal(imageDigestMirrorSet) - if err != nil { - return nil, err - } - name := imageDigestMirrorSet.Name - if name == nil { - return nil, fmt.Errorf("imageDigestMirrorSet.Name must be provided to Apply") - } - emptyResult := &v1.ImageDigestMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagedigestmirrorsetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImageDigestMirrorSets(fake *FakeConfigV1) typedconfigv1.ImageDigestMirrorSetInterface { + return &fakeImageDigestMirrorSets{ + gentype.NewFakeClientWithListAndApply[*v1.ImageDigestMirrorSet, *v1.ImageDigestMirrorSetList, *configv1.ImageDigestMirrorSetApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("imagedigestmirrorsets"), + v1.SchemeGroupVersion.WithKind("ImageDigestMirrorSet"), + func() *v1.ImageDigestMirrorSet { return &v1.ImageDigestMirrorSet{} }, + func() *v1.ImageDigestMirrorSetList { return &v1.ImageDigestMirrorSetList{} }, + func(dst, src *v1.ImageDigestMirrorSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageDigestMirrorSetList) []*v1.ImageDigestMirrorSet { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ImageDigestMirrorSetList, items []*v1.ImageDigestMirrorSet) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ImageDigestMirrorSet), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_imagetagmirrorset.go b/config/clientset/versioned/typed/config/v1/fake/fake_imagetagmirrorset.go index 3ebcdb95c0..cea42e0448 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_imagetagmirrorset.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_imagetagmirrorset.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageTagMirrorSets implements ImageTagMirrorSetInterface -type FakeImageTagMirrorSets struct { +// fakeImageTagMirrorSets implements ImageTagMirrorSetInterface +type fakeImageTagMirrorSets struct { + *gentype.FakeClientWithListAndApply[*v1.ImageTagMirrorSet, *v1.ImageTagMirrorSetList, *configv1.ImageTagMirrorSetApplyConfiguration] Fake *FakeConfigV1 } -var imagetagmirrorsetsResource = v1.SchemeGroupVersion.WithResource("imagetagmirrorsets") - -var imagetagmirrorsetsKind = v1.SchemeGroupVersion.WithKind("ImageTagMirrorSet") - -// Get takes name of the imageTagMirrorSet, and returns the corresponding imageTagMirrorSet object, and an error if there is any. -func (c *FakeImageTagMirrorSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageTagMirrorSet, err error) { - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imagetagmirrorsetsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTagMirrorSet), err -} - -// List takes label and field selectors, and returns the list of ImageTagMirrorSets that match those selectors. -func (c *FakeImageTagMirrorSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageTagMirrorSetList, err error) { - emptyResult := &v1.ImageTagMirrorSetList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imagetagmirrorsetsResource, imagetagmirrorsetsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageTagMirrorSetList{ListMeta: obj.(*v1.ImageTagMirrorSetList).ListMeta} - for _, item := range obj.(*v1.ImageTagMirrorSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imageTagMirrorSets. -func (c *FakeImageTagMirrorSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imagetagmirrorsetsResource, opts)) -} - -// Create takes the representation of a imageTagMirrorSet and creates it. Returns the server's representation of the imageTagMirrorSet, and an error, if there is any. -func (c *FakeImageTagMirrorSets) Create(ctx context.Context, imageTagMirrorSet *v1.ImageTagMirrorSet, opts metav1.CreateOptions) (result *v1.ImageTagMirrorSet, err error) { - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagetagmirrorsetsResource, imageTagMirrorSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTagMirrorSet), err -} - -// Update takes the representation of a imageTagMirrorSet and updates it. Returns the server's representation of the imageTagMirrorSet, and an error, if there is any. -func (c *FakeImageTagMirrorSets) Update(ctx context.Context, imageTagMirrorSet *v1.ImageTagMirrorSet, opts metav1.UpdateOptions) (result *v1.ImageTagMirrorSet, err error) { - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imagetagmirrorsetsResource, imageTagMirrorSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTagMirrorSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeImageTagMirrorSets) UpdateStatus(ctx context.Context, imageTagMirrorSet *v1.ImageTagMirrorSet, opts metav1.UpdateOptions) (result *v1.ImageTagMirrorSet, err error) { - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(imagetagmirrorsetsResource, "status", imageTagMirrorSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTagMirrorSet), err -} - -// Delete takes name of the imageTagMirrorSet and deletes it. Returns an error if one occurs. -func (c *FakeImageTagMirrorSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagetagmirrorsetsResource, name, opts), &v1.ImageTagMirrorSet{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImageTagMirrorSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imagetagmirrorsetsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImageTagMirrorSetList{}) - return err -} - -// Patch applies the patch and returns the patched imageTagMirrorSet. -func (c *FakeImageTagMirrorSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageTagMirrorSet, err error) { - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagetagmirrorsetsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTagMirrorSet), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imageTagMirrorSet. -func (c *FakeImageTagMirrorSets) Apply(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageTagMirrorSet, err error) { - if imageTagMirrorSet == nil { - return nil, fmt.Errorf("imageTagMirrorSet provided to Apply must not be nil") - } - data, err := json.Marshal(imageTagMirrorSet) - if err != nil { - return nil, err - } - name := imageTagMirrorSet.Name - if name == nil { - return nil, fmt.Errorf("imageTagMirrorSet.Name must be provided to Apply") - } - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagetagmirrorsetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTagMirrorSet), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeImageTagMirrorSets) ApplyStatus(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageTagMirrorSet, err error) { - if imageTagMirrorSet == nil { - return nil, fmt.Errorf("imageTagMirrorSet provided to Apply must not be nil") - } - data, err := json.Marshal(imageTagMirrorSet) - if err != nil { - return nil, err - } - name := imageTagMirrorSet.Name - if name == nil { - return nil, fmt.Errorf("imageTagMirrorSet.Name must be provided to Apply") - } - emptyResult := &v1.ImageTagMirrorSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagetagmirrorsetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImageTagMirrorSets(fake *FakeConfigV1) typedconfigv1.ImageTagMirrorSetInterface { + return &fakeImageTagMirrorSets{ + gentype.NewFakeClientWithListAndApply[*v1.ImageTagMirrorSet, *v1.ImageTagMirrorSetList, *configv1.ImageTagMirrorSetApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("imagetagmirrorsets"), + v1.SchemeGroupVersion.WithKind("ImageTagMirrorSet"), + func() *v1.ImageTagMirrorSet { return &v1.ImageTagMirrorSet{} }, + func() *v1.ImageTagMirrorSetList { return &v1.ImageTagMirrorSetList{} }, + func(dst, src *v1.ImageTagMirrorSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageTagMirrorSetList) []*v1.ImageTagMirrorSet { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ImageTagMirrorSetList, items []*v1.ImageTagMirrorSet) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ImageTagMirrorSet), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_infrastructure.go b/config/clientset/versioned/typed/config/v1/fake/fake_infrastructure.go index 6b3f399abb..b859d67988 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_infrastructure.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_infrastructure.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeInfrastructures implements InfrastructureInterface -type FakeInfrastructures struct { +// fakeInfrastructures implements InfrastructureInterface +type fakeInfrastructures struct { + *gentype.FakeClientWithListAndApply[*v1.Infrastructure, *v1.InfrastructureList, *configv1.InfrastructureApplyConfiguration] Fake *FakeConfigV1 } -var infrastructuresResource = v1.SchemeGroupVersion.WithResource("infrastructures") - -var infrastructuresKind = v1.SchemeGroupVersion.WithKind("Infrastructure") - -// Get takes name of the infrastructure, and returns the corresponding infrastructure object, and an error if there is any. -func (c *FakeInfrastructures) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Infrastructure, err error) { - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(infrastructuresResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Infrastructure), err -} - -// List takes label and field selectors, and returns the list of Infrastructures that match those selectors. -func (c *FakeInfrastructures) List(ctx context.Context, opts metav1.ListOptions) (result *v1.InfrastructureList, err error) { - emptyResult := &v1.InfrastructureList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(infrastructuresResource, infrastructuresKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.InfrastructureList{ListMeta: obj.(*v1.InfrastructureList).ListMeta} - for _, item := range obj.(*v1.InfrastructureList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested infrastructures. -func (c *FakeInfrastructures) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(infrastructuresResource, opts)) -} - -// Create takes the representation of a infrastructure and creates it. Returns the server's representation of the infrastructure, and an error, if there is any. -func (c *FakeInfrastructures) Create(ctx context.Context, infrastructure *v1.Infrastructure, opts metav1.CreateOptions) (result *v1.Infrastructure, err error) { - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(infrastructuresResource, infrastructure, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Infrastructure), err -} - -// Update takes the representation of a infrastructure and updates it. Returns the server's representation of the infrastructure, and an error, if there is any. -func (c *FakeInfrastructures) Update(ctx context.Context, infrastructure *v1.Infrastructure, opts metav1.UpdateOptions) (result *v1.Infrastructure, err error) { - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(infrastructuresResource, infrastructure, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Infrastructure), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInfrastructures) UpdateStatus(ctx context.Context, infrastructure *v1.Infrastructure, opts metav1.UpdateOptions) (result *v1.Infrastructure, err error) { - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(infrastructuresResource, "status", infrastructure, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Infrastructure), err -} - -// Delete takes name of the infrastructure and deletes it. Returns an error if one occurs. -func (c *FakeInfrastructures) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(infrastructuresResource, name, opts), &v1.Infrastructure{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeInfrastructures) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(infrastructuresResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.InfrastructureList{}) - return err -} - -// Patch applies the patch and returns the patched infrastructure. -func (c *FakeInfrastructures) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Infrastructure, err error) { - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(infrastructuresResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Infrastructure), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied infrastructure. -func (c *FakeInfrastructures) Apply(ctx context.Context, infrastructure *configv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Infrastructure, err error) { - if infrastructure == nil { - return nil, fmt.Errorf("infrastructure provided to Apply must not be nil") - } - data, err := json.Marshal(infrastructure) - if err != nil { - return nil, err - } - name := infrastructure.Name - if name == nil { - return nil, fmt.Errorf("infrastructure.Name must be provided to Apply") - } - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(infrastructuresResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Infrastructure), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeInfrastructures) ApplyStatus(ctx context.Context, infrastructure *configv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Infrastructure, err error) { - if infrastructure == nil { - return nil, fmt.Errorf("infrastructure provided to Apply must not be nil") - } - data, err := json.Marshal(infrastructure) - if err != nil { - return nil, err - } - name := infrastructure.Name - if name == nil { - return nil, fmt.Errorf("infrastructure.Name must be provided to Apply") - } - emptyResult := &v1.Infrastructure{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(infrastructuresResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeInfrastructures(fake *FakeConfigV1) typedconfigv1.InfrastructureInterface { + return &fakeInfrastructures{ + gentype.NewFakeClientWithListAndApply[*v1.Infrastructure, *v1.InfrastructureList, *configv1.InfrastructureApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("infrastructures"), + v1.SchemeGroupVersion.WithKind("Infrastructure"), + func() *v1.Infrastructure { return &v1.Infrastructure{} }, + func() *v1.InfrastructureList { return &v1.InfrastructureList{} }, + func(dst, src *v1.InfrastructureList) { dst.ListMeta = src.ListMeta }, + func(list *v1.InfrastructureList) []*v1.Infrastructure { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.InfrastructureList, items []*v1.Infrastructure) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.Infrastructure), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_ingress.go b/config/clientset/versioned/typed/config/v1/fake/fake_ingress.go index 249b717a45..5f7d16cda1 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_ingress.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_ingress.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeIngresses implements IngressInterface -type FakeIngresses struct { +// fakeIngresses implements IngressInterface +type fakeIngresses struct { + *gentype.FakeClientWithListAndApply[*v1.Ingress, *v1.IngressList, *configv1.IngressApplyConfiguration] Fake *FakeConfigV1 } -var ingressesResource = v1.SchemeGroupVersion.WithResource("ingresses") - -var ingressesKind = v1.SchemeGroupVersion.WithKind("Ingress") - -// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any. -func (c *FakeIngresses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Ingress, err error) { - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(ingressesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Ingress), err -} - -// List takes label and field selectors, and returns the list of Ingresses that match those selectors. -func (c *FakeIngresses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressList, err error) { - emptyResult := &v1.IngressList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(ingressesResource, ingressesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.IngressList{ListMeta: obj.(*v1.IngressList).ListMeta} - for _, item := range obj.(*v1.IngressList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ingresses. -func (c *FakeIngresses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(ingressesResource, opts)) -} - -// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (result *v1.Ingress, err error) { - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(ingressesResource, ingress, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Ingress), err -} - -// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any. -func (c *FakeIngresses) Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) { - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(ingressesResource, ingress, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Ingress), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngresses) UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) { - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(ingressesResource, "status", ingress, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Ingress), err -} - -// Delete takes name of the ingress and deletes it. Returns an error if one occurs. -func (c *FakeIngresses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(ingressesResource, name, opts), &v1.Ingress{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(ingressesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.IngressList{}) - return err -} - -// Patch applies the patch and returns the patched ingress. -func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error) { - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(ingressesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Ingress), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied ingress. -func (c *FakeIngresses) Apply(ctx context.Context, ingress *configv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Ingress, err error) { - if ingress == nil { - return nil, fmt.Errorf("ingress provided to Apply must not be nil") - } - data, err := json.Marshal(ingress) - if err != nil { - return nil, err - } - name := ingress.Name - if name == nil { - return nil, fmt.Errorf("ingress.Name must be provided to Apply") - } - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(ingressesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Ingress), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeIngresses) ApplyStatus(ctx context.Context, ingress *configv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Ingress, err error) { - if ingress == nil { - return nil, fmt.Errorf("ingress provided to Apply must not be nil") - } - data, err := json.Marshal(ingress) - if err != nil { - return nil, err - } - name := ingress.Name - if name == nil { - return nil, fmt.Errorf("ingress.Name must be provided to Apply") - } - emptyResult := &v1.Ingress{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(ingressesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeIngresses(fake *FakeConfigV1) typedconfigv1.IngressInterface { + return &fakeIngresses{ + gentype.NewFakeClientWithListAndApply[*v1.Ingress, *v1.IngressList, *configv1.IngressApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("ingresses"), + v1.SchemeGroupVersion.WithKind("Ingress"), + func() *v1.Ingress { return &v1.Ingress{} }, + func() *v1.IngressList { return &v1.IngressList{} }, + func(dst, src *v1.IngressList) { dst.ListMeta = src.ListMeta }, + func(list *v1.IngressList) []*v1.Ingress { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.IngressList, items []*v1.Ingress) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Ingress), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_network.go b/config/clientset/versioned/typed/config/v1/fake/fake_network.go index 3ab994475a..446ce65db9 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_network.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_network.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeNetworks implements NetworkInterface -type FakeNetworks struct { +// fakeNetworks implements NetworkInterface +type fakeNetworks struct { + *gentype.FakeClientWithListAndApply[*v1.Network, *v1.NetworkList, *configv1.NetworkApplyConfiguration] Fake *FakeConfigV1 } -var networksResource = v1.SchemeGroupVersion.WithResource("networks") - -var networksKind = v1.SchemeGroupVersion.WithKind("Network") - -// Get takes name of the network, and returns the corresponding network object, and an error if there is any. -func (c *FakeNetworks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(networksResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// List takes label and field selectors, and returns the list of Networks that match those selectors. -func (c *FakeNetworks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkList, err error) { - emptyResult := &v1.NetworkList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(networksResource, networksKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NetworkList{ListMeta: obj.(*v1.NetworkList).ListMeta} - for _, item := range obj.(*v1.NetworkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested networks. -func (c *FakeNetworks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(networksResource, opts)) -} - -// Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Create(ctx context.Context, network *v1.Network, opts metav1.CreateOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(networksResource, network, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Update(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(networksResource, network, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNetworks) UpdateStatus(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(networksResource, "status", network, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// Delete takes name of the network and deletes it. Returns an error if one occurs. -func (c *FakeNetworks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(networksResource, name, opts), &v1.Network{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNetworks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(networksResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.NetworkList{}) - return err -} - -// Patch applies the patch and returns the patched network. -func (c *FakeNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(networksResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied network. -func (c *FakeNetworks) Apply(ctx context.Context, network *configv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { - if network == nil { - return nil, fmt.Errorf("network provided to Apply must not be nil") - } - data, err := json.Marshal(network) - if err != nil { - return nil, err - } - name := network.Name - if name == nil { - return nil, fmt.Errorf("network.Name must be provided to Apply") - } - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(networksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *configv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { - if network == nil { - return nil, fmt.Errorf("network provided to Apply must not be nil") - } - data, err := json.Marshal(network) - if err != nil { - return nil, err - } - name := network.Name - if name == nil { - return nil, fmt.Errorf("network.Name must be provided to Apply") - } - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(networksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeNetworks(fake *FakeConfigV1) typedconfigv1.NetworkInterface { + return &fakeNetworks{ + gentype.NewFakeClientWithListAndApply[*v1.Network, *v1.NetworkList, *configv1.NetworkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("networks"), + v1.SchemeGroupVersion.WithKind("Network"), + func() *v1.Network { return &v1.Network{} }, + func() *v1.NetworkList { return &v1.NetworkList{} }, + func(dst, src *v1.NetworkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.NetworkList) []*v1.Network { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.NetworkList, items []*v1.Network) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Network), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_node.go b/config/clientset/versioned/typed/config/v1/fake/fake_node.go index a5792da429..77aa20d2a9 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_node.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_node.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeNodes implements NodeInterface -type FakeNodes struct { +// fakeNodes implements NodeInterface +type fakeNodes struct { + *gentype.FakeClientWithListAndApply[*v1.Node, *v1.NodeList, *configv1.NodeApplyConfiguration] Fake *FakeConfigV1 } -var nodesResource = v1.SchemeGroupVersion.WithResource("nodes") - -var nodesKind = v1.SchemeGroupVersion.WithKind("Node") - -// Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *FakeNodes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Node, err error) { - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(nodesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Node), err -} - -// List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *FakeNodes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NodeList, err error) { - emptyResult := &v1.NodeList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(nodesResource, nodesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NodeList{ListMeta: obj.(*v1.NodeList).ListMeta} - for _, item := range obj.(*v1.NodeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested nodes. -func (c *FakeNodes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(nodesResource, opts)) -} - -// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (result *v1.Node, err error) { - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(nodesResource, node, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Node), err -} - -// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(nodesResource, node, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Node), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNodes) UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (result *v1.Node, err error) { - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(nodesResource, "status", node, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Node), err -} - -// Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *FakeNodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(nodesResource, name, opts), &v1.Node{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(nodesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.NodeList{}) - return err -} - -// Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) { - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(nodesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Node), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied node. -func (c *FakeNodes) Apply(ctx context.Context, node *configv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Node, err error) { - if node == nil { - return nil, fmt.Errorf("node provided to Apply must not be nil") - } - data, err := json.Marshal(node) - if err != nil { - return nil, err - } - name := node.Name - if name == nil { - return nil, fmt.Errorf("node.Name must be provided to Apply") - } - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(nodesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Node), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNodes) ApplyStatus(ctx context.Context, node *configv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Node, err error) { - if node == nil { - return nil, fmt.Errorf("node provided to Apply must not be nil") - } - data, err := json.Marshal(node) - if err != nil { - return nil, err - } - name := node.Name - if name == nil { - return nil, fmt.Errorf("node.Name must be provided to Apply") - } - emptyResult := &v1.Node{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(nodesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeNodes(fake *FakeConfigV1) typedconfigv1.NodeInterface { + return &fakeNodes{ + gentype.NewFakeClientWithListAndApply[*v1.Node, *v1.NodeList, *configv1.NodeApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("nodes"), + v1.SchemeGroupVersion.WithKind("Node"), + func() *v1.Node { return &v1.Node{} }, + func() *v1.NodeList { return &v1.NodeList{} }, + func(dst, src *v1.NodeList) { dst.ListMeta = src.ListMeta }, + func(list *v1.NodeList) []*v1.Node { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.NodeList, items []*v1.Node) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Node), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_oauth.go b/config/clientset/versioned/typed/config/v1/fake/fake_oauth.go index 5955231254..f4ab053b94 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_oauth.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_oauth.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOAuths implements OAuthInterface -type FakeOAuths struct { +// fakeOAuths implements OAuthInterface +type fakeOAuths struct { + *gentype.FakeClientWithListAndApply[*v1.OAuth, *v1.OAuthList, *configv1.OAuthApplyConfiguration] Fake *FakeConfigV1 } -var oauthsResource = v1.SchemeGroupVersion.WithResource("oauths") - -var oauthsKind = v1.SchemeGroupVersion.WithKind("OAuth") - -// Get takes name of the oAuth, and returns the corresponding oAuth object, and an error if there is any. -func (c *FakeOAuths) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OAuth, err error) { - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(oauthsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuth), err -} - -// List takes label and field selectors, and returns the list of OAuths that match those selectors. -func (c *FakeOAuths) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OAuthList, err error) { - emptyResult := &v1.OAuthList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(oauthsResource, oauthsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OAuthList{ListMeta: obj.(*v1.OAuthList).ListMeta} - for _, item := range obj.(*v1.OAuthList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oAuths. -func (c *FakeOAuths) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(oauthsResource, opts)) -} - -// Create takes the representation of a oAuth and creates it. Returns the server's representation of the oAuth, and an error, if there is any. -func (c *FakeOAuths) Create(ctx context.Context, oAuth *v1.OAuth, opts metav1.CreateOptions) (result *v1.OAuth, err error) { - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(oauthsResource, oAuth, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuth), err -} - -// Update takes the representation of a oAuth and updates it. Returns the server's representation of the oAuth, and an error, if there is any. -func (c *FakeOAuths) Update(ctx context.Context, oAuth *v1.OAuth, opts metav1.UpdateOptions) (result *v1.OAuth, err error) { - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(oauthsResource, oAuth, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuth), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOAuths) UpdateStatus(ctx context.Context, oAuth *v1.OAuth, opts metav1.UpdateOptions) (result *v1.OAuth, err error) { - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(oauthsResource, "status", oAuth, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuth), err -} - -// Delete takes name of the oAuth and deletes it. Returns an error if one occurs. -func (c *FakeOAuths) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(oauthsResource, name, opts), &v1.OAuth{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOAuths) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(oauthsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OAuthList{}) - return err -} - -// Patch applies the patch and returns the patched oAuth. -func (c *FakeOAuths) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuth, err error) { - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuth), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oAuth. -func (c *FakeOAuths) Apply(ctx context.Context, oAuth *configv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuth, err error) { - if oAuth == nil { - return nil, fmt.Errorf("oAuth provided to Apply must not be nil") - } - data, err := json.Marshal(oAuth) - if err != nil { - return nil, err - } - name := oAuth.Name - if name == nil { - return nil, fmt.Errorf("oAuth.Name must be provided to Apply") - } - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuth), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOAuths) ApplyStatus(ctx context.Context, oAuth *configv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuth, err error) { - if oAuth == nil { - return nil, fmt.Errorf("oAuth provided to Apply must not be nil") - } - data, err := json.Marshal(oAuth) - if err != nil { - return nil, err - } - name := oAuth.Name - if name == nil { - return nil, fmt.Errorf("oAuth.Name must be provided to Apply") - } - emptyResult := &v1.OAuth{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOAuths(fake *FakeConfigV1) typedconfigv1.OAuthInterface { + return &fakeOAuths{ + gentype.NewFakeClientWithListAndApply[*v1.OAuth, *v1.OAuthList, *configv1.OAuthApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("oauths"), + v1.SchemeGroupVersion.WithKind("OAuth"), + func() *v1.OAuth { return &v1.OAuth{} }, + func() *v1.OAuthList { return &v1.OAuthList{} }, + func(dst, src *v1.OAuthList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OAuthList) []*v1.OAuth { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.OAuthList, items []*v1.OAuth) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.OAuth), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go b/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go index 7d72fc000d..06989ba1d8 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_operatorhub.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOperatorHubs implements OperatorHubInterface -type FakeOperatorHubs struct { +// fakeOperatorHubs implements OperatorHubInterface +type fakeOperatorHubs struct { + *gentype.FakeClientWithListAndApply[*v1.OperatorHub, *v1.OperatorHubList, *configv1.OperatorHubApplyConfiguration] Fake *FakeConfigV1 } -var operatorhubsResource = v1.SchemeGroupVersion.WithResource("operatorhubs") - -var operatorhubsKind = v1.SchemeGroupVersion.WithKind("OperatorHub") - -// Get takes name of the operatorHub, and returns the corresponding operatorHub object, and an error if there is any. -func (c *FakeOperatorHubs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OperatorHub, err error) { - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(operatorhubsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OperatorHub), err -} - -// List takes label and field selectors, and returns the list of OperatorHubs that match those selectors. -func (c *FakeOperatorHubs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OperatorHubList, err error) { - emptyResult := &v1.OperatorHubList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(operatorhubsResource, operatorhubsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OperatorHubList{ListMeta: obj.(*v1.OperatorHubList).ListMeta} - for _, item := range obj.(*v1.OperatorHubList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested operatorHubs. -func (c *FakeOperatorHubs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(operatorhubsResource, opts)) -} - -// Create takes the representation of a operatorHub and creates it. Returns the server's representation of the operatorHub, and an error, if there is any. -func (c *FakeOperatorHubs) Create(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.CreateOptions) (result *v1.OperatorHub, err error) { - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(operatorhubsResource, operatorHub, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OperatorHub), err -} - -// Update takes the representation of a operatorHub and updates it. Returns the server's representation of the operatorHub, and an error, if there is any. -func (c *FakeOperatorHubs) Update(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (result *v1.OperatorHub, err error) { - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(operatorhubsResource, operatorHub, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OperatorHub), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOperatorHubs) UpdateStatus(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (result *v1.OperatorHub, err error) { - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(operatorhubsResource, "status", operatorHub, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OperatorHub), err -} - -// Delete takes name of the operatorHub and deletes it. Returns an error if one occurs. -func (c *FakeOperatorHubs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(operatorhubsResource, name, opts), &v1.OperatorHub{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOperatorHubs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(operatorhubsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OperatorHubList{}) - return err -} - -// Patch applies the patch and returns the patched operatorHub. -func (c *FakeOperatorHubs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OperatorHub, err error) { - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(operatorhubsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OperatorHub), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied operatorHub. -func (c *FakeOperatorHubs) Apply(ctx context.Context, operatorHub *configv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OperatorHub, err error) { - if operatorHub == nil { - return nil, fmt.Errorf("operatorHub provided to Apply must not be nil") - } - data, err := json.Marshal(operatorHub) - if err != nil { - return nil, err - } - name := operatorHub.Name - if name == nil { - return nil, fmt.Errorf("operatorHub.Name must be provided to Apply") - } - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(operatorhubsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OperatorHub), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOperatorHubs) ApplyStatus(ctx context.Context, operatorHub *configv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OperatorHub, err error) { - if operatorHub == nil { - return nil, fmt.Errorf("operatorHub provided to Apply must not be nil") - } - data, err := json.Marshal(operatorHub) - if err != nil { - return nil, err - } - name := operatorHub.Name - if name == nil { - return nil, fmt.Errorf("operatorHub.Name must be provided to Apply") - } - emptyResult := &v1.OperatorHub{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(operatorhubsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOperatorHubs(fake *FakeConfigV1) typedconfigv1.OperatorHubInterface { + return &fakeOperatorHubs{ + gentype.NewFakeClientWithListAndApply[*v1.OperatorHub, *v1.OperatorHubList, *configv1.OperatorHubApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("operatorhubs"), + v1.SchemeGroupVersion.WithKind("OperatorHub"), + func() *v1.OperatorHub { return &v1.OperatorHub{} }, + func() *v1.OperatorHubList { return &v1.OperatorHubList{} }, + func(dst, src *v1.OperatorHubList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OperatorHubList) []*v1.OperatorHub { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.OperatorHubList, items []*v1.OperatorHub) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.OperatorHub), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_project.go b/config/clientset/versioned/typed/config/v1/fake/fake_project.go index 62a2aa019d..506f1527b8 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_project.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_project.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeProjects implements ProjectInterface -type FakeProjects struct { +// fakeProjects implements ProjectInterface +type fakeProjects struct { + *gentype.FakeClientWithListAndApply[*v1.Project, *v1.ProjectList, *configv1.ProjectApplyConfiguration] Fake *FakeConfigV1 } -var projectsResource = v1.SchemeGroupVersion.WithResource("projects") - -var projectsKind = v1.SchemeGroupVersion.WithKind("Project") - -// Get takes name of the project, and returns the corresponding project object, and an error if there is any. -func (c *FakeProjects) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(projectsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// List takes label and field selectors, and returns the list of Projects that match those selectors. -func (c *FakeProjects) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProjectList, err error) { - emptyResult := &v1.ProjectList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(projectsResource, projectsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ProjectList{ListMeta: obj.(*v1.ProjectList).ListMeta} - for _, item := range obj.(*v1.ProjectList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested projects. -func (c *FakeProjects) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(projectsResource, opts)) -} - -// Create takes the representation of a project and creates it. Returns the server's representation of the project, and an error, if there is any. -func (c *FakeProjects) Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(projectsResource, project, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// Update takes the representation of a project and updates it. Returns the server's representation of the project, and an error, if there is any. -func (c *FakeProjects) Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(projectsResource, project, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeProjects) UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(projectsResource, "status", project, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// Delete takes name of the project and deletes it. Returns an error if one occurs. -func (c *FakeProjects) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(projectsResource, name, opts), &v1.Project{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeProjects) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(projectsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ProjectList{}) - return err -} - -// Patch applies the patch and returns the patched project. -func (c *FakeProjects) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied project. -func (c *FakeProjects) Apply(ctx context.Context, project *configv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) { - if project == nil { - return nil, fmt.Errorf("project provided to Apply must not be nil") - } - data, err := json.Marshal(project) - if err != nil { - return nil, err - } - name := project.Name - if name == nil { - return nil, fmt.Errorf("project.Name must be provided to Apply") - } - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeProjects) ApplyStatus(ctx context.Context, project *configv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) { - if project == nil { - return nil, fmt.Errorf("project provided to Apply must not be nil") - } - data, err := json.Marshal(project) - if err != nil { - return nil, err - } - name := project.Name - if name == nil { - return nil, fmt.Errorf("project.Name must be provided to Apply") - } - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeProjects(fake *FakeConfigV1) typedconfigv1.ProjectInterface { + return &fakeProjects{ + gentype.NewFakeClientWithListAndApply[*v1.Project, *v1.ProjectList, *configv1.ProjectApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("projects"), + v1.SchemeGroupVersion.WithKind("Project"), + func() *v1.Project { return &v1.Project{} }, + func() *v1.ProjectList { return &v1.ProjectList{} }, + func(dst, src *v1.ProjectList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ProjectList) []*v1.Project { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ProjectList, items []*v1.Project) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Project), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_proxy.go b/config/clientset/versioned/typed/config/v1/fake/fake_proxy.go index 9f4de37a27..6cb1cd0946 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_proxy.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_proxy.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeProxies implements ProxyInterface -type FakeProxies struct { +// fakeProxies implements ProxyInterface +type fakeProxies struct { + *gentype.FakeClientWithListAndApply[*v1.Proxy, *v1.ProxyList, *configv1.ProxyApplyConfiguration] Fake *FakeConfigV1 } -var proxiesResource = v1.SchemeGroupVersion.WithResource("proxies") - -var proxiesKind = v1.SchemeGroupVersion.WithKind("Proxy") - -// Get takes name of the proxy, and returns the corresponding proxy object, and an error if there is any. -func (c *FakeProxies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Proxy, err error) { - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(proxiesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Proxy), err -} - -// List takes label and field selectors, and returns the list of Proxies that match those selectors. -func (c *FakeProxies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProxyList, err error) { - emptyResult := &v1.ProxyList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(proxiesResource, proxiesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ProxyList{ListMeta: obj.(*v1.ProxyList).ListMeta} - for _, item := range obj.(*v1.ProxyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested proxies. -func (c *FakeProxies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(proxiesResource, opts)) -} - -// Create takes the representation of a proxy and creates it. Returns the server's representation of the proxy, and an error, if there is any. -func (c *FakeProxies) Create(ctx context.Context, proxy *v1.Proxy, opts metav1.CreateOptions) (result *v1.Proxy, err error) { - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(proxiesResource, proxy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Proxy), err -} - -// Update takes the representation of a proxy and updates it. Returns the server's representation of the proxy, and an error, if there is any. -func (c *FakeProxies) Update(ctx context.Context, proxy *v1.Proxy, opts metav1.UpdateOptions) (result *v1.Proxy, err error) { - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(proxiesResource, proxy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Proxy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeProxies) UpdateStatus(ctx context.Context, proxy *v1.Proxy, opts metav1.UpdateOptions) (result *v1.Proxy, err error) { - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(proxiesResource, "status", proxy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Proxy), err -} - -// Delete takes name of the proxy and deletes it. Returns an error if one occurs. -func (c *FakeProxies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(proxiesResource, name, opts), &v1.Proxy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeProxies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(proxiesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ProxyList{}) - return err -} - -// Patch applies the patch and returns the patched proxy. -func (c *FakeProxies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Proxy, err error) { - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(proxiesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Proxy), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied proxy. -func (c *FakeProxies) Apply(ctx context.Context, proxy *configv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Proxy, err error) { - if proxy == nil { - return nil, fmt.Errorf("proxy provided to Apply must not be nil") - } - data, err := json.Marshal(proxy) - if err != nil { - return nil, err - } - name := proxy.Name - if name == nil { - return nil, fmt.Errorf("proxy.Name must be provided to Apply") - } - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(proxiesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Proxy), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeProxies) ApplyStatus(ctx context.Context, proxy *configv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Proxy, err error) { - if proxy == nil { - return nil, fmt.Errorf("proxy provided to Apply must not be nil") - } - data, err := json.Marshal(proxy) - if err != nil { - return nil, err - } - name := proxy.Name - if name == nil { - return nil, fmt.Errorf("proxy.Name must be provided to Apply") - } - emptyResult := &v1.Proxy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(proxiesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeProxies(fake *FakeConfigV1) typedconfigv1.ProxyInterface { + return &fakeProxies{ + gentype.NewFakeClientWithListAndApply[*v1.Proxy, *v1.ProxyList, *configv1.ProxyApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("proxies"), + v1.SchemeGroupVersion.WithKind("Proxy"), + func() *v1.Proxy { return &v1.Proxy{} }, + func() *v1.ProxyList { return &v1.ProxyList{} }, + func(dst, src *v1.ProxyList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ProxyList) []*v1.Proxy { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ProxyList, items []*v1.Proxy) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Proxy), err } diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_scheduler.go b/config/clientset/versioned/typed/config/v1/fake/fake_scheduler.go index 79890ff842..cba9733c94 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_scheduler.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_scheduler.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/config/v1" configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeSchedulers implements SchedulerInterface -type FakeSchedulers struct { +// fakeSchedulers implements SchedulerInterface +type fakeSchedulers struct { + *gentype.FakeClientWithListAndApply[*v1.Scheduler, *v1.SchedulerList, *configv1.SchedulerApplyConfiguration] Fake *FakeConfigV1 } -var schedulersResource = v1.SchemeGroupVersion.WithResource("schedulers") - -var schedulersKind = v1.SchemeGroupVersion.WithKind("Scheduler") - -// Get takes name of the scheduler, and returns the corresponding scheduler object, and an error if there is any. -func (c *FakeSchedulers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Scheduler, err error) { - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(schedulersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Scheduler), err -} - -// List takes label and field selectors, and returns the list of Schedulers that match those selectors. -func (c *FakeSchedulers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SchedulerList, err error) { - emptyResult := &v1.SchedulerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(schedulersResource, schedulersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.SchedulerList{ListMeta: obj.(*v1.SchedulerList).ListMeta} - for _, item := range obj.(*v1.SchedulerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested schedulers. -func (c *FakeSchedulers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(schedulersResource, opts)) -} - -// Create takes the representation of a scheduler and creates it. Returns the server's representation of the scheduler, and an error, if there is any. -func (c *FakeSchedulers) Create(ctx context.Context, scheduler *v1.Scheduler, opts metav1.CreateOptions) (result *v1.Scheduler, err error) { - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(schedulersResource, scheduler, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Scheduler), err -} - -// Update takes the representation of a scheduler and updates it. Returns the server's representation of the scheduler, and an error, if there is any. -func (c *FakeSchedulers) Update(ctx context.Context, scheduler *v1.Scheduler, opts metav1.UpdateOptions) (result *v1.Scheduler, err error) { - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(schedulersResource, scheduler, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Scheduler), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSchedulers) UpdateStatus(ctx context.Context, scheduler *v1.Scheduler, opts metav1.UpdateOptions) (result *v1.Scheduler, err error) { - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(schedulersResource, "status", scheduler, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Scheduler), err -} - -// Delete takes name of the scheduler and deletes it. Returns an error if one occurs. -func (c *FakeSchedulers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(schedulersResource, name, opts), &v1.Scheduler{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSchedulers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(schedulersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.SchedulerList{}) - return err -} - -// Patch applies the patch and returns the patched scheduler. -func (c *FakeSchedulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Scheduler, err error) { - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(schedulersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Scheduler), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied scheduler. -func (c *FakeSchedulers) Apply(ctx context.Context, scheduler *configv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Scheduler, err error) { - if scheduler == nil { - return nil, fmt.Errorf("scheduler provided to Apply must not be nil") - } - data, err := json.Marshal(scheduler) - if err != nil { - return nil, err - } - name := scheduler.Name - if name == nil { - return nil, fmt.Errorf("scheduler.Name must be provided to Apply") - } - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(schedulersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Scheduler), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeSchedulers) ApplyStatus(ctx context.Context, scheduler *configv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Scheduler, err error) { - if scheduler == nil { - return nil, fmt.Errorf("scheduler provided to Apply must not be nil") - } - data, err := json.Marshal(scheduler) - if err != nil { - return nil, err - } - name := scheduler.Name - if name == nil { - return nil, fmt.Errorf("scheduler.Name must be provided to Apply") - } - emptyResult := &v1.Scheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(schedulersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeSchedulers(fake *FakeConfigV1) typedconfigv1.SchedulerInterface { + return &fakeSchedulers{ + gentype.NewFakeClientWithListAndApply[*v1.Scheduler, *v1.SchedulerList, *configv1.SchedulerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("schedulers"), + v1.SchemeGroupVersion.WithKind("Scheduler"), + func() *v1.Scheduler { return &v1.Scheduler{} }, + func() *v1.SchedulerList { return &v1.SchedulerList{} }, + func(dst, src *v1.SchedulerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.SchedulerList) []*v1.Scheduler { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.SchedulerList, items []*v1.Scheduler) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Scheduler), err } diff --git a/config/clientset/versioned/typed/config/v1/featuregate.go b/config/clientset/versioned/typed/config/v1/featuregate.go index fcbfe3577d..2a41c2e738 100644 --- a/config/clientset/versioned/typed/config/v1/featuregate.go +++ b/config/clientset/versioned/typed/config/v1/featuregate.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type FeatureGatesGetter interface { // FeatureGateInterface has methods to work with FeatureGate resources. type FeatureGateInterface interface { - Create(ctx context.Context, featureGate *v1.FeatureGate, opts metav1.CreateOptions) (*v1.FeatureGate, error) - Update(ctx context.Context, featureGate *v1.FeatureGate, opts metav1.UpdateOptions) (*v1.FeatureGate, error) + Create(ctx context.Context, featureGate *configv1.FeatureGate, opts metav1.CreateOptions) (*configv1.FeatureGate, error) + Update(ctx context.Context, featureGate *configv1.FeatureGate, opts metav1.UpdateOptions) (*configv1.FeatureGate, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, featureGate *v1.FeatureGate, opts metav1.UpdateOptions) (*v1.FeatureGate, error) + UpdateStatus(ctx context.Context, featureGate *configv1.FeatureGate, opts metav1.UpdateOptions) (*configv1.FeatureGate, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.FeatureGate, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.FeatureGateList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.FeatureGate, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.FeatureGateList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FeatureGate, err error) - Apply(ctx context.Context, featureGate *configv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FeatureGate, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.FeatureGate, err error) + Apply(ctx context.Context, featureGate *applyconfigurationsconfigv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.FeatureGate, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, featureGate *configv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FeatureGate, err error) + ApplyStatus(ctx context.Context, featureGate *applyconfigurationsconfigv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.FeatureGate, err error) FeatureGateExpansion } // featureGates implements FeatureGateInterface type featureGates struct { - *gentype.ClientWithListAndApply[*v1.FeatureGate, *v1.FeatureGateList, *configv1.FeatureGateApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.FeatureGate, *configv1.FeatureGateList, *applyconfigurationsconfigv1.FeatureGateApplyConfiguration] } // newFeatureGates returns a FeatureGates func newFeatureGates(c *ConfigV1Client) *featureGates { return &featureGates{ - gentype.NewClientWithListAndApply[*v1.FeatureGate, *v1.FeatureGateList, *configv1.FeatureGateApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.FeatureGate, *configv1.FeatureGateList, *applyconfigurationsconfigv1.FeatureGateApplyConfiguration]( "featuregates", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.FeatureGate { return &v1.FeatureGate{} }, - func() *v1.FeatureGateList { return &v1.FeatureGateList{} }), + func() *configv1.FeatureGate { return &configv1.FeatureGate{} }, + func() *configv1.FeatureGateList { return &configv1.FeatureGateList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/image.go b/config/clientset/versioned/typed/config/v1/image.go index 536693d3e9..2950a19c60 100644 --- a/config/clientset/versioned/typed/config/v1/image.go +++ b/config/clientset/versioned/typed/config/v1/image.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ImagesGetter interface { // ImageInterface has methods to work with Image resources. type ImageInterface interface { - Create(ctx context.Context, image *v1.Image, opts metav1.CreateOptions) (*v1.Image, error) - Update(ctx context.Context, image *v1.Image, opts metav1.UpdateOptions) (*v1.Image, error) + Create(ctx context.Context, image *configv1.Image, opts metav1.CreateOptions) (*configv1.Image, error) + Update(ctx context.Context, image *configv1.Image, opts metav1.UpdateOptions) (*configv1.Image, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, image *v1.Image, opts metav1.UpdateOptions) (*v1.Image, error) + UpdateStatus(ctx context.Context, image *configv1.Image, opts metav1.UpdateOptions) (*configv1.Image, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Image, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Image, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Image, err error) - Apply(ctx context.Context, image *configv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Image, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Image, err error) + Apply(ctx context.Context, image *applyconfigurationsconfigv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Image, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, image *configv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Image, err error) + ApplyStatus(ctx context.Context, image *applyconfigurationsconfigv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Image, err error) ImageExpansion } // images implements ImageInterface type images struct { - *gentype.ClientWithListAndApply[*v1.Image, *v1.ImageList, *configv1.ImageApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Image, *configv1.ImageList, *applyconfigurationsconfigv1.ImageApplyConfiguration] } // newImages returns a Images func newImages(c *ConfigV1Client) *images { return &images{ - gentype.NewClientWithListAndApply[*v1.Image, *v1.ImageList, *configv1.ImageApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Image, *configv1.ImageList, *applyconfigurationsconfigv1.ImageApplyConfiguration]( "images", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Image { return &v1.Image{} }, - func() *v1.ImageList { return &v1.ImageList{} }), + func() *configv1.Image { return &configv1.Image{} }, + func() *configv1.ImageList { return &configv1.ImageList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go b/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go index bc8a8b3424..ce52d6c813 100644 --- a/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go +++ b/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ImageContentPoliciesGetter interface { // ImageContentPolicyInterface has methods to work with ImageContentPolicy resources. type ImageContentPolicyInterface interface { - Create(ctx context.Context, imageContentPolicy *v1.ImageContentPolicy, opts metav1.CreateOptions) (*v1.ImageContentPolicy, error) - Update(ctx context.Context, imageContentPolicy *v1.ImageContentPolicy, opts metav1.UpdateOptions) (*v1.ImageContentPolicy, error) + Create(ctx context.Context, imageContentPolicy *configv1.ImageContentPolicy, opts metav1.CreateOptions) (*configv1.ImageContentPolicy, error) + Update(ctx context.Context, imageContentPolicy *configv1.ImageContentPolicy, opts metav1.UpdateOptions) (*configv1.ImageContentPolicy, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImageContentPolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageContentPolicyList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImageContentPolicy, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageContentPolicyList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageContentPolicy, err error) - Apply(ctx context.Context, imageContentPolicy *configv1.ImageContentPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageContentPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImageContentPolicy, err error) + Apply(ctx context.Context, imageContentPolicy *applyconfigurationsconfigv1.ImageContentPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageContentPolicy, err error) ImageContentPolicyExpansion } // imageContentPolicies implements ImageContentPolicyInterface type imageContentPolicies struct { - *gentype.ClientWithListAndApply[*v1.ImageContentPolicy, *v1.ImageContentPolicyList, *configv1.ImageContentPolicyApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.ImageContentPolicy, *configv1.ImageContentPolicyList, *applyconfigurationsconfigv1.ImageContentPolicyApplyConfiguration] } // newImageContentPolicies returns a ImageContentPolicies func newImageContentPolicies(c *ConfigV1Client) *imageContentPolicies { return &imageContentPolicies{ - gentype.NewClientWithListAndApply[*v1.ImageContentPolicy, *v1.ImageContentPolicyList, *configv1.ImageContentPolicyApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.ImageContentPolicy, *configv1.ImageContentPolicyList, *applyconfigurationsconfigv1.ImageContentPolicyApplyConfiguration]( "imagecontentpolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ImageContentPolicy { return &v1.ImageContentPolicy{} }, - func() *v1.ImageContentPolicyList { return &v1.ImageContentPolicyList{} }), + func() *configv1.ImageContentPolicy { return &configv1.ImageContentPolicy{} }, + func() *configv1.ImageContentPolicyList { return &configv1.ImageContentPolicyList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go b/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go index eca9b95b65..70018dd7fc 100644 --- a/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go +++ b/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ImageDigestMirrorSetsGetter interface { // ImageDigestMirrorSetInterface has methods to work with ImageDigestMirrorSet resources. type ImageDigestMirrorSetInterface interface { - Create(ctx context.Context, imageDigestMirrorSet *v1.ImageDigestMirrorSet, opts metav1.CreateOptions) (*v1.ImageDigestMirrorSet, error) - Update(ctx context.Context, imageDigestMirrorSet *v1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (*v1.ImageDigestMirrorSet, error) + Create(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSet, opts metav1.CreateOptions) (*configv1.ImageDigestMirrorSet, error) + Update(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageDigestMirrorSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imageDigestMirrorSet *v1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (*v1.ImageDigestMirrorSet, error) + UpdateStatus(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageDigestMirrorSet, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImageDigestMirrorSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageDigestMirrorSetList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImageDigestMirrorSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageDigestMirrorSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageDigestMirrorSet, err error) - Apply(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageDigestMirrorSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImageDigestMirrorSet, err error) + Apply(ctx context.Context, imageDigestMirrorSet *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageDigestMirrorSet, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageDigestMirrorSet, err error) + ApplyStatus(ctx context.Context, imageDigestMirrorSet *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageDigestMirrorSet, err error) ImageDigestMirrorSetExpansion } // imageDigestMirrorSets implements ImageDigestMirrorSetInterface type imageDigestMirrorSets struct { - *gentype.ClientWithListAndApply[*v1.ImageDigestMirrorSet, *v1.ImageDigestMirrorSetList, *configv1.ImageDigestMirrorSetApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.ImageDigestMirrorSet, *configv1.ImageDigestMirrorSetList, *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration] } // newImageDigestMirrorSets returns a ImageDigestMirrorSets func newImageDigestMirrorSets(c *ConfigV1Client) *imageDigestMirrorSets { return &imageDigestMirrorSets{ - gentype.NewClientWithListAndApply[*v1.ImageDigestMirrorSet, *v1.ImageDigestMirrorSetList, *configv1.ImageDigestMirrorSetApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.ImageDigestMirrorSet, *configv1.ImageDigestMirrorSetList, *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration]( "imagedigestmirrorsets", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ImageDigestMirrorSet { return &v1.ImageDigestMirrorSet{} }, - func() *v1.ImageDigestMirrorSetList { return &v1.ImageDigestMirrorSetList{} }), + func() *configv1.ImageDigestMirrorSet { return &configv1.ImageDigestMirrorSet{} }, + func() *configv1.ImageDigestMirrorSetList { return &configv1.ImageDigestMirrorSetList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go b/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go index add148a557..ca3c6e0be7 100644 --- a/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go +++ b/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ImageTagMirrorSetsGetter interface { // ImageTagMirrorSetInterface has methods to work with ImageTagMirrorSet resources. type ImageTagMirrorSetInterface interface { - Create(ctx context.Context, imageTagMirrorSet *v1.ImageTagMirrorSet, opts metav1.CreateOptions) (*v1.ImageTagMirrorSet, error) - Update(ctx context.Context, imageTagMirrorSet *v1.ImageTagMirrorSet, opts metav1.UpdateOptions) (*v1.ImageTagMirrorSet, error) + Create(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSet, opts metav1.CreateOptions) (*configv1.ImageTagMirrorSet, error) + Update(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageTagMirrorSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imageTagMirrorSet *v1.ImageTagMirrorSet, opts metav1.UpdateOptions) (*v1.ImageTagMirrorSet, error) + UpdateStatus(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageTagMirrorSet, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImageTagMirrorSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageTagMirrorSetList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImageTagMirrorSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageTagMirrorSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageTagMirrorSet, err error) - Apply(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageTagMirrorSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImageTagMirrorSet, err error) + Apply(ctx context.Context, imageTagMirrorSet *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageTagMirrorSet, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageTagMirrorSet, err error) + ApplyStatus(ctx context.Context, imageTagMirrorSet *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageTagMirrorSet, err error) ImageTagMirrorSetExpansion } // imageTagMirrorSets implements ImageTagMirrorSetInterface type imageTagMirrorSets struct { - *gentype.ClientWithListAndApply[*v1.ImageTagMirrorSet, *v1.ImageTagMirrorSetList, *configv1.ImageTagMirrorSetApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.ImageTagMirrorSet, *configv1.ImageTagMirrorSetList, *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration] } // newImageTagMirrorSets returns a ImageTagMirrorSets func newImageTagMirrorSets(c *ConfigV1Client) *imageTagMirrorSets { return &imageTagMirrorSets{ - gentype.NewClientWithListAndApply[*v1.ImageTagMirrorSet, *v1.ImageTagMirrorSetList, *configv1.ImageTagMirrorSetApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.ImageTagMirrorSet, *configv1.ImageTagMirrorSetList, *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration]( "imagetagmirrorsets", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ImageTagMirrorSet { return &v1.ImageTagMirrorSet{} }, - func() *v1.ImageTagMirrorSetList { return &v1.ImageTagMirrorSetList{} }), + func() *configv1.ImageTagMirrorSet { return &configv1.ImageTagMirrorSet{} }, + func() *configv1.ImageTagMirrorSetList { return &configv1.ImageTagMirrorSetList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/infrastructure.go b/config/clientset/versioned/typed/config/v1/infrastructure.go index 4d85508331..eb307026ce 100644 --- a/config/clientset/versioned/typed/config/v1/infrastructure.go +++ b/config/clientset/versioned/typed/config/v1/infrastructure.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type InfrastructuresGetter interface { // InfrastructureInterface has methods to work with Infrastructure resources. type InfrastructureInterface interface { - Create(ctx context.Context, infrastructure *v1.Infrastructure, opts metav1.CreateOptions) (*v1.Infrastructure, error) - Update(ctx context.Context, infrastructure *v1.Infrastructure, opts metav1.UpdateOptions) (*v1.Infrastructure, error) + Create(ctx context.Context, infrastructure *configv1.Infrastructure, opts metav1.CreateOptions) (*configv1.Infrastructure, error) + Update(ctx context.Context, infrastructure *configv1.Infrastructure, opts metav1.UpdateOptions) (*configv1.Infrastructure, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, infrastructure *v1.Infrastructure, opts metav1.UpdateOptions) (*v1.Infrastructure, error) + UpdateStatus(ctx context.Context, infrastructure *configv1.Infrastructure, opts metav1.UpdateOptions) (*configv1.Infrastructure, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Infrastructure, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.InfrastructureList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Infrastructure, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.InfrastructureList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Infrastructure, err error) - Apply(ctx context.Context, infrastructure *configv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Infrastructure, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Infrastructure, err error) + Apply(ctx context.Context, infrastructure *applyconfigurationsconfigv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Infrastructure, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, infrastructure *configv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Infrastructure, err error) + ApplyStatus(ctx context.Context, infrastructure *applyconfigurationsconfigv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Infrastructure, err error) InfrastructureExpansion } // infrastructures implements InfrastructureInterface type infrastructures struct { - *gentype.ClientWithListAndApply[*v1.Infrastructure, *v1.InfrastructureList, *configv1.InfrastructureApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Infrastructure, *configv1.InfrastructureList, *applyconfigurationsconfigv1.InfrastructureApplyConfiguration] } // newInfrastructures returns a Infrastructures func newInfrastructures(c *ConfigV1Client) *infrastructures { return &infrastructures{ - gentype.NewClientWithListAndApply[*v1.Infrastructure, *v1.InfrastructureList, *configv1.InfrastructureApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Infrastructure, *configv1.InfrastructureList, *applyconfigurationsconfigv1.InfrastructureApplyConfiguration]( "infrastructures", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Infrastructure { return &v1.Infrastructure{} }, - func() *v1.InfrastructureList { return &v1.InfrastructureList{} }), + func() *configv1.Infrastructure { return &configv1.Infrastructure{} }, + func() *configv1.InfrastructureList { return &configv1.InfrastructureList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/ingress.go b/config/clientset/versioned/typed/config/v1/ingress.go index cc4fa53c40..81057042d2 100644 --- a/config/clientset/versioned/typed/config/v1/ingress.go +++ b/config/clientset/versioned/typed/config/v1/ingress.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type IngressesGetter interface { // IngressInterface has methods to work with Ingress resources. type IngressInterface interface { - Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (*v1.Ingress, error) - Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error) + Create(ctx context.Context, ingress *configv1.Ingress, opts metav1.CreateOptions) (*configv1.Ingress, error) + Update(ctx context.Context, ingress *configv1.Ingress, opts metav1.UpdateOptions) (*configv1.Ingress, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error) + UpdateStatus(ctx context.Context, ingress *configv1.Ingress, opts metav1.UpdateOptions) (*configv1.Ingress, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Ingress, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Ingress, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.IngressList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error) - Apply(ctx context.Context, ingress *configv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Ingress, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Ingress, err error) + Apply(ctx context.Context, ingress *applyconfigurationsconfigv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Ingress, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, ingress *configv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Ingress, err error) + ApplyStatus(ctx context.Context, ingress *applyconfigurationsconfigv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Ingress, err error) IngressExpansion } // ingresses implements IngressInterface type ingresses struct { - *gentype.ClientWithListAndApply[*v1.Ingress, *v1.IngressList, *configv1.IngressApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Ingress, *configv1.IngressList, *applyconfigurationsconfigv1.IngressApplyConfiguration] } // newIngresses returns a Ingresses func newIngresses(c *ConfigV1Client) *ingresses { return &ingresses{ - gentype.NewClientWithListAndApply[*v1.Ingress, *v1.IngressList, *configv1.IngressApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Ingress, *configv1.IngressList, *applyconfigurationsconfigv1.IngressApplyConfiguration]( "ingresses", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Ingress { return &v1.Ingress{} }, - func() *v1.IngressList { return &v1.IngressList{} }), + func() *configv1.Ingress { return &configv1.Ingress{} }, + func() *configv1.IngressList { return &configv1.IngressList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/network.go b/config/clientset/versioned/typed/config/v1/network.go index ca61ca93ad..c58e0f211e 100644 --- a/config/clientset/versioned/typed/config/v1/network.go +++ b/config/clientset/versioned/typed/config/v1/network.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type NetworksGetter interface { // NetworkInterface has methods to work with Network resources. type NetworkInterface interface { - Create(ctx context.Context, network *v1.Network, opts metav1.CreateOptions) (*v1.Network, error) - Update(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (*v1.Network, error) + Create(ctx context.Context, network *configv1.Network, opts metav1.CreateOptions) (*configv1.Network, error) + Update(ctx context.Context, network *configv1.Network, opts metav1.UpdateOptions) (*configv1.Network, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (*v1.Network, error) + UpdateStatus(ctx context.Context, network *configv1.Network, opts metav1.UpdateOptions) (*configv1.Network, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Network, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Network, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.NetworkList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Network, err error) - Apply(ctx context.Context, network *configv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Network, err error) + Apply(ctx context.Context, network *applyconfigurationsconfigv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Network, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, network *configv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) + ApplyStatus(ctx context.Context, network *applyconfigurationsconfigv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Network, err error) NetworkExpansion } // networks implements NetworkInterface type networks struct { - *gentype.ClientWithListAndApply[*v1.Network, *v1.NetworkList, *configv1.NetworkApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Network, *configv1.NetworkList, *applyconfigurationsconfigv1.NetworkApplyConfiguration] } // newNetworks returns a Networks func newNetworks(c *ConfigV1Client) *networks { return &networks{ - gentype.NewClientWithListAndApply[*v1.Network, *v1.NetworkList, *configv1.NetworkApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Network, *configv1.NetworkList, *applyconfigurationsconfigv1.NetworkApplyConfiguration]( "networks", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Network { return &v1.Network{} }, - func() *v1.NetworkList { return &v1.NetworkList{} }), + func() *configv1.Network { return &configv1.Network{} }, + func() *configv1.NetworkList { return &configv1.NetworkList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/node.go b/config/clientset/versioned/typed/config/v1/node.go index 0ec0e5e5ac..b573b1598b 100644 --- a/config/clientset/versioned/typed/config/v1/node.go +++ b/config/clientset/versioned/typed/config/v1/node.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type NodesGetter interface { // NodeInterface has methods to work with Node resources. type NodeInterface interface { - Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (*v1.Node, error) - Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) + Create(ctx context.Context, node *configv1.Node, opts metav1.CreateOptions) (*configv1.Node, error) + Update(ctx context.Context, node *configv1.Node, opts metav1.UpdateOptions) (*configv1.Node, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) + UpdateStatus(ctx context.Context, node *configv1.Node, opts metav1.UpdateOptions) (*configv1.Node, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Node, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NodeList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Node, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.NodeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) - Apply(ctx context.Context, node *configv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Node, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Node, err error) + Apply(ctx context.Context, node *applyconfigurationsconfigv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Node, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, node *configv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Node, err error) + ApplyStatus(ctx context.Context, node *applyconfigurationsconfigv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Node, err error) NodeExpansion } // nodes implements NodeInterface type nodes struct { - *gentype.ClientWithListAndApply[*v1.Node, *v1.NodeList, *configv1.NodeApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Node, *configv1.NodeList, *applyconfigurationsconfigv1.NodeApplyConfiguration] } // newNodes returns a Nodes func newNodes(c *ConfigV1Client) *nodes { return &nodes{ - gentype.NewClientWithListAndApply[*v1.Node, *v1.NodeList, *configv1.NodeApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Node, *configv1.NodeList, *applyconfigurationsconfigv1.NodeApplyConfiguration]( "nodes", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Node { return &v1.Node{} }, - func() *v1.NodeList { return &v1.NodeList{} }), + func() *configv1.Node { return &configv1.Node{} }, + func() *configv1.NodeList { return &configv1.NodeList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/oauth.go b/config/clientset/versioned/typed/config/v1/oauth.go index d6f7814aac..755a938737 100644 --- a/config/clientset/versioned/typed/config/v1/oauth.go +++ b/config/clientset/versioned/typed/config/v1/oauth.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type OAuthsGetter interface { // OAuthInterface has methods to work with OAuth resources. type OAuthInterface interface { - Create(ctx context.Context, oAuth *v1.OAuth, opts metav1.CreateOptions) (*v1.OAuth, error) - Update(ctx context.Context, oAuth *v1.OAuth, opts metav1.UpdateOptions) (*v1.OAuth, error) + Create(ctx context.Context, oAuth *configv1.OAuth, opts metav1.CreateOptions) (*configv1.OAuth, error) + Update(ctx context.Context, oAuth *configv1.OAuth, opts metav1.UpdateOptions) (*configv1.OAuth, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, oAuth *v1.OAuth, opts metav1.UpdateOptions) (*v1.OAuth, error) + UpdateStatus(ctx context.Context, oAuth *configv1.OAuth, opts metav1.UpdateOptions) (*configv1.OAuth, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OAuth, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OAuthList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.OAuth, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.OAuthList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuth, err error) - Apply(ctx context.Context, oAuth *configv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuth, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.OAuth, err error) + Apply(ctx context.Context, oAuth *applyconfigurationsconfigv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OAuth, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, oAuth *configv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuth, err error) + ApplyStatus(ctx context.Context, oAuth *applyconfigurationsconfigv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OAuth, err error) OAuthExpansion } // oAuths implements OAuthInterface type oAuths struct { - *gentype.ClientWithListAndApply[*v1.OAuth, *v1.OAuthList, *configv1.OAuthApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.OAuth, *configv1.OAuthList, *applyconfigurationsconfigv1.OAuthApplyConfiguration] } // newOAuths returns a OAuths func newOAuths(c *ConfigV1Client) *oAuths { return &oAuths{ - gentype.NewClientWithListAndApply[*v1.OAuth, *v1.OAuthList, *configv1.OAuthApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.OAuth, *configv1.OAuthList, *applyconfigurationsconfigv1.OAuthApplyConfiguration]( "oauths", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OAuth { return &v1.OAuth{} }, - func() *v1.OAuthList { return &v1.OAuthList{} }), + func() *configv1.OAuth { return &configv1.OAuth{} }, + func() *configv1.OAuthList { return &configv1.OAuthList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/operatorhub.go b/config/clientset/versioned/typed/config/v1/operatorhub.go index c8a2914861..e3ba1b8abe 100644 --- a/config/clientset/versioned/typed/config/v1/operatorhub.go +++ b/config/clientset/versioned/typed/config/v1/operatorhub.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type OperatorHubsGetter interface { // OperatorHubInterface has methods to work with OperatorHub resources. type OperatorHubInterface interface { - Create(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.CreateOptions) (*v1.OperatorHub, error) - Update(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (*v1.OperatorHub, error) + Create(ctx context.Context, operatorHub *configv1.OperatorHub, opts metav1.CreateOptions) (*configv1.OperatorHub, error) + Update(ctx context.Context, operatorHub *configv1.OperatorHub, opts metav1.UpdateOptions) (*configv1.OperatorHub, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, operatorHub *v1.OperatorHub, opts metav1.UpdateOptions) (*v1.OperatorHub, error) + UpdateStatus(ctx context.Context, operatorHub *configv1.OperatorHub, opts metav1.UpdateOptions) (*configv1.OperatorHub, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OperatorHub, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OperatorHubList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.OperatorHub, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.OperatorHubList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OperatorHub, err error) - Apply(ctx context.Context, operatorHub *configv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OperatorHub, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.OperatorHub, err error) + Apply(ctx context.Context, operatorHub *applyconfigurationsconfigv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OperatorHub, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, operatorHub *configv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OperatorHub, err error) + ApplyStatus(ctx context.Context, operatorHub *applyconfigurationsconfigv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OperatorHub, err error) OperatorHubExpansion } // operatorHubs implements OperatorHubInterface type operatorHubs struct { - *gentype.ClientWithListAndApply[*v1.OperatorHub, *v1.OperatorHubList, *configv1.OperatorHubApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.OperatorHub, *configv1.OperatorHubList, *applyconfigurationsconfigv1.OperatorHubApplyConfiguration] } // newOperatorHubs returns a OperatorHubs func newOperatorHubs(c *ConfigV1Client) *operatorHubs { return &operatorHubs{ - gentype.NewClientWithListAndApply[*v1.OperatorHub, *v1.OperatorHubList, *configv1.OperatorHubApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.OperatorHub, *configv1.OperatorHubList, *applyconfigurationsconfigv1.OperatorHubApplyConfiguration]( "operatorhubs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OperatorHub { return &v1.OperatorHub{} }, - func() *v1.OperatorHubList { return &v1.OperatorHubList{} }), + func() *configv1.OperatorHub { return &configv1.OperatorHub{} }, + func() *configv1.OperatorHubList { return &configv1.OperatorHubList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/project.go b/config/clientset/versioned/typed/config/v1/project.go index 75cd01ec12..5cde353a6a 100644 --- a/config/clientset/versioned/typed/config/v1/project.go +++ b/config/clientset/versioned/typed/config/v1/project.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ProjectsGetter interface { // ProjectInterface has methods to work with Project resources. type ProjectInterface interface { - Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (*v1.Project, error) - Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + Create(ctx context.Context, project *configv1.Project, opts metav1.CreateOptions) (*configv1.Project, error) + Update(ctx context.Context, project *configv1.Project, opts metav1.UpdateOptions) (*configv1.Project, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + UpdateStatus(ctx context.Context, project *configv1.Project, opts metav1.UpdateOptions) (*configv1.Project, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Project, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ProjectList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Project, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ProjectList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) - Apply(ctx context.Context, project *configv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Project, err error) + Apply(ctx context.Context, project *applyconfigurationsconfigv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Project, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, project *configv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) + ApplyStatus(ctx context.Context, project *applyconfigurationsconfigv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Project, err error) ProjectExpansion } // projects implements ProjectInterface type projects struct { - *gentype.ClientWithListAndApply[*v1.Project, *v1.ProjectList, *configv1.ProjectApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Project, *configv1.ProjectList, *applyconfigurationsconfigv1.ProjectApplyConfiguration] } // newProjects returns a Projects func newProjects(c *ConfigV1Client) *projects { return &projects{ - gentype.NewClientWithListAndApply[*v1.Project, *v1.ProjectList, *configv1.ProjectApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Project, *configv1.ProjectList, *applyconfigurationsconfigv1.ProjectApplyConfiguration]( "projects", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Project { return &v1.Project{} }, - func() *v1.ProjectList { return &v1.ProjectList{} }), + func() *configv1.Project { return &configv1.Project{} }, + func() *configv1.ProjectList { return &configv1.ProjectList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/proxy.go b/config/clientset/versioned/typed/config/v1/proxy.go index dfa2b4d197..55374ecfe8 100644 --- a/config/clientset/versioned/typed/config/v1/proxy.go +++ b/config/clientset/versioned/typed/config/v1/proxy.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ProxiesGetter interface { // ProxyInterface has methods to work with Proxy resources. type ProxyInterface interface { - Create(ctx context.Context, proxy *v1.Proxy, opts metav1.CreateOptions) (*v1.Proxy, error) - Update(ctx context.Context, proxy *v1.Proxy, opts metav1.UpdateOptions) (*v1.Proxy, error) + Create(ctx context.Context, proxy *configv1.Proxy, opts metav1.CreateOptions) (*configv1.Proxy, error) + Update(ctx context.Context, proxy *configv1.Proxy, opts metav1.UpdateOptions) (*configv1.Proxy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, proxy *v1.Proxy, opts metav1.UpdateOptions) (*v1.Proxy, error) + UpdateStatus(ctx context.Context, proxy *configv1.Proxy, opts metav1.UpdateOptions) (*configv1.Proxy, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Proxy, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ProxyList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Proxy, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.ProxyList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Proxy, err error) - Apply(ctx context.Context, proxy *configv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Proxy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Proxy, err error) + Apply(ctx context.Context, proxy *applyconfigurationsconfigv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Proxy, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, proxy *configv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Proxy, err error) + ApplyStatus(ctx context.Context, proxy *applyconfigurationsconfigv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Proxy, err error) ProxyExpansion } // proxies implements ProxyInterface type proxies struct { - *gentype.ClientWithListAndApply[*v1.Proxy, *v1.ProxyList, *configv1.ProxyApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Proxy, *configv1.ProxyList, *applyconfigurationsconfigv1.ProxyApplyConfiguration] } // newProxies returns a Proxies func newProxies(c *ConfigV1Client) *proxies { return &proxies{ - gentype.NewClientWithListAndApply[*v1.Proxy, *v1.ProxyList, *configv1.ProxyApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Proxy, *configv1.ProxyList, *applyconfigurationsconfigv1.ProxyApplyConfiguration]( "proxies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Proxy { return &v1.Proxy{} }, - func() *v1.ProxyList { return &v1.ProxyList{} }), + func() *configv1.Proxy { return &configv1.Proxy{} }, + func() *configv1.ProxyList { return &configv1.ProxyList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1/scheduler.go b/config/clientset/versioned/typed/config/v1/scheduler.go index 7d459060ea..3bdc27dbc4 100644 --- a/config/clientset/versioned/typed/config/v1/scheduler.go +++ b/config/clientset/versioned/typed/config/v1/scheduler.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/config/v1" - configv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" + configv1 "github.com/openshift/api/config/v1" + applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type SchedulersGetter interface { // SchedulerInterface has methods to work with Scheduler resources. type SchedulerInterface interface { - Create(ctx context.Context, scheduler *v1.Scheduler, opts metav1.CreateOptions) (*v1.Scheduler, error) - Update(ctx context.Context, scheduler *v1.Scheduler, opts metav1.UpdateOptions) (*v1.Scheduler, error) + Create(ctx context.Context, scheduler *configv1.Scheduler, opts metav1.CreateOptions) (*configv1.Scheduler, error) + Update(ctx context.Context, scheduler *configv1.Scheduler, opts metav1.UpdateOptions) (*configv1.Scheduler, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, scheduler *v1.Scheduler, opts metav1.UpdateOptions) (*v1.Scheduler, error) + UpdateStatus(ctx context.Context, scheduler *configv1.Scheduler, opts metav1.UpdateOptions) (*configv1.Scheduler, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Scheduler, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SchedulerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Scheduler, error) + List(ctx context.Context, opts metav1.ListOptions) (*configv1.SchedulerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Scheduler, err error) - Apply(ctx context.Context, scheduler *configv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Scheduler, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Scheduler, err error) + Apply(ctx context.Context, scheduler *applyconfigurationsconfigv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Scheduler, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, scheduler *configv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Scheduler, err error) + ApplyStatus(ctx context.Context, scheduler *applyconfigurationsconfigv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Scheduler, err error) SchedulerExpansion } // schedulers implements SchedulerInterface type schedulers struct { - *gentype.ClientWithListAndApply[*v1.Scheduler, *v1.SchedulerList, *configv1.SchedulerApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1.Scheduler, *configv1.SchedulerList, *applyconfigurationsconfigv1.SchedulerApplyConfiguration] } // newSchedulers returns a Schedulers func newSchedulers(c *ConfigV1Client) *schedulers { return &schedulers{ - gentype.NewClientWithListAndApply[*v1.Scheduler, *v1.SchedulerList, *configv1.SchedulerApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1.Scheduler, *configv1.SchedulerList, *applyconfigurationsconfigv1.SchedulerApplyConfiguration]( "schedulers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Scheduler { return &v1.Scheduler{} }, - func() *v1.SchedulerList { return &v1.SchedulerList{} }), + func() *configv1.Scheduler { return &configv1.Scheduler{} }, + func() *configv1.SchedulerList { return &configv1.SchedulerList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1alpha1/backup.go b/config/clientset/versioned/typed/config/v1alpha1/backup.go index 40ade83918..89c7b176e0 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/backup.go +++ b/config/clientset/versioned/typed/config/v1alpha1/backup.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type BackupsGetter interface { // BackupInterface has methods to work with Backup resources. type BackupInterface interface { - Create(ctx context.Context, backup *v1alpha1.Backup, opts v1.CreateOptions) (*v1alpha1.Backup, error) - Update(ctx context.Context, backup *v1alpha1.Backup, opts v1.UpdateOptions) (*v1alpha1.Backup, error) + Create(ctx context.Context, backup *configv1alpha1.Backup, opts v1.CreateOptions) (*configv1alpha1.Backup, error) + Update(ctx context.Context, backup *configv1alpha1.Backup, opts v1.UpdateOptions) (*configv1alpha1.Backup, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, backup *v1alpha1.Backup, opts v1.UpdateOptions) (*v1alpha1.Backup, error) + UpdateStatus(ctx context.Context, backup *configv1alpha1.Backup, opts v1.UpdateOptions) (*configv1alpha1.Backup, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Backup, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.BackupList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.Backup, error) + List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.BackupList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Backup, err error) - Apply(ctx context.Context, backup *configv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Backup, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.Backup, err error) + Apply(ctx context.Context, backup *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.Backup, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, backup *configv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Backup, err error) + ApplyStatus(ctx context.Context, backup *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.Backup, err error) BackupExpansion } // backups implements BackupInterface type backups struct { - *gentype.ClientWithListAndApply[*v1alpha1.Backup, *v1alpha1.BackupList, *configv1alpha1.BackupApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1alpha1.Backup, *configv1alpha1.BackupList, *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration] } // newBackups returns a Backups func newBackups(c *ConfigV1alpha1Client) *backups { return &backups{ - gentype.NewClientWithListAndApply[*v1alpha1.Backup, *v1alpha1.BackupList, *configv1alpha1.BackupApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1alpha1.Backup, *configv1alpha1.BackupList, *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration]( "backups", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.Backup { return &v1alpha1.Backup{} }, - func() *v1alpha1.BackupList { return &v1alpha1.BackupList{} }), + func() *configv1alpha1.Backup { return &configv1alpha1.Backup{} }, + func() *configv1alpha1.BackupList { return &configv1alpha1.BackupList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1alpha1/clusterimagepolicy.go b/config/clientset/versioned/typed/config/v1alpha1/clusterimagepolicy.go index 508b3604bf..8391f7b40e 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/clusterimagepolicy.go +++ b/config/clientset/versioned/typed/config/v1alpha1/clusterimagepolicy.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ClusterImagePoliciesGetter interface { // ClusterImagePolicyInterface has methods to work with ClusterImagePolicy resources. type ClusterImagePolicyInterface interface { - Create(ctx context.Context, clusterImagePolicy *v1alpha1.ClusterImagePolicy, opts v1.CreateOptions) (*v1alpha1.ClusterImagePolicy, error) - Update(ctx context.Context, clusterImagePolicy *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ClusterImagePolicy, error) + Create(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicy, opts v1.CreateOptions) (*configv1alpha1.ClusterImagePolicy, error) + Update(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*configv1alpha1.ClusterImagePolicy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterImagePolicy *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ClusterImagePolicy, error) + UpdateStatus(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (*configv1alpha1.ClusterImagePolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ClusterImagePolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterImagePolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.ClusterImagePolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.ClusterImagePolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterImagePolicy, err error) - Apply(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterImagePolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.ClusterImagePolicy, err error) + Apply(ctx context.Context, clusterImagePolicy *applyconfigurationsconfigv1alpha1.ClusterImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.ClusterImagePolicy, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterImagePolicy, err error) + ApplyStatus(ctx context.Context, clusterImagePolicy *applyconfigurationsconfigv1alpha1.ClusterImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.ClusterImagePolicy, err error) ClusterImagePolicyExpansion } // clusterImagePolicies implements ClusterImagePolicyInterface type clusterImagePolicies struct { - *gentype.ClientWithListAndApply[*v1alpha1.ClusterImagePolicy, *v1alpha1.ClusterImagePolicyList, *configv1alpha1.ClusterImagePolicyApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1alpha1.ClusterImagePolicy, *configv1alpha1.ClusterImagePolicyList, *applyconfigurationsconfigv1alpha1.ClusterImagePolicyApplyConfiguration] } // newClusterImagePolicies returns a ClusterImagePolicies func newClusterImagePolicies(c *ConfigV1alpha1Client) *clusterImagePolicies { return &clusterImagePolicies{ - gentype.NewClientWithListAndApply[*v1alpha1.ClusterImagePolicy, *v1alpha1.ClusterImagePolicyList, *configv1alpha1.ClusterImagePolicyApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1alpha1.ClusterImagePolicy, *configv1alpha1.ClusterImagePolicyList, *applyconfigurationsconfigv1alpha1.ClusterImagePolicyApplyConfiguration]( "clusterimagepolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.ClusterImagePolicy { return &v1alpha1.ClusterImagePolicy{} }, - func() *v1alpha1.ClusterImagePolicyList { return &v1alpha1.ClusterImagePolicyList{} }), + func() *configv1alpha1.ClusterImagePolicy { return &configv1alpha1.ClusterImagePolicy{} }, + func() *configv1alpha1.ClusterImagePolicyList { return &configv1alpha1.ClusterImagePolicyList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1alpha1/config_client.go b/config/clientset/versioned/typed/config/v1alpha1/config_client.go index cfbbd848bb..a5af019600 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/config/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/config/v1alpha1" - "github.com/openshift/client-go/config/clientset/versioned/scheme" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -84,10 +84,10 @@ func New(c rest.Interface) *ConfigV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := configv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_backup.go b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_backup.go index 22e83601e2..91db422ac3 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_backup.go +++ b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_backup.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/config/v1alpha1" configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1alpha1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeBackups implements BackupInterface -type FakeBackups struct { +// fakeBackups implements BackupInterface +type fakeBackups struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.Backup, *v1alpha1.BackupList, *configv1alpha1.BackupApplyConfiguration] Fake *FakeConfigV1alpha1 } -var backupsResource = v1alpha1.SchemeGroupVersion.WithResource("backups") - -var backupsKind = v1alpha1.SchemeGroupVersion.WithKind("Backup") - -// Get takes name of the backup, and returns the corresponding backup object, and an error if there is any. -func (c *FakeBackups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Backup, err error) { - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(backupsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Backup), err -} - -// List takes label and field selectors, and returns the list of Backups that match those selectors. -func (c *FakeBackups) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.BackupList, err error) { - emptyResult := &v1alpha1.BackupList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(backupsResource, backupsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.BackupList{ListMeta: obj.(*v1alpha1.BackupList).ListMeta} - for _, item := range obj.(*v1alpha1.BackupList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested backups. -func (c *FakeBackups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(backupsResource, opts)) -} - -// Create takes the representation of a backup and creates it. Returns the server's representation of the backup, and an error, if there is any. -func (c *FakeBackups) Create(ctx context.Context, backup *v1alpha1.Backup, opts v1.CreateOptions) (result *v1alpha1.Backup, err error) { - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(backupsResource, backup, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Backup), err -} - -// Update takes the representation of a backup and updates it. Returns the server's representation of the backup, and an error, if there is any. -func (c *FakeBackups) Update(ctx context.Context, backup *v1alpha1.Backup, opts v1.UpdateOptions) (result *v1alpha1.Backup, err error) { - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(backupsResource, backup, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Backup), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeBackups) UpdateStatus(ctx context.Context, backup *v1alpha1.Backup, opts v1.UpdateOptions) (result *v1alpha1.Backup, err error) { - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(backupsResource, "status", backup, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Backup), err -} - -// Delete takes name of the backup and deletes it. Returns an error if one occurs. -func (c *FakeBackups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(backupsResource, name, opts), &v1alpha1.Backup{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeBackups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(backupsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.BackupList{}) - return err -} - -// Patch applies the patch and returns the patched backup. -func (c *FakeBackups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Backup, err error) { - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(backupsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Backup), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied backup. -func (c *FakeBackups) Apply(ctx context.Context, backup *configv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Backup, err error) { - if backup == nil { - return nil, fmt.Errorf("backup provided to Apply must not be nil") - } - data, err := json.Marshal(backup) - if err != nil { - return nil, err - } - name := backup.Name - if name == nil { - return nil, fmt.Errorf("backup.Name must be provided to Apply") - } - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(backupsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Backup), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeBackups) ApplyStatus(ctx context.Context, backup *configv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.Backup, err error) { - if backup == nil { - return nil, fmt.Errorf("backup provided to Apply must not be nil") - } - data, err := json.Marshal(backup) - if err != nil { - return nil, err - } - name := backup.Name - if name == nil { - return nil, fmt.Errorf("backup.Name must be provided to Apply") - } - emptyResult := &v1alpha1.Backup{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(backupsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeBackups(fake *FakeConfigV1alpha1) typedconfigv1alpha1.BackupInterface { + return &fakeBackups{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.Backup, *v1alpha1.BackupList, *configv1alpha1.BackupApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("backups"), + v1alpha1.SchemeGroupVersion.WithKind("Backup"), + func() *v1alpha1.Backup { return &v1alpha1.Backup{} }, + func() *v1alpha1.BackupList { return &v1alpha1.BackupList{} }, + func(dst, src *v1alpha1.BackupList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.BackupList) []*v1alpha1.Backup { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.BackupList, items []*v1alpha1.Backup) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.Backup), err } diff --git a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_clusterimagepolicy.go b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_clusterimagepolicy.go index 886f25a252..50d94e1a91 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_clusterimagepolicy.go +++ b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_clusterimagepolicy.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/config/v1alpha1" configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1alpha1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterImagePolicies implements ClusterImagePolicyInterface -type FakeClusterImagePolicies struct { +// fakeClusterImagePolicies implements ClusterImagePolicyInterface +type fakeClusterImagePolicies struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.ClusterImagePolicy, *v1alpha1.ClusterImagePolicyList, *configv1alpha1.ClusterImagePolicyApplyConfiguration] Fake *FakeConfigV1alpha1 } -var clusterimagepoliciesResource = v1alpha1.SchemeGroupVersion.WithResource("clusterimagepolicies") - -var clusterimagepoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("ClusterImagePolicy") - -// Get takes name of the clusterImagePolicy, and returns the corresponding clusterImagePolicy object, and an error if there is any. -func (c *FakeClusterImagePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterImagePolicy, err error) { - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusterimagepoliciesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ClusterImagePolicy), err -} - -// List takes label and field selectors, and returns the list of ClusterImagePolicies that match those selectors. -func (c *FakeClusterImagePolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterImagePolicyList, err error) { - emptyResult := &v1alpha1.ClusterImagePolicyList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusterimagepoliciesResource, clusterimagepoliciesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ClusterImagePolicyList{ListMeta: obj.(*v1alpha1.ClusterImagePolicyList).ListMeta} - for _, item := range obj.(*v1alpha1.ClusterImagePolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterImagePolicies. -func (c *FakeClusterImagePolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusterimagepoliciesResource, opts)) -} - -// Create takes the representation of a clusterImagePolicy and creates it. Returns the server's representation of the clusterImagePolicy, and an error, if there is any. -func (c *FakeClusterImagePolicies) Create(ctx context.Context, clusterImagePolicy *v1alpha1.ClusterImagePolicy, opts v1.CreateOptions) (result *v1alpha1.ClusterImagePolicy, err error) { - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusterimagepoliciesResource, clusterImagePolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ClusterImagePolicy), err -} - -// Update takes the representation of a clusterImagePolicy and updates it. Returns the server's representation of the clusterImagePolicy, and an error, if there is any. -func (c *FakeClusterImagePolicies) Update(ctx context.Context, clusterImagePolicy *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (result *v1alpha1.ClusterImagePolicy, err error) { - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusterimagepoliciesResource, clusterImagePolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ClusterImagePolicy), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterImagePolicies) UpdateStatus(ctx context.Context, clusterImagePolicy *v1alpha1.ClusterImagePolicy, opts v1.UpdateOptions) (result *v1alpha1.ClusterImagePolicy, err error) { - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(clusterimagepoliciesResource, "status", clusterImagePolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ClusterImagePolicy), err -} - -// Delete takes name of the clusterImagePolicy and deletes it. Returns an error if one occurs. -func (c *FakeClusterImagePolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusterimagepoliciesResource, name, opts), &v1alpha1.ClusterImagePolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterImagePolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusterimagepoliciesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ClusterImagePolicyList{}) - return err -} - -// Patch applies the patch and returns the patched clusterImagePolicy. -func (c *FakeClusterImagePolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterImagePolicy, err error) { - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterimagepoliciesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ClusterImagePolicy), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterImagePolicy. -func (c *FakeClusterImagePolicies) Apply(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterImagePolicy, err error) { - if clusterImagePolicy == nil { - return nil, fmt.Errorf("clusterImagePolicy provided to Apply must not be nil") - } - data, err := json.Marshal(clusterImagePolicy) - if err != nil { - return nil, err - } - name := clusterImagePolicy.Name - if name == nil { - return nil, fmt.Errorf("clusterImagePolicy.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterimagepoliciesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ClusterImagePolicy), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterImagePolicies) ApplyStatus(ctx context.Context, clusterImagePolicy *configv1alpha1.ClusterImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterImagePolicy, err error) { - if clusterImagePolicy == nil { - return nil, fmt.Errorf("clusterImagePolicy provided to Apply must not be nil") - } - data, err := json.Marshal(clusterImagePolicy) - if err != nil { - return nil, err - } - name := clusterImagePolicy.Name - if name == nil { - return nil, fmt.Errorf("clusterImagePolicy.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ClusterImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterimagepoliciesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterImagePolicies(fake *FakeConfigV1alpha1) typedconfigv1alpha1.ClusterImagePolicyInterface { + return &fakeClusterImagePolicies{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.ClusterImagePolicy, *v1alpha1.ClusterImagePolicyList, *configv1alpha1.ClusterImagePolicyApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("clusterimagepolicies"), + v1alpha1.SchemeGroupVersion.WithKind("ClusterImagePolicy"), + func() *v1alpha1.ClusterImagePolicy { return &v1alpha1.ClusterImagePolicy{} }, + func() *v1alpha1.ClusterImagePolicyList { return &v1alpha1.ClusterImagePolicyList{} }, + func(dst, src *v1alpha1.ClusterImagePolicyList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.ClusterImagePolicyList) []*v1alpha1.ClusterImagePolicy { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.ClusterImagePolicyList, items []*v1alpha1.ClusterImagePolicy) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.ClusterImagePolicy), err } diff --git a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index c720aa837a..927818794a 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -13,19 +13,19 @@ type FakeConfigV1alpha1 struct { } func (c *FakeConfigV1alpha1) Backups() v1alpha1.BackupInterface { - return &FakeBackups{c} + return newFakeBackups(c) } func (c *FakeConfigV1alpha1) ClusterImagePolicies() v1alpha1.ClusterImagePolicyInterface { - return &FakeClusterImagePolicies{c} + return newFakeClusterImagePolicies(c) } func (c *FakeConfigV1alpha1) ImagePolicies(namespace string) v1alpha1.ImagePolicyInterface { - return &FakeImagePolicies{c, namespace} + return newFakeImagePolicies(c, namespace) } func (c *FakeConfigV1alpha1) InsightsDataGathers() v1alpha1.InsightsDataGatherInterface { - return &FakeInsightsDataGathers{c} + return newFakeInsightsDataGathers(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_imagepolicy.go b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_imagepolicy.go index c7bf7d9e12..9bf6cb9c04 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_imagepolicy.go +++ b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_imagepolicy.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/config/v1alpha1" configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1alpha1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeImagePolicies implements ImagePolicyInterface -type FakeImagePolicies struct { +// fakeImagePolicies implements ImagePolicyInterface +type fakeImagePolicies struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.ImagePolicy, *v1alpha1.ImagePolicyList, *configv1alpha1.ImagePolicyApplyConfiguration] Fake *FakeConfigV1alpha1 - ns string -} - -var imagepoliciesResource = v1alpha1.SchemeGroupVersion.WithResource("imagepolicies") - -var imagepoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("ImagePolicy") - -// Get takes name of the imagePolicy, and returns the corresponding imagePolicy object, and an error if there is any. -func (c *FakeImagePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImagePolicy, err error) { - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(imagepoliciesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImagePolicy), err -} - -// List takes label and field selectors, and returns the list of ImagePolicies that match those selectors. -func (c *FakeImagePolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ImagePolicyList, err error) { - emptyResult := &v1alpha1.ImagePolicyList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(imagepoliciesResource, imagepoliciesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ImagePolicyList{ListMeta: obj.(*v1alpha1.ImagePolicyList).ListMeta} - for _, item := range obj.(*v1alpha1.ImagePolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imagePolicies. -func (c *FakeImagePolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(imagepoliciesResource, c.ns, opts)) - -} - -// Create takes the representation of a imagePolicy and creates it. Returns the server's representation of the imagePolicy, and an error, if there is any. -func (c *FakeImagePolicies) Create(ctx context.Context, imagePolicy *v1alpha1.ImagePolicy, opts v1.CreateOptions) (result *v1alpha1.ImagePolicy, err error) { - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(imagepoliciesResource, c.ns, imagePolicy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImagePolicy), err -} - -// Update takes the representation of a imagePolicy and updates it. Returns the server's representation of the imagePolicy, and an error, if there is any. -func (c *FakeImagePolicies) Update(ctx context.Context, imagePolicy *v1alpha1.ImagePolicy, opts v1.UpdateOptions) (result *v1alpha1.ImagePolicy, err error) { - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(imagepoliciesResource, c.ns, imagePolicy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImagePolicy), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeImagePolicies) UpdateStatus(ctx context.Context, imagePolicy *v1alpha1.ImagePolicy, opts v1.UpdateOptions) (result *v1alpha1.ImagePolicy, err error) { - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(imagepoliciesResource, "status", c.ns, imagePolicy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImagePolicy), err -} - -// Delete takes name of the imagePolicy and deletes it. Returns an error if one occurs. -func (c *FakeImagePolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(imagepoliciesResource, c.ns, name, opts), &v1alpha1.ImagePolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImagePolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(imagepoliciesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ImagePolicyList{}) - return err -} - -// Patch applies the patch and returns the patched imagePolicy. -func (c *FakeImagePolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImagePolicy, err error) { - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagepoliciesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImagePolicy), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imagePolicy. -func (c *FakeImagePolicies) Apply(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ImagePolicy, err error) { - if imagePolicy == nil { - return nil, fmt.Errorf("imagePolicy provided to Apply must not be nil") - } - data, err := json.Marshal(imagePolicy) - if err != nil { - return nil, err - } - name := imagePolicy.Name - if name == nil { - return nil, fmt.Errorf("imagePolicy.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagepoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImagePolicy), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeImagePolicies) ApplyStatus(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ImagePolicy, err error) { - if imagePolicy == nil { - return nil, fmt.Errorf("imagePolicy provided to Apply must not be nil") - } - data, err := json.Marshal(imagePolicy) - if err != nil { - return nil, err - } - name := imagePolicy.Name - if name == nil { - return nil, fmt.Errorf("imagePolicy.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ImagePolicy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagepoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImagePolicies(fake *FakeConfigV1alpha1, namespace string) typedconfigv1alpha1.ImagePolicyInterface { + return &fakeImagePolicies{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.ImagePolicy, *v1alpha1.ImagePolicyList, *configv1alpha1.ImagePolicyApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("imagepolicies"), + v1alpha1.SchemeGroupVersion.WithKind("ImagePolicy"), + func() *v1alpha1.ImagePolicy { return &v1alpha1.ImagePolicy{} }, + func() *v1alpha1.ImagePolicyList { return &v1alpha1.ImagePolicyList{} }, + func(dst, src *v1alpha1.ImagePolicyList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.ImagePolicyList) []*v1alpha1.ImagePolicy { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.ImagePolicyList, items []*v1alpha1.ImagePolicy) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.ImagePolicy), err } diff --git a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_insightsdatagather.go b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_insightsdatagather.go index d3405fbce8..fc68d168e5 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/fake/fake_insightsdatagather.go +++ b/config/clientset/versioned/typed/config/v1alpha1/fake/fake_insightsdatagather.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/config/v1alpha1" configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconfigv1alpha1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeInsightsDataGathers implements InsightsDataGatherInterface -type FakeInsightsDataGathers struct { +// fakeInsightsDataGathers implements InsightsDataGatherInterface +type fakeInsightsDataGathers struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.InsightsDataGather, *v1alpha1.InsightsDataGatherList, *configv1alpha1.InsightsDataGatherApplyConfiguration] Fake *FakeConfigV1alpha1 } -var insightsdatagathersResource = v1alpha1.SchemeGroupVersion.WithResource("insightsdatagathers") - -var insightsdatagathersKind = v1alpha1.SchemeGroupVersion.WithKind("InsightsDataGather") - -// Get takes name of the insightsDataGather, and returns the corresponding insightsDataGather object, and an error if there is any. -func (c *FakeInsightsDataGathers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.InsightsDataGather, err error) { - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(insightsdatagathersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.InsightsDataGather), err -} - -// List takes label and field selectors, and returns the list of InsightsDataGathers that match those selectors. -func (c *FakeInsightsDataGathers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.InsightsDataGatherList, err error) { - emptyResult := &v1alpha1.InsightsDataGatherList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(insightsdatagathersResource, insightsdatagathersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.InsightsDataGatherList{ListMeta: obj.(*v1alpha1.InsightsDataGatherList).ListMeta} - for _, item := range obj.(*v1alpha1.InsightsDataGatherList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested insightsDataGathers. -func (c *FakeInsightsDataGathers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(insightsdatagathersResource, opts)) -} - -// Create takes the representation of a insightsDataGather and creates it. Returns the server's representation of the insightsDataGather, and an error, if there is any. -func (c *FakeInsightsDataGathers) Create(ctx context.Context, insightsDataGather *v1alpha1.InsightsDataGather, opts v1.CreateOptions) (result *v1alpha1.InsightsDataGather, err error) { - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(insightsdatagathersResource, insightsDataGather, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.InsightsDataGather), err -} - -// Update takes the representation of a insightsDataGather and updates it. Returns the server's representation of the insightsDataGather, and an error, if there is any. -func (c *FakeInsightsDataGathers) Update(ctx context.Context, insightsDataGather *v1alpha1.InsightsDataGather, opts v1.UpdateOptions) (result *v1alpha1.InsightsDataGather, err error) { - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(insightsdatagathersResource, insightsDataGather, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.InsightsDataGather), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInsightsDataGathers) UpdateStatus(ctx context.Context, insightsDataGather *v1alpha1.InsightsDataGather, opts v1.UpdateOptions) (result *v1alpha1.InsightsDataGather, err error) { - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(insightsdatagathersResource, "status", insightsDataGather, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.InsightsDataGather), err -} - -// Delete takes name of the insightsDataGather and deletes it. Returns an error if one occurs. -func (c *FakeInsightsDataGathers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(insightsdatagathersResource, name, opts), &v1alpha1.InsightsDataGather{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeInsightsDataGathers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(insightsdatagathersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.InsightsDataGatherList{}) - return err -} - -// Patch applies the patch and returns the patched insightsDataGather. -func (c *FakeInsightsDataGathers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.InsightsDataGather, err error) { - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(insightsdatagathersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.InsightsDataGather), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied insightsDataGather. -func (c *FakeInsightsDataGathers) Apply(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.InsightsDataGather, err error) { - if insightsDataGather == nil { - return nil, fmt.Errorf("insightsDataGather provided to Apply must not be nil") - } - data, err := json.Marshal(insightsDataGather) - if err != nil { - return nil, err - } - name := insightsDataGather.Name - if name == nil { - return nil, fmt.Errorf("insightsDataGather.Name must be provided to Apply") - } - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(insightsdatagathersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.InsightsDataGather), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeInsightsDataGathers) ApplyStatus(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.InsightsDataGather, err error) { - if insightsDataGather == nil { - return nil, fmt.Errorf("insightsDataGather provided to Apply must not be nil") - } - data, err := json.Marshal(insightsDataGather) - if err != nil { - return nil, err - } - name := insightsDataGather.Name - if name == nil { - return nil, fmt.Errorf("insightsDataGather.Name must be provided to Apply") - } - emptyResult := &v1alpha1.InsightsDataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(insightsdatagathersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeInsightsDataGathers(fake *FakeConfigV1alpha1) typedconfigv1alpha1.InsightsDataGatherInterface { + return &fakeInsightsDataGathers{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.InsightsDataGather, *v1alpha1.InsightsDataGatherList, *configv1alpha1.InsightsDataGatherApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("insightsdatagathers"), + v1alpha1.SchemeGroupVersion.WithKind("InsightsDataGather"), + func() *v1alpha1.InsightsDataGather { return &v1alpha1.InsightsDataGather{} }, + func() *v1alpha1.InsightsDataGatherList { return &v1alpha1.InsightsDataGatherList{} }, + func(dst, src *v1alpha1.InsightsDataGatherList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.InsightsDataGatherList) []*v1alpha1.InsightsDataGather { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.InsightsDataGatherList, items []*v1alpha1.InsightsDataGather) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.InsightsDataGather), err } diff --git a/config/clientset/versioned/typed/config/v1alpha1/imagepolicy.go b/config/clientset/versioned/typed/config/v1alpha1/imagepolicy.go index 02caded7ae..a893efeea7 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/imagepolicy.go +++ b/config/clientset/versioned/typed/config/v1alpha1/imagepolicy.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ImagePoliciesGetter interface { // ImagePolicyInterface has methods to work with ImagePolicy resources. type ImagePolicyInterface interface { - Create(ctx context.Context, imagePolicy *v1alpha1.ImagePolicy, opts v1.CreateOptions) (*v1alpha1.ImagePolicy, error) - Update(ctx context.Context, imagePolicy *v1alpha1.ImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ImagePolicy, error) + Create(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicy, opts v1.CreateOptions) (*configv1alpha1.ImagePolicy, error) + Update(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicy, opts v1.UpdateOptions) (*configv1alpha1.ImagePolicy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imagePolicy *v1alpha1.ImagePolicy, opts v1.UpdateOptions) (*v1alpha1.ImagePolicy, error) + UpdateStatus(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicy, opts v1.UpdateOptions) (*configv1alpha1.ImagePolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ImagePolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ImagePolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.ImagePolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.ImagePolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImagePolicy, err error) - Apply(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ImagePolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.ImagePolicy, err error) + Apply(ctx context.Context, imagePolicy *applyconfigurationsconfigv1alpha1.ImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.ImagePolicy, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imagePolicy *configv1alpha1.ImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ImagePolicy, err error) + ApplyStatus(ctx context.Context, imagePolicy *applyconfigurationsconfigv1alpha1.ImagePolicyApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.ImagePolicy, err error) ImagePolicyExpansion } // imagePolicies implements ImagePolicyInterface type imagePolicies struct { - *gentype.ClientWithListAndApply[*v1alpha1.ImagePolicy, *v1alpha1.ImagePolicyList, *configv1alpha1.ImagePolicyApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1alpha1.ImagePolicy, *configv1alpha1.ImagePolicyList, *applyconfigurationsconfigv1alpha1.ImagePolicyApplyConfiguration] } // newImagePolicies returns a ImagePolicies func newImagePolicies(c *ConfigV1alpha1Client, namespace string) *imagePolicies { return &imagePolicies{ - gentype.NewClientWithListAndApply[*v1alpha1.ImagePolicy, *v1alpha1.ImagePolicyList, *configv1alpha1.ImagePolicyApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1alpha1.ImagePolicy, *configv1alpha1.ImagePolicyList, *applyconfigurationsconfigv1alpha1.ImagePolicyApplyConfiguration]( "imagepolicies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.ImagePolicy { return &v1alpha1.ImagePolicy{} }, - func() *v1alpha1.ImagePolicyList { return &v1alpha1.ImagePolicyList{} }), + func() *configv1alpha1.ImagePolicy { return &configv1alpha1.ImagePolicy{} }, + func() *configv1alpha1.ImagePolicyList { return &configv1alpha1.ImagePolicyList{} }, + ), } } diff --git a/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go b/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go index 8f147bae11..cff76db8de 100644 --- a/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go +++ b/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type InsightsDataGathersGetter interface { // InsightsDataGatherInterface has methods to work with InsightsDataGather resources. type InsightsDataGatherInterface interface { - Create(ctx context.Context, insightsDataGather *v1alpha1.InsightsDataGather, opts v1.CreateOptions) (*v1alpha1.InsightsDataGather, error) - Update(ctx context.Context, insightsDataGather *v1alpha1.InsightsDataGather, opts v1.UpdateOptions) (*v1alpha1.InsightsDataGather, error) + Create(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGather, opts v1.CreateOptions) (*configv1alpha1.InsightsDataGather, error) + Update(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGather, opts v1.UpdateOptions) (*configv1alpha1.InsightsDataGather, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, insightsDataGather *v1alpha1.InsightsDataGather, opts v1.UpdateOptions) (*v1alpha1.InsightsDataGather, error) + UpdateStatus(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGather, opts v1.UpdateOptions) (*configv1alpha1.InsightsDataGather, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.InsightsDataGather, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.InsightsDataGatherList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.InsightsDataGather, error) + List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.InsightsDataGatherList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.InsightsDataGather, err error) - Apply(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.InsightsDataGather, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.InsightsDataGather, err error) + Apply(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.InsightsDataGather, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.InsightsDataGather, err error) + ApplyStatus(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.InsightsDataGather, err error) InsightsDataGatherExpansion } // insightsDataGathers implements InsightsDataGatherInterface type insightsDataGathers struct { - *gentype.ClientWithListAndApply[*v1alpha1.InsightsDataGather, *v1alpha1.InsightsDataGatherList, *configv1alpha1.InsightsDataGatherApplyConfiguration] + *gentype.ClientWithListAndApply[*configv1alpha1.InsightsDataGather, *configv1alpha1.InsightsDataGatherList, *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration] } // newInsightsDataGathers returns a InsightsDataGathers func newInsightsDataGathers(c *ConfigV1alpha1Client) *insightsDataGathers { return &insightsDataGathers{ - gentype.NewClientWithListAndApply[*v1alpha1.InsightsDataGather, *v1alpha1.InsightsDataGatherList, *configv1alpha1.InsightsDataGatherApplyConfiguration]( + gentype.NewClientWithListAndApply[*configv1alpha1.InsightsDataGather, *configv1alpha1.InsightsDataGatherList, *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration]( "insightsdatagathers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.InsightsDataGather { return &v1alpha1.InsightsDataGather{} }, - func() *v1alpha1.InsightsDataGatherList { return &v1alpha1.InsightsDataGatherList{} }), + func() *configv1alpha1.InsightsDataGather { return &configv1alpha1.InsightsDataGather{} }, + func() *configv1alpha1.InsightsDataGatherList { return &configv1alpha1.InsightsDataGatherList{} }, + ), } } diff --git a/config/informers/externalversions/config/v1/apiserver.go b/config/informers/externalversions/config/v1/apiserver.go index 2fcff23129..262aa7b0a2 100644 --- a/config/informers/externalversions/config/v1/apiserver.go +++ b/config/informers/externalversions/config/v1/apiserver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // APIServers. type APIServerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.APIServerLister + Lister() configv1.APIServerLister } type aPIServerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredAPIServerInformer(client versioned.Interface, resyncPeriod time. return client.ConfigV1().APIServers().Watch(context.TODO(), options) }, }, - &configv1.APIServer{}, + &apiconfigv1.APIServer{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *aPIServerInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *aPIServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.APIServer{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.APIServer{}, f.defaultInformer) } -func (f *aPIServerInformer) Lister() v1.APIServerLister { - return v1.NewAPIServerLister(f.Informer().GetIndexer()) +func (f *aPIServerInformer) Lister() configv1.APIServerLister { + return configv1.NewAPIServerLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/authentication.go b/config/informers/externalversions/config/v1/authentication.go index c2792cf8ff..efe2c253e9 100644 --- a/config/informers/externalversions/config/v1/authentication.go +++ b/config/informers/externalversions/config/v1/authentication.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Authentications. type AuthenticationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.AuthenticationLister + Lister() configv1.AuthenticationLister } type authenticationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredAuthenticationInformer(client versioned.Interface, resyncPeriod return client.ConfigV1().Authentications().Watch(context.TODO(), options) }, }, - &configv1.Authentication{}, + &apiconfigv1.Authentication{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *authenticationInformer) defaultInformer(client versioned.Interface, res } func (f *authenticationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Authentication{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Authentication{}, f.defaultInformer) } -func (f *authenticationInformer) Lister() v1.AuthenticationLister { - return v1.NewAuthenticationLister(f.Informer().GetIndexer()) +func (f *authenticationInformer) Lister() configv1.AuthenticationLister { + return configv1.NewAuthenticationLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/build.go b/config/informers/externalversions/config/v1/build.go index c944db0652..451ba252da 100644 --- a/config/informers/externalversions/config/v1/build.go +++ b/config/informers/externalversions/config/v1/build.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Builds. type BuildInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.BuildLister + Lister() configv1.BuildLister } type buildInformer struct { @@ -54,7 +54,7 @@ func NewFilteredBuildInformer(client versioned.Interface, resyncPeriod time.Dura return client.ConfigV1().Builds().Watch(context.TODO(), options) }, }, - &configv1.Build{}, + &apiconfigv1.Build{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *buildInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *buildInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Build{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Build{}, f.defaultInformer) } -func (f *buildInformer) Lister() v1.BuildLister { - return v1.NewBuildLister(f.Informer().GetIndexer()) +func (f *buildInformer) Lister() configv1.BuildLister { + return configv1.NewBuildLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/clusteroperator.go b/config/informers/externalversions/config/v1/clusteroperator.go index 4c81309fb7..1eda53c8b9 100644 --- a/config/informers/externalversions/config/v1/clusteroperator.go +++ b/config/informers/externalversions/config/v1/clusteroperator.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterOperators. type ClusterOperatorInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterOperatorLister + Lister() configv1.ClusterOperatorLister } type clusterOperatorInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterOperatorInformer(client versioned.Interface, resyncPeriod return client.ConfigV1().ClusterOperators().Watch(context.TODO(), options) }, }, - &configv1.ClusterOperator{}, + &apiconfigv1.ClusterOperator{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterOperatorInformer) defaultInformer(client versioned.Interface, re } func (f *clusterOperatorInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.ClusterOperator{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.ClusterOperator{}, f.defaultInformer) } -func (f *clusterOperatorInformer) Lister() v1.ClusterOperatorLister { - return v1.NewClusterOperatorLister(f.Informer().GetIndexer()) +func (f *clusterOperatorInformer) Lister() configv1.ClusterOperatorLister { + return configv1.NewClusterOperatorLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/clusterversion.go b/config/informers/externalversions/config/v1/clusterversion.go index 8015d6eed7..c3915175ea 100644 --- a/config/informers/externalversions/config/v1/clusterversion.go +++ b/config/informers/externalversions/config/v1/clusterversion.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterVersions. type ClusterVersionInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterVersionLister + Lister() configv1.ClusterVersionLister } type clusterVersionInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterVersionInformer(client versioned.Interface, resyncPeriod return client.ConfigV1().ClusterVersions().Watch(context.TODO(), options) }, }, - &configv1.ClusterVersion{}, + &apiconfigv1.ClusterVersion{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterVersionInformer) defaultInformer(client versioned.Interface, res } func (f *clusterVersionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.ClusterVersion{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.ClusterVersion{}, f.defaultInformer) } -func (f *clusterVersionInformer) Lister() v1.ClusterVersionLister { - return v1.NewClusterVersionLister(f.Informer().GetIndexer()) +func (f *clusterVersionInformer) Lister() configv1.ClusterVersionLister { + return configv1.NewClusterVersionLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/console.go b/config/informers/externalversions/config/v1/console.go index 7d23130a44..05a36ec0a1 100644 --- a/config/informers/externalversions/config/v1/console.go +++ b/config/informers/externalversions/config/v1/console.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Consoles. type ConsoleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleLister + Lister() configv1.ConsoleLister } type consoleInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleInformer(client versioned.Interface, resyncPeriod time.Du return client.ConfigV1().Consoles().Watch(context.TODO(), options) }, }, - &configv1.Console{}, + &apiconfigv1.Console{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *consoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Console{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Console{}, f.defaultInformer) } -func (f *consoleInformer) Lister() v1.ConsoleLister { - return v1.NewConsoleLister(f.Informer().GetIndexer()) +func (f *consoleInformer) Lister() configv1.ConsoleLister { + return configv1.NewConsoleLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/dns.go b/config/informers/externalversions/config/v1/dns.go index ddadf98cb8..af44dfce98 100644 --- a/config/informers/externalversions/config/v1/dns.go +++ b/config/informers/externalversions/config/v1/dns.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DNSes. type DNSInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.DNSLister + Lister() configv1.DNSLister } type dNSInformer struct { @@ -54,7 +54,7 @@ func NewFilteredDNSInformer(client versioned.Interface, resyncPeriod time.Durati return client.ConfigV1().DNSes().Watch(context.TODO(), options) }, }, - &configv1.DNS{}, + &apiconfigv1.DNS{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *dNSInformer) defaultInformer(client versioned.Interface, resyncPeriod t } func (f *dNSInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.DNS{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.DNS{}, f.defaultInformer) } -func (f *dNSInformer) Lister() v1.DNSLister { - return v1.NewDNSLister(f.Informer().GetIndexer()) +func (f *dNSInformer) Lister() configv1.DNSLister { + return configv1.NewDNSLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/featuregate.go b/config/informers/externalversions/config/v1/featuregate.go index 84cec90afa..dc1e205070 100644 --- a/config/informers/externalversions/config/v1/featuregate.go +++ b/config/informers/externalversions/config/v1/featuregate.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // FeatureGates. type FeatureGateInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.FeatureGateLister + Lister() configv1.FeatureGateLister } type featureGateInformer struct { @@ -54,7 +54,7 @@ func NewFilteredFeatureGateInformer(client versioned.Interface, resyncPeriod tim return client.ConfigV1().FeatureGates().Watch(context.TODO(), options) }, }, - &configv1.FeatureGate{}, + &apiconfigv1.FeatureGate{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *featureGateInformer) defaultInformer(client versioned.Interface, resync } func (f *featureGateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.FeatureGate{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.FeatureGate{}, f.defaultInformer) } -func (f *featureGateInformer) Lister() v1.FeatureGateLister { - return v1.NewFeatureGateLister(f.Informer().GetIndexer()) +func (f *featureGateInformer) Lister() configv1.FeatureGateLister { + return configv1.NewFeatureGateLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/image.go b/config/informers/externalversions/config/v1/image.go index e7a3ecc210..5f68a35ec6 100644 --- a/config/informers/externalversions/config/v1/image.go +++ b/config/informers/externalversions/config/v1/image.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Images. type ImageInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImageLister + Lister() configv1.ImageLister } type imageInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImageInformer(client versioned.Interface, resyncPeriod time.Dura return client.ConfigV1().Images().Watch(context.TODO(), options) }, }, - &configv1.Image{}, + &apiconfigv1.Image{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imageInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *imageInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Image{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Image{}, f.defaultInformer) } -func (f *imageInformer) Lister() v1.ImageLister { - return v1.NewImageLister(f.Informer().GetIndexer()) +func (f *imageInformer) Lister() configv1.ImageLister { + return configv1.NewImageLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/imagecontentpolicy.go b/config/informers/externalversions/config/v1/imagecontentpolicy.go index c50ea7b1b2..e062099ea2 100644 --- a/config/informers/externalversions/config/v1/imagecontentpolicy.go +++ b/config/informers/externalversions/config/v1/imagecontentpolicy.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImageContentPolicies. type ImageContentPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImageContentPolicyLister + Lister() configv1.ImageContentPolicyLister } type imageContentPolicyInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImageContentPolicyInformer(client versioned.Interface, resyncPer return client.ConfigV1().ImageContentPolicies().Watch(context.TODO(), options) }, }, - &configv1.ImageContentPolicy{}, + &apiconfigv1.ImageContentPolicy{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imageContentPolicyInformer) defaultInformer(client versioned.Interface, } func (f *imageContentPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.ImageContentPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.ImageContentPolicy{}, f.defaultInformer) } -func (f *imageContentPolicyInformer) Lister() v1.ImageContentPolicyLister { - return v1.NewImageContentPolicyLister(f.Informer().GetIndexer()) +func (f *imageContentPolicyInformer) Lister() configv1.ImageContentPolicyLister { + return configv1.NewImageContentPolicyLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/imagedigestmirrorset.go b/config/informers/externalversions/config/v1/imagedigestmirrorset.go index 8953cfd890..0bdadff5b5 100644 --- a/config/informers/externalversions/config/v1/imagedigestmirrorset.go +++ b/config/informers/externalversions/config/v1/imagedigestmirrorset.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImageDigestMirrorSets. type ImageDigestMirrorSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImageDigestMirrorSetLister + Lister() configv1.ImageDigestMirrorSetLister } type imageDigestMirrorSetInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImageDigestMirrorSetInformer(client versioned.Interface, resyncP return client.ConfigV1().ImageDigestMirrorSets().Watch(context.TODO(), options) }, }, - &configv1.ImageDigestMirrorSet{}, + &apiconfigv1.ImageDigestMirrorSet{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imageDigestMirrorSetInformer) defaultInformer(client versioned.Interfac } func (f *imageDigestMirrorSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.ImageDigestMirrorSet{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.ImageDigestMirrorSet{}, f.defaultInformer) } -func (f *imageDigestMirrorSetInformer) Lister() v1.ImageDigestMirrorSetLister { - return v1.NewImageDigestMirrorSetLister(f.Informer().GetIndexer()) +func (f *imageDigestMirrorSetInformer) Lister() configv1.ImageDigestMirrorSetLister { + return configv1.NewImageDigestMirrorSetLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/imagetagmirrorset.go b/config/informers/externalversions/config/v1/imagetagmirrorset.go index a0951a190f..92bf24f201 100644 --- a/config/informers/externalversions/config/v1/imagetagmirrorset.go +++ b/config/informers/externalversions/config/v1/imagetagmirrorset.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImageTagMirrorSets. type ImageTagMirrorSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImageTagMirrorSetLister + Lister() configv1.ImageTagMirrorSetLister } type imageTagMirrorSetInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImageTagMirrorSetInformer(client versioned.Interface, resyncPeri return client.ConfigV1().ImageTagMirrorSets().Watch(context.TODO(), options) }, }, - &configv1.ImageTagMirrorSet{}, + &apiconfigv1.ImageTagMirrorSet{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imageTagMirrorSetInformer) defaultInformer(client versioned.Interface, } func (f *imageTagMirrorSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.ImageTagMirrorSet{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.ImageTagMirrorSet{}, f.defaultInformer) } -func (f *imageTagMirrorSetInformer) Lister() v1.ImageTagMirrorSetLister { - return v1.NewImageTagMirrorSetLister(f.Informer().GetIndexer()) +func (f *imageTagMirrorSetInformer) Lister() configv1.ImageTagMirrorSetLister { + return configv1.NewImageTagMirrorSetLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/infrastructure.go b/config/informers/externalversions/config/v1/infrastructure.go index 150ee6fe85..4891bd2497 100644 --- a/config/informers/externalversions/config/v1/infrastructure.go +++ b/config/informers/externalversions/config/v1/infrastructure.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Infrastructures. type InfrastructureInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.InfrastructureLister + Lister() configv1.InfrastructureLister } type infrastructureInformer struct { @@ -54,7 +54,7 @@ func NewFilteredInfrastructureInformer(client versioned.Interface, resyncPeriod return client.ConfigV1().Infrastructures().Watch(context.TODO(), options) }, }, - &configv1.Infrastructure{}, + &apiconfigv1.Infrastructure{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *infrastructureInformer) defaultInformer(client versioned.Interface, res } func (f *infrastructureInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Infrastructure{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Infrastructure{}, f.defaultInformer) } -func (f *infrastructureInformer) Lister() v1.InfrastructureLister { - return v1.NewInfrastructureLister(f.Informer().GetIndexer()) +func (f *infrastructureInformer) Lister() configv1.InfrastructureLister { + return configv1.NewInfrastructureLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/ingress.go b/config/informers/externalversions/config/v1/ingress.go index 4452b1022f..59ca11638b 100644 --- a/config/informers/externalversions/config/v1/ingress.go +++ b/config/informers/externalversions/config/v1/ingress.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Ingresses. type IngressInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.IngressLister + Lister() configv1.IngressLister } type ingressInformer struct { @@ -54,7 +54,7 @@ func NewFilteredIngressInformer(client versioned.Interface, resyncPeriod time.Du return client.ConfigV1().Ingresses().Watch(context.TODO(), options) }, }, - &configv1.Ingress{}, + &apiconfigv1.Ingress{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *ingressInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *ingressInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Ingress{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Ingress{}, f.defaultInformer) } -func (f *ingressInformer) Lister() v1.IngressLister { - return v1.NewIngressLister(f.Informer().GetIndexer()) +func (f *ingressInformer) Lister() configv1.IngressLister { + return configv1.NewIngressLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/network.go b/config/informers/externalversions/config/v1/network.go index d05980759a..48e4896def 100644 --- a/config/informers/externalversions/config/v1/network.go +++ b/config/informers/externalversions/config/v1/network.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Networks. type NetworkInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NetworkLister + Lister() configv1.NetworkLister } type networkInformer struct { @@ -54,7 +54,7 @@ func NewFilteredNetworkInformer(client versioned.Interface, resyncPeriod time.Du return client.ConfigV1().Networks().Watch(context.TODO(), options) }, }, - &configv1.Network{}, + &apiconfigv1.Network{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *networkInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *networkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Network{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Network{}, f.defaultInformer) } -func (f *networkInformer) Lister() v1.NetworkLister { - return v1.NewNetworkLister(f.Informer().GetIndexer()) +func (f *networkInformer) Lister() configv1.NetworkLister { + return configv1.NewNetworkLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/node.go b/config/informers/externalversions/config/v1/node.go index 6a9f806dff..2cb791b00c 100644 --- a/config/informers/externalversions/config/v1/node.go +++ b/config/informers/externalversions/config/v1/node.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Nodes. type NodeInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NodeLister + Lister() configv1.NodeLister } type nodeInformer struct { @@ -54,7 +54,7 @@ func NewFilteredNodeInformer(client versioned.Interface, resyncPeriod time.Durat return client.ConfigV1().Nodes().Watch(context.TODO(), options) }, }, - &configv1.Node{}, + &apiconfigv1.Node{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *nodeInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *nodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Node{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Node{}, f.defaultInformer) } -func (f *nodeInformer) Lister() v1.NodeLister { - return v1.NewNodeLister(f.Informer().GetIndexer()) +func (f *nodeInformer) Lister() configv1.NodeLister { + return configv1.NewNodeLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/oauth.go b/config/informers/externalversions/config/v1/oauth.go index 31b37b7933..75128769f3 100644 --- a/config/informers/externalversions/config/v1/oauth.go +++ b/config/informers/externalversions/config/v1/oauth.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OAuths. type OAuthInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OAuthLister + Lister() configv1.OAuthLister } type oAuthInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOAuthInformer(client versioned.Interface, resyncPeriod time.Dura return client.ConfigV1().OAuths().Watch(context.TODO(), options) }, }, - &configv1.OAuth{}, + &apiconfigv1.OAuth{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oAuthInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *oAuthInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.OAuth{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.OAuth{}, f.defaultInformer) } -func (f *oAuthInformer) Lister() v1.OAuthLister { - return v1.NewOAuthLister(f.Informer().GetIndexer()) +func (f *oAuthInformer) Lister() configv1.OAuthLister { + return configv1.NewOAuthLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/operatorhub.go b/config/informers/externalversions/config/v1/operatorhub.go index a2c8757fce..d2196b2255 100644 --- a/config/informers/externalversions/config/v1/operatorhub.go +++ b/config/informers/externalversions/config/v1/operatorhub.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OperatorHubs. type OperatorHubInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OperatorHubLister + Lister() configv1.OperatorHubLister } type operatorHubInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOperatorHubInformer(client versioned.Interface, resyncPeriod tim return client.ConfigV1().OperatorHubs().Watch(context.TODO(), options) }, }, - &configv1.OperatorHub{}, + &apiconfigv1.OperatorHub{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *operatorHubInformer) defaultInformer(client versioned.Interface, resync } func (f *operatorHubInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.OperatorHub{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.OperatorHub{}, f.defaultInformer) } -func (f *operatorHubInformer) Lister() v1.OperatorHubLister { - return v1.NewOperatorHubLister(f.Informer().GetIndexer()) +func (f *operatorHubInformer) Lister() configv1.OperatorHubLister { + return configv1.NewOperatorHubLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/project.go b/config/informers/externalversions/config/v1/project.go index c9f5af1ece..0c5604e1e4 100644 --- a/config/informers/externalversions/config/v1/project.go +++ b/config/informers/externalversions/config/v1/project.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Projects. type ProjectInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ProjectLister + Lister() configv1.ProjectLister } type projectInformer struct { @@ -54,7 +54,7 @@ func NewFilteredProjectInformer(client versioned.Interface, resyncPeriod time.Du return client.ConfigV1().Projects().Watch(context.TODO(), options) }, }, - &configv1.Project{}, + &apiconfigv1.Project{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *projectInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *projectInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Project{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Project{}, f.defaultInformer) } -func (f *projectInformer) Lister() v1.ProjectLister { - return v1.NewProjectLister(f.Informer().GetIndexer()) +func (f *projectInformer) Lister() configv1.ProjectLister { + return configv1.NewProjectLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/proxy.go b/config/informers/externalversions/config/v1/proxy.go index cfbcd029e4..aa1c2c551b 100644 --- a/config/informers/externalversions/config/v1/proxy.go +++ b/config/informers/externalversions/config/v1/proxy.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Proxies. type ProxyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ProxyLister + Lister() configv1.ProxyLister } type proxyInformer struct { @@ -54,7 +54,7 @@ func NewFilteredProxyInformer(client versioned.Interface, resyncPeriod time.Dura return client.ConfigV1().Proxies().Watch(context.TODO(), options) }, }, - &configv1.Proxy{}, + &apiconfigv1.Proxy{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *proxyInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *proxyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Proxy{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Proxy{}, f.defaultInformer) } -func (f *proxyInformer) Lister() v1.ProxyLister { - return v1.NewProxyLister(f.Informer().GetIndexer()) +func (f *proxyInformer) Lister() configv1.ProxyLister { + return configv1.NewProxyLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/scheduler.go b/config/informers/externalversions/config/v1/scheduler.go index 104cdd76ca..0117f2941d 100644 --- a/config/informers/externalversions/config/v1/scheduler.go +++ b/config/informers/externalversions/config/v1/scheduler.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - configv1 "github.com/openshift/api/config/v1" + apiconfigv1 "github.com/openshift/api/config/v1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/config/listers/config/v1" + configv1 "github.com/openshift/client-go/config/listers/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Schedulers. type SchedulerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.SchedulerLister + Lister() configv1.SchedulerLister } type schedulerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredSchedulerInformer(client versioned.Interface, resyncPeriod time. return client.ConfigV1().Schedulers().Watch(context.TODO(), options) }, }, - &configv1.Scheduler{}, + &apiconfigv1.Scheduler{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *schedulerInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *schedulerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1.Scheduler{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1.Scheduler{}, f.defaultInformer) } -func (f *schedulerInformer) Lister() v1.SchedulerLister { - return v1.NewSchedulerLister(f.Informer().GetIndexer()) +func (f *schedulerInformer) Lister() configv1.SchedulerLister { + return configv1.NewSchedulerLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1alpha1/backup.go b/config/informers/externalversions/config/v1alpha1/backup.go index ae3013d42a..bed1857ee8 100644 --- a/config/informers/externalversions/config/v1alpha1/backup.go +++ b/config/informers/externalversions/config/v1alpha1/backup.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - configv1alpha1 "github.com/openshift/api/config/v1alpha1" + apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" + configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Backups. type BackupInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.BackupLister + Lister() configv1alpha1.BackupLister } type backupInformer struct { @@ -54,7 +54,7 @@ func NewFilteredBackupInformer(client versioned.Interface, resyncPeriod time.Dur return client.ConfigV1alpha1().Backups().Watch(context.TODO(), options) }, }, - &configv1alpha1.Backup{}, + &apiconfigv1alpha1.Backup{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *backupInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *backupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1alpha1.Backup{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1alpha1.Backup{}, f.defaultInformer) } -func (f *backupInformer) Lister() v1alpha1.BackupLister { - return v1alpha1.NewBackupLister(f.Informer().GetIndexer()) +func (f *backupInformer) Lister() configv1alpha1.BackupLister { + return configv1alpha1.NewBackupLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1alpha1/clusterimagepolicy.go b/config/informers/externalversions/config/v1alpha1/clusterimagepolicy.go index 2e71741a74..b11866c35f 100644 --- a/config/informers/externalversions/config/v1alpha1/clusterimagepolicy.go +++ b/config/informers/externalversions/config/v1alpha1/clusterimagepolicy.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - configv1alpha1 "github.com/openshift/api/config/v1alpha1" + apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" + configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterImagePolicies. type ClusterImagePolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.ClusterImagePolicyLister + Lister() configv1alpha1.ClusterImagePolicyLister } type clusterImagePolicyInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterImagePolicyInformer(client versioned.Interface, resyncPer return client.ConfigV1alpha1().ClusterImagePolicies().Watch(context.TODO(), options) }, }, - &configv1alpha1.ClusterImagePolicy{}, + &apiconfigv1alpha1.ClusterImagePolicy{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterImagePolicyInformer) defaultInformer(client versioned.Interface, } func (f *clusterImagePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1alpha1.ClusterImagePolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1alpha1.ClusterImagePolicy{}, f.defaultInformer) } -func (f *clusterImagePolicyInformer) Lister() v1alpha1.ClusterImagePolicyLister { - return v1alpha1.NewClusterImagePolicyLister(f.Informer().GetIndexer()) +func (f *clusterImagePolicyInformer) Lister() configv1alpha1.ClusterImagePolicyLister { + return configv1alpha1.NewClusterImagePolicyLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1alpha1/imagepolicy.go b/config/informers/externalversions/config/v1alpha1/imagepolicy.go index ba72caedf6..d6ab02a000 100644 --- a/config/informers/externalversions/config/v1alpha1/imagepolicy.go +++ b/config/informers/externalversions/config/v1alpha1/imagepolicy.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - configv1alpha1 "github.com/openshift/api/config/v1alpha1" + apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" + configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImagePolicies. type ImagePolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.ImagePolicyLister + Lister() configv1alpha1.ImagePolicyLister } type imagePolicyInformer struct { @@ -55,7 +55,7 @@ func NewFilteredImagePolicyInformer(client versioned.Interface, namespace string return client.ConfigV1alpha1().ImagePolicies(namespace).Watch(context.TODO(), options) }, }, - &configv1alpha1.ImagePolicy{}, + &apiconfigv1alpha1.ImagePolicy{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *imagePolicyInformer) defaultInformer(client versioned.Interface, resync } func (f *imagePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1alpha1.ImagePolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1alpha1.ImagePolicy{}, f.defaultInformer) } -func (f *imagePolicyInformer) Lister() v1alpha1.ImagePolicyLister { - return v1alpha1.NewImagePolicyLister(f.Informer().GetIndexer()) +func (f *imagePolicyInformer) Lister() configv1alpha1.ImagePolicyLister { + return configv1alpha1.NewImagePolicyLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1alpha1/insightsdatagather.go b/config/informers/externalversions/config/v1alpha1/insightsdatagather.go index 22a41d3630..51f09bad2c 100644 --- a/config/informers/externalversions/config/v1alpha1/insightsdatagather.go +++ b/config/informers/externalversions/config/v1alpha1/insightsdatagather.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - configv1alpha1 "github.com/openshift/api/config/v1alpha1" + apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" versioned "github.com/openshift/client-go/config/clientset/versioned" internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" + configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // InsightsDataGathers. type InsightsDataGatherInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.InsightsDataGatherLister + Lister() configv1alpha1.InsightsDataGatherLister } type insightsDataGatherInformer struct { @@ -54,7 +54,7 @@ func NewFilteredInsightsDataGatherInformer(client versioned.Interface, resyncPer return client.ConfigV1alpha1().InsightsDataGathers().Watch(context.TODO(), options) }, }, - &configv1alpha1.InsightsDataGather{}, + &apiconfigv1alpha1.InsightsDataGather{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *insightsDataGatherInformer) defaultInformer(client versioned.Interface, } func (f *insightsDataGatherInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&configv1alpha1.InsightsDataGather{}, f.defaultInformer) + return f.factory.InformerFor(&apiconfigv1alpha1.InsightsDataGather{}, f.defaultInformer) } -func (f *insightsDataGatherInformer) Lister() v1alpha1.InsightsDataGatherLister { - return v1alpha1.NewInsightsDataGatherLister(f.Informer().GetIndexer()) +func (f *insightsDataGatherInformer) Lister() configv1alpha1.InsightsDataGatherLister { + return configv1alpha1.NewInsightsDataGatherLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/generic.go b/config/informers/externalversions/generic.go index 20b3b4e606..cb2395d1ef 100644 --- a/config/informers/externalversions/generic.go +++ b/config/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/config/v1" v1alpha1 "github.com/openshift/api/config/v1alpha1" diff --git a/config/listers/config/v1/apiserver.go b/config/listers/config/v1/apiserver.go index 456d544063..59c5faa8a9 100644 --- a/config/listers/config/v1/apiserver.go +++ b/config/listers/config/v1/apiserver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // APIServerLister helps list APIServers. @@ -14,19 +14,19 @@ import ( type APIServerLister interface { // List lists all APIServers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.APIServer, err error) + List(selector labels.Selector) (ret []*configv1.APIServer, err error) // Get retrieves the APIServer from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.APIServer, error) + Get(name string) (*configv1.APIServer, error) APIServerListerExpansion } // aPIServerLister implements the APIServerLister interface. type aPIServerLister struct { - listers.ResourceIndexer[*v1.APIServer] + listers.ResourceIndexer[*configv1.APIServer] } // NewAPIServerLister returns a new APIServerLister. func NewAPIServerLister(indexer cache.Indexer) APIServerLister { - return &aPIServerLister{listers.New[*v1.APIServer](indexer, v1.Resource("apiserver"))} + return &aPIServerLister{listers.New[*configv1.APIServer](indexer, configv1.Resource("apiserver"))} } diff --git a/config/listers/config/v1/authentication.go b/config/listers/config/v1/authentication.go index c048da0e1b..242930e685 100644 --- a/config/listers/config/v1/authentication.go +++ b/config/listers/config/v1/authentication.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // AuthenticationLister helps list Authentications. @@ -14,19 +14,19 @@ import ( type AuthenticationLister interface { // List lists all Authentications in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Authentication, err error) + List(selector labels.Selector) (ret []*configv1.Authentication, err error) // Get retrieves the Authentication from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Authentication, error) + Get(name string) (*configv1.Authentication, error) AuthenticationListerExpansion } // authenticationLister implements the AuthenticationLister interface. type authenticationLister struct { - listers.ResourceIndexer[*v1.Authentication] + listers.ResourceIndexer[*configv1.Authentication] } // NewAuthenticationLister returns a new AuthenticationLister. func NewAuthenticationLister(indexer cache.Indexer) AuthenticationLister { - return &authenticationLister{listers.New[*v1.Authentication](indexer, v1.Resource("authentication"))} + return &authenticationLister{listers.New[*configv1.Authentication](indexer, configv1.Resource("authentication"))} } diff --git a/config/listers/config/v1/build.go b/config/listers/config/v1/build.go index c4fcae5d9c..b98accfeed 100644 --- a/config/listers/config/v1/build.go +++ b/config/listers/config/v1/build.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // BuildLister helps list Builds. @@ -14,19 +14,19 @@ import ( type BuildLister interface { // List lists all Builds in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Build, err error) + List(selector labels.Selector) (ret []*configv1.Build, err error) // Get retrieves the Build from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Build, error) + Get(name string) (*configv1.Build, error) BuildListerExpansion } // buildLister implements the BuildLister interface. type buildLister struct { - listers.ResourceIndexer[*v1.Build] + listers.ResourceIndexer[*configv1.Build] } // NewBuildLister returns a new BuildLister. func NewBuildLister(indexer cache.Indexer) BuildLister { - return &buildLister{listers.New[*v1.Build](indexer, v1.Resource("build"))} + return &buildLister{listers.New[*configv1.Build](indexer, configv1.Resource("build"))} } diff --git a/config/listers/config/v1/clusteroperator.go b/config/listers/config/v1/clusteroperator.go index d9ba7e8aab..a8eaacf78a 100644 --- a/config/listers/config/v1/clusteroperator.go +++ b/config/listers/config/v1/clusteroperator.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterOperatorLister helps list ClusterOperators. @@ -14,19 +14,19 @@ import ( type ClusterOperatorLister interface { // List lists all ClusterOperators in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterOperator, err error) + List(selector labels.Selector) (ret []*configv1.ClusterOperator, err error) // Get retrieves the ClusterOperator from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterOperator, error) + Get(name string) (*configv1.ClusterOperator, error) ClusterOperatorListerExpansion } // clusterOperatorLister implements the ClusterOperatorLister interface. type clusterOperatorLister struct { - listers.ResourceIndexer[*v1.ClusterOperator] + listers.ResourceIndexer[*configv1.ClusterOperator] } // NewClusterOperatorLister returns a new ClusterOperatorLister. func NewClusterOperatorLister(indexer cache.Indexer) ClusterOperatorLister { - return &clusterOperatorLister{listers.New[*v1.ClusterOperator](indexer, v1.Resource("clusteroperator"))} + return &clusterOperatorLister{listers.New[*configv1.ClusterOperator](indexer, configv1.Resource("clusteroperator"))} } diff --git a/config/listers/config/v1/clusterversion.go b/config/listers/config/v1/clusterversion.go index d052480907..9f466ccb9d 100644 --- a/config/listers/config/v1/clusterversion.go +++ b/config/listers/config/v1/clusterversion.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterVersionLister helps list ClusterVersions. @@ -14,19 +14,19 @@ import ( type ClusterVersionLister interface { // List lists all ClusterVersions in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterVersion, err error) + List(selector labels.Selector) (ret []*configv1.ClusterVersion, err error) // Get retrieves the ClusterVersion from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterVersion, error) + Get(name string) (*configv1.ClusterVersion, error) ClusterVersionListerExpansion } // clusterVersionLister implements the ClusterVersionLister interface. type clusterVersionLister struct { - listers.ResourceIndexer[*v1.ClusterVersion] + listers.ResourceIndexer[*configv1.ClusterVersion] } // NewClusterVersionLister returns a new ClusterVersionLister. func NewClusterVersionLister(indexer cache.Indexer) ClusterVersionLister { - return &clusterVersionLister{listers.New[*v1.ClusterVersion](indexer, v1.Resource("clusterversion"))} + return &clusterVersionLister{listers.New[*configv1.ClusterVersion](indexer, configv1.Resource("clusterversion"))} } diff --git a/config/listers/config/v1/console.go b/config/listers/config/v1/console.go index 192798555c..e9d9558e7c 100644 --- a/config/listers/config/v1/console.go +++ b/config/listers/config/v1/console.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleLister helps list Consoles. @@ -14,19 +14,19 @@ import ( type ConsoleLister interface { // List lists all Consoles in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Console, err error) + List(selector labels.Selector) (ret []*configv1.Console, err error) // Get retrieves the Console from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Console, error) + Get(name string) (*configv1.Console, error) ConsoleListerExpansion } // consoleLister implements the ConsoleLister interface. type consoleLister struct { - listers.ResourceIndexer[*v1.Console] + listers.ResourceIndexer[*configv1.Console] } // NewConsoleLister returns a new ConsoleLister. func NewConsoleLister(indexer cache.Indexer) ConsoleLister { - return &consoleLister{listers.New[*v1.Console](indexer, v1.Resource("console"))} + return &consoleLister{listers.New[*configv1.Console](indexer, configv1.Resource("console"))} } diff --git a/config/listers/config/v1/dns.go b/config/listers/config/v1/dns.go index 85dd5e4baf..95dbcd0821 100644 --- a/config/listers/config/v1/dns.go +++ b/config/listers/config/v1/dns.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DNSLister helps list DNSes. @@ -14,19 +14,19 @@ import ( type DNSLister interface { // List lists all DNSes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.DNS, err error) + List(selector labels.Selector) (ret []*configv1.DNS, err error) // Get retrieves the DNS from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.DNS, error) + Get(name string) (*configv1.DNS, error) DNSListerExpansion } // dNSLister implements the DNSLister interface. type dNSLister struct { - listers.ResourceIndexer[*v1.DNS] + listers.ResourceIndexer[*configv1.DNS] } // NewDNSLister returns a new DNSLister. func NewDNSLister(indexer cache.Indexer) DNSLister { - return &dNSLister{listers.New[*v1.DNS](indexer, v1.Resource("dns"))} + return &dNSLister{listers.New[*configv1.DNS](indexer, configv1.Resource("dns"))} } diff --git a/config/listers/config/v1/featuregate.go b/config/listers/config/v1/featuregate.go index a2bcacff60..7cedf79488 100644 --- a/config/listers/config/v1/featuregate.go +++ b/config/listers/config/v1/featuregate.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // FeatureGateLister helps list FeatureGates. @@ -14,19 +14,19 @@ import ( type FeatureGateLister interface { // List lists all FeatureGates in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.FeatureGate, err error) + List(selector labels.Selector) (ret []*configv1.FeatureGate, err error) // Get retrieves the FeatureGate from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.FeatureGate, error) + Get(name string) (*configv1.FeatureGate, error) FeatureGateListerExpansion } // featureGateLister implements the FeatureGateLister interface. type featureGateLister struct { - listers.ResourceIndexer[*v1.FeatureGate] + listers.ResourceIndexer[*configv1.FeatureGate] } // NewFeatureGateLister returns a new FeatureGateLister. func NewFeatureGateLister(indexer cache.Indexer) FeatureGateLister { - return &featureGateLister{listers.New[*v1.FeatureGate](indexer, v1.Resource("featuregate"))} + return &featureGateLister{listers.New[*configv1.FeatureGate](indexer, configv1.Resource("featuregate"))} } diff --git a/config/listers/config/v1/image.go b/config/listers/config/v1/image.go index 908753f35c..407415393d 100644 --- a/config/listers/config/v1/image.go +++ b/config/listers/config/v1/image.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageLister helps list Images. @@ -14,19 +14,19 @@ import ( type ImageLister interface { // List lists all Images in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Image, err error) + List(selector labels.Selector) (ret []*configv1.Image, err error) // Get retrieves the Image from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Image, error) + Get(name string) (*configv1.Image, error) ImageListerExpansion } // imageLister implements the ImageLister interface. type imageLister struct { - listers.ResourceIndexer[*v1.Image] + listers.ResourceIndexer[*configv1.Image] } // NewImageLister returns a new ImageLister. func NewImageLister(indexer cache.Indexer) ImageLister { - return &imageLister{listers.New[*v1.Image](indexer, v1.Resource("image"))} + return &imageLister{listers.New[*configv1.Image](indexer, configv1.Resource("image"))} } diff --git a/config/listers/config/v1/imagecontentpolicy.go b/config/listers/config/v1/imagecontentpolicy.go index edad83a7b2..75607f9184 100644 --- a/config/listers/config/v1/imagecontentpolicy.go +++ b/config/listers/config/v1/imagecontentpolicy.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageContentPolicyLister helps list ImageContentPolicies. @@ -14,19 +14,19 @@ import ( type ImageContentPolicyLister interface { // List lists all ImageContentPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageContentPolicy, err error) + List(selector labels.Selector) (ret []*configv1.ImageContentPolicy, err error) // Get retrieves the ImageContentPolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImageContentPolicy, error) + Get(name string) (*configv1.ImageContentPolicy, error) ImageContentPolicyListerExpansion } // imageContentPolicyLister implements the ImageContentPolicyLister interface. type imageContentPolicyLister struct { - listers.ResourceIndexer[*v1.ImageContentPolicy] + listers.ResourceIndexer[*configv1.ImageContentPolicy] } // NewImageContentPolicyLister returns a new ImageContentPolicyLister. func NewImageContentPolicyLister(indexer cache.Indexer) ImageContentPolicyLister { - return &imageContentPolicyLister{listers.New[*v1.ImageContentPolicy](indexer, v1.Resource("imagecontentpolicy"))} + return &imageContentPolicyLister{listers.New[*configv1.ImageContentPolicy](indexer, configv1.Resource("imagecontentpolicy"))} } diff --git a/config/listers/config/v1/imagedigestmirrorset.go b/config/listers/config/v1/imagedigestmirrorset.go index 6639b7cc0b..027ded8bb3 100644 --- a/config/listers/config/v1/imagedigestmirrorset.go +++ b/config/listers/config/v1/imagedigestmirrorset.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageDigestMirrorSetLister helps list ImageDigestMirrorSets. @@ -14,19 +14,19 @@ import ( type ImageDigestMirrorSetLister interface { // List lists all ImageDigestMirrorSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageDigestMirrorSet, err error) + List(selector labels.Selector) (ret []*configv1.ImageDigestMirrorSet, err error) // Get retrieves the ImageDigestMirrorSet from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImageDigestMirrorSet, error) + Get(name string) (*configv1.ImageDigestMirrorSet, error) ImageDigestMirrorSetListerExpansion } // imageDigestMirrorSetLister implements the ImageDigestMirrorSetLister interface. type imageDigestMirrorSetLister struct { - listers.ResourceIndexer[*v1.ImageDigestMirrorSet] + listers.ResourceIndexer[*configv1.ImageDigestMirrorSet] } // NewImageDigestMirrorSetLister returns a new ImageDigestMirrorSetLister. func NewImageDigestMirrorSetLister(indexer cache.Indexer) ImageDigestMirrorSetLister { - return &imageDigestMirrorSetLister{listers.New[*v1.ImageDigestMirrorSet](indexer, v1.Resource("imagedigestmirrorset"))} + return &imageDigestMirrorSetLister{listers.New[*configv1.ImageDigestMirrorSet](indexer, configv1.Resource("imagedigestmirrorset"))} } diff --git a/config/listers/config/v1/imagetagmirrorset.go b/config/listers/config/v1/imagetagmirrorset.go index 8605b7e786..d390bc14ec 100644 --- a/config/listers/config/v1/imagetagmirrorset.go +++ b/config/listers/config/v1/imagetagmirrorset.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageTagMirrorSetLister helps list ImageTagMirrorSets. @@ -14,19 +14,19 @@ import ( type ImageTagMirrorSetLister interface { // List lists all ImageTagMirrorSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageTagMirrorSet, err error) + List(selector labels.Selector) (ret []*configv1.ImageTagMirrorSet, err error) // Get retrieves the ImageTagMirrorSet from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImageTagMirrorSet, error) + Get(name string) (*configv1.ImageTagMirrorSet, error) ImageTagMirrorSetListerExpansion } // imageTagMirrorSetLister implements the ImageTagMirrorSetLister interface. type imageTagMirrorSetLister struct { - listers.ResourceIndexer[*v1.ImageTagMirrorSet] + listers.ResourceIndexer[*configv1.ImageTagMirrorSet] } // NewImageTagMirrorSetLister returns a new ImageTagMirrorSetLister. func NewImageTagMirrorSetLister(indexer cache.Indexer) ImageTagMirrorSetLister { - return &imageTagMirrorSetLister{listers.New[*v1.ImageTagMirrorSet](indexer, v1.Resource("imagetagmirrorset"))} + return &imageTagMirrorSetLister{listers.New[*configv1.ImageTagMirrorSet](indexer, configv1.Resource("imagetagmirrorset"))} } diff --git a/config/listers/config/v1/infrastructure.go b/config/listers/config/v1/infrastructure.go index db1e7725a9..48d592a295 100644 --- a/config/listers/config/v1/infrastructure.go +++ b/config/listers/config/v1/infrastructure.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // InfrastructureLister helps list Infrastructures. @@ -14,19 +14,19 @@ import ( type InfrastructureLister interface { // List lists all Infrastructures in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Infrastructure, err error) + List(selector labels.Selector) (ret []*configv1.Infrastructure, err error) // Get retrieves the Infrastructure from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Infrastructure, error) + Get(name string) (*configv1.Infrastructure, error) InfrastructureListerExpansion } // infrastructureLister implements the InfrastructureLister interface. type infrastructureLister struct { - listers.ResourceIndexer[*v1.Infrastructure] + listers.ResourceIndexer[*configv1.Infrastructure] } // NewInfrastructureLister returns a new InfrastructureLister. func NewInfrastructureLister(indexer cache.Indexer) InfrastructureLister { - return &infrastructureLister{listers.New[*v1.Infrastructure](indexer, v1.Resource("infrastructure"))} + return &infrastructureLister{listers.New[*configv1.Infrastructure](indexer, configv1.Resource("infrastructure"))} } diff --git a/config/listers/config/v1/ingress.go b/config/listers/config/v1/ingress.go index de29c3f1aa..81538435fb 100644 --- a/config/listers/config/v1/ingress.go +++ b/config/listers/config/v1/ingress.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // IngressLister helps list Ingresses. @@ -14,19 +14,19 @@ import ( type IngressLister interface { // List lists all Ingresses in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Ingress, err error) + List(selector labels.Selector) (ret []*configv1.Ingress, err error) // Get retrieves the Ingress from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Ingress, error) + Get(name string) (*configv1.Ingress, error) IngressListerExpansion } // ingressLister implements the IngressLister interface. type ingressLister struct { - listers.ResourceIndexer[*v1.Ingress] + listers.ResourceIndexer[*configv1.Ingress] } // NewIngressLister returns a new IngressLister. func NewIngressLister(indexer cache.Indexer) IngressLister { - return &ingressLister{listers.New[*v1.Ingress](indexer, v1.Resource("ingress"))} + return &ingressLister{listers.New[*configv1.Ingress](indexer, configv1.Resource("ingress"))} } diff --git a/config/listers/config/v1/network.go b/config/listers/config/v1/network.go index d71892d6c0..3376a46b11 100644 --- a/config/listers/config/v1/network.go +++ b/config/listers/config/v1/network.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NetworkLister helps list Networks. @@ -14,19 +14,19 @@ import ( type NetworkLister interface { // List lists all Networks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Network, err error) + List(selector labels.Selector) (ret []*configv1.Network, err error) // Get retrieves the Network from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Network, error) + Get(name string) (*configv1.Network, error) NetworkListerExpansion } // networkLister implements the NetworkLister interface. type networkLister struct { - listers.ResourceIndexer[*v1.Network] + listers.ResourceIndexer[*configv1.Network] } // NewNetworkLister returns a new NetworkLister. func NewNetworkLister(indexer cache.Indexer) NetworkLister { - return &networkLister{listers.New[*v1.Network](indexer, v1.Resource("network"))} + return &networkLister{listers.New[*configv1.Network](indexer, configv1.Resource("network"))} } diff --git a/config/listers/config/v1/node.go b/config/listers/config/v1/node.go index 08e3236703..2520016a51 100644 --- a/config/listers/config/v1/node.go +++ b/config/listers/config/v1/node.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NodeLister helps list Nodes. @@ -14,19 +14,19 @@ import ( type NodeLister interface { // List lists all Nodes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Node, err error) + List(selector labels.Selector) (ret []*configv1.Node, err error) // Get retrieves the Node from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Node, error) + Get(name string) (*configv1.Node, error) NodeListerExpansion } // nodeLister implements the NodeLister interface. type nodeLister struct { - listers.ResourceIndexer[*v1.Node] + listers.ResourceIndexer[*configv1.Node] } // NewNodeLister returns a new NodeLister. func NewNodeLister(indexer cache.Indexer) NodeLister { - return &nodeLister{listers.New[*v1.Node](indexer, v1.Resource("node"))} + return &nodeLister{listers.New[*configv1.Node](indexer, configv1.Resource("node"))} } diff --git a/config/listers/config/v1/oauth.go b/config/listers/config/v1/oauth.go index abfa6cc2a5..5cffcd7bf6 100644 --- a/config/listers/config/v1/oauth.go +++ b/config/listers/config/v1/oauth.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OAuthLister helps list OAuths. @@ -14,19 +14,19 @@ import ( type OAuthLister interface { // List lists all OAuths in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OAuth, err error) + List(selector labels.Selector) (ret []*configv1.OAuth, err error) // Get retrieves the OAuth from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OAuth, error) + Get(name string) (*configv1.OAuth, error) OAuthListerExpansion } // oAuthLister implements the OAuthLister interface. type oAuthLister struct { - listers.ResourceIndexer[*v1.OAuth] + listers.ResourceIndexer[*configv1.OAuth] } // NewOAuthLister returns a new OAuthLister. func NewOAuthLister(indexer cache.Indexer) OAuthLister { - return &oAuthLister{listers.New[*v1.OAuth](indexer, v1.Resource("oauth"))} + return &oAuthLister{listers.New[*configv1.OAuth](indexer, configv1.Resource("oauth"))} } diff --git a/config/listers/config/v1/operatorhub.go b/config/listers/config/v1/operatorhub.go index e4b0e47122..a28f63f791 100644 --- a/config/listers/config/v1/operatorhub.go +++ b/config/listers/config/v1/operatorhub.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OperatorHubLister helps list OperatorHubs. @@ -14,19 +14,19 @@ import ( type OperatorHubLister interface { // List lists all OperatorHubs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OperatorHub, err error) + List(selector labels.Selector) (ret []*configv1.OperatorHub, err error) // Get retrieves the OperatorHub from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OperatorHub, error) + Get(name string) (*configv1.OperatorHub, error) OperatorHubListerExpansion } // operatorHubLister implements the OperatorHubLister interface. type operatorHubLister struct { - listers.ResourceIndexer[*v1.OperatorHub] + listers.ResourceIndexer[*configv1.OperatorHub] } // NewOperatorHubLister returns a new OperatorHubLister. func NewOperatorHubLister(indexer cache.Indexer) OperatorHubLister { - return &operatorHubLister{listers.New[*v1.OperatorHub](indexer, v1.Resource("operatorhub"))} + return &operatorHubLister{listers.New[*configv1.OperatorHub](indexer, configv1.Resource("operatorhub"))} } diff --git a/config/listers/config/v1/project.go b/config/listers/config/v1/project.go index 67a1ee3234..fbc57217fa 100644 --- a/config/listers/config/v1/project.go +++ b/config/listers/config/v1/project.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ProjectLister helps list Projects. @@ -14,19 +14,19 @@ import ( type ProjectLister interface { // List lists all Projects in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Project, err error) + List(selector labels.Selector) (ret []*configv1.Project, err error) // Get retrieves the Project from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Project, error) + Get(name string) (*configv1.Project, error) ProjectListerExpansion } // projectLister implements the ProjectLister interface. type projectLister struct { - listers.ResourceIndexer[*v1.Project] + listers.ResourceIndexer[*configv1.Project] } // NewProjectLister returns a new ProjectLister. func NewProjectLister(indexer cache.Indexer) ProjectLister { - return &projectLister{listers.New[*v1.Project](indexer, v1.Resource("project"))} + return &projectLister{listers.New[*configv1.Project](indexer, configv1.Resource("project"))} } diff --git a/config/listers/config/v1/proxy.go b/config/listers/config/v1/proxy.go index 39837c2f6f..8edbd0fab5 100644 --- a/config/listers/config/v1/proxy.go +++ b/config/listers/config/v1/proxy.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ProxyLister helps list Proxies. @@ -14,19 +14,19 @@ import ( type ProxyLister interface { // List lists all Proxies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Proxy, err error) + List(selector labels.Selector) (ret []*configv1.Proxy, err error) // Get retrieves the Proxy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Proxy, error) + Get(name string) (*configv1.Proxy, error) ProxyListerExpansion } // proxyLister implements the ProxyLister interface. type proxyLister struct { - listers.ResourceIndexer[*v1.Proxy] + listers.ResourceIndexer[*configv1.Proxy] } // NewProxyLister returns a new ProxyLister. func NewProxyLister(indexer cache.Indexer) ProxyLister { - return &proxyLister{listers.New[*v1.Proxy](indexer, v1.Resource("proxy"))} + return &proxyLister{listers.New[*configv1.Proxy](indexer, configv1.Resource("proxy"))} } diff --git a/config/listers/config/v1/scheduler.go b/config/listers/config/v1/scheduler.go index 6f95e0254a..a90829c8dd 100644 --- a/config/listers/config/v1/scheduler.go +++ b/config/listers/config/v1/scheduler.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1 "github.com/openshift/api/config/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // SchedulerLister helps list Schedulers. @@ -14,19 +14,19 @@ import ( type SchedulerLister interface { // List lists all Schedulers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Scheduler, err error) + List(selector labels.Selector) (ret []*configv1.Scheduler, err error) // Get retrieves the Scheduler from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Scheduler, error) + Get(name string) (*configv1.Scheduler, error) SchedulerListerExpansion } // schedulerLister implements the SchedulerLister interface. type schedulerLister struct { - listers.ResourceIndexer[*v1.Scheduler] + listers.ResourceIndexer[*configv1.Scheduler] } // NewSchedulerLister returns a new SchedulerLister. func NewSchedulerLister(indexer cache.Indexer) SchedulerLister { - return &schedulerLister{listers.New[*v1.Scheduler](indexer, v1.Resource("scheduler"))} + return &schedulerLister{listers.New[*configv1.Scheduler](indexer, configv1.Resource("scheduler"))} } diff --git a/config/listers/config/v1alpha1/backup.go b/config/listers/config/v1alpha1/backup.go index c7d3ba5466..6b992e0d03 100644 --- a/config/listers/config/v1alpha1/backup.go +++ b/config/listers/config/v1alpha1/backup.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // BackupLister helps list Backups. @@ -14,19 +14,19 @@ import ( type BackupLister interface { // List lists all Backups in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.Backup, err error) + List(selector labels.Selector) (ret []*configv1alpha1.Backup, err error) // Get retrieves the Backup from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.Backup, error) + Get(name string) (*configv1alpha1.Backup, error) BackupListerExpansion } // backupLister implements the BackupLister interface. type backupLister struct { - listers.ResourceIndexer[*v1alpha1.Backup] + listers.ResourceIndexer[*configv1alpha1.Backup] } // NewBackupLister returns a new BackupLister. func NewBackupLister(indexer cache.Indexer) BackupLister { - return &backupLister{listers.New[*v1alpha1.Backup](indexer, v1alpha1.Resource("backup"))} + return &backupLister{listers.New[*configv1alpha1.Backup](indexer, configv1alpha1.Resource("backup"))} } diff --git a/config/listers/config/v1alpha1/clusterimagepolicy.go b/config/listers/config/v1alpha1/clusterimagepolicy.go index ab909818ee..0512d3682f 100644 --- a/config/listers/config/v1alpha1/clusterimagepolicy.go +++ b/config/listers/config/v1alpha1/clusterimagepolicy.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterImagePolicyLister helps list ClusterImagePolicies. @@ -14,19 +14,19 @@ import ( type ClusterImagePolicyLister interface { // List lists all ClusterImagePolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ClusterImagePolicy, err error) + List(selector labels.Selector) (ret []*configv1alpha1.ClusterImagePolicy, err error) // Get retrieves the ClusterImagePolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.ClusterImagePolicy, error) + Get(name string) (*configv1alpha1.ClusterImagePolicy, error) ClusterImagePolicyListerExpansion } // clusterImagePolicyLister implements the ClusterImagePolicyLister interface. type clusterImagePolicyLister struct { - listers.ResourceIndexer[*v1alpha1.ClusterImagePolicy] + listers.ResourceIndexer[*configv1alpha1.ClusterImagePolicy] } // NewClusterImagePolicyLister returns a new ClusterImagePolicyLister. func NewClusterImagePolicyLister(indexer cache.Indexer) ClusterImagePolicyLister { - return &clusterImagePolicyLister{listers.New[*v1alpha1.ClusterImagePolicy](indexer, v1alpha1.Resource("clusterimagepolicy"))} + return &clusterImagePolicyLister{listers.New[*configv1alpha1.ClusterImagePolicy](indexer, configv1alpha1.Resource("clusterimagepolicy"))} } diff --git a/config/listers/config/v1alpha1/imagepolicy.go b/config/listers/config/v1alpha1/imagepolicy.go index e5aa271616..7050c57718 100644 --- a/config/listers/config/v1alpha1/imagepolicy.go +++ b/config/listers/config/v1alpha1/imagepolicy.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImagePolicyLister helps list ImagePolicies. @@ -14,7 +14,7 @@ import ( type ImagePolicyLister interface { // List lists all ImagePolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ImagePolicy, err error) + List(selector labels.Selector) (ret []*configv1alpha1.ImagePolicy, err error) // ImagePolicies returns an object that can list and get ImagePolicies. ImagePolicies(namespace string) ImagePolicyNamespaceLister ImagePolicyListerExpansion @@ -22,17 +22,17 @@ type ImagePolicyLister interface { // imagePolicyLister implements the ImagePolicyLister interface. type imagePolicyLister struct { - listers.ResourceIndexer[*v1alpha1.ImagePolicy] + listers.ResourceIndexer[*configv1alpha1.ImagePolicy] } // NewImagePolicyLister returns a new ImagePolicyLister. func NewImagePolicyLister(indexer cache.Indexer) ImagePolicyLister { - return &imagePolicyLister{listers.New[*v1alpha1.ImagePolicy](indexer, v1alpha1.Resource("imagepolicy"))} + return &imagePolicyLister{listers.New[*configv1alpha1.ImagePolicy](indexer, configv1alpha1.Resource("imagepolicy"))} } // ImagePolicies returns an object that can list and get ImagePolicies. func (s *imagePolicyLister) ImagePolicies(namespace string) ImagePolicyNamespaceLister { - return imagePolicyNamespaceLister{listers.NewNamespaced[*v1alpha1.ImagePolicy](s.ResourceIndexer, namespace)} + return imagePolicyNamespaceLister{listers.NewNamespaced[*configv1alpha1.ImagePolicy](s.ResourceIndexer, namespace)} } // ImagePolicyNamespaceLister helps list and get ImagePolicies. @@ -40,15 +40,15 @@ func (s *imagePolicyLister) ImagePolicies(namespace string) ImagePolicyNamespace type ImagePolicyNamespaceLister interface { // List lists all ImagePolicies in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ImagePolicy, err error) + List(selector labels.Selector) (ret []*configv1alpha1.ImagePolicy, err error) // Get retrieves the ImagePolicy from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.ImagePolicy, error) + Get(name string) (*configv1alpha1.ImagePolicy, error) ImagePolicyNamespaceListerExpansion } // imagePolicyNamespaceLister implements the ImagePolicyNamespaceLister // interface. type imagePolicyNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.ImagePolicy] + listers.ResourceIndexer[*configv1alpha1.ImagePolicy] } diff --git a/config/listers/config/v1alpha1/insightsdatagather.go b/config/listers/config/v1alpha1/insightsdatagather.go index 4885030b91..9328022a46 100644 --- a/config/listers/config/v1alpha1/insightsdatagather.go +++ b/config/listers/config/v1alpha1/insightsdatagather.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/config/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + configv1alpha1 "github.com/openshift/api/config/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // InsightsDataGatherLister helps list InsightsDataGathers. @@ -14,19 +14,19 @@ import ( type InsightsDataGatherLister interface { // List lists all InsightsDataGathers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.InsightsDataGather, err error) + List(selector labels.Selector) (ret []*configv1alpha1.InsightsDataGather, err error) // Get retrieves the InsightsDataGather from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.InsightsDataGather, error) + Get(name string) (*configv1alpha1.InsightsDataGather, error) InsightsDataGatherListerExpansion } // insightsDataGatherLister implements the InsightsDataGatherLister interface. type insightsDataGatherLister struct { - listers.ResourceIndexer[*v1alpha1.InsightsDataGather] + listers.ResourceIndexer[*configv1alpha1.InsightsDataGather] } // NewInsightsDataGatherLister returns a new InsightsDataGatherLister. func NewInsightsDataGatherLister(indexer cache.Indexer) InsightsDataGatherLister { - return &insightsDataGatherLister{listers.New[*v1alpha1.InsightsDataGather](indexer, v1alpha1.Resource("insightsdatagather"))} + return &insightsDataGatherLister{listers.New[*configv1alpha1.InsightsDataGather](indexer, configv1alpha1.Resource("insightsdatagather"))} } diff --git a/console/applyconfigurations/console/v1/consoleclidownload.go b/console/applyconfigurations/console/v1/consoleclidownload.go index 8560cb6141..295f8256e4 100644 --- a/console/applyconfigurations/console/v1/consoleclidownload.go +++ b/console/applyconfigurations/console/v1/consoleclidownload.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleCLIDownloadApplyConfiguration represents a declarative configuration of the ConsoleCLIDownload type for use // with apply. type ConsoleCLIDownloadApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleCLIDownloadSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleCLIDownloadSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleCLIDownload constructs a declarative configuration of the ConsoleCLIDownload type for use with @@ -40,18 +40,18 @@ func ConsoleCLIDownload(name string) *ConsoleCLIDownloadApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleCLIDownload(consoleCLIDownload *apiconsolev1.ConsoleCLIDownload, fieldManager string) (*ConsoleCLIDownloadApplyConfiguration, error) { +func ExtractConsoleCLIDownload(consoleCLIDownload *consolev1.ConsoleCLIDownload, fieldManager string) (*ConsoleCLIDownloadApplyConfiguration, error) { return extractConsoleCLIDownload(consoleCLIDownload, fieldManager, "") } // ExtractConsoleCLIDownloadStatus is the same as ExtractConsoleCLIDownload except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleCLIDownloadStatus(consoleCLIDownload *apiconsolev1.ConsoleCLIDownload, fieldManager string) (*ConsoleCLIDownloadApplyConfiguration, error) { +func ExtractConsoleCLIDownloadStatus(consoleCLIDownload *consolev1.ConsoleCLIDownload, fieldManager string) (*ConsoleCLIDownloadApplyConfiguration, error) { return extractConsoleCLIDownload(consoleCLIDownload, fieldManager, "status") } -func extractConsoleCLIDownload(consoleCLIDownload *apiconsolev1.ConsoleCLIDownload, fieldManager string, subresource string) (*ConsoleCLIDownloadApplyConfiguration, error) { +func extractConsoleCLIDownload(consoleCLIDownload *consolev1.ConsoleCLIDownload, fieldManager string, subresource string) (*ConsoleCLIDownloadApplyConfiguration, error) { b := &ConsoleCLIDownloadApplyConfiguration{} err := managedfields.ExtractInto(consoleCLIDownload, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleCLIDownload"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleCLIDownload(consoleCLIDownload *apiconsolev1.ConsoleCLIDownlo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithKind(value string) *ConsoleCLIDownloadApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithKind(value string) *ConsoleCL // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithAPIVersion(value string) *ConsoleCLIDownloadApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithAPIVersion(value string) *Con // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithName(value string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithName(value string) *ConsoleCL // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithGenerateName(value string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithGenerateName(value string) *C // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithNamespace(value string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithNamespace(value string) *Cons // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithUID(value types.UID) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithUID(value types.UID) *Console // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithResourceVersion(value string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithGeneration(value int64) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleCLIDownloadApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleCLIDownloadApplyConfiguration { +func (b *ConsoleCLIDownloadApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleCLIDownloadApplyConfiguration { +func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleCLIDownloadApplyConfiguration) WithLabels(entries map[string]string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleCLIDownloadApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithAnnotations(entries map[strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleCLIDownloadApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleCLIDownloadApplyConfiguration { +func (b *ConsoleCLIDownloadApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *ConsoleCLIDownloadApplyConfiguration) WithFinalizers(values ...string) *ConsoleCLIDownloadApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleCLIDownloadApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleCLIDownloadApplyConfiguration) WithSpec(value *ConsoleCLIDownloa // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleCLIDownloadApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consoleexternalloglink.go b/console/applyconfigurations/console/v1/consoleexternalloglink.go index 222b7c1924..35998307b5 100644 --- a/console/applyconfigurations/console/v1/consoleexternalloglink.go +++ b/console/applyconfigurations/console/v1/consoleexternalloglink.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleExternalLogLinkApplyConfiguration represents a declarative configuration of the ConsoleExternalLogLink type for use // with apply. type ConsoleExternalLogLinkApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleExternalLogLinkSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleExternalLogLinkSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleExternalLogLink constructs a declarative configuration of the ConsoleExternalLogLink type for use with @@ -40,18 +40,18 @@ func ConsoleExternalLogLink(name string) *ConsoleExternalLogLinkApplyConfigurati // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleExternalLogLink(consoleExternalLogLink *apiconsolev1.ConsoleExternalLogLink, fieldManager string) (*ConsoleExternalLogLinkApplyConfiguration, error) { +func ExtractConsoleExternalLogLink(consoleExternalLogLink *consolev1.ConsoleExternalLogLink, fieldManager string) (*ConsoleExternalLogLinkApplyConfiguration, error) { return extractConsoleExternalLogLink(consoleExternalLogLink, fieldManager, "") } // ExtractConsoleExternalLogLinkStatus is the same as ExtractConsoleExternalLogLink except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleExternalLogLinkStatus(consoleExternalLogLink *apiconsolev1.ConsoleExternalLogLink, fieldManager string) (*ConsoleExternalLogLinkApplyConfiguration, error) { +func ExtractConsoleExternalLogLinkStatus(consoleExternalLogLink *consolev1.ConsoleExternalLogLink, fieldManager string) (*ConsoleExternalLogLinkApplyConfiguration, error) { return extractConsoleExternalLogLink(consoleExternalLogLink, fieldManager, "status") } -func extractConsoleExternalLogLink(consoleExternalLogLink *apiconsolev1.ConsoleExternalLogLink, fieldManager string, subresource string) (*ConsoleExternalLogLinkApplyConfiguration, error) { +func extractConsoleExternalLogLink(consoleExternalLogLink *consolev1.ConsoleExternalLogLink, fieldManager string, subresource string) (*ConsoleExternalLogLinkApplyConfiguration, error) { b := &ConsoleExternalLogLinkApplyConfiguration{} err := managedfields.ExtractInto(consoleExternalLogLink, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleExternalLogLink"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleExternalLogLink(consoleExternalLogLink *apiconsolev1.ConsoleE // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithKind(value string) *ConsoleExternalLogLinkApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithKind(value string) *Conso // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithAPIVersion(value string) *ConsoleExternalLogLinkApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithAPIVersion(value string) // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithName(value string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithName(value string) *Conso // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithGenerateName(value string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithGenerateName(value string // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithNamespace(value string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithNamespace(value string) * // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithUID(value types.UID) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithUID(value types.UID) *Con // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithResourceVersion(value string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithResourceVersion(value str // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithGeneration(value int64) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleExternalLogLinkApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleExternalLogLinkApplyConfiguration { +func (b *ConsoleExternalLogLinkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleExternalLogLinkApplyConfiguration { +func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionTimestamp(value m // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionGracePeriodSecond // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleExternalLogLinkApplyConfiguration) WithLabels(entries map[string]string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithLabels(entries map[string // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleExternalLogLinkApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithAnnotations(entries map[s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleExternalLogLinkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleExternalLogLinkApplyConfiguration { +func (b *ConsoleExternalLogLinkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithOwnerReferences(values .. func (b *ConsoleExternalLogLinkApplyConfiguration) WithFinalizers(values ...string) *ConsoleExternalLogLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleExternalLogLinkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleExternalLogLinkApplyConfiguration) WithSpec(value *ConsoleExtern // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleExternalLogLinkApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consolelink.go b/console/applyconfigurations/console/v1/consolelink.go index 4018274123..c3cd07d456 100644 --- a/console/applyconfigurations/console/v1/consolelink.go +++ b/console/applyconfigurations/console/v1/consolelink.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleLinkApplyConfiguration represents a declarative configuration of the ConsoleLink type for use // with apply. type ConsoleLinkApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleLinkSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleLinkSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleLink constructs a declarative configuration of the ConsoleLink type for use with @@ -40,18 +40,18 @@ func ConsoleLink(name string) *ConsoleLinkApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleLink(consoleLink *apiconsolev1.ConsoleLink, fieldManager string) (*ConsoleLinkApplyConfiguration, error) { +func ExtractConsoleLink(consoleLink *consolev1.ConsoleLink, fieldManager string) (*ConsoleLinkApplyConfiguration, error) { return extractConsoleLink(consoleLink, fieldManager, "") } // ExtractConsoleLinkStatus is the same as ExtractConsoleLink except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleLinkStatus(consoleLink *apiconsolev1.ConsoleLink, fieldManager string) (*ConsoleLinkApplyConfiguration, error) { +func ExtractConsoleLinkStatus(consoleLink *consolev1.ConsoleLink, fieldManager string) (*ConsoleLinkApplyConfiguration, error) { return extractConsoleLink(consoleLink, fieldManager, "status") } -func extractConsoleLink(consoleLink *apiconsolev1.ConsoleLink, fieldManager string, subresource string) (*ConsoleLinkApplyConfiguration, error) { +func extractConsoleLink(consoleLink *consolev1.ConsoleLink, fieldManager string, subresource string) (*ConsoleLinkApplyConfiguration, error) { b := &ConsoleLinkApplyConfiguration{} err := managedfields.ExtractInto(consoleLink, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleLink"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleLink(consoleLink *apiconsolev1.ConsoleLink, fieldManager stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithKind(value string) *ConsoleLinkApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleLinkApplyConfiguration) WithKind(value string) *ConsoleLinkApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithAPIVersion(value string) *ConsoleLinkApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleLinkApplyConfiguration) WithAPIVersion(value string) *ConsoleLin // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithName(value string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleLinkApplyConfiguration) WithName(value string) *ConsoleLinkApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithGenerateName(value string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleLinkApplyConfiguration) WithGenerateName(value string) *ConsoleL // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithNamespace(value string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleLinkApplyConfiguration) WithNamespace(value string) *ConsoleLink // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithUID(value types.UID) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleLinkApplyConfiguration) WithUID(value types.UID) *ConsoleLinkApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithResourceVersion(value string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleLinkApplyConfiguration) WithResourceVersion(value string) *Conso // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithGeneration(value int64) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleLinkApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleLinkApplyConfiguration { +func (b *ConsoleLinkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleLinkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleLinkApplyConfiguration { +func (b *ConsoleLinkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleLinkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleLinkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleLinkApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleLinkApplyConfiguration) WithLabels(entries map[string]string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleLinkApplyConfiguration) WithLabels(entries map[string]string) *C // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleLinkApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleLinkApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleLinkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleLinkApplyConfiguration { +func (b *ConsoleLinkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleLinkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *ConsoleLinkApplyConfiguration) WithFinalizers(values ...string) *ConsoleLinkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleLinkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleLinkApplyConfiguration) WithSpec(value *ConsoleLinkSpecApplyConf // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleLinkApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consolelinkspec.go b/console/applyconfigurations/console/v1/consolelinkspec.go index 9913966f49..151aaacfcf 100644 --- a/console/applyconfigurations/console/v1/consolelinkspec.go +++ b/console/applyconfigurations/console/v1/consolelinkspec.go @@ -25,7 +25,7 @@ func ConsoleLinkSpec() *ConsoleLinkSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Text field is set to the value of the last call. func (b *ConsoleLinkSpecApplyConfiguration) WithText(value string) *ConsoleLinkSpecApplyConfiguration { - b.Text = &value + b.LinkApplyConfiguration.Text = &value return b } @@ -33,7 +33,7 @@ func (b *ConsoleLinkSpecApplyConfiguration) WithText(value string) *ConsoleLinkS // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Href field is set to the value of the last call. func (b *ConsoleLinkSpecApplyConfiguration) WithHref(value string) *ConsoleLinkSpecApplyConfiguration { - b.Href = &value + b.LinkApplyConfiguration.Href = &value return b } diff --git a/console/applyconfigurations/console/v1/consolenotification.go b/console/applyconfigurations/console/v1/consolenotification.go index b64384cdc7..4d28c5902a 100644 --- a/console/applyconfigurations/console/v1/consolenotification.go +++ b/console/applyconfigurations/console/v1/consolenotification.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleNotificationApplyConfiguration represents a declarative configuration of the ConsoleNotification type for use // with apply. type ConsoleNotificationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleNotificationSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleNotificationSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleNotification constructs a declarative configuration of the ConsoleNotification type for use with @@ -40,18 +40,18 @@ func ConsoleNotification(name string) *ConsoleNotificationApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleNotification(consoleNotification *apiconsolev1.ConsoleNotification, fieldManager string) (*ConsoleNotificationApplyConfiguration, error) { +func ExtractConsoleNotification(consoleNotification *consolev1.ConsoleNotification, fieldManager string) (*ConsoleNotificationApplyConfiguration, error) { return extractConsoleNotification(consoleNotification, fieldManager, "") } // ExtractConsoleNotificationStatus is the same as ExtractConsoleNotification except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleNotificationStatus(consoleNotification *apiconsolev1.ConsoleNotification, fieldManager string) (*ConsoleNotificationApplyConfiguration, error) { +func ExtractConsoleNotificationStatus(consoleNotification *consolev1.ConsoleNotification, fieldManager string) (*ConsoleNotificationApplyConfiguration, error) { return extractConsoleNotification(consoleNotification, fieldManager, "status") } -func extractConsoleNotification(consoleNotification *apiconsolev1.ConsoleNotification, fieldManager string, subresource string) (*ConsoleNotificationApplyConfiguration, error) { +func extractConsoleNotification(consoleNotification *consolev1.ConsoleNotification, fieldManager string, subresource string) (*ConsoleNotificationApplyConfiguration, error) { b := &ConsoleNotificationApplyConfiguration{} err := managedfields.ExtractInto(consoleNotification, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleNotification"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleNotification(consoleNotification *apiconsolev1.ConsoleNotific // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithKind(value string) *ConsoleNotificationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithKind(value string) *ConsoleN // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithAPIVersion(value string) *ConsoleNotificationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithAPIVersion(value string) *Co // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithName(value string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithName(value string) *ConsoleN // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithGenerateName(value string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithGenerateName(value string) * // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithNamespace(value string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithNamespace(value string) *Con // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithUID(value types.UID) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithUID(value types.UID) *Consol // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithResourceVersion(value string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleNotificationApplyConfiguration) WithResourceVersion(value string // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithGeneration(value int64) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleNotificationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleNotificationApplyConfiguration { +func (b *ConsoleNotificationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleNotificationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleNotificationApplyConfiguration { +func (b *ConsoleNotificationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleNotificationApplyConfiguration) WithDeletionTimestamp(value meta // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleNotificationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleNotificationApplyConfiguration) WithDeletionGracePeriodSeconds(v // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleNotificationApplyConfiguration) WithLabels(entries map[string]string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleNotificationApplyConfiguration) WithLabels(entries map[string]st // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleNotificationApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleNotificationApplyConfiguration) WithAnnotations(entries map[stri // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleNotificationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleNotificationApplyConfiguration { +func (b *ConsoleNotificationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleNotificationApplyConfiguration) WithOwnerReferences(values ...*v func (b *ConsoleNotificationApplyConfiguration) WithFinalizers(values ...string) *ConsoleNotificationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleNotificationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleNotificationApplyConfiguration) WithSpec(value *ConsoleNotificat // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleNotificationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consolenotificationspec.go b/console/applyconfigurations/console/v1/consolenotificationspec.go index 9735e7d9e7..1f06e50acb 100644 --- a/console/applyconfigurations/console/v1/consolenotificationspec.go +++ b/console/applyconfigurations/console/v1/consolenotificationspec.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" ) // ConsoleNotificationSpecApplyConfiguration represents a declarative configuration of the ConsoleNotificationSpec type for use // with apply. type ConsoleNotificationSpecApplyConfiguration struct { - Text *string `json:"text,omitempty"` - Location *v1.ConsoleNotificationLocation `json:"location,omitempty"` - Link *LinkApplyConfiguration `json:"link,omitempty"` - Color *string `json:"color,omitempty"` - BackgroundColor *string `json:"backgroundColor,omitempty"` + Text *string `json:"text,omitempty"` + Location *consolev1.ConsoleNotificationLocation `json:"location,omitempty"` + Link *LinkApplyConfiguration `json:"link,omitempty"` + Color *string `json:"color,omitempty"` + BackgroundColor *string `json:"backgroundColor,omitempty"` } // ConsoleNotificationSpecApplyConfiguration constructs a declarative configuration of the ConsoleNotificationSpec type for use with @@ -33,7 +33,7 @@ func (b *ConsoleNotificationSpecApplyConfiguration) WithText(value string) *Cons // WithLocation sets the Location field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Location field is set to the value of the last call. -func (b *ConsoleNotificationSpecApplyConfiguration) WithLocation(value v1.ConsoleNotificationLocation) *ConsoleNotificationSpecApplyConfiguration { +func (b *ConsoleNotificationSpecApplyConfiguration) WithLocation(value consolev1.ConsoleNotificationLocation) *ConsoleNotificationSpecApplyConfiguration { b.Location = &value return b } diff --git a/console/applyconfigurations/console/v1/consoleplugin.go b/console/applyconfigurations/console/v1/consoleplugin.go index 920cbd7100..fd4bcc538f 100644 --- a/console/applyconfigurations/console/v1/consoleplugin.go +++ b/console/applyconfigurations/console/v1/consoleplugin.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsolePluginApplyConfiguration represents a declarative configuration of the ConsolePlugin type for use // with apply. type ConsolePluginApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsolePluginSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsolePluginSpecApplyConfiguration `json:"spec,omitempty"` } // ConsolePlugin constructs a declarative configuration of the ConsolePlugin type for use with @@ -40,18 +40,18 @@ func ConsolePlugin(name string) *ConsolePluginApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsolePlugin(consolePlugin *apiconsolev1.ConsolePlugin, fieldManager string) (*ConsolePluginApplyConfiguration, error) { +func ExtractConsolePlugin(consolePlugin *consolev1.ConsolePlugin, fieldManager string) (*ConsolePluginApplyConfiguration, error) { return extractConsolePlugin(consolePlugin, fieldManager, "") } // ExtractConsolePluginStatus is the same as ExtractConsolePlugin except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsolePluginStatus(consolePlugin *apiconsolev1.ConsolePlugin, fieldManager string) (*ConsolePluginApplyConfiguration, error) { +func ExtractConsolePluginStatus(consolePlugin *consolev1.ConsolePlugin, fieldManager string) (*ConsolePluginApplyConfiguration, error) { return extractConsolePlugin(consolePlugin, fieldManager, "status") } -func extractConsolePlugin(consolePlugin *apiconsolev1.ConsolePlugin, fieldManager string, subresource string) (*ConsolePluginApplyConfiguration, error) { +func extractConsolePlugin(consolePlugin *consolev1.ConsolePlugin, fieldManager string, subresource string) (*ConsolePluginApplyConfiguration, error) { b := &ConsolePluginApplyConfiguration{} err := managedfields.ExtractInto(consolePlugin, internal.Parser().Type("com.github.openshift.api.console.v1.ConsolePlugin"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsolePlugin(consolePlugin *apiconsolev1.ConsolePlugin, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithKind(value string) *ConsolePluginApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsolePluginApplyConfiguration) WithKind(value string) *ConsolePluginA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithAPIVersion(value string) *ConsolePluginApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsolePluginApplyConfiguration) WithAPIVersion(value string) *ConsoleP // If called multiple times, the Name field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithName(value string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsolePluginApplyConfiguration) WithName(value string) *ConsolePluginA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithGenerateName(value string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsolePluginApplyConfiguration) WithGenerateName(value string) *Consol // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithNamespace(value string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsolePluginApplyConfiguration) WithNamespace(value string) *ConsolePl // If called multiple times, the UID field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithUID(value types.UID) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsolePluginApplyConfiguration) WithUID(value types.UID) *ConsolePlugi // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithResourceVersion(value string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsolePluginApplyConfiguration) WithResourceVersion(value string) *Con // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithGeneration(value int64) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsolePluginApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsolePluginApplyConfiguration { +func (b *ConsolePluginApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsolePluginApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsolePluginApplyConfiguration { +func (b *ConsolePluginApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsolePluginApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsolePluginApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsolePluginApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *ConsolePluginApplyConfiguration) WithLabels(entries map[string]string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsolePluginApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ConsolePluginApplyConfiguration) WithAnnotations(entries map[string]string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsolePluginApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsolePluginApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsolePluginApplyConfiguration { +func (b *ConsolePluginApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsolePluginApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *ConsolePluginApplyConfiguration) WithFinalizers(values ...string) *ConsolePluginApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsolePluginApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsolePluginApplyConfiguration) WithSpec(value *ConsolePluginSpecApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsolePluginApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consolepluginbackend.go b/console/applyconfigurations/console/v1/consolepluginbackend.go index 79c6435614..03fe8ac932 100644 --- a/console/applyconfigurations/console/v1/consolepluginbackend.go +++ b/console/applyconfigurations/console/v1/consolepluginbackend.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" ) // ConsolePluginBackendApplyConfiguration represents a declarative configuration of the ConsolePluginBackend type for use // with apply. type ConsolePluginBackendApplyConfiguration struct { - Type *v1.ConsolePluginBackendType `json:"type,omitempty"` + Type *consolev1.ConsolePluginBackendType `json:"type,omitempty"` Service *ConsolePluginServiceApplyConfiguration `json:"service,omitempty"` } @@ -22,7 +22,7 @@ func ConsolePluginBackend() *ConsolePluginBackendApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ConsolePluginBackendApplyConfiguration) WithType(value v1.ConsolePluginBackendType) *ConsolePluginBackendApplyConfiguration { +func (b *ConsolePluginBackendApplyConfiguration) WithType(value consolev1.ConsolePluginBackendType) *ConsolePluginBackendApplyConfiguration { b.Type = &value return b } diff --git a/console/applyconfigurations/console/v1/consoleplugincsp.go b/console/applyconfigurations/console/v1/consoleplugincsp.go index d32c1dcbc0..a837b06b72 100644 --- a/console/applyconfigurations/console/v1/consoleplugincsp.go +++ b/console/applyconfigurations/console/v1/consoleplugincsp.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" ) // ConsolePluginCSPApplyConfiguration represents a declarative configuration of the ConsolePluginCSP type for use // with apply. type ConsolePluginCSPApplyConfiguration struct { - Directive *v1.DirectiveType `json:"directive,omitempty"` - Values []v1.CSPDirectiveValue `json:"values,omitempty"` + Directive *consolev1.DirectiveType `json:"directive,omitempty"` + Values []consolev1.CSPDirectiveValue `json:"values,omitempty"` } // ConsolePluginCSPApplyConfiguration constructs a declarative configuration of the ConsolePluginCSP type for use with @@ -22,7 +22,7 @@ func ConsolePluginCSP() *ConsolePluginCSPApplyConfiguration { // WithDirective sets the Directive field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Directive field is set to the value of the last call. -func (b *ConsolePluginCSPApplyConfiguration) WithDirective(value v1.DirectiveType) *ConsolePluginCSPApplyConfiguration { +func (b *ConsolePluginCSPApplyConfiguration) WithDirective(value consolev1.DirectiveType) *ConsolePluginCSPApplyConfiguration { b.Directive = &value return b } @@ -30,7 +30,7 @@ func (b *ConsolePluginCSPApplyConfiguration) WithDirective(value v1.DirectiveTyp // WithValues adds the given value to the Values field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Values field. -func (b *ConsolePluginCSPApplyConfiguration) WithValues(values ...v1.CSPDirectiveValue) *ConsolePluginCSPApplyConfiguration { +func (b *ConsolePluginCSPApplyConfiguration) WithValues(values ...consolev1.CSPDirectiveValue) *ConsolePluginCSPApplyConfiguration { for i := range values { b.Values = append(b.Values, values[i]) } diff --git a/console/applyconfigurations/console/v1/consoleplugini18n.go b/console/applyconfigurations/console/v1/consoleplugini18n.go index 2928e6269c..050b3bbd7b 100644 --- a/console/applyconfigurations/console/v1/consoleplugini18n.go +++ b/console/applyconfigurations/console/v1/consoleplugini18n.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" ) // ConsolePluginI18nApplyConfiguration represents a declarative configuration of the ConsolePluginI18n type for use // with apply. type ConsolePluginI18nApplyConfiguration struct { - LoadType *v1.LoadType `json:"loadType,omitempty"` + LoadType *consolev1.LoadType `json:"loadType,omitempty"` } // ConsolePluginI18nApplyConfiguration constructs a declarative configuration of the ConsolePluginI18n type for use with @@ -21,7 +21,7 @@ func ConsolePluginI18n() *ConsolePluginI18nApplyConfiguration { // WithLoadType sets the LoadType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LoadType field is set to the value of the last call. -func (b *ConsolePluginI18nApplyConfiguration) WithLoadType(value v1.LoadType) *ConsolePluginI18nApplyConfiguration { +func (b *ConsolePluginI18nApplyConfiguration) WithLoadType(value consolev1.LoadType) *ConsolePluginI18nApplyConfiguration { b.LoadType = &value return b } diff --git a/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go b/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go index ef7944a06c..2a6b8bad55 100644 --- a/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go +++ b/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" ) // ConsolePluginProxyEndpointApplyConfiguration represents a declarative configuration of the ConsolePluginProxyEndpoint type for use // with apply. type ConsolePluginProxyEndpointApplyConfiguration struct { - Type *v1.ConsolePluginProxyType `json:"type,omitempty"` + Type *consolev1.ConsolePluginProxyType `json:"type,omitempty"` Service *ConsolePluginProxyServiceConfigApplyConfiguration `json:"service,omitempty"` } @@ -22,7 +22,7 @@ func ConsolePluginProxyEndpoint() *ConsolePluginProxyEndpointApplyConfiguration // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ConsolePluginProxyEndpointApplyConfiguration) WithType(value v1.ConsolePluginProxyType) *ConsolePluginProxyEndpointApplyConfiguration { +func (b *ConsolePluginProxyEndpointApplyConfiguration) WithType(value consolev1.ConsolePluginProxyType) *ConsolePluginProxyEndpointApplyConfiguration { b.Type = &value return b } diff --git a/console/applyconfigurations/console/v1/consolequickstart.go b/console/applyconfigurations/console/v1/consolequickstart.go index 319287c7cd..290c83ec8e 100644 --- a/console/applyconfigurations/console/v1/consolequickstart.go +++ b/console/applyconfigurations/console/v1/consolequickstart.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleQuickStartApplyConfiguration represents a declarative configuration of the ConsoleQuickStart type for use // with apply. type ConsoleQuickStartApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleQuickStartSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleQuickStartSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleQuickStart constructs a declarative configuration of the ConsoleQuickStart type for use with @@ -40,18 +40,18 @@ func ConsoleQuickStart(name string) *ConsoleQuickStartApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleQuickStart(consoleQuickStart *apiconsolev1.ConsoleQuickStart, fieldManager string) (*ConsoleQuickStartApplyConfiguration, error) { +func ExtractConsoleQuickStart(consoleQuickStart *consolev1.ConsoleQuickStart, fieldManager string) (*ConsoleQuickStartApplyConfiguration, error) { return extractConsoleQuickStart(consoleQuickStart, fieldManager, "") } // ExtractConsoleQuickStartStatus is the same as ExtractConsoleQuickStart except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleQuickStartStatus(consoleQuickStart *apiconsolev1.ConsoleQuickStart, fieldManager string) (*ConsoleQuickStartApplyConfiguration, error) { +func ExtractConsoleQuickStartStatus(consoleQuickStart *consolev1.ConsoleQuickStart, fieldManager string) (*ConsoleQuickStartApplyConfiguration, error) { return extractConsoleQuickStart(consoleQuickStart, fieldManager, "status") } -func extractConsoleQuickStart(consoleQuickStart *apiconsolev1.ConsoleQuickStart, fieldManager string, subresource string) (*ConsoleQuickStartApplyConfiguration, error) { +func extractConsoleQuickStart(consoleQuickStart *consolev1.ConsoleQuickStart, fieldManager string, subresource string) (*ConsoleQuickStartApplyConfiguration, error) { b := &ConsoleQuickStartApplyConfiguration{} err := managedfields.ExtractInto(consoleQuickStart, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleQuickStart"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleQuickStart(consoleQuickStart *apiconsolev1.ConsoleQuickStart, // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithKind(value string) *ConsoleQuickStartApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithKind(value string) *ConsoleQui // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithAPIVersion(value string) *ConsoleQuickStartApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithAPIVersion(value string) *Cons // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithName(value string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithName(value string) *ConsoleQui // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithGenerateName(value string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithGenerateName(value string) *Co // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithNamespace(value string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithNamespace(value string) *Conso // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithUID(value types.UID) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithUID(value types.UID) *ConsoleQ // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithResourceVersion(value string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleQuickStartApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithGeneration(value int64) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleQuickStartApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleQuickStartApplyConfiguration { +func (b *ConsoleQuickStartApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleQuickStartApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleQuickStartApplyConfiguration { +func (b *ConsoleQuickStartApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleQuickStartApplyConfiguration) WithDeletionTimestamp(value metav1 // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleQuickStartApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleQuickStartApplyConfiguration) WithDeletionGracePeriodSeconds(val // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleQuickStartApplyConfiguration) WithLabels(entries map[string]string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleQuickStartApplyConfiguration) WithLabels(entries map[string]stri // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleQuickStartApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleQuickStartApplyConfiguration) WithAnnotations(entries map[string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleQuickStartApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleQuickStartApplyConfiguration { +func (b *ConsoleQuickStartApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleQuickStartApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *ConsoleQuickStartApplyConfiguration) WithFinalizers(values ...string) *ConsoleQuickStartApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleQuickStartApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleQuickStartApplyConfiguration) WithSpec(value *ConsoleQuickStartS // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleQuickStartApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consolesample.go b/console/applyconfigurations/console/v1/consolesample.go index fccc1c478e..1d9d99fcd5 100644 --- a/console/applyconfigurations/console/v1/consolesample.go +++ b/console/applyconfigurations/console/v1/consolesample.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleSampleApplyConfiguration represents a declarative configuration of the ConsoleSample type for use // with apply. type ConsoleSampleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleSampleSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleSampleSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleSample constructs a declarative configuration of the ConsoleSample type for use with @@ -40,18 +40,18 @@ func ConsoleSample(name string) *ConsoleSampleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleSample(consoleSample *apiconsolev1.ConsoleSample, fieldManager string) (*ConsoleSampleApplyConfiguration, error) { +func ExtractConsoleSample(consoleSample *consolev1.ConsoleSample, fieldManager string) (*ConsoleSampleApplyConfiguration, error) { return extractConsoleSample(consoleSample, fieldManager, "") } // ExtractConsoleSampleStatus is the same as ExtractConsoleSample except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleSampleStatus(consoleSample *apiconsolev1.ConsoleSample, fieldManager string) (*ConsoleSampleApplyConfiguration, error) { +func ExtractConsoleSampleStatus(consoleSample *consolev1.ConsoleSample, fieldManager string) (*ConsoleSampleApplyConfiguration, error) { return extractConsoleSample(consoleSample, fieldManager, "status") } -func extractConsoleSample(consoleSample *apiconsolev1.ConsoleSample, fieldManager string, subresource string) (*ConsoleSampleApplyConfiguration, error) { +func extractConsoleSample(consoleSample *consolev1.ConsoleSample, fieldManager string, subresource string) (*ConsoleSampleApplyConfiguration, error) { b := &ConsoleSampleApplyConfiguration{} err := managedfields.ExtractInto(consoleSample, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleSample"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleSample(consoleSample *apiconsolev1.ConsoleSample, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithKind(value string) *ConsoleSampleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleSampleApplyConfiguration) WithKind(value string) *ConsoleSampleA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithAPIVersion(value string) *ConsoleSampleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleSampleApplyConfiguration) WithAPIVersion(value string) *ConsoleS // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithName(value string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleSampleApplyConfiguration) WithName(value string) *ConsoleSampleA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithGenerateName(value string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleSampleApplyConfiguration) WithGenerateName(value string) *Consol // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithNamespace(value string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleSampleApplyConfiguration) WithNamespace(value string) *ConsoleSa // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithUID(value types.UID) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleSampleApplyConfiguration) WithUID(value types.UID) *ConsoleSampl // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithResourceVersion(value string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleSampleApplyConfiguration) WithResourceVersion(value string) *Con // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithGeneration(value int64) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleSampleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleSampleApplyConfiguration { +func (b *ConsoleSampleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleSampleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleSampleApplyConfiguration { +func (b *ConsoleSampleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleSampleApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleSampleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleSampleApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleSampleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleSampleApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleSampleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleSampleApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleSampleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleSampleApplyConfiguration { +func (b *ConsoleSampleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleSampleApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *ConsoleSampleApplyConfiguration) WithFinalizers(values ...string) *ConsoleSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleSampleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleSampleApplyConfiguration) WithSpec(value *ConsoleSampleSpecApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleSampleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consolesamplesource.go b/console/applyconfigurations/console/v1/consolesamplesource.go index 9aa774ef04..372a6c7d7d 100644 --- a/console/applyconfigurations/console/v1/consolesamplesource.go +++ b/console/applyconfigurations/console/v1/consolesamplesource.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" ) // ConsoleSampleSourceApplyConfiguration represents a declarative configuration of the ConsoleSampleSource type for use // with apply. type ConsoleSampleSourceApplyConfiguration struct { - Type *v1.ConsoleSampleSourceType `json:"type,omitempty"` + Type *consolev1.ConsoleSampleSourceType `json:"type,omitempty"` GitImport *ConsoleSampleGitImportSourceApplyConfiguration `json:"gitImport,omitempty"` ContainerImport *ConsoleSampleContainerImportSourceApplyConfiguration `json:"containerImport,omitempty"` } @@ -23,7 +23,7 @@ func ConsoleSampleSource() *ConsoleSampleSourceApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ConsoleSampleSourceApplyConfiguration) WithType(value v1.ConsoleSampleSourceType) *ConsoleSampleSourceApplyConfiguration { +func (b *ConsoleSampleSourceApplyConfiguration) WithType(value consolev1.ConsoleSampleSourceType) *ConsoleSampleSourceApplyConfiguration { b.Type = &value return b } diff --git a/console/applyconfigurations/console/v1/consoleyamlsample.go b/console/applyconfigurations/console/v1/consoleyamlsample.go index 3b096d1550..c9a7c7282c 100644 --- a/console/applyconfigurations/console/v1/consoleyamlsample.go +++ b/console/applyconfigurations/console/v1/consoleyamlsample.go @@ -3,20 +3,20 @@ package v1 import ( - apiconsolev1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/api/console/v1" internal "github.com/openshift/client-go/console/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleYAMLSampleApplyConfiguration represents a declarative configuration of the ConsoleYAMLSample type for use // with apply. type ConsoleYAMLSampleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleYAMLSampleSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleYAMLSampleSpecApplyConfiguration `json:"spec,omitempty"` } // ConsoleYAMLSample constructs a declarative configuration of the ConsoleYAMLSample type for use with @@ -40,18 +40,18 @@ func ConsoleYAMLSample(name string) *ConsoleYAMLSampleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsoleYAMLSample(consoleYAMLSample *apiconsolev1.ConsoleYAMLSample, fieldManager string) (*ConsoleYAMLSampleApplyConfiguration, error) { +func ExtractConsoleYAMLSample(consoleYAMLSample *consolev1.ConsoleYAMLSample, fieldManager string) (*ConsoleYAMLSampleApplyConfiguration, error) { return extractConsoleYAMLSample(consoleYAMLSample, fieldManager, "") } // ExtractConsoleYAMLSampleStatus is the same as ExtractConsoleYAMLSample except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleYAMLSampleStatus(consoleYAMLSample *apiconsolev1.ConsoleYAMLSample, fieldManager string) (*ConsoleYAMLSampleApplyConfiguration, error) { +func ExtractConsoleYAMLSampleStatus(consoleYAMLSample *consolev1.ConsoleYAMLSample, fieldManager string) (*ConsoleYAMLSampleApplyConfiguration, error) { return extractConsoleYAMLSample(consoleYAMLSample, fieldManager, "status") } -func extractConsoleYAMLSample(consoleYAMLSample *apiconsolev1.ConsoleYAMLSample, fieldManager string, subresource string) (*ConsoleYAMLSampleApplyConfiguration, error) { +func extractConsoleYAMLSample(consoleYAMLSample *consolev1.ConsoleYAMLSample, fieldManager string, subresource string) (*ConsoleYAMLSampleApplyConfiguration, error) { b := &ConsoleYAMLSampleApplyConfiguration{} err := managedfields.ExtractInto(consoleYAMLSample, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleYAMLSample"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractConsoleYAMLSample(consoleYAMLSample *apiconsolev1.ConsoleYAMLSample, // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithKind(value string) *ConsoleYAMLSampleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithKind(value string) *ConsoleYAM // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithAPIVersion(value string) *ConsoleYAMLSampleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithAPIVersion(value string) *Cons // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithName(value string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithName(value string) *ConsoleYAM // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithGenerateName(value string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithGenerateName(value string) *Co // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithNamespace(value string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithNamespace(value string) *Conso // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithUID(value types.UID) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithUID(value types.UID) *ConsoleY // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithResourceVersion(value string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithGeneration(value int64) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleYAMLSampleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleYAMLSampleApplyConfiguration { +func (b *ConsoleYAMLSampleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleYAMLSampleApplyConfiguration { +func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionTimestamp(value metav1 // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionGracePeriodSeconds(val // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleYAMLSampleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithLabels(entries map[string]stri // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleYAMLSampleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithAnnotations(entries map[string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleYAMLSampleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleYAMLSampleApplyConfiguration { +func (b *ConsoleYAMLSampleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *ConsoleYAMLSampleApplyConfiguration) WithFinalizers(values ...string) *ConsoleYAMLSampleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleYAMLSampleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *ConsoleYAMLSampleApplyConfiguration) WithSpec(value *ConsoleYAMLSampleS // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleYAMLSampleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/console/applyconfigurations/console/v1/consoleyamlsamplespec.go b/console/applyconfigurations/console/v1/consoleyamlsamplespec.go index c2b1384cb2..d5fee7bc13 100644 --- a/console/applyconfigurations/console/v1/consoleyamlsamplespec.go +++ b/console/applyconfigurations/console/v1/consoleyamlsamplespec.go @@ -4,13 +4,13 @@ package v1 import ( consolev1 "github.com/openshift/api/console/v1" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleYAMLSampleSpecApplyConfiguration represents a declarative configuration of the ConsoleYAMLSampleSpec type for use // with apply. type ConsoleYAMLSampleSpecApplyConfiguration struct { - TargetResource *v1.TypeMetaApplyConfiguration `json:"targetResource,omitempty"` + TargetResource *metav1.TypeMetaApplyConfiguration `json:"targetResource,omitempty"` Title *consolev1.ConsoleYAMLSampleTitle `json:"title,omitempty"` Description *consolev1.ConsoleYAMLSampleDescription `json:"description,omitempty"` YAML *consolev1.ConsoleYAMLSampleYAML `json:"yaml,omitempty"` @@ -26,7 +26,7 @@ func ConsoleYAMLSampleSpec() *ConsoleYAMLSampleSpecApplyConfiguration { // WithTargetResource sets the TargetResource field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TargetResource field is set to the value of the last call. -func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithTargetResource(value *v1.TypeMetaApplyConfiguration) *ConsoleYAMLSampleSpecApplyConfiguration { +func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithTargetResource(value *metav1.TypeMetaApplyConfiguration) *ConsoleYAMLSampleSpecApplyConfiguration { b.TargetResource = value return b } diff --git a/console/applyconfigurations/console/v1/namespacedashboardspec.go b/console/applyconfigurations/console/v1/namespacedashboardspec.go index f310ae46d8..6731ab5a2b 100644 --- a/console/applyconfigurations/console/v1/namespacedashboardspec.go +++ b/console/applyconfigurations/console/v1/namespacedashboardspec.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NamespaceDashboardSpecApplyConfiguration represents a declarative configuration of the NamespaceDashboardSpec type for use // with apply. type NamespaceDashboardSpecApplyConfiguration struct { - Namespaces []string `json:"namespaces,omitempty"` - NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + Namespaces []string `json:"namespaces,omitempty"` + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` } // NamespaceDashboardSpecApplyConfiguration constructs a declarative configuration of the NamespaceDashboardSpec type for use with @@ -32,7 +32,7 @@ func (b *NamespaceDashboardSpecApplyConfiguration) WithNamespaces(values ...stri // WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NamespaceSelector field is set to the value of the last call. -func (b *NamespaceDashboardSpecApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *NamespaceDashboardSpecApplyConfiguration { +func (b *NamespaceDashboardSpecApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *NamespaceDashboardSpecApplyConfiguration { b.NamespaceSelector = value return b } diff --git a/console/applyconfigurations/internal/internal.go b/console/applyconfigurations/internal/internal.go index efa08520a2..d60d9e0cf6 100644 --- a/console/applyconfigurations/internal/internal.go +++ b/console/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/console/clientset/versioned/clientset.go b/console/clientset/versioned/clientset.go index 7ff9fcc1e3..a03b79be02 100644 --- a/console/clientset/versioned/clientset.go +++ b/console/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" consolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" discovery "k8s.io/client-go/discovery" diff --git a/console/clientset/versioned/typed/console/v1/console_client.go b/console/clientset/versioned/typed/console/v1/console_client.go index eaf99076eb..660b9b48d5 100644 --- a/console/clientset/versioned/typed/console/v1/console_client.go +++ b/console/clientset/versioned/typed/console/v1/console_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/console/v1" - "github.com/openshift/client-go/console/clientset/versioned/scheme" + consolev1 "github.com/openshift/api/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -104,10 +104,10 @@ func New(c rest.Interface) *ConsoleV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := consolev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/console/clientset/versioned/typed/console/v1/consoleclidownload.go b/console/clientset/versioned/typed/console/v1/consoleclidownload.go index 93b0692dd1..0081fd62a6 100644 --- a/console/clientset/versioned/typed/console/v1/consoleclidownload.go +++ b/console/clientset/versioned/typed/console/v1/consoleclidownload.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleCLIDownloadsGetter interface { // ConsoleCLIDownloadInterface has methods to work with ConsoleCLIDownload resources. type ConsoleCLIDownloadInterface interface { - Create(ctx context.Context, consoleCLIDownload *v1.ConsoleCLIDownload, opts metav1.CreateOptions) (*v1.ConsoleCLIDownload, error) - Update(ctx context.Context, consoleCLIDownload *v1.ConsoleCLIDownload, opts metav1.UpdateOptions) (*v1.ConsoleCLIDownload, error) + Create(ctx context.Context, consoleCLIDownload *consolev1.ConsoleCLIDownload, opts metav1.CreateOptions) (*consolev1.ConsoleCLIDownload, error) + Update(ctx context.Context, consoleCLIDownload *consolev1.ConsoleCLIDownload, opts metav1.UpdateOptions) (*consolev1.ConsoleCLIDownload, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleCLIDownload, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleCLIDownloadList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleCLIDownload, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleCLIDownloadList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleCLIDownload, err error) - Apply(ctx context.Context, consoleCLIDownload *consolev1.ConsoleCLIDownloadApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleCLIDownload, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleCLIDownload, err error) + Apply(ctx context.Context, consoleCLIDownload *applyconfigurationsconsolev1.ConsoleCLIDownloadApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleCLIDownload, err error) ConsoleCLIDownloadExpansion } // consoleCLIDownloads implements ConsoleCLIDownloadInterface type consoleCLIDownloads struct { - *gentype.ClientWithListAndApply[*v1.ConsoleCLIDownload, *v1.ConsoleCLIDownloadList, *consolev1.ConsoleCLIDownloadApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleCLIDownload, *consolev1.ConsoleCLIDownloadList, *applyconfigurationsconsolev1.ConsoleCLIDownloadApplyConfiguration] } // newConsoleCLIDownloads returns a ConsoleCLIDownloads func newConsoleCLIDownloads(c *ConsoleV1Client) *consoleCLIDownloads { return &consoleCLIDownloads{ - gentype.NewClientWithListAndApply[*v1.ConsoleCLIDownload, *v1.ConsoleCLIDownloadList, *consolev1.ConsoleCLIDownloadApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleCLIDownload, *consolev1.ConsoleCLIDownloadList, *applyconfigurationsconsolev1.ConsoleCLIDownloadApplyConfiguration]( "consoleclidownloads", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleCLIDownload { return &v1.ConsoleCLIDownload{} }, - func() *v1.ConsoleCLIDownloadList { return &v1.ConsoleCLIDownloadList{} }), + func() *consolev1.ConsoleCLIDownload { return &consolev1.ConsoleCLIDownload{} }, + func() *consolev1.ConsoleCLIDownloadList { return &consolev1.ConsoleCLIDownloadList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go b/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go index d5c6ec68de..08e467dd9f 100644 --- a/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go +++ b/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleExternalLogLinksGetter interface { // ConsoleExternalLogLinkInterface has methods to work with ConsoleExternalLogLink resources. type ConsoleExternalLogLinkInterface interface { - Create(ctx context.Context, consoleExternalLogLink *v1.ConsoleExternalLogLink, opts metav1.CreateOptions) (*v1.ConsoleExternalLogLink, error) - Update(ctx context.Context, consoleExternalLogLink *v1.ConsoleExternalLogLink, opts metav1.UpdateOptions) (*v1.ConsoleExternalLogLink, error) + Create(ctx context.Context, consoleExternalLogLink *consolev1.ConsoleExternalLogLink, opts metav1.CreateOptions) (*consolev1.ConsoleExternalLogLink, error) + Update(ctx context.Context, consoleExternalLogLink *consolev1.ConsoleExternalLogLink, opts metav1.UpdateOptions) (*consolev1.ConsoleExternalLogLink, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleExternalLogLink, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleExternalLogLinkList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleExternalLogLink, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleExternalLogLinkList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleExternalLogLink, err error) - Apply(ctx context.Context, consoleExternalLogLink *consolev1.ConsoleExternalLogLinkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleExternalLogLink, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleExternalLogLink, err error) + Apply(ctx context.Context, consoleExternalLogLink *applyconfigurationsconsolev1.ConsoleExternalLogLinkApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleExternalLogLink, err error) ConsoleExternalLogLinkExpansion } // consoleExternalLogLinks implements ConsoleExternalLogLinkInterface type consoleExternalLogLinks struct { - *gentype.ClientWithListAndApply[*v1.ConsoleExternalLogLink, *v1.ConsoleExternalLogLinkList, *consolev1.ConsoleExternalLogLinkApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleExternalLogLink, *consolev1.ConsoleExternalLogLinkList, *applyconfigurationsconsolev1.ConsoleExternalLogLinkApplyConfiguration] } // newConsoleExternalLogLinks returns a ConsoleExternalLogLinks func newConsoleExternalLogLinks(c *ConsoleV1Client) *consoleExternalLogLinks { return &consoleExternalLogLinks{ - gentype.NewClientWithListAndApply[*v1.ConsoleExternalLogLink, *v1.ConsoleExternalLogLinkList, *consolev1.ConsoleExternalLogLinkApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleExternalLogLink, *consolev1.ConsoleExternalLogLinkList, *applyconfigurationsconsolev1.ConsoleExternalLogLinkApplyConfiguration]( "consoleexternalloglinks", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleExternalLogLink { return &v1.ConsoleExternalLogLink{} }, - func() *v1.ConsoleExternalLogLinkList { return &v1.ConsoleExternalLogLinkList{} }), + func() *consolev1.ConsoleExternalLogLink { return &consolev1.ConsoleExternalLogLink{} }, + func() *consolev1.ConsoleExternalLogLinkList { return &consolev1.ConsoleExternalLogLinkList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consolelink.go b/console/clientset/versioned/typed/console/v1/consolelink.go index afb54d9707..6acc519952 100644 --- a/console/clientset/versioned/typed/console/v1/consolelink.go +++ b/console/clientset/versioned/typed/console/v1/consolelink.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleLinksGetter interface { // ConsoleLinkInterface has methods to work with ConsoleLink resources. type ConsoleLinkInterface interface { - Create(ctx context.Context, consoleLink *v1.ConsoleLink, opts metav1.CreateOptions) (*v1.ConsoleLink, error) - Update(ctx context.Context, consoleLink *v1.ConsoleLink, opts metav1.UpdateOptions) (*v1.ConsoleLink, error) + Create(ctx context.Context, consoleLink *consolev1.ConsoleLink, opts metav1.CreateOptions) (*consolev1.ConsoleLink, error) + Update(ctx context.Context, consoleLink *consolev1.ConsoleLink, opts metav1.UpdateOptions) (*consolev1.ConsoleLink, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleLink, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleLinkList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleLink, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleLinkList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleLink, err error) - Apply(ctx context.Context, consoleLink *consolev1.ConsoleLinkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleLink, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleLink, err error) + Apply(ctx context.Context, consoleLink *applyconfigurationsconsolev1.ConsoleLinkApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleLink, err error) ConsoleLinkExpansion } // consoleLinks implements ConsoleLinkInterface type consoleLinks struct { - *gentype.ClientWithListAndApply[*v1.ConsoleLink, *v1.ConsoleLinkList, *consolev1.ConsoleLinkApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleLink, *consolev1.ConsoleLinkList, *applyconfigurationsconsolev1.ConsoleLinkApplyConfiguration] } // newConsoleLinks returns a ConsoleLinks func newConsoleLinks(c *ConsoleV1Client) *consoleLinks { return &consoleLinks{ - gentype.NewClientWithListAndApply[*v1.ConsoleLink, *v1.ConsoleLinkList, *consolev1.ConsoleLinkApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleLink, *consolev1.ConsoleLinkList, *applyconfigurationsconsolev1.ConsoleLinkApplyConfiguration]( "consolelinks", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleLink { return &v1.ConsoleLink{} }, - func() *v1.ConsoleLinkList { return &v1.ConsoleLinkList{} }), + func() *consolev1.ConsoleLink { return &consolev1.ConsoleLink{} }, + func() *consolev1.ConsoleLinkList { return &consolev1.ConsoleLinkList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consolenotification.go b/console/clientset/versioned/typed/console/v1/consolenotification.go index 30ef4ec5b3..bf46fa43d8 100644 --- a/console/clientset/versioned/typed/console/v1/consolenotification.go +++ b/console/clientset/versioned/typed/console/v1/consolenotification.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleNotificationsGetter interface { // ConsoleNotificationInterface has methods to work with ConsoleNotification resources. type ConsoleNotificationInterface interface { - Create(ctx context.Context, consoleNotification *v1.ConsoleNotification, opts metav1.CreateOptions) (*v1.ConsoleNotification, error) - Update(ctx context.Context, consoleNotification *v1.ConsoleNotification, opts metav1.UpdateOptions) (*v1.ConsoleNotification, error) + Create(ctx context.Context, consoleNotification *consolev1.ConsoleNotification, opts metav1.CreateOptions) (*consolev1.ConsoleNotification, error) + Update(ctx context.Context, consoleNotification *consolev1.ConsoleNotification, opts metav1.UpdateOptions) (*consolev1.ConsoleNotification, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleNotification, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleNotificationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleNotification, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleNotificationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleNotification, err error) - Apply(ctx context.Context, consoleNotification *consolev1.ConsoleNotificationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleNotification, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleNotification, err error) + Apply(ctx context.Context, consoleNotification *applyconfigurationsconsolev1.ConsoleNotificationApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleNotification, err error) ConsoleNotificationExpansion } // consoleNotifications implements ConsoleNotificationInterface type consoleNotifications struct { - *gentype.ClientWithListAndApply[*v1.ConsoleNotification, *v1.ConsoleNotificationList, *consolev1.ConsoleNotificationApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleNotification, *consolev1.ConsoleNotificationList, *applyconfigurationsconsolev1.ConsoleNotificationApplyConfiguration] } // newConsoleNotifications returns a ConsoleNotifications func newConsoleNotifications(c *ConsoleV1Client) *consoleNotifications { return &consoleNotifications{ - gentype.NewClientWithListAndApply[*v1.ConsoleNotification, *v1.ConsoleNotificationList, *consolev1.ConsoleNotificationApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleNotification, *consolev1.ConsoleNotificationList, *applyconfigurationsconsolev1.ConsoleNotificationApplyConfiguration]( "consolenotifications", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleNotification { return &v1.ConsoleNotification{} }, - func() *v1.ConsoleNotificationList { return &v1.ConsoleNotificationList{} }), + func() *consolev1.ConsoleNotification { return &consolev1.ConsoleNotification{} }, + func() *consolev1.ConsoleNotificationList { return &consolev1.ConsoleNotificationList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consoleplugin.go b/console/clientset/versioned/typed/console/v1/consoleplugin.go index 650524d984..d592717e9b 100644 --- a/console/clientset/versioned/typed/console/v1/consoleplugin.go +++ b/console/clientset/versioned/typed/console/v1/consoleplugin.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsolePluginsGetter interface { // ConsolePluginInterface has methods to work with ConsolePlugin resources. type ConsolePluginInterface interface { - Create(ctx context.Context, consolePlugin *v1.ConsolePlugin, opts metav1.CreateOptions) (*v1.ConsolePlugin, error) - Update(ctx context.Context, consolePlugin *v1.ConsolePlugin, opts metav1.UpdateOptions) (*v1.ConsolePlugin, error) + Create(ctx context.Context, consolePlugin *consolev1.ConsolePlugin, opts metav1.CreateOptions) (*consolev1.ConsolePlugin, error) + Update(ctx context.Context, consolePlugin *consolev1.ConsolePlugin, opts metav1.UpdateOptions) (*consolev1.ConsolePlugin, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsolePlugin, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsolePluginList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsolePlugin, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsolePluginList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsolePlugin, err error) - Apply(ctx context.Context, consolePlugin *consolev1.ConsolePluginApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsolePlugin, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsolePlugin, err error) + Apply(ctx context.Context, consolePlugin *applyconfigurationsconsolev1.ConsolePluginApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsolePlugin, err error) ConsolePluginExpansion } // consolePlugins implements ConsolePluginInterface type consolePlugins struct { - *gentype.ClientWithListAndApply[*v1.ConsolePlugin, *v1.ConsolePluginList, *consolev1.ConsolePluginApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsolePlugin, *consolev1.ConsolePluginList, *applyconfigurationsconsolev1.ConsolePluginApplyConfiguration] } // newConsolePlugins returns a ConsolePlugins func newConsolePlugins(c *ConsoleV1Client) *consolePlugins { return &consolePlugins{ - gentype.NewClientWithListAndApply[*v1.ConsolePlugin, *v1.ConsolePluginList, *consolev1.ConsolePluginApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsolePlugin, *consolev1.ConsolePluginList, *applyconfigurationsconsolev1.ConsolePluginApplyConfiguration]( "consoleplugins", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsolePlugin { return &v1.ConsolePlugin{} }, - func() *v1.ConsolePluginList { return &v1.ConsolePluginList{} }), + func() *consolev1.ConsolePlugin { return &consolev1.ConsolePlugin{} }, + func() *consolev1.ConsolePluginList { return &consolev1.ConsolePluginList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consolequickstart.go b/console/clientset/versioned/typed/console/v1/consolequickstart.go index 330ccb2304..7c69b11aaa 100644 --- a/console/clientset/versioned/typed/console/v1/consolequickstart.go +++ b/console/clientset/versioned/typed/console/v1/consolequickstart.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleQuickStartsGetter interface { // ConsoleQuickStartInterface has methods to work with ConsoleQuickStart resources. type ConsoleQuickStartInterface interface { - Create(ctx context.Context, consoleQuickStart *v1.ConsoleQuickStart, opts metav1.CreateOptions) (*v1.ConsoleQuickStart, error) - Update(ctx context.Context, consoleQuickStart *v1.ConsoleQuickStart, opts metav1.UpdateOptions) (*v1.ConsoleQuickStart, error) + Create(ctx context.Context, consoleQuickStart *consolev1.ConsoleQuickStart, opts metav1.CreateOptions) (*consolev1.ConsoleQuickStart, error) + Update(ctx context.Context, consoleQuickStart *consolev1.ConsoleQuickStart, opts metav1.UpdateOptions) (*consolev1.ConsoleQuickStart, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleQuickStart, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleQuickStartList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleQuickStart, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleQuickStartList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleQuickStart, err error) - Apply(ctx context.Context, consoleQuickStart *consolev1.ConsoleQuickStartApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleQuickStart, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleQuickStart, err error) + Apply(ctx context.Context, consoleQuickStart *applyconfigurationsconsolev1.ConsoleQuickStartApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleQuickStart, err error) ConsoleQuickStartExpansion } // consoleQuickStarts implements ConsoleQuickStartInterface type consoleQuickStarts struct { - *gentype.ClientWithListAndApply[*v1.ConsoleQuickStart, *v1.ConsoleQuickStartList, *consolev1.ConsoleQuickStartApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleQuickStart, *consolev1.ConsoleQuickStartList, *applyconfigurationsconsolev1.ConsoleQuickStartApplyConfiguration] } // newConsoleQuickStarts returns a ConsoleQuickStarts func newConsoleQuickStarts(c *ConsoleV1Client) *consoleQuickStarts { return &consoleQuickStarts{ - gentype.NewClientWithListAndApply[*v1.ConsoleQuickStart, *v1.ConsoleQuickStartList, *consolev1.ConsoleQuickStartApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleQuickStart, *consolev1.ConsoleQuickStartList, *applyconfigurationsconsolev1.ConsoleQuickStartApplyConfiguration]( "consolequickstarts", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleQuickStart { return &v1.ConsoleQuickStart{} }, - func() *v1.ConsoleQuickStartList { return &v1.ConsoleQuickStartList{} }), + func() *consolev1.ConsoleQuickStart { return &consolev1.ConsoleQuickStart{} }, + func() *consolev1.ConsoleQuickStartList { return &consolev1.ConsoleQuickStartList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consolesample.go b/console/clientset/versioned/typed/console/v1/consolesample.go index 2eb96aa546..6298129545 100644 --- a/console/clientset/versioned/typed/console/v1/consolesample.go +++ b/console/clientset/versioned/typed/console/v1/consolesample.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleSamplesGetter interface { // ConsoleSampleInterface has methods to work with ConsoleSample resources. type ConsoleSampleInterface interface { - Create(ctx context.Context, consoleSample *v1.ConsoleSample, opts metav1.CreateOptions) (*v1.ConsoleSample, error) - Update(ctx context.Context, consoleSample *v1.ConsoleSample, opts metav1.UpdateOptions) (*v1.ConsoleSample, error) + Create(ctx context.Context, consoleSample *consolev1.ConsoleSample, opts metav1.CreateOptions) (*consolev1.ConsoleSample, error) + Update(ctx context.Context, consoleSample *consolev1.ConsoleSample, opts metav1.UpdateOptions) (*consolev1.ConsoleSample, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleSample, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleSampleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleSample, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleSampleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleSample, err error) - Apply(ctx context.Context, consoleSample *consolev1.ConsoleSampleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleSample, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleSample, err error) + Apply(ctx context.Context, consoleSample *applyconfigurationsconsolev1.ConsoleSampleApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleSample, err error) ConsoleSampleExpansion } // consoleSamples implements ConsoleSampleInterface type consoleSamples struct { - *gentype.ClientWithListAndApply[*v1.ConsoleSample, *v1.ConsoleSampleList, *consolev1.ConsoleSampleApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleSample, *consolev1.ConsoleSampleList, *applyconfigurationsconsolev1.ConsoleSampleApplyConfiguration] } // newConsoleSamples returns a ConsoleSamples func newConsoleSamples(c *ConsoleV1Client) *consoleSamples { return &consoleSamples{ - gentype.NewClientWithListAndApply[*v1.ConsoleSample, *v1.ConsoleSampleList, *consolev1.ConsoleSampleApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleSample, *consolev1.ConsoleSampleList, *applyconfigurationsconsolev1.ConsoleSampleApplyConfiguration]( "consolesamples", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleSample { return &v1.ConsoleSample{} }, - func() *v1.ConsoleSampleList { return &v1.ConsoleSampleList{} }), + func() *consolev1.ConsoleSample { return &consolev1.ConsoleSample{} }, + func() *consolev1.ConsoleSampleList { return &consolev1.ConsoleSampleList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/consoleyamlsample.go b/console/clientset/versioned/typed/console/v1/consoleyamlsample.go index b12d3a7e83..32c07d856c 100644 --- a/console/clientset/versioned/typed/console/v1/consoleyamlsample.go +++ b/console/clientset/versioned/typed/console/v1/consoleyamlsample.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/console/v1" - consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ConsoleYAMLSamplesGetter interface { // ConsoleYAMLSampleInterface has methods to work with ConsoleYAMLSample resources. type ConsoleYAMLSampleInterface interface { - Create(ctx context.Context, consoleYAMLSample *v1.ConsoleYAMLSample, opts metav1.CreateOptions) (*v1.ConsoleYAMLSample, error) - Update(ctx context.Context, consoleYAMLSample *v1.ConsoleYAMLSample, opts metav1.UpdateOptions) (*v1.ConsoleYAMLSample, error) + Create(ctx context.Context, consoleYAMLSample *consolev1.ConsoleYAMLSample, opts metav1.CreateOptions) (*consolev1.ConsoleYAMLSample, error) + Update(ctx context.Context, consoleYAMLSample *consolev1.ConsoleYAMLSample, opts metav1.UpdateOptions) (*consolev1.ConsoleYAMLSample, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ConsoleYAMLSample, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleYAMLSampleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleYAMLSample, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleYAMLSampleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleYAMLSample, err error) - Apply(ctx context.Context, consoleYAMLSample *consolev1.ConsoleYAMLSampleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleYAMLSample, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleYAMLSample, err error) + Apply(ctx context.Context, consoleYAMLSample *applyconfigurationsconsolev1.ConsoleYAMLSampleApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleYAMLSample, err error) ConsoleYAMLSampleExpansion } // consoleYAMLSamples implements ConsoleYAMLSampleInterface type consoleYAMLSamples struct { - *gentype.ClientWithListAndApply[*v1.ConsoleYAMLSample, *v1.ConsoleYAMLSampleList, *consolev1.ConsoleYAMLSampleApplyConfiguration] + *gentype.ClientWithListAndApply[*consolev1.ConsoleYAMLSample, *consolev1.ConsoleYAMLSampleList, *applyconfigurationsconsolev1.ConsoleYAMLSampleApplyConfiguration] } // newConsoleYAMLSamples returns a ConsoleYAMLSamples func newConsoleYAMLSamples(c *ConsoleV1Client) *consoleYAMLSamples { return &consoleYAMLSamples{ - gentype.NewClientWithListAndApply[*v1.ConsoleYAMLSample, *v1.ConsoleYAMLSampleList, *consolev1.ConsoleYAMLSampleApplyConfiguration]( + gentype.NewClientWithListAndApply[*consolev1.ConsoleYAMLSample, *consolev1.ConsoleYAMLSampleList, *applyconfigurationsconsolev1.ConsoleYAMLSampleApplyConfiguration]( "consoleyamlsamples", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ConsoleYAMLSample { return &v1.ConsoleYAMLSample{} }, - func() *v1.ConsoleYAMLSampleList { return &v1.ConsoleYAMLSampleList{} }), + func() *consolev1.ConsoleYAMLSample { return &consolev1.ConsoleYAMLSample{} }, + func() *consolev1.ConsoleYAMLSampleList { return &consolev1.ConsoleYAMLSampleList{} }, + ), } } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go b/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go index b213a34c26..05fd1edeb7 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go @@ -13,35 +13,35 @@ type FakeConsoleV1 struct { } func (c *FakeConsoleV1) ConsoleCLIDownloads() v1.ConsoleCLIDownloadInterface { - return &FakeConsoleCLIDownloads{c} + return newFakeConsoleCLIDownloads(c) } func (c *FakeConsoleV1) ConsoleExternalLogLinks() v1.ConsoleExternalLogLinkInterface { - return &FakeConsoleExternalLogLinks{c} + return newFakeConsoleExternalLogLinks(c) } func (c *FakeConsoleV1) ConsoleLinks() v1.ConsoleLinkInterface { - return &FakeConsoleLinks{c} + return newFakeConsoleLinks(c) } func (c *FakeConsoleV1) ConsoleNotifications() v1.ConsoleNotificationInterface { - return &FakeConsoleNotifications{c} + return newFakeConsoleNotifications(c) } func (c *FakeConsoleV1) ConsolePlugins() v1.ConsolePluginInterface { - return &FakeConsolePlugins{c} + return newFakeConsolePlugins(c) } func (c *FakeConsoleV1) ConsoleQuickStarts() v1.ConsoleQuickStartInterface { - return &FakeConsoleQuickStarts{c} + return newFakeConsoleQuickStarts(c) } func (c *FakeConsoleV1) ConsoleSamples() v1.ConsoleSampleInterface { - return &FakeConsoleSamples{c} + return newFakeConsoleSamples(c) } func (c *FakeConsoleV1) ConsoleYAMLSamples() v1.ConsoleYAMLSampleInterface { - return &FakeConsoleYAMLSamples{c} + return newFakeConsoleYAMLSamples(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go b/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go index c3d5e6d2d3..c4f35849d2 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleCLIDownloads implements ConsoleCLIDownloadInterface -type FakeConsoleCLIDownloads struct { +// fakeConsoleCLIDownloads implements ConsoleCLIDownloadInterface +type fakeConsoleCLIDownloads struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleCLIDownload, *v1.ConsoleCLIDownloadList, *consolev1.ConsoleCLIDownloadApplyConfiguration] Fake *FakeConsoleV1 } -var consoleclidownloadsResource = v1.SchemeGroupVersion.WithResource("consoleclidownloads") - -var consoleclidownloadsKind = v1.SchemeGroupVersion.WithKind("ConsoleCLIDownload") - -// Get takes name of the consoleCLIDownload, and returns the corresponding consoleCLIDownload object, and an error if there is any. -func (c *FakeConsoleCLIDownloads) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleCLIDownload, err error) { - emptyResult := &v1.ConsoleCLIDownload{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consoleclidownloadsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleCLIDownload), err -} - -// List takes label and field selectors, and returns the list of ConsoleCLIDownloads that match those selectors. -func (c *FakeConsoleCLIDownloads) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleCLIDownloadList, err error) { - emptyResult := &v1.ConsoleCLIDownloadList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consoleclidownloadsResource, consoleclidownloadsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleCLIDownloadList{ListMeta: obj.(*v1.ConsoleCLIDownloadList).ListMeta} - for _, item := range obj.(*v1.ConsoleCLIDownloadList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleCLIDownloads. -func (c *FakeConsoleCLIDownloads) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consoleclidownloadsResource, opts)) -} - -// Create takes the representation of a consoleCLIDownload and creates it. Returns the server's representation of the consoleCLIDownload, and an error, if there is any. -func (c *FakeConsoleCLIDownloads) Create(ctx context.Context, consoleCLIDownload *v1.ConsoleCLIDownload, opts metav1.CreateOptions) (result *v1.ConsoleCLIDownload, err error) { - emptyResult := &v1.ConsoleCLIDownload{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consoleclidownloadsResource, consoleCLIDownload, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleCLIDownload), err -} - -// Update takes the representation of a consoleCLIDownload and updates it. Returns the server's representation of the consoleCLIDownload, and an error, if there is any. -func (c *FakeConsoleCLIDownloads) Update(ctx context.Context, consoleCLIDownload *v1.ConsoleCLIDownload, opts metav1.UpdateOptions) (result *v1.ConsoleCLIDownload, err error) { - emptyResult := &v1.ConsoleCLIDownload{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consoleclidownloadsResource, consoleCLIDownload, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleCLIDownload), err -} - -// Delete takes name of the consoleCLIDownload and deletes it. Returns an error if one occurs. -func (c *FakeConsoleCLIDownloads) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consoleclidownloadsResource, name, opts), &v1.ConsoleCLIDownload{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleCLIDownloads) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consoleclidownloadsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleCLIDownloadList{}) - return err -} - -// Patch applies the patch and returns the patched consoleCLIDownload. -func (c *FakeConsoleCLIDownloads) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleCLIDownload, err error) { - emptyResult := &v1.ConsoleCLIDownload{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consoleclidownloadsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleCLIDownload), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleCLIDownload. -func (c *FakeConsoleCLIDownloads) Apply(ctx context.Context, consoleCLIDownload *consolev1.ConsoleCLIDownloadApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleCLIDownload, err error) { - if consoleCLIDownload == nil { - return nil, fmt.Errorf("consoleCLIDownload provided to Apply must not be nil") - } - data, err := json.Marshal(consoleCLIDownload) - if err != nil { - return nil, err - } - name := consoleCLIDownload.Name - if name == nil { - return nil, fmt.Errorf("consoleCLIDownload.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleCLIDownload{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consoleclidownloadsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleCLIDownloads(fake *FakeConsoleV1) typedconsolev1.ConsoleCLIDownloadInterface { + return &fakeConsoleCLIDownloads{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleCLIDownload, *v1.ConsoleCLIDownloadList, *consolev1.ConsoleCLIDownloadApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleclidownloads"), + v1.SchemeGroupVersion.WithKind("ConsoleCLIDownload"), + func() *v1.ConsoleCLIDownload { return &v1.ConsoleCLIDownload{} }, + func() *v1.ConsoleCLIDownloadList { return &v1.ConsoleCLIDownloadList{} }, + func(dst, src *v1.ConsoleCLIDownloadList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleCLIDownloadList) []*v1.ConsoleCLIDownload { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleCLIDownloadList, items []*v1.ConsoleCLIDownload) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsoleCLIDownload), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go b/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go index 5250f639e1..c48acf8727 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleExternalLogLinks implements ConsoleExternalLogLinkInterface -type FakeConsoleExternalLogLinks struct { +// fakeConsoleExternalLogLinks implements ConsoleExternalLogLinkInterface +type fakeConsoleExternalLogLinks struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleExternalLogLink, *v1.ConsoleExternalLogLinkList, *consolev1.ConsoleExternalLogLinkApplyConfiguration] Fake *FakeConsoleV1 } -var consoleexternalloglinksResource = v1.SchemeGroupVersion.WithResource("consoleexternalloglinks") - -var consoleexternalloglinksKind = v1.SchemeGroupVersion.WithKind("ConsoleExternalLogLink") - -// Get takes name of the consoleExternalLogLink, and returns the corresponding consoleExternalLogLink object, and an error if there is any. -func (c *FakeConsoleExternalLogLinks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleExternalLogLink, err error) { - emptyResult := &v1.ConsoleExternalLogLink{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consoleexternalloglinksResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleExternalLogLink), err -} - -// List takes label and field selectors, and returns the list of ConsoleExternalLogLinks that match those selectors. -func (c *FakeConsoleExternalLogLinks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleExternalLogLinkList, err error) { - emptyResult := &v1.ConsoleExternalLogLinkList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consoleexternalloglinksResource, consoleexternalloglinksKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleExternalLogLinkList{ListMeta: obj.(*v1.ConsoleExternalLogLinkList).ListMeta} - for _, item := range obj.(*v1.ConsoleExternalLogLinkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleExternalLogLinks. -func (c *FakeConsoleExternalLogLinks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consoleexternalloglinksResource, opts)) -} - -// Create takes the representation of a consoleExternalLogLink and creates it. Returns the server's representation of the consoleExternalLogLink, and an error, if there is any. -func (c *FakeConsoleExternalLogLinks) Create(ctx context.Context, consoleExternalLogLink *v1.ConsoleExternalLogLink, opts metav1.CreateOptions) (result *v1.ConsoleExternalLogLink, err error) { - emptyResult := &v1.ConsoleExternalLogLink{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consoleexternalloglinksResource, consoleExternalLogLink, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleExternalLogLink), err -} - -// Update takes the representation of a consoleExternalLogLink and updates it. Returns the server's representation of the consoleExternalLogLink, and an error, if there is any. -func (c *FakeConsoleExternalLogLinks) Update(ctx context.Context, consoleExternalLogLink *v1.ConsoleExternalLogLink, opts metav1.UpdateOptions) (result *v1.ConsoleExternalLogLink, err error) { - emptyResult := &v1.ConsoleExternalLogLink{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consoleexternalloglinksResource, consoleExternalLogLink, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleExternalLogLink), err -} - -// Delete takes name of the consoleExternalLogLink and deletes it. Returns an error if one occurs. -func (c *FakeConsoleExternalLogLinks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consoleexternalloglinksResource, name, opts), &v1.ConsoleExternalLogLink{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleExternalLogLinks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consoleexternalloglinksResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleExternalLogLinkList{}) - return err -} - -// Patch applies the patch and returns the patched consoleExternalLogLink. -func (c *FakeConsoleExternalLogLinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleExternalLogLink, err error) { - emptyResult := &v1.ConsoleExternalLogLink{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consoleexternalloglinksResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleExternalLogLink), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleExternalLogLink. -func (c *FakeConsoleExternalLogLinks) Apply(ctx context.Context, consoleExternalLogLink *consolev1.ConsoleExternalLogLinkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleExternalLogLink, err error) { - if consoleExternalLogLink == nil { - return nil, fmt.Errorf("consoleExternalLogLink provided to Apply must not be nil") - } - data, err := json.Marshal(consoleExternalLogLink) - if err != nil { - return nil, err - } - name := consoleExternalLogLink.Name - if name == nil { - return nil, fmt.Errorf("consoleExternalLogLink.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleExternalLogLink{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consoleexternalloglinksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleExternalLogLinks(fake *FakeConsoleV1) typedconsolev1.ConsoleExternalLogLinkInterface { + return &fakeConsoleExternalLogLinks{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleExternalLogLink, *v1.ConsoleExternalLogLinkList, *consolev1.ConsoleExternalLogLinkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleexternalloglinks"), + v1.SchemeGroupVersion.WithKind("ConsoleExternalLogLink"), + func() *v1.ConsoleExternalLogLink { return &v1.ConsoleExternalLogLink{} }, + func() *v1.ConsoleExternalLogLinkList { return &v1.ConsoleExternalLogLinkList{} }, + func(dst, src *v1.ConsoleExternalLogLinkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleExternalLogLinkList) []*v1.ConsoleExternalLogLink { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleExternalLogLinkList, items []*v1.ConsoleExternalLogLink) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsoleExternalLogLink), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go b/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go index 343200f6b6..fdcc2c3d12 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleLinks implements ConsoleLinkInterface -type FakeConsoleLinks struct { +// fakeConsoleLinks implements ConsoleLinkInterface +type fakeConsoleLinks struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleLink, *v1.ConsoleLinkList, *consolev1.ConsoleLinkApplyConfiguration] Fake *FakeConsoleV1 } -var consolelinksResource = v1.SchemeGroupVersion.WithResource("consolelinks") - -var consolelinksKind = v1.SchemeGroupVersion.WithKind("ConsoleLink") - -// Get takes name of the consoleLink, and returns the corresponding consoleLink object, and an error if there is any. -func (c *FakeConsoleLinks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleLink, err error) { - emptyResult := &v1.ConsoleLink{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolelinksResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleLink), err -} - -// List takes label and field selectors, and returns the list of ConsoleLinks that match those selectors. -func (c *FakeConsoleLinks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleLinkList, err error) { - emptyResult := &v1.ConsoleLinkList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolelinksResource, consolelinksKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleLinkList{ListMeta: obj.(*v1.ConsoleLinkList).ListMeta} - for _, item := range obj.(*v1.ConsoleLinkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleLinks. -func (c *FakeConsoleLinks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolelinksResource, opts)) -} - -// Create takes the representation of a consoleLink and creates it. Returns the server's representation of the consoleLink, and an error, if there is any. -func (c *FakeConsoleLinks) Create(ctx context.Context, consoleLink *v1.ConsoleLink, opts metav1.CreateOptions) (result *v1.ConsoleLink, err error) { - emptyResult := &v1.ConsoleLink{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolelinksResource, consoleLink, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleLink), err -} - -// Update takes the representation of a consoleLink and updates it. Returns the server's representation of the consoleLink, and an error, if there is any. -func (c *FakeConsoleLinks) Update(ctx context.Context, consoleLink *v1.ConsoleLink, opts metav1.UpdateOptions) (result *v1.ConsoleLink, err error) { - emptyResult := &v1.ConsoleLink{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolelinksResource, consoleLink, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleLink), err -} - -// Delete takes name of the consoleLink and deletes it. Returns an error if one occurs. -func (c *FakeConsoleLinks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolelinksResource, name, opts), &v1.ConsoleLink{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleLinks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolelinksResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleLinkList{}) - return err -} - -// Patch applies the patch and returns the patched consoleLink. -func (c *FakeConsoleLinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleLink, err error) { - emptyResult := &v1.ConsoleLink{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolelinksResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleLink), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleLink. -func (c *FakeConsoleLinks) Apply(ctx context.Context, consoleLink *consolev1.ConsoleLinkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleLink, err error) { - if consoleLink == nil { - return nil, fmt.Errorf("consoleLink provided to Apply must not be nil") - } - data, err := json.Marshal(consoleLink) - if err != nil { - return nil, err - } - name := consoleLink.Name - if name == nil { - return nil, fmt.Errorf("consoleLink.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleLink{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolelinksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleLinks(fake *FakeConsoleV1) typedconsolev1.ConsoleLinkInterface { + return &fakeConsoleLinks{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleLink, *v1.ConsoleLinkList, *consolev1.ConsoleLinkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolelinks"), + v1.SchemeGroupVersion.WithKind("ConsoleLink"), + func() *v1.ConsoleLink { return &v1.ConsoleLink{} }, + func() *v1.ConsoleLinkList { return &v1.ConsoleLinkList{} }, + func(dst, src *v1.ConsoleLinkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleLinkList) []*v1.ConsoleLink { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsoleLinkList, items []*v1.ConsoleLink) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.ConsoleLink), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go b/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go index 1ca4b7a892..09229375db 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleNotifications implements ConsoleNotificationInterface -type FakeConsoleNotifications struct { +// fakeConsoleNotifications implements ConsoleNotificationInterface +type fakeConsoleNotifications struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleNotification, *v1.ConsoleNotificationList, *consolev1.ConsoleNotificationApplyConfiguration] Fake *FakeConsoleV1 } -var consolenotificationsResource = v1.SchemeGroupVersion.WithResource("consolenotifications") - -var consolenotificationsKind = v1.SchemeGroupVersion.WithKind("ConsoleNotification") - -// Get takes name of the consoleNotification, and returns the corresponding consoleNotification object, and an error if there is any. -func (c *FakeConsoleNotifications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleNotification, err error) { - emptyResult := &v1.ConsoleNotification{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolenotificationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleNotification), err -} - -// List takes label and field selectors, and returns the list of ConsoleNotifications that match those selectors. -func (c *FakeConsoleNotifications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleNotificationList, err error) { - emptyResult := &v1.ConsoleNotificationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolenotificationsResource, consolenotificationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleNotificationList{ListMeta: obj.(*v1.ConsoleNotificationList).ListMeta} - for _, item := range obj.(*v1.ConsoleNotificationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleNotifications. -func (c *FakeConsoleNotifications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolenotificationsResource, opts)) -} - -// Create takes the representation of a consoleNotification and creates it. Returns the server's representation of the consoleNotification, and an error, if there is any. -func (c *FakeConsoleNotifications) Create(ctx context.Context, consoleNotification *v1.ConsoleNotification, opts metav1.CreateOptions) (result *v1.ConsoleNotification, err error) { - emptyResult := &v1.ConsoleNotification{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolenotificationsResource, consoleNotification, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleNotification), err -} - -// Update takes the representation of a consoleNotification and updates it. Returns the server's representation of the consoleNotification, and an error, if there is any. -func (c *FakeConsoleNotifications) Update(ctx context.Context, consoleNotification *v1.ConsoleNotification, opts metav1.UpdateOptions) (result *v1.ConsoleNotification, err error) { - emptyResult := &v1.ConsoleNotification{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolenotificationsResource, consoleNotification, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleNotification), err -} - -// Delete takes name of the consoleNotification and deletes it. Returns an error if one occurs. -func (c *FakeConsoleNotifications) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolenotificationsResource, name, opts), &v1.ConsoleNotification{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleNotifications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolenotificationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleNotificationList{}) - return err -} - -// Patch applies the patch and returns the patched consoleNotification. -func (c *FakeConsoleNotifications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleNotification, err error) { - emptyResult := &v1.ConsoleNotification{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolenotificationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleNotification), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleNotification. -func (c *FakeConsoleNotifications) Apply(ctx context.Context, consoleNotification *consolev1.ConsoleNotificationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleNotification, err error) { - if consoleNotification == nil { - return nil, fmt.Errorf("consoleNotification provided to Apply must not be nil") - } - data, err := json.Marshal(consoleNotification) - if err != nil { - return nil, err - } - name := consoleNotification.Name - if name == nil { - return nil, fmt.Errorf("consoleNotification.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleNotification{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolenotificationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleNotifications(fake *FakeConsoleV1) typedconsolev1.ConsoleNotificationInterface { + return &fakeConsoleNotifications{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleNotification, *v1.ConsoleNotificationList, *consolev1.ConsoleNotificationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolenotifications"), + v1.SchemeGroupVersion.WithKind("ConsoleNotification"), + func() *v1.ConsoleNotification { return &v1.ConsoleNotification{} }, + func() *v1.ConsoleNotificationList { return &v1.ConsoleNotificationList{} }, + func(dst, src *v1.ConsoleNotificationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleNotificationList) []*v1.ConsoleNotification { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleNotificationList, items []*v1.ConsoleNotification) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsoleNotification), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go b/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go index 0643f54f24..ae86183676 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsolePlugins implements ConsolePluginInterface -type FakeConsolePlugins struct { +// fakeConsolePlugins implements ConsolePluginInterface +type fakeConsolePlugins struct { + *gentype.FakeClientWithListAndApply[*v1.ConsolePlugin, *v1.ConsolePluginList, *consolev1.ConsolePluginApplyConfiguration] Fake *FakeConsoleV1 } -var consolepluginsResource = v1.SchemeGroupVersion.WithResource("consoleplugins") - -var consolepluginsKind = v1.SchemeGroupVersion.WithKind("ConsolePlugin") - -// Get takes name of the consolePlugin, and returns the corresponding consolePlugin object, and an error if there is any. -func (c *FakeConsolePlugins) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsolePlugin, err error) { - emptyResult := &v1.ConsolePlugin{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolepluginsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsolePlugin), err -} - -// List takes label and field selectors, and returns the list of ConsolePlugins that match those selectors. -func (c *FakeConsolePlugins) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsolePluginList, err error) { - emptyResult := &v1.ConsolePluginList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolepluginsResource, consolepluginsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsolePluginList{ListMeta: obj.(*v1.ConsolePluginList).ListMeta} - for _, item := range obj.(*v1.ConsolePluginList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consolePlugins. -func (c *FakeConsolePlugins) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolepluginsResource, opts)) -} - -// Create takes the representation of a consolePlugin and creates it. Returns the server's representation of the consolePlugin, and an error, if there is any. -func (c *FakeConsolePlugins) Create(ctx context.Context, consolePlugin *v1.ConsolePlugin, opts metav1.CreateOptions) (result *v1.ConsolePlugin, err error) { - emptyResult := &v1.ConsolePlugin{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolepluginsResource, consolePlugin, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsolePlugin), err -} - -// Update takes the representation of a consolePlugin and updates it. Returns the server's representation of the consolePlugin, and an error, if there is any. -func (c *FakeConsolePlugins) Update(ctx context.Context, consolePlugin *v1.ConsolePlugin, opts metav1.UpdateOptions) (result *v1.ConsolePlugin, err error) { - emptyResult := &v1.ConsolePlugin{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolepluginsResource, consolePlugin, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsolePlugin), err -} - -// Delete takes name of the consolePlugin and deletes it. Returns an error if one occurs. -func (c *FakeConsolePlugins) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolepluginsResource, name, opts), &v1.ConsolePlugin{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsolePlugins) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolepluginsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsolePluginList{}) - return err -} - -// Patch applies the patch and returns the patched consolePlugin. -func (c *FakeConsolePlugins) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsolePlugin, err error) { - emptyResult := &v1.ConsolePlugin{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolepluginsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsolePlugin), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consolePlugin. -func (c *FakeConsolePlugins) Apply(ctx context.Context, consolePlugin *consolev1.ConsolePluginApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsolePlugin, err error) { - if consolePlugin == nil { - return nil, fmt.Errorf("consolePlugin provided to Apply must not be nil") - } - data, err := json.Marshal(consolePlugin) - if err != nil { - return nil, err - } - name := consolePlugin.Name - if name == nil { - return nil, fmt.Errorf("consolePlugin.Name must be provided to Apply") - } - emptyResult := &v1.ConsolePlugin{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolepluginsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsolePlugins(fake *FakeConsoleV1) typedconsolev1.ConsolePluginInterface { + return &fakeConsolePlugins{ + gentype.NewFakeClientWithListAndApply[*v1.ConsolePlugin, *v1.ConsolePluginList, *consolev1.ConsolePluginApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleplugins"), + v1.SchemeGroupVersion.WithKind("ConsolePlugin"), + func() *v1.ConsolePlugin { return &v1.ConsolePlugin{} }, + func() *v1.ConsolePluginList { return &v1.ConsolePluginList{} }, + func(dst, src *v1.ConsolePluginList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsolePluginList) []*v1.ConsolePlugin { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsolePluginList, items []*v1.ConsolePlugin) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsolePlugin), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go b/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go index 66324695e6..ea8afc4704 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleQuickStarts implements ConsoleQuickStartInterface -type FakeConsoleQuickStarts struct { +// fakeConsoleQuickStarts implements ConsoleQuickStartInterface +type fakeConsoleQuickStarts struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleQuickStart, *v1.ConsoleQuickStartList, *consolev1.ConsoleQuickStartApplyConfiguration] Fake *FakeConsoleV1 } -var consolequickstartsResource = v1.SchemeGroupVersion.WithResource("consolequickstarts") - -var consolequickstartsKind = v1.SchemeGroupVersion.WithKind("ConsoleQuickStart") - -// Get takes name of the consoleQuickStart, and returns the corresponding consoleQuickStart object, and an error if there is any. -func (c *FakeConsoleQuickStarts) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleQuickStart, err error) { - emptyResult := &v1.ConsoleQuickStart{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolequickstartsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleQuickStart), err -} - -// List takes label and field selectors, and returns the list of ConsoleQuickStarts that match those selectors. -func (c *FakeConsoleQuickStarts) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleQuickStartList, err error) { - emptyResult := &v1.ConsoleQuickStartList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolequickstartsResource, consolequickstartsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleQuickStartList{ListMeta: obj.(*v1.ConsoleQuickStartList).ListMeta} - for _, item := range obj.(*v1.ConsoleQuickStartList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleQuickStarts. -func (c *FakeConsoleQuickStarts) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolequickstartsResource, opts)) -} - -// Create takes the representation of a consoleQuickStart and creates it. Returns the server's representation of the consoleQuickStart, and an error, if there is any. -func (c *FakeConsoleQuickStarts) Create(ctx context.Context, consoleQuickStart *v1.ConsoleQuickStart, opts metav1.CreateOptions) (result *v1.ConsoleQuickStart, err error) { - emptyResult := &v1.ConsoleQuickStart{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolequickstartsResource, consoleQuickStart, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleQuickStart), err -} - -// Update takes the representation of a consoleQuickStart and updates it. Returns the server's representation of the consoleQuickStart, and an error, if there is any. -func (c *FakeConsoleQuickStarts) Update(ctx context.Context, consoleQuickStart *v1.ConsoleQuickStart, opts metav1.UpdateOptions) (result *v1.ConsoleQuickStart, err error) { - emptyResult := &v1.ConsoleQuickStart{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolequickstartsResource, consoleQuickStart, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleQuickStart), err -} - -// Delete takes name of the consoleQuickStart and deletes it. Returns an error if one occurs. -func (c *FakeConsoleQuickStarts) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolequickstartsResource, name, opts), &v1.ConsoleQuickStart{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleQuickStarts) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolequickstartsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleQuickStartList{}) - return err -} - -// Patch applies the patch and returns the patched consoleQuickStart. -func (c *FakeConsoleQuickStarts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleQuickStart, err error) { - emptyResult := &v1.ConsoleQuickStart{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolequickstartsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleQuickStart), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleQuickStart. -func (c *FakeConsoleQuickStarts) Apply(ctx context.Context, consoleQuickStart *consolev1.ConsoleQuickStartApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleQuickStart, err error) { - if consoleQuickStart == nil { - return nil, fmt.Errorf("consoleQuickStart provided to Apply must not be nil") - } - data, err := json.Marshal(consoleQuickStart) - if err != nil { - return nil, err - } - name := consoleQuickStart.Name - if name == nil { - return nil, fmt.Errorf("consoleQuickStart.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleQuickStart{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolequickstartsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleQuickStarts(fake *FakeConsoleV1) typedconsolev1.ConsoleQuickStartInterface { + return &fakeConsoleQuickStarts{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleQuickStart, *v1.ConsoleQuickStartList, *consolev1.ConsoleQuickStartApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolequickstarts"), + v1.SchemeGroupVersion.WithKind("ConsoleQuickStart"), + func() *v1.ConsoleQuickStart { return &v1.ConsoleQuickStart{} }, + func() *v1.ConsoleQuickStartList { return &v1.ConsoleQuickStartList{} }, + func(dst, src *v1.ConsoleQuickStartList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleQuickStartList) []*v1.ConsoleQuickStart { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleQuickStartList, items []*v1.ConsoleQuickStart) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsoleQuickStart), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go b/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go index 8d204966c2..55e67ac312 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleSamples implements ConsoleSampleInterface -type FakeConsoleSamples struct { +// fakeConsoleSamples implements ConsoleSampleInterface +type fakeConsoleSamples struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleSample, *v1.ConsoleSampleList, *consolev1.ConsoleSampleApplyConfiguration] Fake *FakeConsoleV1 } -var consolesamplesResource = v1.SchemeGroupVersion.WithResource("consolesamples") - -var consolesamplesKind = v1.SchemeGroupVersion.WithKind("ConsoleSample") - -// Get takes name of the consoleSample, and returns the corresponding consoleSample object, and an error if there is any. -func (c *FakeConsoleSamples) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleSample, err error) { - emptyResult := &v1.ConsoleSample{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolesamplesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleSample), err -} - -// List takes label and field selectors, and returns the list of ConsoleSamples that match those selectors. -func (c *FakeConsoleSamples) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleSampleList, err error) { - emptyResult := &v1.ConsoleSampleList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolesamplesResource, consolesamplesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleSampleList{ListMeta: obj.(*v1.ConsoleSampleList).ListMeta} - for _, item := range obj.(*v1.ConsoleSampleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleSamples. -func (c *FakeConsoleSamples) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolesamplesResource, opts)) -} - -// Create takes the representation of a consoleSample and creates it. Returns the server's representation of the consoleSample, and an error, if there is any. -func (c *FakeConsoleSamples) Create(ctx context.Context, consoleSample *v1.ConsoleSample, opts metav1.CreateOptions) (result *v1.ConsoleSample, err error) { - emptyResult := &v1.ConsoleSample{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolesamplesResource, consoleSample, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleSample), err -} - -// Update takes the representation of a consoleSample and updates it. Returns the server's representation of the consoleSample, and an error, if there is any. -func (c *FakeConsoleSamples) Update(ctx context.Context, consoleSample *v1.ConsoleSample, opts metav1.UpdateOptions) (result *v1.ConsoleSample, err error) { - emptyResult := &v1.ConsoleSample{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolesamplesResource, consoleSample, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleSample), err -} - -// Delete takes name of the consoleSample and deletes it. Returns an error if one occurs. -func (c *FakeConsoleSamples) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolesamplesResource, name, opts), &v1.ConsoleSample{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleSamples) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolesamplesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleSampleList{}) - return err -} - -// Patch applies the patch and returns the patched consoleSample. -func (c *FakeConsoleSamples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleSample, err error) { - emptyResult := &v1.ConsoleSample{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesamplesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleSample), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleSample. -func (c *FakeConsoleSamples) Apply(ctx context.Context, consoleSample *consolev1.ConsoleSampleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleSample, err error) { - if consoleSample == nil { - return nil, fmt.Errorf("consoleSample provided to Apply must not be nil") - } - data, err := json.Marshal(consoleSample) - if err != nil { - return nil, err - } - name := consoleSample.Name - if name == nil { - return nil, fmt.Errorf("consoleSample.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleSample{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesamplesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleSamples(fake *FakeConsoleV1) typedconsolev1.ConsoleSampleInterface { + return &fakeConsoleSamples{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleSample, *v1.ConsoleSampleList, *consolev1.ConsoleSampleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolesamples"), + v1.SchemeGroupVersion.WithKind("ConsoleSample"), + func() *v1.ConsoleSample { return &v1.ConsoleSample{} }, + func() *v1.ConsoleSampleList { return &v1.ConsoleSampleList{} }, + func(dst, src *v1.ConsoleSampleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleSampleList) []*v1.ConsoleSample { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsoleSampleList, items []*v1.ConsoleSample) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsoleSample), err } diff --git a/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go b/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go index cd4343a3d8..fe399cd577 100644 --- a/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go +++ b/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/console/v1" consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoleYAMLSamples implements ConsoleYAMLSampleInterface -type FakeConsoleYAMLSamples struct { +// fakeConsoleYAMLSamples implements ConsoleYAMLSampleInterface +type fakeConsoleYAMLSamples struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleYAMLSample, *v1.ConsoleYAMLSampleList, *consolev1.ConsoleYAMLSampleApplyConfiguration] Fake *FakeConsoleV1 } -var consoleyamlsamplesResource = v1.SchemeGroupVersion.WithResource("consoleyamlsamples") - -var consoleyamlsamplesKind = v1.SchemeGroupVersion.WithKind("ConsoleYAMLSample") - -// Get takes name of the consoleYAMLSample, and returns the corresponding consoleYAMLSample object, and an error if there is any. -func (c *FakeConsoleYAMLSamples) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ConsoleYAMLSample, err error) { - emptyResult := &v1.ConsoleYAMLSample{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consoleyamlsamplesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleYAMLSample), err -} - -// List takes label and field selectors, and returns the list of ConsoleYAMLSamples that match those selectors. -func (c *FakeConsoleYAMLSamples) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleYAMLSampleList, err error) { - emptyResult := &v1.ConsoleYAMLSampleList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consoleyamlsamplesResource, consoleyamlsamplesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleYAMLSampleList{ListMeta: obj.(*v1.ConsoleYAMLSampleList).ListMeta} - for _, item := range obj.(*v1.ConsoleYAMLSampleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoleYAMLSamples. -func (c *FakeConsoleYAMLSamples) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consoleyamlsamplesResource, opts)) -} - -// Create takes the representation of a consoleYAMLSample and creates it. Returns the server's representation of the consoleYAMLSample, and an error, if there is any. -func (c *FakeConsoleYAMLSamples) Create(ctx context.Context, consoleYAMLSample *v1.ConsoleYAMLSample, opts metav1.CreateOptions) (result *v1.ConsoleYAMLSample, err error) { - emptyResult := &v1.ConsoleYAMLSample{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consoleyamlsamplesResource, consoleYAMLSample, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleYAMLSample), err -} - -// Update takes the representation of a consoleYAMLSample and updates it. Returns the server's representation of the consoleYAMLSample, and an error, if there is any. -func (c *FakeConsoleYAMLSamples) Update(ctx context.Context, consoleYAMLSample *v1.ConsoleYAMLSample, opts metav1.UpdateOptions) (result *v1.ConsoleYAMLSample, err error) { - emptyResult := &v1.ConsoleYAMLSample{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consoleyamlsamplesResource, consoleYAMLSample, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleYAMLSample), err -} - -// Delete takes name of the consoleYAMLSample and deletes it. Returns an error if one occurs. -func (c *FakeConsoleYAMLSamples) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consoleyamlsamplesResource, name, opts), &v1.ConsoleYAMLSample{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoleYAMLSamples) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consoleyamlsamplesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleYAMLSampleList{}) - return err -} - -// Patch applies the patch and returns the patched consoleYAMLSample. -func (c *FakeConsoleYAMLSamples) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ConsoleYAMLSample, err error) { - emptyResult := &v1.ConsoleYAMLSample{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consoleyamlsamplesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ConsoleYAMLSample), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied consoleYAMLSample. -func (c *FakeConsoleYAMLSamples) Apply(ctx context.Context, consoleYAMLSample *consolev1.ConsoleYAMLSampleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ConsoleYAMLSample, err error) { - if consoleYAMLSample == nil { - return nil, fmt.Errorf("consoleYAMLSample provided to Apply must not be nil") - } - data, err := json.Marshal(consoleYAMLSample) - if err != nil { - return nil, err - } - name := consoleYAMLSample.Name - if name == nil { - return nil, fmt.Errorf("consoleYAMLSample.Name must be provided to Apply") - } - emptyResult := &v1.ConsoleYAMLSample{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consoleyamlsamplesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoleYAMLSamples(fake *FakeConsoleV1) typedconsolev1.ConsoleYAMLSampleInterface { + return &fakeConsoleYAMLSamples{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleYAMLSample, *v1.ConsoleYAMLSampleList, *consolev1.ConsoleYAMLSampleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleyamlsamples"), + v1.SchemeGroupVersion.WithKind("ConsoleYAMLSample"), + func() *v1.ConsoleYAMLSample { return &v1.ConsoleYAMLSample{} }, + func() *v1.ConsoleYAMLSampleList { return &v1.ConsoleYAMLSampleList{} }, + func(dst, src *v1.ConsoleYAMLSampleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleYAMLSampleList) []*v1.ConsoleYAMLSample { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleYAMLSampleList, items []*v1.ConsoleYAMLSample) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ConsoleYAMLSample), err } diff --git a/console/informers/externalversions/console/v1/consoleclidownload.go b/console/informers/externalversions/console/v1/consoleclidownload.go index 756b15207e..7023d3635b 100644 --- a/console/informers/externalversions/console/v1/consoleclidownload.go +++ b/console/informers/externalversions/console/v1/consoleclidownload.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleCLIDownloads. type ConsoleCLIDownloadInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleCLIDownloadLister + Lister() consolev1.ConsoleCLIDownloadLister } type consoleCLIDownloadInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleCLIDownloadInformer(client versioned.Interface, resyncPer return client.ConsoleV1().ConsoleCLIDownloads().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleCLIDownload{}, + &apiconsolev1.ConsoleCLIDownload{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleCLIDownloadInformer) defaultInformer(client versioned.Interface, } func (f *consoleCLIDownloadInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleCLIDownload{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleCLIDownload{}, f.defaultInformer) } -func (f *consoleCLIDownloadInformer) Lister() v1.ConsoleCLIDownloadLister { - return v1.NewConsoleCLIDownloadLister(f.Informer().GetIndexer()) +func (f *consoleCLIDownloadInformer) Lister() consolev1.ConsoleCLIDownloadLister { + return consolev1.NewConsoleCLIDownloadLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consoleexternalloglink.go b/console/informers/externalversions/console/v1/consoleexternalloglink.go index bf933d9120..23f3356655 100644 --- a/console/informers/externalversions/console/v1/consoleexternalloglink.go +++ b/console/informers/externalversions/console/v1/consoleexternalloglink.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleExternalLogLinks. type ConsoleExternalLogLinkInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleExternalLogLinkLister + Lister() consolev1.ConsoleExternalLogLinkLister } type consoleExternalLogLinkInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleExternalLogLinkInformer(client versioned.Interface, resyn return client.ConsoleV1().ConsoleExternalLogLinks().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleExternalLogLink{}, + &apiconsolev1.ConsoleExternalLogLink{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleExternalLogLinkInformer) defaultInformer(client versioned.Interf } func (f *consoleExternalLogLinkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleExternalLogLink{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleExternalLogLink{}, f.defaultInformer) } -func (f *consoleExternalLogLinkInformer) Lister() v1.ConsoleExternalLogLinkLister { - return v1.NewConsoleExternalLogLinkLister(f.Informer().GetIndexer()) +func (f *consoleExternalLogLinkInformer) Lister() consolev1.ConsoleExternalLogLinkLister { + return consolev1.NewConsoleExternalLogLinkLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consolelink.go b/console/informers/externalversions/console/v1/consolelink.go index 5ff2a50b4c..887c3de0e5 100644 --- a/console/informers/externalversions/console/v1/consolelink.go +++ b/console/informers/externalversions/console/v1/consolelink.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleLinks. type ConsoleLinkInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleLinkLister + Lister() consolev1.ConsoleLinkLister } type consoleLinkInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleLinkInformer(client versioned.Interface, resyncPeriod tim return client.ConsoleV1().ConsoleLinks().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleLink{}, + &apiconsolev1.ConsoleLink{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleLinkInformer) defaultInformer(client versioned.Interface, resync } func (f *consoleLinkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleLink{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleLink{}, f.defaultInformer) } -func (f *consoleLinkInformer) Lister() v1.ConsoleLinkLister { - return v1.NewConsoleLinkLister(f.Informer().GetIndexer()) +func (f *consoleLinkInformer) Lister() consolev1.ConsoleLinkLister { + return consolev1.NewConsoleLinkLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consolenotification.go b/console/informers/externalversions/console/v1/consolenotification.go index 6941719bbc..c93aa648bb 100644 --- a/console/informers/externalversions/console/v1/consolenotification.go +++ b/console/informers/externalversions/console/v1/consolenotification.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleNotifications. type ConsoleNotificationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleNotificationLister + Lister() consolev1.ConsoleNotificationLister } type consoleNotificationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleNotificationInformer(client versioned.Interface, resyncPe return client.ConsoleV1().ConsoleNotifications().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleNotification{}, + &apiconsolev1.ConsoleNotification{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleNotificationInformer) defaultInformer(client versioned.Interface } func (f *consoleNotificationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleNotification{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleNotification{}, f.defaultInformer) } -func (f *consoleNotificationInformer) Lister() v1.ConsoleNotificationLister { - return v1.NewConsoleNotificationLister(f.Informer().GetIndexer()) +func (f *consoleNotificationInformer) Lister() consolev1.ConsoleNotificationLister { + return consolev1.NewConsoleNotificationLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consoleplugin.go b/console/informers/externalversions/console/v1/consoleplugin.go index 67090b06c4..dd5d81521c 100644 --- a/console/informers/externalversions/console/v1/consoleplugin.go +++ b/console/informers/externalversions/console/v1/consoleplugin.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsolePlugins. type ConsolePluginInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsolePluginLister + Lister() consolev1.ConsolePluginLister } type consolePluginInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsolePluginInformer(client versioned.Interface, resyncPeriod t return client.ConsoleV1().ConsolePlugins().Watch(context.TODO(), options) }, }, - &consolev1.ConsolePlugin{}, + &apiconsolev1.ConsolePlugin{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consolePluginInformer) defaultInformer(client versioned.Interface, resy } func (f *consolePluginInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsolePlugin{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsolePlugin{}, f.defaultInformer) } -func (f *consolePluginInformer) Lister() v1.ConsolePluginLister { - return v1.NewConsolePluginLister(f.Informer().GetIndexer()) +func (f *consolePluginInformer) Lister() consolev1.ConsolePluginLister { + return consolev1.NewConsolePluginLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consolequickstart.go b/console/informers/externalversions/console/v1/consolequickstart.go index da4befa02d..21c82ec4bf 100644 --- a/console/informers/externalversions/console/v1/consolequickstart.go +++ b/console/informers/externalversions/console/v1/consolequickstart.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleQuickStarts. type ConsoleQuickStartInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleQuickStartLister + Lister() consolev1.ConsoleQuickStartLister } type consoleQuickStartInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleQuickStartInformer(client versioned.Interface, resyncPeri return client.ConsoleV1().ConsoleQuickStarts().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleQuickStart{}, + &apiconsolev1.ConsoleQuickStart{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleQuickStartInformer) defaultInformer(client versioned.Interface, } func (f *consoleQuickStartInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleQuickStart{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleQuickStart{}, f.defaultInformer) } -func (f *consoleQuickStartInformer) Lister() v1.ConsoleQuickStartLister { - return v1.NewConsoleQuickStartLister(f.Informer().GetIndexer()) +func (f *consoleQuickStartInformer) Lister() consolev1.ConsoleQuickStartLister { + return consolev1.NewConsoleQuickStartLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consolesample.go b/console/informers/externalversions/console/v1/consolesample.go index e0ef30065c..3311f3102b 100644 --- a/console/informers/externalversions/console/v1/consolesample.go +++ b/console/informers/externalversions/console/v1/consolesample.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleSamples. type ConsoleSampleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleSampleLister + Lister() consolev1.ConsoleSampleLister } type consoleSampleInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleSampleInformer(client versioned.Interface, resyncPeriod t return client.ConsoleV1().ConsoleSamples().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleSample{}, + &apiconsolev1.ConsoleSample{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleSampleInformer) defaultInformer(client versioned.Interface, resy } func (f *consoleSampleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleSample{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleSample{}, f.defaultInformer) } -func (f *consoleSampleInformer) Lister() v1.ConsoleSampleLister { - return v1.NewConsoleSampleLister(f.Informer().GetIndexer()) +func (f *consoleSampleInformer) Lister() consolev1.ConsoleSampleLister { + return consolev1.NewConsoleSampleLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/console/v1/consoleyamlsample.go b/console/informers/externalversions/console/v1/consoleyamlsample.go index f3c6dc9b4f..1edfefb9f0 100644 --- a/console/informers/externalversions/console/v1/consoleyamlsample.go +++ b/console/informers/externalversions/console/v1/consoleyamlsample.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - consolev1 "github.com/openshift/api/console/v1" + apiconsolev1 "github.com/openshift/api/console/v1" versioned "github.com/openshift/client-go/console/clientset/versioned" internalinterfaces "github.com/openshift/client-go/console/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/console/listers/console/v1" + consolev1 "github.com/openshift/client-go/console/listers/console/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ConsoleYAMLSamples. type ConsoleYAMLSampleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleYAMLSampleLister + Lister() consolev1.ConsoleYAMLSampleLister } type consoleYAMLSampleInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleYAMLSampleInformer(client versioned.Interface, resyncPeri return client.ConsoleV1().ConsoleYAMLSamples().Watch(context.TODO(), options) }, }, - &consolev1.ConsoleYAMLSample{}, + &apiconsolev1.ConsoleYAMLSample{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleYAMLSampleInformer) defaultInformer(client versioned.Interface, } func (f *consoleYAMLSampleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&consolev1.ConsoleYAMLSample{}, f.defaultInformer) + return f.factory.InformerFor(&apiconsolev1.ConsoleYAMLSample{}, f.defaultInformer) } -func (f *consoleYAMLSampleInformer) Lister() v1.ConsoleYAMLSampleLister { - return v1.NewConsoleYAMLSampleLister(f.Informer().GetIndexer()) +func (f *consoleYAMLSampleInformer) Lister() consolev1.ConsoleYAMLSampleLister { + return consolev1.NewConsoleYAMLSampleLister(f.Informer().GetIndexer()) } diff --git a/console/informers/externalversions/generic.go b/console/informers/externalversions/generic.go index f1d22cf093..ba4e79d838 100644 --- a/console/informers/externalversions/generic.go +++ b/console/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/console/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/console/listers/console/v1/consoleclidownload.go b/console/listers/console/v1/consoleclidownload.go index f0a93782a2..3e99efd57b 100644 --- a/console/listers/console/v1/consoleclidownload.go +++ b/console/listers/console/v1/consoleclidownload.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleCLIDownloadLister helps list ConsoleCLIDownloads. @@ -14,19 +14,19 @@ import ( type ConsoleCLIDownloadLister interface { // List lists all ConsoleCLIDownloads in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleCLIDownload, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleCLIDownload, err error) // Get retrieves the ConsoleCLIDownload from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleCLIDownload, error) + Get(name string) (*consolev1.ConsoleCLIDownload, error) ConsoleCLIDownloadListerExpansion } // consoleCLIDownloadLister implements the ConsoleCLIDownloadLister interface. type consoleCLIDownloadLister struct { - listers.ResourceIndexer[*v1.ConsoleCLIDownload] + listers.ResourceIndexer[*consolev1.ConsoleCLIDownload] } // NewConsoleCLIDownloadLister returns a new ConsoleCLIDownloadLister. func NewConsoleCLIDownloadLister(indexer cache.Indexer) ConsoleCLIDownloadLister { - return &consoleCLIDownloadLister{listers.New[*v1.ConsoleCLIDownload](indexer, v1.Resource("consoleclidownload"))} + return &consoleCLIDownloadLister{listers.New[*consolev1.ConsoleCLIDownload](indexer, consolev1.Resource("consoleclidownload"))} } diff --git a/console/listers/console/v1/consoleexternalloglink.go b/console/listers/console/v1/consoleexternalloglink.go index 43adfed2fb..c5a2a0ccb9 100644 --- a/console/listers/console/v1/consoleexternalloglink.go +++ b/console/listers/console/v1/consoleexternalloglink.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleExternalLogLinkLister helps list ConsoleExternalLogLinks. @@ -14,19 +14,19 @@ import ( type ConsoleExternalLogLinkLister interface { // List lists all ConsoleExternalLogLinks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleExternalLogLink, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleExternalLogLink, err error) // Get retrieves the ConsoleExternalLogLink from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleExternalLogLink, error) + Get(name string) (*consolev1.ConsoleExternalLogLink, error) ConsoleExternalLogLinkListerExpansion } // consoleExternalLogLinkLister implements the ConsoleExternalLogLinkLister interface. type consoleExternalLogLinkLister struct { - listers.ResourceIndexer[*v1.ConsoleExternalLogLink] + listers.ResourceIndexer[*consolev1.ConsoleExternalLogLink] } // NewConsoleExternalLogLinkLister returns a new ConsoleExternalLogLinkLister. func NewConsoleExternalLogLinkLister(indexer cache.Indexer) ConsoleExternalLogLinkLister { - return &consoleExternalLogLinkLister{listers.New[*v1.ConsoleExternalLogLink](indexer, v1.Resource("consoleexternalloglink"))} + return &consoleExternalLogLinkLister{listers.New[*consolev1.ConsoleExternalLogLink](indexer, consolev1.Resource("consoleexternalloglink"))} } diff --git a/console/listers/console/v1/consolelink.go b/console/listers/console/v1/consolelink.go index a09595d635..20d4945e12 100644 --- a/console/listers/console/v1/consolelink.go +++ b/console/listers/console/v1/consolelink.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleLinkLister helps list ConsoleLinks. @@ -14,19 +14,19 @@ import ( type ConsoleLinkLister interface { // List lists all ConsoleLinks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleLink, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleLink, err error) // Get retrieves the ConsoleLink from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleLink, error) + Get(name string) (*consolev1.ConsoleLink, error) ConsoleLinkListerExpansion } // consoleLinkLister implements the ConsoleLinkLister interface. type consoleLinkLister struct { - listers.ResourceIndexer[*v1.ConsoleLink] + listers.ResourceIndexer[*consolev1.ConsoleLink] } // NewConsoleLinkLister returns a new ConsoleLinkLister. func NewConsoleLinkLister(indexer cache.Indexer) ConsoleLinkLister { - return &consoleLinkLister{listers.New[*v1.ConsoleLink](indexer, v1.Resource("consolelink"))} + return &consoleLinkLister{listers.New[*consolev1.ConsoleLink](indexer, consolev1.Resource("consolelink"))} } diff --git a/console/listers/console/v1/consolenotification.go b/console/listers/console/v1/consolenotification.go index 366be23cda..133a2f8667 100644 --- a/console/listers/console/v1/consolenotification.go +++ b/console/listers/console/v1/consolenotification.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleNotificationLister helps list ConsoleNotifications. @@ -14,19 +14,19 @@ import ( type ConsoleNotificationLister interface { // List lists all ConsoleNotifications in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleNotification, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleNotification, err error) // Get retrieves the ConsoleNotification from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleNotification, error) + Get(name string) (*consolev1.ConsoleNotification, error) ConsoleNotificationListerExpansion } // consoleNotificationLister implements the ConsoleNotificationLister interface. type consoleNotificationLister struct { - listers.ResourceIndexer[*v1.ConsoleNotification] + listers.ResourceIndexer[*consolev1.ConsoleNotification] } // NewConsoleNotificationLister returns a new ConsoleNotificationLister. func NewConsoleNotificationLister(indexer cache.Indexer) ConsoleNotificationLister { - return &consoleNotificationLister{listers.New[*v1.ConsoleNotification](indexer, v1.Resource("consolenotification"))} + return &consoleNotificationLister{listers.New[*consolev1.ConsoleNotification](indexer, consolev1.Resource("consolenotification"))} } diff --git a/console/listers/console/v1/consoleplugin.go b/console/listers/console/v1/consoleplugin.go index ba58e7ed97..13e407a526 100644 --- a/console/listers/console/v1/consoleplugin.go +++ b/console/listers/console/v1/consoleplugin.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsolePluginLister helps list ConsolePlugins. @@ -14,19 +14,19 @@ import ( type ConsolePluginLister interface { // List lists all ConsolePlugins in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsolePlugin, err error) + List(selector labels.Selector) (ret []*consolev1.ConsolePlugin, err error) // Get retrieves the ConsolePlugin from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsolePlugin, error) + Get(name string) (*consolev1.ConsolePlugin, error) ConsolePluginListerExpansion } // consolePluginLister implements the ConsolePluginLister interface. type consolePluginLister struct { - listers.ResourceIndexer[*v1.ConsolePlugin] + listers.ResourceIndexer[*consolev1.ConsolePlugin] } // NewConsolePluginLister returns a new ConsolePluginLister. func NewConsolePluginLister(indexer cache.Indexer) ConsolePluginLister { - return &consolePluginLister{listers.New[*v1.ConsolePlugin](indexer, v1.Resource("consoleplugin"))} + return &consolePluginLister{listers.New[*consolev1.ConsolePlugin](indexer, consolev1.Resource("consoleplugin"))} } diff --git a/console/listers/console/v1/consolequickstart.go b/console/listers/console/v1/consolequickstart.go index f32fe77d54..2269839efb 100644 --- a/console/listers/console/v1/consolequickstart.go +++ b/console/listers/console/v1/consolequickstart.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleQuickStartLister helps list ConsoleQuickStarts. @@ -14,19 +14,19 @@ import ( type ConsoleQuickStartLister interface { // List lists all ConsoleQuickStarts in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleQuickStart, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleQuickStart, err error) // Get retrieves the ConsoleQuickStart from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleQuickStart, error) + Get(name string) (*consolev1.ConsoleQuickStart, error) ConsoleQuickStartListerExpansion } // consoleQuickStartLister implements the ConsoleQuickStartLister interface. type consoleQuickStartLister struct { - listers.ResourceIndexer[*v1.ConsoleQuickStart] + listers.ResourceIndexer[*consolev1.ConsoleQuickStart] } // NewConsoleQuickStartLister returns a new ConsoleQuickStartLister. func NewConsoleQuickStartLister(indexer cache.Indexer) ConsoleQuickStartLister { - return &consoleQuickStartLister{listers.New[*v1.ConsoleQuickStart](indexer, v1.Resource("consolequickstart"))} + return &consoleQuickStartLister{listers.New[*consolev1.ConsoleQuickStart](indexer, consolev1.Resource("consolequickstart"))} } diff --git a/console/listers/console/v1/consolesample.go b/console/listers/console/v1/consolesample.go index 49559b2de5..847ea547b3 100644 --- a/console/listers/console/v1/consolesample.go +++ b/console/listers/console/v1/consolesample.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleSampleLister helps list ConsoleSamples. @@ -14,19 +14,19 @@ import ( type ConsoleSampleLister interface { // List lists all ConsoleSamples in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleSample, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleSample, err error) // Get retrieves the ConsoleSample from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleSample, error) + Get(name string) (*consolev1.ConsoleSample, error) ConsoleSampleListerExpansion } // consoleSampleLister implements the ConsoleSampleLister interface. type consoleSampleLister struct { - listers.ResourceIndexer[*v1.ConsoleSample] + listers.ResourceIndexer[*consolev1.ConsoleSample] } // NewConsoleSampleLister returns a new ConsoleSampleLister. func NewConsoleSampleLister(indexer cache.Indexer) ConsoleSampleLister { - return &consoleSampleLister{listers.New[*v1.ConsoleSample](indexer, v1.Resource("consolesample"))} + return &consoleSampleLister{listers.New[*consolev1.ConsoleSample](indexer, consolev1.Resource("consolesample"))} } diff --git a/console/listers/console/v1/consoleyamlsample.go b/console/listers/console/v1/consoleyamlsample.go index fa5d4c3124..27ab822e8e 100644 --- a/console/listers/console/v1/consoleyamlsample.go +++ b/console/listers/console/v1/consoleyamlsample.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/console/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + consolev1 "github.com/openshift/api/console/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleYAMLSampleLister helps list ConsoleYAMLSamples. @@ -14,19 +14,19 @@ import ( type ConsoleYAMLSampleLister interface { // List lists all ConsoleYAMLSamples in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ConsoleYAMLSample, err error) + List(selector labels.Selector) (ret []*consolev1.ConsoleYAMLSample, err error) // Get retrieves the ConsoleYAMLSample from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ConsoleYAMLSample, error) + Get(name string) (*consolev1.ConsoleYAMLSample, error) ConsoleYAMLSampleListerExpansion } // consoleYAMLSampleLister implements the ConsoleYAMLSampleLister interface. type consoleYAMLSampleLister struct { - listers.ResourceIndexer[*v1.ConsoleYAMLSample] + listers.ResourceIndexer[*consolev1.ConsoleYAMLSample] } // NewConsoleYAMLSampleLister returns a new ConsoleYAMLSampleLister. func NewConsoleYAMLSampleLister(indexer cache.Indexer) ConsoleYAMLSampleLister { - return &consoleYAMLSampleLister{listers.New[*v1.ConsoleYAMLSample](indexer, v1.Resource("consoleyamlsample"))} + return &consoleYAMLSampleLister{listers.New[*consolev1.ConsoleYAMLSample](indexer, consolev1.Resource("consoleyamlsample"))} } diff --git a/go.mod b/go.mod index 7cf82e3395..518fdef302 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,18 @@ module github.com/openshift/client-go -go 1.22.0 +go 1.23.0 -toolchain go1.22.1 +toolchain go1.23.2 require ( github.com/openshift/api v0.0.0-20241129195214-14a6da22da50 github.com/openshift/build-machinery-go v0.0.0-20240613134303-8359781da660 github.com/spf13/pflag v1.0.5 - k8s.io/api v0.31.1 - k8s.io/apimachinery v0.31.1 - k8s.io/client-go v0.31.1 - k8s.io/code-generator v0.31.1 - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 + k8s.io/api v0.32.0-rc.2 + k8s.io/apimachinery v0.32.0-rc.2 + k8s.io/client-go v0.32.0-rc.2 + k8s.io/code-generator v0.32.0-rc.2 + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 ) require ( @@ -20,16 +20,15 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/imdario/mergo v0.3.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -38,25 +37,24 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/x448/float16 v0.8.4 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect + golang.org/x/time v0.7.0 // indirect + golang.org/x/tools v0.26.0 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect + k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) @@ -68,3 +66,5 @@ retract v3.9.0+incompatible // To make go aware of the retraction, we need to tag a new version that can be // retracted by itself. retract v0.0.1 + +replace github.com/openshift/api => github.com/dusk125/api v0.0.0-20241209155505-523f1022cf43 diff --git a/go.sum b/go.sum index 90c82045c6..ed29171b4f 100644 --- a/go.sum +++ b/go.sum @@ -3,19 +3,22 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dusk125/api v0.0.0-20241209155505-523f1022cf43 h1:7DGhVWMEqp7xd+z26ys+EgvSVk9ZwsborAgUbAYfcT8= +github.com/dusk125/api v0.0.0-20241209155505-523f1022cf43/go.mod h1:RgBoUKGw76DiY/UQVet7fkeiW0RWkLtm2fJ0eHZuU50= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -30,12 +33,10 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= -github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -58,12 +59,10 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/openshift/api v0.0.0-20241129195214-14a6da22da50 h1:qoLwPTb5y060j2sXLU3b8yKpnhWsvyBpzWayuTaTwjQ= -github.com/openshift/api v0.0.0-20241129195214-14a6da22da50/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/openshift/build-machinery-go v0.0.0-20240613134303-8359781da660 h1:F0zE2bmdVvaEd18VXuGYQdJJ1FYJu4MIDW9PYZWc9No= github.com/openshift/build-machinery-go v0.0.0-20240613134303-8359781da660/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -93,16 +92,16 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -111,28 +110,28 @@ golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -140,31 +139,28 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/code-generator v0.31.1 h1:GvkRZEP2g2UnB2QKT2Dgc/kYxIkDxCHENv2Q1itioVs= -k8s.io/code-generator v0.31.1/go.mod h1:oL2ky46L48osNqqZAeOcWWy0S5BXj50vVdwOtTefqIs= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/api v0.32.0-rc.2 h1:mFjTedXmyzuhkl1Fi35t/CY6Dq/VYKCyZoqnxvf6j+g= +k8s.io/api v0.32.0-rc.2/go.mod h1:/O0NxfXqcDG0xKUKKttOnl/DWYJ6K7iqnzVXecg5OKw= +k8s.io/apimachinery v0.32.0-rc.2 h1:rsh5rcqBWhYHXuV4GLXyQs26HKnhYq+Plp7iywewHR0= +k8s.io/apimachinery v0.32.0-rc.2/go.mod h1:pfmi1Ug6+bq/azoo9WveGhYBCQ0b+Wm4IgxWGFZ7wRc= +k8s.io/client-go v0.32.0-rc.2 h1:x1WFgHIL7hTF+SQw7OvGB/IG7srV74gU+vtcErXI3pk= +k8s.io/client-go v0.32.0-rc.2/go.mod h1:+ePHye0JCEujugXp1oGyBhELUV3w/XcaPdkieeKJ40k= +k8s.io/code-generator v0.32.0-rc.2 h1:4V6QHSXLEuTBDu3wZiWAvTIrnimtMWd7geckiPPgh9k= +k8s.io/code-generator v0.32.0-rc.2/go.mod h1:yKxXwnnUnzaPvchydKrWShfwAH8l5O25KdhV1yaz0SA= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= -k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/helm/applyconfigurations/helm/v1beta1/helmchartrepository.go b/helm/applyconfigurations/helm/v1beta1/helmchartrepository.go index bae785a37d..45447bc0a4 100644 --- a/helm/applyconfigurations/helm/v1beta1/helmchartrepository.go +++ b/helm/applyconfigurations/helm/v1beta1/helmchartrepository.go @@ -69,7 +69,7 @@ func extractHelmChartRepository(helmChartRepository *helmv1beta1.HelmChartReposi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithKind(value string) *HelmChartRepositoryApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithKind(value string) *HelmChar // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithAPIVersion(value string) *HelmChartRepositoryApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithAPIVersion(value string) *He // If called multiple times, the Name field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithName(value string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithName(value string) *HelmChar // If called multiple times, the GenerateName field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithGenerateName(value string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithGenerateName(value string) * // If called multiple times, the Namespace field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithNamespace(value string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithNamespace(value string) *Hel // If called multiple times, the UID field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithUID(value types.UID) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithUID(value types.UID) *HelmCh // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithResourceVersion(value string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithResourceVersion(value string // If called multiple times, the Generation field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithGeneration(value int64) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithGeneration(value int64) *Hel // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithCreationTimestamp(value meta // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithDeletionTimestamp(value meta // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *HelmChartRepositoryApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *HelmChartRepositoryApplyConfiguration) WithDeletionGracePeriodSeconds(v // overwriting an existing map entries in Labels field with the same key. func (b *HelmChartRepositoryApplyConfiguration) WithLabels(entries map[string]string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *HelmChartRepositoryApplyConfiguration) WithLabels(entries map[string]st // overwriting an existing map entries in Annotations field with the same key. func (b *HelmChartRepositoryApplyConfiguration) WithAnnotations(entries map[string]string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithOwnerReferences(values ...*v if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *HelmChartRepositoryApplyConfiguration) WithOwnerReferences(values ...*v func (b *HelmChartRepositoryApplyConfiguration) WithFinalizers(values ...string) *HelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *HelmChartRepositoryApplyConfiguration) WithStatus(value *HelmChartRepos // GetName retrieves the value of the Name field in the declarative configuration. func (b *HelmChartRepositoryApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/helm/applyconfigurations/helm/v1beta1/projecthelmchartrepository.go b/helm/applyconfigurations/helm/v1beta1/projecthelmchartrepository.go index 23635566ab..2f1533f02c 100644 --- a/helm/applyconfigurations/helm/v1beta1/projecthelmchartrepository.go +++ b/helm/applyconfigurations/helm/v1beta1/projecthelmchartrepository.go @@ -71,7 +71,7 @@ func extractProjectHelmChartRepository(projectHelmChartRepository *helmv1beta1.P // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithKind(value string) *ProjectHelmChartRepositoryApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithKind(value string) *P // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithAPIVersion(value string) *ProjectHelmChartRepositoryApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithAPIVersion(value stri // If called multiple times, the Name field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithName(value string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithName(value string) *P // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithGenerateName(value string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithGenerateName(value st // If called multiple times, the Namespace field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithNamespace(value string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithNamespace(value strin // If called multiple times, the UID field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithUID(value types.UID) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithUID(value types.UID) // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithResourceVersion(value string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithResourceVersion(value // If called multiple times, the Generation field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithGeneration(value int64) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithGeneration(value int6 // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithCreationTimestamp(val // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithDeletionTimestamp(val // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithDeletionGracePeriodSe // overwriting an existing map entries in Labels field with the same key. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithLabels(entries map[string]string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithLabels(entries map[st // overwriting an existing map entries in Annotations field with the same key. func (b *ProjectHelmChartRepositoryApplyConfiguration) WithAnnotations(entries map[string]string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithOwnerReferences(value if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithOwnerReferences(value func (b *ProjectHelmChartRepositoryApplyConfiguration) WithFinalizers(values ...string) *ProjectHelmChartRepositoryApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *ProjectHelmChartRepositoryApplyConfiguration) WithStatus(value *HelmCha // GetName retrieves the value of the Name field in the declarative configuration. func (b *ProjectHelmChartRepositoryApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/helm/applyconfigurations/internal/internal.go b/helm/applyconfigurations/internal/internal.go index 81478f5af4..9855e72228 100644 --- a/helm/applyconfigurations/internal/internal.go +++ b/helm/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/helm/clientset/versioned/clientset.go b/helm/clientset/versioned/clientset.go index bd4658a601..e74f89b810 100644 --- a/helm/clientset/versioned/clientset.go +++ b/helm/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" helmv1beta1 "github.com/openshift/client-go/helm/clientset/versioned/typed/helm/v1beta1" discovery "k8s.io/client-go/discovery" diff --git a/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helm_client.go b/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helm_client.go index 13c32356cb..0aab8c0d02 100644 --- a/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helm_client.go +++ b/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helm_client.go @@ -13,11 +13,11 @@ type FakeHelmV1beta1 struct { } func (c *FakeHelmV1beta1) HelmChartRepositories() v1beta1.HelmChartRepositoryInterface { - return &FakeHelmChartRepositories{c} + return newFakeHelmChartRepositories(c) } func (c *FakeHelmV1beta1) ProjectHelmChartRepositories(namespace string) v1beta1.ProjectHelmChartRepositoryInterface { - return &FakeProjectHelmChartRepositories{c, namespace} + return newFakeProjectHelmChartRepositories(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helmchartrepository.go b/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helmchartrepository.go index 13b7207dd2..65d57a9821 100644 --- a/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helmchartrepository.go +++ b/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_helmchartrepository.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1beta1 "github.com/openshift/api/helm/v1beta1" helmv1beta1 "github.com/openshift/client-go/helm/applyconfigurations/helm/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedhelmv1beta1 "github.com/openshift/client-go/helm/clientset/versioned/typed/helm/v1beta1" + gentype "k8s.io/client-go/gentype" ) -// FakeHelmChartRepositories implements HelmChartRepositoryInterface -type FakeHelmChartRepositories struct { +// fakeHelmChartRepositories implements HelmChartRepositoryInterface +type fakeHelmChartRepositories struct { + *gentype.FakeClientWithListAndApply[*v1beta1.HelmChartRepository, *v1beta1.HelmChartRepositoryList, *helmv1beta1.HelmChartRepositoryApplyConfiguration] Fake *FakeHelmV1beta1 } -var helmchartrepositoriesResource = v1beta1.SchemeGroupVersion.WithResource("helmchartrepositories") - -var helmchartrepositoriesKind = v1beta1.SchemeGroupVersion.WithKind("HelmChartRepository") - -// Get takes name of the helmChartRepository, and returns the corresponding helmChartRepository object, and an error if there is any. -func (c *FakeHelmChartRepositories) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.HelmChartRepository, err error) { - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(helmchartrepositoriesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.HelmChartRepository), err -} - -// List takes label and field selectors, and returns the list of HelmChartRepositories that match those selectors. -func (c *FakeHelmChartRepositories) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.HelmChartRepositoryList, err error) { - emptyResult := &v1beta1.HelmChartRepositoryList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(helmchartrepositoriesResource, helmchartrepositoriesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.HelmChartRepositoryList{ListMeta: obj.(*v1beta1.HelmChartRepositoryList).ListMeta} - for _, item := range obj.(*v1beta1.HelmChartRepositoryList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested helmChartRepositories. -func (c *FakeHelmChartRepositories) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(helmchartrepositoriesResource, opts)) -} - -// Create takes the representation of a helmChartRepository and creates it. Returns the server's representation of the helmChartRepository, and an error, if there is any. -func (c *FakeHelmChartRepositories) Create(ctx context.Context, helmChartRepository *v1beta1.HelmChartRepository, opts v1.CreateOptions) (result *v1beta1.HelmChartRepository, err error) { - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(helmchartrepositoriesResource, helmChartRepository, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.HelmChartRepository), err -} - -// Update takes the representation of a helmChartRepository and updates it. Returns the server's representation of the helmChartRepository, and an error, if there is any. -func (c *FakeHelmChartRepositories) Update(ctx context.Context, helmChartRepository *v1beta1.HelmChartRepository, opts v1.UpdateOptions) (result *v1beta1.HelmChartRepository, err error) { - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(helmchartrepositoriesResource, helmChartRepository, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.HelmChartRepository), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHelmChartRepositories) UpdateStatus(ctx context.Context, helmChartRepository *v1beta1.HelmChartRepository, opts v1.UpdateOptions) (result *v1beta1.HelmChartRepository, err error) { - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(helmchartrepositoriesResource, "status", helmChartRepository, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.HelmChartRepository), err -} - -// Delete takes name of the helmChartRepository and deletes it. Returns an error if one occurs. -func (c *FakeHelmChartRepositories) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(helmchartrepositoriesResource, name, opts), &v1beta1.HelmChartRepository{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeHelmChartRepositories) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(helmchartrepositoriesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.HelmChartRepositoryList{}) - return err -} - -// Patch applies the patch and returns the patched helmChartRepository. -func (c *FakeHelmChartRepositories) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HelmChartRepository, err error) { - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(helmchartrepositoriesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.HelmChartRepository), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied helmChartRepository. -func (c *FakeHelmChartRepositories) Apply(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HelmChartRepository, err error) { - if helmChartRepository == nil { - return nil, fmt.Errorf("helmChartRepository provided to Apply must not be nil") - } - data, err := json.Marshal(helmChartRepository) - if err != nil { - return nil, err - } - name := helmChartRepository.Name - if name == nil { - return nil, fmt.Errorf("helmChartRepository.Name must be provided to Apply") - } - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(helmchartrepositoriesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.HelmChartRepository), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeHelmChartRepositories) ApplyStatus(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HelmChartRepository, err error) { - if helmChartRepository == nil { - return nil, fmt.Errorf("helmChartRepository provided to Apply must not be nil") - } - data, err := json.Marshal(helmChartRepository) - if err != nil { - return nil, err - } - name := helmChartRepository.Name - if name == nil { - return nil, fmt.Errorf("helmChartRepository.Name must be provided to Apply") - } - emptyResult := &v1beta1.HelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(helmchartrepositoriesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeHelmChartRepositories(fake *FakeHelmV1beta1) typedhelmv1beta1.HelmChartRepositoryInterface { + return &fakeHelmChartRepositories{ + gentype.NewFakeClientWithListAndApply[*v1beta1.HelmChartRepository, *v1beta1.HelmChartRepositoryList, *helmv1beta1.HelmChartRepositoryApplyConfiguration]( + fake.Fake, + "", + v1beta1.SchemeGroupVersion.WithResource("helmchartrepositories"), + v1beta1.SchemeGroupVersion.WithKind("HelmChartRepository"), + func() *v1beta1.HelmChartRepository { return &v1beta1.HelmChartRepository{} }, + func() *v1beta1.HelmChartRepositoryList { return &v1beta1.HelmChartRepositoryList{} }, + func(dst, src *v1beta1.HelmChartRepositoryList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.HelmChartRepositoryList) []*v1beta1.HelmChartRepository { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta1.HelmChartRepositoryList, items []*v1beta1.HelmChartRepository) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.HelmChartRepository), err } diff --git a/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_projecthelmchartrepository.go b/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_projecthelmchartrepository.go index 40921ec2ab..9e3f8e48e4 100644 --- a/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_projecthelmchartrepository.go +++ b/helm/clientset/versioned/typed/helm/v1beta1/fake/fake_projecthelmchartrepository.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1beta1 "github.com/openshift/api/helm/v1beta1" helmv1beta1 "github.com/openshift/client-go/helm/applyconfigurations/helm/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedhelmv1beta1 "github.com/openshift/client-go/helm/clientset/versioned/typed/helm/v1beta1" + gentype "k8s.io/client-go/gentype" ) -// FakeProjectHelmChartRepositories implements ProjectHelmChartRepositoryInterface -type FakeProjectHelmChartRepositories struct { +// fakeProjectHelmChartRepositories implements ProjectHelmChartRepositoryInterface +type fakeProjectHelmChartRepositories struct { + *gentype.FakeClientWithListAndApply[*v1beta1.ProjectHelmChartRepository, *v1beta1.ProjectHelmChartRepositoryList, *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration] Fake *FakeHelmV1beta1 - ns string -} - -var projecthelmchartrepositoriesResource = v1beta1.SchemeGroupVersion.WithResource("projecthelmchartrepositories") - -var projecthelmchartrepositoriesKind = v1beta1.SchemeGroupVersion.WithKind("ProjectHelmChartRepository") - -// Get takes name of the projectHelmChartRepository, and returns the corresponding projectHelmChartRepository object, and an error if there is any. -func (c *FakeProjectHelmChartRepositories) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ProjectHelmChartRepository, err error) { - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(projecthelmchartrepositoriesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.ProjectHelmChartRepository), err -} - -// List takes label and field selectors, and returns the list of ProjectHelmChartRepositories that match those selectors. -func (c *FakeProjectHelmChartRepositories) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ProjectHelmChartRepositoryList, err error) { - emptyResult := &v1beta1.ProjectHelmChartRepositoryList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(projecthelmchartrepositoriesResource, projecthelmchartrepositoriesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.ProjectHelmChartRepositoryList{ListMeta: obj.(*v1beta1.ProjectHelmChartRepositoryList).ListMeta} - for _, item := range obj.(*v1beta1.ProjectHelmChartRepositoryList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested projectHelmChartRepositories. -func (c *FakeProjectHelmChartRepositories) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(projecthelmchartrepositoriesResource, c.ns, opts)) - -} - -// Create takes the representation of a projectHelmChartRepository and creates it. Returns the server's representation of the projectHelmChartRepository, and an error, if there is any. -func (c *FakeProjectHelmChartRepositories) Create(ctx context.Context, projectHelmChartRepository *v1beta1.ProjectHelmChartRepository, opts v1.CreateOptions) (result *v1beta1.ProjectHelmChartRepository, err error) { - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(projecthelmchartrepositoriesResource, c.ns, projectHelmChartRepository, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.ProjectHelmChartRepository), err -} - -// Update takes the representation of a projectHelmChartRepository and updates it. Returns the server's representation of the projectHelmChartRepository, and an error, if there is any. -func (c *FakeProjectHelmChartRepositories) Update(ctx context.Context, projectHelmChartRepository *v1beta1.ProjectHelmChartRepository, opts v1.UpdateOptions) (result *v1beta1.ProjectHelmChartRepository, err error) { - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(projecthelmchartrepositoriesResource, c.ns, projectHelmChartRepository, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.ProjectHelmChartRepository), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeProjectHelmChartRepositories) UpdateStatus(ctx context.Context, projectHelmChartRepository *v1beta1.ProjectHelmChartRepository, opts v1.UpdateOptions) (result *v1beta1.ProjectHelmChartRepository, err error) { - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(projecthelmchartrepositoriesResource, "status", c.ns, projectHelmChartRepository, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.ProjectHelmChartRepository), err -} - -// Delete takes name of the projectHelmChartRepository and deletes it. Returns an error if one occurs. -func (c *FakeProjectHelmChartRepositories) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(projecthelmchartrepositoriesResource, c.ns, name, opts), &v1beta1.ProjectHelmChartRepository{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeProjectHelmChartRepositories) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(projecthelmchartrepositoriesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.ProjectHelmChartRepositoryList{}) - return err -} - -// Patch applies the patch and returns the patched projectHelmChartRepository. -func (c *FakeProjectHelmChartRepositories) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ProjectHelmChartRepository, err error) { - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(projecthelmchartrepositoriesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.ProjectHelmChartRepository), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied projectHelmChartRepository. -func (c *FakeProjectHelmChartRepositories) Apply(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ProjectHelmChartRepository, err error) { - if projectHelmChartRepository == nil { - return nil, fmt.Errorf("projectHelmChartRepository provided to Apply must not be nil") - } - data, err := json.Marshal(projectHelmChartRepository) - if err != nil { - return nil, err - } - name := projectHelmChartRepository.Name - if name == nil { - return nil, fmt.Errorf("projectHelmChartRepository.Name must be provided to Apply") - } - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(projecthelmchartrepositoriesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.ProjectHelmChartRepository), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeProjectHelmChartRepositories) ApplyStatus(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ProjectHelmChartRepository, err error) { - if projectHelmChartRepository == nil { - return nil, fmt.Errorf("projectHelmChartRepository provided to Apply must not be nil") - } - data, err := json.Marshal(projectHelmChartRepository) - if err != nil { - return nil, err - } - name := projectHelmChartRepository.Name - if name == nil { - return nil, fmt.Errorf("projectHelmChartRepository.Name must be provided to Apply") - } - emptyResult := &v1beta1.ProjectHelmChartRepository{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(projecthelmchartrepositoriesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeProjectHelmChartRepositories(fake *FakeHelmV1beta1, namespace string) typedhelmv1beta1.ProjectHelmChartRepositoryInterface { + return &fakeProjectHelmChartRepositories{ + gentype.NewFakeClientWithListAndApply[*v1beta1.ProjectHelmChartRepository, *v1beta1.ProjectHelmChartRepositoryList, *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration]( + fake.Fake, + namespace, + v1beta1.SchemeGroupVersion.WithResource("projecthelmchartrepositories"), + v1beta1.SchemeGroupVersion.WithKind("ProjectHelmChartRepository"), + func() *v1beta1.ProjectHelmChartRepository { return &v1beta1.ProjectHelmChartRepository{} }, + func() *v1beta1.ProjectHelmChartRepositoryList { return &v1beta1.ProjectHelmChartRepositoryList{} }, + func(dst, src *v1beta1.ProjectHelmChartRepositoryList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.ProjectHelmChartRepositoryList) []*v1beta1.ProjectHelmChartRepository { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta1.ProjectHelmChartRepositoryList, items []*v1beta1.ProjectHelmChartRepository) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.ProjectHelmChartRepository), err } diff --git a/helm/clientset/versioned/typed/helm/v1beta1/helm_client.go b/helm/clientset/versioned/typed/helm/v1beta1/helm_client.go index 1162f31f8f..ebfa9bea9f 100644 --- a/helm/clientset/versioned/typed/helm/v1beta1/helm_client.go +++ b/helm/clientset/versioned/typed/helm/v1beta1/helm_client.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "net/http" + http "net/http" - v1beta1 "github.com/openshift/api/helm/v1beta1" - "github.com/openshift/client-go/helm/clientset/versioned/scheme" + helmv1beta1 "github.com/openshift/api/helm/v1beta1" + scheme "github.com/openshift/client-go/helm/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *HelmV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := helmv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/helm/clientset/versioned/typed/helm/v1beta1/helmchartrepository.go b/helm/clientset/versioned/typed/helm/v1beta1/helmchartrepository.go index 31747b99f0..ee94b84a35 100644 --- a/helm/clientset/versioned/typed/helm/v1beta1/helmchartrepository.go +++ b/helm/clientset/versioned/typed/helm/v1beta1/helmchartrepository.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/openshift/api/helm/v1beta1" - helmv1beta1 "github.com/openshift/client-go/helm/applyconfigurations/helm/v1beta1" + helmv1beta1 "github.com/openshift/api/helm/v1beta1" + applyconfigurationshelmv1beta1 "github.com/openshift/client-go/helm/applyconfigurations/helm/v1beta1" scheme "github.com/openshift/client-go/helm/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type HelmChartRepositoriesGetter interface { // HelmChartRepositoryInterface has methods to work with HelmChartRepository resources. type HelmChartRepositoryInterface interface { - Create(ctx context.Context, helmChartRepository *v1beta1.HelmChartRepository, opts v1.CreateOptions) (*v1beta1.HelmChartRepository, error) - Update(ctx context.Context, helmChartRepository *v1beta1.HelmChartRepository, opts v1.UpdateOptions) (*v1beta1.HelmChartRepository, error) + Create(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepository, opts v1.CreateOptions) (*helmv1beta1.HelmChartRepository, error) + Update(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepository, opts v1.UpdateOptions) (*helmv1beta1.HelmChartRepository, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, helmChartRepository *v1beta1.HelmChartRepository, opts v1.UpdateOptions) (*v1beta1.HelmChartRepository, error) + UpdateStatus(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepository, opts v1.UpdateOptions) (*helmv1beta1.HelmChartRepository, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.HelmChartRepository, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.HelmChartRepositoryList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*helmv1beta1.HelmChartRepository, error) + List(ctx context.Context, opts v1.ListOptions) (*helmv1beta1.HelmChartRepositoryList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HelmChartRepository, err error) - Apply(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HelmChartRepository, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *helmv1beta1.HelmChartRepository, err error) + Apply(ctx context.Context, helmChartRepository *applyconfigurationshelmv1beta1.HelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *helmv1beta1.HelmChartRepository, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, helmChartRepository *helmv1beta1.HelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HelmChartRepository, err error) + ApplyStatus(ctx context.Context, helmChartRepository *applyconfigurationshelmv1beta1.HelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *helmv1beta1.HelmChartRepository, err error) HelmChartRepositoryExpansion } // helmChartRepositories implements HelmChartRepositoryInterface type helmChartRepositories struct { - *gentype.ClientWithListAndApply[*v1beta1.HelmChartRepository, *v1beta1.HelmChartRepositoryList, *helmv1beta1.HelmChartRepositoryApplyConfiguration] + *gentype.ClientWithListAndApply[*helmv1beta1.HelmChartRepository, *helmv1beta1.HelmChartRepositoryList, *applyconfigurationshelmv1beta1.HelmChartRepositoryApplyConfiguration] } // newHelmChartRepositories returns a HelmChartRepositories func newHelmChartRepositories(c *HelmV1beta1Client) *helmChartRepositories { return &helmChartRepositories{ - gentype.NewClientWithListAndApply[*v1beta1.HelmChartRepository, *v1beta1.HelmChartRepositoryList, *helmv1beta1.HelmChartRepositoryApplyConfiguration]( + gentype.NewClientWithListAndApply[*helmv1beta1.HelmChartRepository, *helmv1beta1.HelmChartRepositoryList, *applyconfigurationshelmv1beta1.HelmChartRepositoryApplyConfiguration]( "helmchartrepositories", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1beta1.HelmChartRepository { return &v1beta1.HelmChartRepository{} }, - func() *v1beta1.HelmChartRepositoryList { return &v1beta1.HelmChartRepositoryList{} }), + func() *helmv1beta1.HelmChartRepository { return &helmv1beta1.HelmChartRepository{} }, + func() *helmv1beta1.HelmChartRepositoryList { return &helmv1beta1.HelmChartRepositoryList{} }, + ), } } diff --git a/helm/clientset/versioned/typed/helm/v1beta1/projecthelmchartrepository.go b/helm/clientset/versioned/typed/helm/v1beta1/projecthelmchartrepository.go index fb502ee7a5..425df22ebb 100644 --- a/helm/clientset/versioned/typed/helm/v1beta1/projecthelmchartrepository.go +++ b/helm/clientset/versioned/typed/helm/v1beta1/projecthelmchartrepository.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/openshift/api/helm/v1beta1" - helmv1beta1 "github.com/openshift/client-go/helm/applyconfigurations/helm/v1beta1" + helmv1beta1 "github.com/openshift/api/helm/v1beta1" + applyconfigurationshelmv1beta1 "github.com/openshift/client-go/helm/applyconfigurations/helm/v1beta1" scheme "github.com/openshift/client-go/helm/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,39 @@ type ProjectHelmChartRepositoriesGetter interface { // ProjectHelmChartRepositoryInterface has methods to work with ProjectHelmChartRepository resources. type ProjectHelmChartRepositoryInterface interface { - Create(ctx context.Context, projectHelmChartRepository *v1beta1.ProjectHelmChartRepository, opts v1.CreateOptions) (*v1beta1.ProjectHelmChartRepository, error) - Update(ctx context.Context, projectHelmChartRepository *v1beta1.ProjectHelmChartRepository, opts v1.UpdateOptions) (*v1beta1.ProjectHelmChartRepository, error) + Create(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepository, opts v1.CreateOptions) (*helmv1beta1.ProjectHelmChartRepository, error) + Update(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepository, opts v1.UpdateOptions) (*helmv1beta1.ProjectHelmChartRepository, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, projectHelmChartRepository *v1beta1.ProjectHelmChartRepository, opts v1.UpdateOptions) (*v1beta1.ProjectHelmChartRepository, error) + UpdateStatus(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepository, opts v1.UpdateOptions) (*helmv1beta1.ProjectHelmChartRepository, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.ProjectHelmChartRepository, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ProjectHelmChartRepositoryList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*helmv1beta1.ProjectHelmChartRepository, error) + List(ctx context.Context, opts v1.ListOptions) (*helmv1beta1.ProjectHelmChartRepositoryList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ProjectHelmChartRepository, err error) - Apply(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ProjectHelmChartRepository, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *helmv1beta1.ProjectHelmChartRepository, err error) + Apply(ctx context.Context, projectHelmChartRepository *applyconfigurationshelmv1beta1.ProjectHelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *helmv1beta1.ProjectHelmChartRepository, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, projectHelmChartRepository *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ProjectHelmChartRepository, err error) + ApplyStatus(ctx context.Context, projectHelmChartRepository *applyconfigurationshelmv1beta1.ProjectHelmChartRepositoryApplyConfiguration, opts v1.ApplyOptions) (result *helmv1beta1.ProjectHelmChartRepository, err error) ProjectHelmChartRepositoryExpansion } // projectHelmChartRepositories implements ProjectHelmChartRepositoryInterface type projectHelmChartRepositories struct { - *gentype.ClientWithListAndApply[*v1beta1.ProjectHelmChartRepository, *v1beta1.ProjectHelmChartRepositoryList, *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration] + *gentype.ClientWithListAndApply[*helmv1beta1.ProjectHelmChartRepository, *helmv1beta1.ProjectHelmChartRepositoryList, *applyconfigurationshelmv1beta1.ProjectHelmChartRepositoryApplyConfiguration] } // newProjectHelmChartRepositories returns a ProjectHelmChartRepositories func newProjectHelmChartRepositories(c *HelmV1beta1Client, namespace string) *projectHelmChartRepositories { return &projectHelmChartRepositories{ - gentype.NewClientWithListAndApply[*v1beta1.ProjectHelmChartRepository, *v1beta1.ProjectHelmChartRepositoryList, *helmv1beta1.ProjectHelmChartRepositoryApplyConfiguration]( + gentype.NewClientWithListAndApply[*helmv1beta1.ProjectHelmChartRepository, *helmv1beta1.ProjectHelmChartRepositoryList, *applyconfigurationshelmv1beta1.ProjectHelmChartRepositoryApplyConfiguration]( "projecthelmchartrepositories", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.ProjectHelmChartRepository { return &v1beta1.ProjectHelmChartRepository{} }, - func() *v1beta1.ProjectHelmChartRepositoryList { return &v1beta1.ProjectHelmChartRepositoryList{} }), + func() *helmv1beta1.ProjectHelmChartRepository { return &helmv1beta1.ProjectHelmChartRepository{} }, + func() *helmv1beta1.ProjectHelmChartRepositoryList { + return &helmv1beta1.ProjectHelmChartRepositoryList{} + }, + ), } } diff --git a/helm/informers/externalversions/generic.go b/helm/informers/externalversions/generic.go index e624b54739..e54f8e9ad4 100644 --- a/helm/informers/externalversions/generic.go +++ b/helm/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1beta1 "github.com/openshift/api/helm/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/helm/informers/externalversions/helm/v1beta1/helmchartrepository.go b/helm/informers/externalversions/helm/v1beta1/helmchartrepository.go index 5fb54e25c4..6934c9d584 100644 --- a/helm/informers/externalversions/helm/v1beta1/helmchartrepository.go +++ b/helm/informers/externalversions/helm/v1beta1/helmchartrepository.go @@ -3,13 +3,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - helmv1beta1 "github.com/openshift/api/helm/v1beta1" + apihelmv1beta1 "github.com/openshift/api/helm/v1beta1" versioned "github.com/openshift/client-go/helm/clientset/versioned" internalinterfaces "github.com/openshift/client-go/helm/informers/externalversions/internalinterfaces" - v1beta1 "github.com/openshift/client-go/helm/listers/helm/v1beta1" + helmv1beta1 "github.com/openshift/client-go/helm/listers/helm/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // HelmChartRepositories. type HelmChartRepositoryInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.HelmChartRepositoryLister + Lister() helmv1beta1.HelmChartRepositoryLister } type helmChartRepositoryInformer struct { @@ -54,7 +54,7 @@ func NewFilteredHelmChartRepositoryInformer(client versioned.Interface, resyncPe return client.HelmV1beta1().HelmChartRepositories().Watch(context.TODO(), options) }, }, - &helmv1beta1.HelmChartRepository{}, + &apihelmv1beta1.HelmChartRepository{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *helmChartRepositoryInformer) defaultInformer(client versioned.Interface } func (f *helmChartRepositoryInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&helmv1beta1.HelmChartRepository{}, f.defaultInformer) + return f.factory.InformerFor(&apihelmv1beta1.HelmChartRepository{}, f.defaultInformer) } -func (f *helmChartRepositoryInformer) Lister() v1beta1.HelmChartRepositoryLister { - return v1beta1.NewHelmChartRepositoryLister(f.Informer().GetIndexer()) +func (f *helmChartRepositoryInformer) Lister() helmv1beta1.HelmChartRepositoryLister { + return helmv1beta1.NewHelmChartRepositoryLister(f.Informer().GetIndexer()) } diff --git a/helm/informers/externalversions/helm/v1beta1/projecthelmchartrepository.go b/helm/informers/externalversions/helm/v1beta1/projecthelmchartrepository.go index c5bf32db1d..0f6455452a 100644 --- a/helm/informers/externalversions/helm/v1beta1/projecthelmchartrepository.go +++ b/helm/informers/externalversions/helm/v1beta1/projecthelmchartrepository.go @@ -3,13 +3,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - helmv1beta1 "github.com/openshift/api/helm/v1beta1" + apihelmv1beta1 "github.com/openshift/api/helm/v1beta1" versioned "github.com/openshift/client-go/helm/clientset/versioned" internalinterfaces "github.com/openshift/client-go/helm/informers/externalversions/internalinterfaces" - v1beta1 "github.com/openshift/client-go/helm/listers/helm/v1beta1" + helmv1beta1 "github.com/openshift/client-go/helm/listers/helm/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ProjectHelmChartRepositories. type ProjectHelmChartRepositoryInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.ProjectHelmChartRepositoryLister + Lister() helmv1beta1.ProjectHelmChartRepositoryLister } type projectHelmChartRepositoryInformer struct { @@ -55,7 +55,7 @@ func NewFilteredProjectHelmChartRepositoryInformer(client versioned.Interface, n return client.HelmV1beta1().ProjectHelmChartRepositories(namespace).Watch(context.TODO(), options) }, }, - &helmv1beta1.ProjectHelmChartRepository{}, + &apihelmv1beta1.ProjectHelmChartRepository{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *projectHelmChartRepositoryInformer) defaultInformer(client versioned.In } func (f *projectHelmChartRepositoryInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&helmv1beta1.ProjectHelmChartRepository{}, f.defaultInformer) + return f.factory.InformerFor(&apihelmv1beta1.ProjectHelmChartRepository{}, f.defaultInformer) } -func (f *projectHelmChartRepositoryInformer) Lister() v1beta1.ProjectHelmChartRepositoryLister { - return v1beta1.NewProjectHelmChartRepositoryLister(f.Informer().GetIndexer()) +func (f *projectHelmChartRepositoryInformer) Lister() helmv1beta1.ProjectHelmChartRepositoryLister { + return helmv1beta1.NewProjectHelmChartRepositoryLister(f.Informer().GetIndexer()) } diff --git a/helm/listers/helm/v1beta1/helmchartrepository.go b/helm/listers/helm/v1beta1/helmchartrepository.go index 4a54d62ec1..88fcdebe50 100644 --- a/helm/listers/helm/v1beta1/helmchartrepository.go +++ b/helm/listers/helm/v1beta1/helmchartrepository.go @@ -3,10 +3,10 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/helm/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + helmv1beta1 "github.com/openshift/api/helm/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // HelmChartRepositoryLister helps list HelmChartRepositories. @@ -14,19 +14,19 @@ import ( type HelmChartRepositoryLister interface { // List lists all HelmChartRepositories in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.HelmChartRepository, err error) + List(selector labels.Selector) (ret []*helmv1beta1.HelmChartRepository, err error) // Get retrieves the HelmChartRepository from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.HelmChartRepository, error) + Get(name string) (*helmv1beta1.HelmChartRepository, error) HelmChartRepositoryListerExpansion } // helmChartRepositoryLister implements the HelmChartRepositoryLister interface. type helmChartRepositoryLister struct { - listers.ResourceIndexer[*v1beta1.HelmChartRepository] + listers.ResourceIndexer[*helmv1beta1.HelmChartRepository] } // NewHelmChartRepositoryLister returns a new HelmChartRepositoryLister. func NewHelmChartRepositoryLister(indexer cache.Indexer) HelmChartRepositoryLister { - return &helmChartRepositoryLister{listers.New[*v1beta1.HelmChartRepository](indexer, v1beta1.Resource("helmchartrepository"))} + return &helmChartRepositoryLister{listers.New[*helmv1beta1.HelmChartRepository](indexer, helmv1beta1.Resource("helmchartrepository"))} } diff --git a/helm/listers/helm/v1beta1/projecthelmchartrepository.go b/helm/listers/helm/v1beta1/projecthelmchartrepository.go index 1468080986..7c0a90bee5 100644 --- a/helm/listers/helm/v1beta1/projecthelmchartrepository.go +++ b/helm/listers/helm/v1beta1/projecthelmchartrepository.go @@ -3,10 +3,10 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/helm/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + helmv1beta1 "github.com/openshift/api/helm/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ProjectHelmChartRepositoryLister helps list ProjectHelmChartRepositories. @@ -14,7 +14,7 @@ import ( type ProjectHelmChartRepositoryLister interface { // List lists all ProjectHelmChartRepositories in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.ProjectHelmChartRepository, err error) + List(selector labels.Selector) (ret []*helmv1beta1.ProjectHelmChartRepository, err error) // ProjectHelmChartRepositories returns an object that can list and get ProjectHelmChartRepositories. ProjectHelmChartRepositories(namespace string) ProjectHelmChartRepositoryNamespaceLister ProjectHelmChartRepositoryListerExpansion @@ -22,17 +22,17 @@ type ProjectHelmChartRepositoryLister interface { // projectHelmChartRepositoryLister implements the ProjectHelmChartRepositoryLister interface. type projectHelmChartRepositoryLister struct { - listers.ResourceIndexer[*v1beta1.ProjectHelmChartRepository] + listers.ResourceIndexer[*helmv1beta1.ProjectHelmChartRepository] } // NewProjectHelmChartRepositoryLister returns a new ProjectHelmChartRepositoryLister. func NewProjectHelmChartRepositoryLister(indexer cache.Indexer) ProjectHelmChartRepositoryLister { - return &projectHelmChartRepositoryLister{listers.New[*v1beta1.ProjectHelmChartRepository](indexer, v1beta1.Resource("projecthelmchartrepository"))} + return &projectHelmChartRepositoryLister{listers.New[*helmv1beta1.ProjectHelmChartRepository](indexer, helmv1beta1.Resource("projecthelmchartrepository"))} } // ProjectHelmChartRepositories returns an object that can list and get ProjectHelmChartRepositories. func (s *projectHelmChartRepositoryLister) ProjectHelmChartRepositories(namespace string) ProjectHelmChartRepositoryNamespaceLister { - return projectHelmChartRepositoryNamespaceLister{listers.NewNamespaced[*v1beta1.ProjectHelmChartRepository](s.ResourceIndexer, namespace)} + return projectHelmChartRepositoryNamespaceLister{listers.NewNamespaced[*helmv1beta1.ProjectHelmChartRepository](s.ResourceIndexer, namespace)} } // ProjectHelmChartRepositoryNamespaceLister helps list and get ProjectHelmChartRepositories. @@ -40,15 +40,15 @@ func (s *projectHelmChartRepositoryLister) ProjectHelmChartRepositories(namespac type ProjectHelmChartRepositoryNamespaceLister interface { // List lists all ProjectHelmChartRepositories in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.ProjectHelmChartRepository, err error) + List(selector labels.Selector) (ret []*helmv1beta1.ProjectHelmChartRepository, err error) // Get retrieves the ProjectHelmChartRepository from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.ProjectHelmChartRepository, error) + Get(name string) (*helmv1beta1.ProjectHelmChartRepository, error) ProjectHelmChartRepositoryNamespaceListerExpansion } // projectHelmChartRepositoryNamespaceLister implements the ProjectHelmChartRepositoryNamespaceLister // interface. type projectHelmChartRepositoryNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.ProjectHelmChartRepository] + listers.ResourceIndexer[*helmv1beta1.ProjectHelmChartRepository] } diff --git a/image/applyconfigurations/image/v1/image.go b/image/applyconfigurations/image/v1/image.go index baddceac6c..d3110a3e6b 100644 --- a/image/applyconfigurations/image/v1/image.go +++ b/image/applyconfigurations/image/v1/image.go @@ -3,30 +3,30 @@ package v1 import ( - apiimagev1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" internal "github.com/openshift/client-go/image/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageApplyConfiguration represents a declarative configuration of the Image type for use // with apply. type ImageApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - DockerImageReference *string `json:"dockerImageReference,omitempty"` - DockerImageMetadata *runtime.RawExtension `json:"dockerImageMetadata,omitempty"` - DockerImageMetadataVersion *string `json:"dockerImageMetadataVersion,omitempty"` - DockerImageManifest *string `json:"dockerImageManifest,omitempty"` - DockerImageLayers []ImageLayerApplyConfiguration `json:"dockerImageLayers,omitempty"` - Signatures []ImageSignatureApplyConfiguration `json:"signatures,omitempty"` - DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty"` - DockerImageManifestMediaType *string `json:"dockerImageManifestMediaType,omitempty"` - DockerImageConfig *string `json:"dockerImageConfig,omitempty"` - DockerImageManifests []ImageManifestApplyConfiguration `json:"dockerImageManifests,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + DockerImageReference *string `json:"dockerImageReference,omitempty"` + DockerImageMetadata *runtime.RawExtension `json:"dockerImageMetadata,omitempty"` + DockerImageMetadataVersion *string `json:"dockerImageMetadataVersion,omitempty"` + DockerImageManifest *string `json:"dockerImageManifest,omitempty"` + DockerImageLayers []ImageLayerApplyConfiguration `json:"dockerImageLayers,omitempty"` + Signatures []ImageSignatureApplyConfiguration `json:"signatures,omitempty"` + DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty"` + DockerImageManifestMediaType *string `json:"dockerImageManifestMediaType,omitempty"` + DockerImageConfig *string `json:"dockerImageConfig,omitempty"` + DockerImageManifests []ImageManifestApplyConfiguration `json:"dockerImageManifests,omitempty"` } // Image constructs a declarative configuration of the Image type for use with @@ -50,18 +50,18 @@ func Image(name string) *ImageApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImage(image *apiimagev1.Image, fieldManager string) (*ImageApplyConfiguration, error) { +func ExtractImage(image *imagev1.Image, fieldManager string) (*ImageApplyConfiguration, error) { return extractImage(image, fieldManager, "") } // ExtractImageStatus is the same as ExtractImage except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageStatus(image *apiimagev1.Image, fieldManager string) (*ImageApplyConfiguration, error) { +func ExtractImageStatus(image *imagev1.Image, fieldManager string) (*ImageApplyConfiguration, error) { return extractImage(image, fieldManager, "status") } -func extractImage(image *apiimagev1.Image, fieldManager string, subresource string) (*ImageApplyConfiguration, error) { +func extractImage(image *imagev1.Image, fieldManager string, subresource string) (*ImageApplyConfiguration, error) { b := &ImageApplyConfiguration{} err := managedfields.ExtractInto(image, internal.Parser().Type("com.github.openshift.api.image.v1.Image"), fieldManager, b, subresource) if err != nil { @@ -78,7 +78,7 @@ func extractImage(image *apiimagev1.Image, fieldManager string, subresource stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageApplyConfiguration) WithKind(value string) *ImageApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -86,7 +86,7 @@ func (b *ImageApplyConfiguration) WithKind(value string) *ImageApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageApplyConfiguration) WithAPIVersion(value string) *ImageApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -95,7 +95,7 @@ func (b *ImageApplyConfiguration) WithAPIVersion(value string) *ImageApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *ImageApplyConfiguration) WithName(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -104,7 +104,7 @@ func (b *ImageApplyConfiguration) WithName(value string) *ImageApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageApplyConfiguration) WithGenerateName(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -113,7 +113,7 @@ func (b *ImageApplyConfiguration) WithGenerateName(value string) *ImageApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageApplyConfiguration) WithNamespace(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -122,7 +122,7 @@ func (b *ImageApplyConfiguration) WithNamespace(value string) *ImageApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *ImageApplyConfiguration) WithUID(value types.UID) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -131,7 +131,7 @@ func (b *ImageApplyConfiguration) WithUID(value types.UID) *ImageApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageApplyConfiguration) WithResourceVersion(value string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -140,25 +140,25 @@ func (b *ImageApplyConfiguration) WithResourceVersion(value string) *ImageApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageApplyConfiguration) WithGeneration(value int64) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageApplyConfiguration { +func (b *ImageApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageApplyConfiguration { +func (b *ImageApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -167,7 +167,7 @@ func (b *ImageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Imag // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -177,11 +177,11 @@ func (b *ImageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *I // overwriting an existing map entries in Labels field with the same key. func (b *ImageApplyConfiguration) WithLabels(entries map[string]string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -192,11 +192,11 @@ func (b *ImageApplyConfiguration) WithLabels(entries map[string]string) *ImageAp // overwriting an existing map entries in Annotations field with the same key. func (b *ImageApplyConfiguration) WithAnnotations(entries map[string]string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -204,13 +204,13 @@ func (b *ImageApplyConfiguration) WithAnnotations(entries map[string]string) *Im // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageApplyConfiguration { +func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -221,14 +221,14 @@ func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *ImageApplyConfiguration) WithFinalizers(values ...string) *ImageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -332,5 +332,5 @@ func (b *ImageApplyConfiguration) WithDockerImageManifests(values ...*ImageManif // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/image/applyconfigurations/image/v1/imagesignature.go b/image/applyconfigurations/image/v1/imagesignature.go index d12f832660..93e5abc04a 100644 --- a/image/applyconfigurations/image/v1/imagesignature.go +++ b/image/applyconfigurations/image/v1/imagesignature.go @@ -3,24 +3,24 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageSignatureApplyConfiguration represents a declarative configuration of the ImageSignature type for use // with apply. type ImageSignatureApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Type *string `json:"type,omitempty"` - Content []byte `json:"content,omitempty"` - Conditions []SignatureConditionApplyConfiguration `json:"conditions,omitempty"` - ImageIdentity *string `json:"imageIdentity,omitempty"` - SignedClaims map[string]string `json:"signedClaims,omitempty"` - Created *metav1.Time `json:"created,omitempty"` - IssuedBy *SignatureIssuerApplyConfiguration `json:"issuedBy,omitempty"` - IssuedTo *SignatureSubjectApplyConfiguration `json:"issuedTo,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Type *string `json:"type,omitempty"` + Content []byte `json:"content,omitempty"` + Conditions []SignatureConditionApplyConfiguration `json:"conditions,omitempty"` + ImageIdentity *string `json:"imageIdentity,omitempty"` + SignedClaims map[string]string `json:"signedClaims,omitempty"` + Created *apismetav1.Time `json:"created,omitempty"` + IssuedBy *SignatureIssuerApplyConfiguration `json:"issuedBy,omitempty"` + IssuedTo *SignatureSubjectApplyConfiguration `json:"issuedTo,omitempty"` } // ImageSignature constructs a declarative configuration of the ImageSignature type for use with @@ -37,7 +37,7 @@ func ImageSignature(name string) *ImageSignatureApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithKind(value string) *ImageSignatureApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -45,7 +45,7 @@ func (b *ImageSignatureApplyConfiguration) WithKind(value string) *ImageSignatur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithAPIVersion(value string) *ImageSignatureApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -54,7 +54,7 @@ func (b *ImageSignatureApplyConfiguration) WithAPIVersion(value string) *ImageSi // If called multiple times, the Name field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithName(value string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -63,7 +63,7 @@ func (b *ImageSignatureApplyConfiguration) WithName(value string) *ImageSignatur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithGenerateName(value string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -72,7 +72,7 @@ func (b *ImageSignatureApplyConfiguration) WithGenerateName(value string) *Image // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithNamespace(value string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -81,7 +81,7 @@ func (b *ImageSignatureApplyConfiguration) WithNamespace(value string) *ImageSig // If called multiple times, the UID field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithUID(value types.UID) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -90,7 +90,7 @@ func (b *ImageSignatureApplyConfiguration) WithUID(value types.UID) *ImageSignat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithResourceVersion(value string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -99,25 +99,25 @@ func (b *ImageSignatureApplyConfiguration) WithResourceVersion(value string) *Im // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithGeneration(value int64) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageSignatureApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageSignatureApplyConfiguration { +func (b *ImageSignatureApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageSignatureApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageSignatureApplyConfiguration { +func (b *ImageSignatureApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -126,7 +126,7 @@ func (b *ImageSignatureApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageSignatureApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -136,11 +136,11 @@ func (b *ImageSignatureApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ImageSignatureApplyConfiguration) WithLabels(entries map[string]string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -151,11 +151,11 @@ func (b *ImageSignatureApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ImageSignatureApplyConfiguration) WithAnnotations(entries map[string]string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -163,13 +163,13 @@ func (b *ImageSignatureApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageSignatureApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageSignatureApplyConfiguration { +func (b *ImageSignatureApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -180,14 +180,14 @@ func (b *ImageSignatureApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ImageSignatureApplyConfiguration) WithFinalizers(values ...string) *ImageSignatureApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageSignatureApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -247,7 +247,7 @@ func (b *ImageSignatureApplyConfiguration) WithSignedClaims(entries map[string]s // WithCreated sets the Created field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Created field is set to the value of the last call. -func (b *ImageSignatureApplyConfiguration) WithCreated(value metav1.Time) *ImageSignatureApplyConfiguration { +func (b *ImageSignatureApplyConfiguration) WithCreated(value apismetav1.Time) *ImageSignatureApplyConfiguration { b.Created = &value return b } @@ -271,5 +271,5 @@ func (b *ImageSignatureApplyConfiguration) WithIssuedTo(value *SignatureSubjectA // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageSignatureApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/image/applyconfigurations/image/v1/imagestream.go b/image/applyconfigurations/image/v1/imagestream.go index d003455851..ad895e1905 100644 --- a/image/applyconfigurations/image/v1/imagestream.go +++ b/image/applyconfigurations/image/v1/imagestream.go @@ -3,21 +3,21 @@ package v1 import ( - apiimagev1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" internal "github.com/openshift/client-go/image/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageStreamApplyConfiguration represents a declarative configuration of the ImageStream type for use // with apply. type ImageStreamApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageStreamSpecApplyConfiguration `json:"spec,omitempty"` - Status *ImageStreamStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImageStreamSpecApplyConfiguration `json:"spec,omitempty"` + Status *ImageStreamStatusApplyConfiguration `json:"status,omitempty"` } // ImageStream constructs a declarative configuration of the ImageStream type for use with @@ -42,18 +42,18 @@ func ImageStream(name, namespace string) *ImageStreamApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImageStream(imageStream *apiimagev1.ImageStream, fieldManager string) (*ImageStreamApplyConfiguration, error) { +func ExtractImageStream(imageStream *imagev1.ImageStream, fieldManager string) (*ImageStreamApplyConfiguration, error) { return extractImageStream(imageStream, fieldManager, "") } // ExtractImageStreamStatus is the same as ExtractImageStream except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageStreamStatus(imageStream *apiimagev1.ImageStream, fieldManager string) (*ImageStreamApplyConfiguration, error) { +func ExtractImageStreamStatus(imageStream *imagev1.ImageStream, fieldManager string) (*ImageStreamApplyConfiguration, error) { return extractImageStream(imageStream, fieldManager, "status") } -func extractImageStream(imageStream *apiimagev1.ImageStream, fieldManager string, subresource string) (*ImageStreamApplyConfiguration, error) { +func extractImageStream(imageStream *imagev1.ImageStream, fieldManager string, subresource string) (*ImageStreamApplyConfiguration, error) { b := &ImageStreamApplyConfiguration{} err := managedfields.ExtractInto(imageStream, internal.Parser().Type("com.github.openshift.api.image.v1.ImageStream"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractImageStream(imageStream *apiimagev1.ImageStream, fieldManager string // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithKind(value string) *ImageStreamApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *ImageStreamApplyConfiguration) WithKind(value string) *ImageStreamApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithAPIVersion(value string) *ImageStreamApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *ImageStreamApplyConfiguration) WithAPIVersion(value string) *ImageStrea // If called multiple times, the Name field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithName(value string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *ImageStreamApplyConfiguration) WithName(value string) *ImageStreamApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithGenerateName(value string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *ImageStreamApplyConfiguration) WithGenerateName(value string) *ImageStr // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithNamespace(value string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *ImageStreamApplyConfiguration) WithNamespace(value string) *ImageStream // If called multiple times, the UID field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithUID(value types.UID) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *ImageStreamApplyConfiguration) WithUID(value types.UID) *ImageStreamApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithResourceVersion(value string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *ImageStreamApplyConfiguration) WithResourceVersion(value string) *Image // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithGeneration(value int64) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageStreamApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageStreamApplyConfiguration { +func (b *ImageStreamApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageStreamApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageStreamApplyConfiguration { +func (b *ImageStreamApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *ImageStreamApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageStreamApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *ImageStreamApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *ImageStreamApplyConfiguration) WithLabels(entries map[string]string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *ImageStreamApplyConfiguration) WithLabels(entries map[string]string) *I // overwriting an existing map entries in Annotations field with the same key. func (b *ImageStreamApplyConfiguration) WithAnnotations(entries map[string]string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *ImageStreamApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageStreamApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageStreamApplyConfiguration { +func (b *ImageStreamApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *ImageStreamApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *ImageStreamApplyConfiguration) WithFinalizers(values ...string) *ImageStreamApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageStreamApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *ImageStreamApplyConfiguration) WithStatus(value *ImageStreamStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageStreamApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/image/applyconfigurations/image/v1/imagestreammapping.go b/image/applyconfigurations/image/v1/imagestreammapping.go index 56a1e24fce..97e99ff088 100644 --- a/image/applyconfigurations/image/v1/imagestreammapping.go +++ b/image/applyconfigurations/image/v1/imagestreammapping.go @@ -3,21 +3,21 @@ package v1 import ( - apiimagev1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" internal "github.com/openshift/client-go/image/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImageStreamMappingApplyConfiguration represents a declarative configuration of the ImageStreamMapping type for use // with apply. type ImageStreamMappingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Image *ImageApplyConfiguration `json:"image,omitempty"` - Tag *string `json:"tag,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Image *ImageApplyConfiguration `json:"image,omitempty"` + Tag *string `json:"tag,omitempty"` } // ImageStreamMapping constructs a declarative configuration of the ImageStreamMapping type for use with @@ -42,18 +42,18 @@ func ImageStreamMapping(name, namespace string) *ImageStreamMappingApplyConfigur // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImageStreamMapping(imageStreamMapping *apiimagev1.ImageStreamMapping, fieldManager string) (*ImageStreamMappingApplyConfiguration, error) { +func ExtractImageStreamMapping(imageStreamMapping *imagev1.ImageStreamMapping, fieldManager string) (*ImageStreamMappingApplyConfiguration, error) { return extractImageStreamMapping(imageStreamMapping, fieldManager, "") } // ExtractImageStreamMappingStatus is the same as ExtractImageStreamMapping except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImageStreamMappingStatus(imageStreamMapping *apiimagev1.ImageStreamMapping, fieldManager string) (*ImageStreamMappingApplyConfiguration, error) { +func ExtractImageStreamMappingStatus(imageStreamMapping *imagev1.ImageStreamMapping, fieldManager string) (*ImageStreamMappingApplyConfiguration, error) { return extractImageStreamMapping(imageStreamMapping, fieldManager, "status") } -func extractImageStreamMapping(imageStreamMapping *apiimagev1.ImageStreamMapping, fieldManager string, subresource string) (*ImageStreamMappingApplyConfiguration, error) { +func extractImageStreamMapping(imageStreamMapping *imagev1.ImageStreamMapping, fieldManager string, subresource string) (*ImageStreamMappingApplyConfiguration, error) { b := &ImageStreamMappingApplyConfiguration{} err := managedfields.ExtractInto(imageStreamMapping, internal.Parser().Type("com.github.openshift.api.image.v1.ImageStreamMapping"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractImageStreamMapping(imageStreamMapping *apiimagev1.ImageStreamMapping // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithKind(value string) *ImageStreamMappingApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithKind(value string) *ImageStre // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithAPIVersion(value string) *ImageStreamMappingApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithAPIVersion(value string) *Ima // If called multiple times, the Name field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithName(value string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithName(value string) *ImageStre // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithGenerateName(value string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithGenerateName(value string) *I // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithNamespace(value string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithNamespace(value string) *Imag // If called multiple times, the UID field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithUID(value types.UID) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithUID(value types.UID) *ImageSt // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithResourceVersion(value string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *ImageStreamMappingApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithGeneration(value int64) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageStreamMappingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageStreamMappingApplyConfiguration { +func (b *ImageStreamMappingApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageStreamMappingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageStreamMappingApplyConfiguration { +func (b *ImageStreamMappingApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *ImageStreamMappingApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageStreamMappingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *ImageStreamMappingApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *ImageStreamMappingApplyConfiguration) WithLabels(entries map[string]string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *ImageStreamMappingApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *ImageStreamMappingApplyConfiguration) WithAnnotations(entries map[string]string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *ImageStreamMappingApplyConfiguration) WithAnnotations(entries map[strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageStreamMappingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImageStreamMappingApplyConfiguration { +func (b *ImageStreamMappingApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *ImageStreamMappingApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *ImageStreamMappingApplyConfiguration) WithFinalizers(values ...string) *ImageStreamMappingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImageStreamMappingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *ImageStreamMappingApplyConfiguration) WithTag(value string) *ImageStrea // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageStreamMappingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/image/applyconfigurations/image/v1/signaturecondition.go b/image/applyconfigurations/image/v1/signaturecondition.go index 23f05b9c4d..232bf7bf96 100644 --- a/image/applyconfigurations/image/v1/signaturecondition.go +++ b/image/applyconfigurations/image/v1/signaturecondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,12 +11,12 @@ import ( // SignatureConditionApplyConfiguration represents a declarative configuration of the SignatureCondition type for use // with apply. type SignatureConditionApplyConfiguration struct { - Type *v1.SignatureConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *imagev1.SignatureConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // SignatureConditionApplyConfiguration constructs a declarative configuration of the SignatureCondition type for use with @@ -28,7 +28,7 @@ func SignatureCondition() *SignatureConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SignatureConditionApplyConfiguration) WithType(value v1.SignatureConditionType) *SignatureConditionApplyConfiguration { +func (b *SignatureConditionApplyConfiguration) WithType(value imagev1.SignatureConditionType) *SignatureConditionApplyConfiguration { b.Type = &value return b } diff --git a/image/applyconfigurations/image/v1/signatureissuer.go b/image/applyconfigurations/image/v1/signatureissuer.go index 3ec7c7bbda..68564dd5f0 100644 --- a/image/applyconfigurations/image/v1/signatureissuer.go +++ b/image/applyconfigurations/image/v1/signatureissuer.go @@ -18,7 +18,7 @@ func SignatureIssuer() *SignatureIssuerApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Organization field is set to the value of the last call. func (b *SignatureIssuerApplyConfiguration) WithOrganization(value string) *SignatureIssuerApplyConfiguration { - b.Organization = &value + b.SignatureGenericEntityApplyConfiguration.Organization = &value return b } @@ -26,6 +26,6 @@ func (b *SignatureIssuerApplyConfiguration) WithOrganization(value string) *Sign // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CommonName field is set to the value of the last call. func (b *SignatureIssuerApplyConfiguration) WithCommonName(value string) *SignatureIssuerApplyConfiguration { - b.CommonName = &value + b.SignatureGenericEntityApplyConfiguration.CommonName = &value return b } diff --git a/image/applyconfigurations/image/v1/signaturesubject.go b/image/applyconfigurations/image/v1/signaturesubject.go index 3506d98a84..bc15e4f373 100644 --- a/image/applyconfigurations/image/v1/signaturesubject.go +++ b/image/applyconfigurations/image/v1/signaturesubject.go @@ -19,7 +19,7 @@ func SignatureSubject() *SignatureSubjectApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Organization field is set to the value of the last call. func (b *SignatureSubjectApplyConfiguration) WithOrganization(value string) *SignatureSubjectApplyConfiguration { - b.Organization = &value + b.SignatureGenericEntityApplyConfiguration.Organization = &value return b } @@ -27,7 +27,7 @@ func (b *SignatureSubjectApplyConfiguration) WithOrganization(value string) *Sig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CommonName field is set to the value of the last call. func (b *SignatureSubjectApplyConfiguration) WithCommonName(value string) *SignatureSubjectApplyConfiguration { - b.CommonName = &value + b.SignatureGenericEntityApplyConfiguration.CommonName = &value return b } diff --git a/image/applyconfigurations/image/v1/tagevent.go b/image/applyconfigurations/image/v1/tagevent.go index 0187ab87a5..d123e74cba 100644 --- a/image/applyconfigurations/image/v1/tagevent.go +++ b/image/applyconfigurations/image/v1/tagevent.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // TagEventApplyConfiguration represents a declarative configuration of the TagEvent type for use // with apply. type TagEventApplyConfiguration struct { - Created *v1.Time `json:"created,omitempty"` - DockerImageReference *string `json:"dockerImageReference,omitempty"` - Image *string `json:"image,omitempty"` - Generation *int64 `json:"generation,omitempty"` + Created *metav1.Time `json:"created,omitempty"` + DockerImageReference *string `json:"dockerImageReference,omitempty"` + Image *string `json:"image,omitempty"` + Generation *int64 `json:"generation,omitempty"` } // TagEventApplyConfiguration constructs a declarative configuration of the TagEvent type for use with @@ -24,7 +24,7 @@ func TagEvent() *TagEventApplyConfiguration { // WithCreated sets the Created field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Created field is set to the value of the last call. -func (b *TagEventApplyConfiguration) WithCreated(value v1.Time) *TagEventApplyConfiguration { +func (b *TagEventApplyConfiguration) WithCreated(value metav1.Time) *TagEventApplyConfiguration { b.Created = &value return b } diff --git a/image/applyconfigurations/image/v1/tageventcondition.go b/image/applyconfigurations/image/v1/tageventcondition.go index b25af86456..ba6193fc3e 100644 --- a/image/applyconfigurations/image/v1/tageventcondition.go +++ b/image/applyconfigurations/image/v1/tageventcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,12 +11,12 @@ import ( // TagEventConditionApplyConfiguration represents a declarative configuration of the TagEventCondition type for use // with apply. type TagEventConditionApplyConfiguration struct { - Type *v1.TagEventConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - Generation *int64 `json:"generation,omitempty"` + Type *imagev1.TagEventConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + Generation *int64 `json:"generation,omitempty"` } // TagEventConditionApplyConfiguration constructs a declarative configuration of the TagEventCondition type for use with @@ -28,7 +28,7 @@ func TagEventCondition() *TagEventConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *TagEventConditionApplyConfiguration) WithType(value v1.TagEventConditionType) *TagEventConditionApplyConfiguration { +func (b *TagEventConditionApplyConfiguration) WithType(value imagev1.TagEventConditionType) *TagEventConditionApplyConfiguration { b.Type = &value return b } diff --git a/image/applyconfigurations/image/v1/tagimportpolicy.go b/image/applyconfigurations/image/v1/tagimportpolicy.go index 1ce15353d5..996690343c 100644 --- a/image/applyconfigurations/image/v1/tagimportpolicy.go +++ b/image/applyconfigurations/image/v1/tagimportpolicy.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" ) // TagImportPolicyApplyConfiguration represents a declarative configuration of the TagImportPolicy type for use // with apply. type TagImportPolicyApplyConfiguration struct { - Insecure *bool `json:"insecure,omitempty"` - Scheduled *bool `json:"scheduled,omitempty"` - ImportMode *v1.ImportModeType `json:"importMode,omitempty"` + Insecure *bool `json:"insecure,omitempty"` + Scheduled *bool `json:"scheduled,omitempty"` + ImportMode *imagev1.ImportModeType `json:"importMode,omitempty"` } // TagImportPolicyApplyConfiguration constructs a declarative configuration of the TagImportPolicy type for use with @@ -39,7 +39,7 @@ func (b *TagImportPolicyApplyConfiguration) WithScheduled(value bool) *TagImport // WithImportMode sets the ImportMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ImportMode field is set to the value of the last call. -func (b *TagImportPolicyApplyConfiguration) WithImportMode(value v1.ImportModeType) *TagImportPolicyApplyConfiguration { +func (b *TagImportPolicyApplyConfiguration) WithImportMode(value imagev1.ImportModeType) *TagImportPolicyApplyConfiguration { b.ImportMode = &value return b } diff --git a/image/applyconfigurations/image/v1/tagreference.go b/image/applyconfigurations/image/v1/tagreference.go index 3ec958d374..648f30e31a 100644 --- a/image/applyconfigurations/image/v1/tagreference.go +++ b/image/applyconfigurations/image/v1/tagreference.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // TagReferenceApplyConfiguration represents a declarative configuration of the TagReference type for use @@ -11,7 +11,7 @@ import ( type TagReferenceApplyConfiguration struct { Name *string `json:"name,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` - From *v1.ObjectReference `json:"from,omitempty"` + From *corev1.ObjectReference `json:"from,omitempty"` Reference *bool `json:"reference,omitempty"` Generation *int64 `json:"generation,omitempty"` ImportPolicy *TagImportPolicyApplyConfiguration `json:"importPolicy,omitempty"` @@ -49,7 +49,7 @@ func (b *TagReferenceApplyConfiguration) WithAnnotations(entries map[string]stri // WithFrom sets the From field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the From field is set to the value of the last call. -func (b *TagReferenceApplyConfiguration) WithFrom(value v1.ObjectReference) *TagReferenceApplyConfiguration { +func (b *TagReferenceApplyConfiguration) WithFrom(value corev1.ObjectReference) *TagReferenceApplyConfiguration { b.From = &value return b } diff --git a/image/applyconfigurations/image/v1/tagreferencepolicy.go b/image/applyconfigurations/image/v1/tagreferencepolicy.go index 06d739753c..d010d3ac0e 100644 --- a/image/applyconfigurations/image/v1/tagreferencepolicy.go +++ b/image/applyconfigurations/image/v1/tagreferencepolicy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" ) // TagReferencePolicyApplyConfiguration represents a declarative configuration of the TagReferencePolicy type for use // with apply. type TagReferencePolicyApplyConfiguration struct { - Type *v1.TagReferencePolicyType `json:"type,omitempty"` + Type *imagev1.TagReferencePolicyType `json:"type,omitempty"` } // TagReferencePolicyApplyConfiguration constructs a declarative configuration of the TagReferencePolicy type for use with @@ -21,7 +21,7 @@ func TagReferencePolicy() *TagReferencePolicyApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *TagReferencePolicyApplyConfiguration) WithType(value v1.TagReferencePolicyType) *TagReferencePolicyApplyConfiguration { +func (b *TagReferencePolicyApplyConfiguration) WithType(value imagev1.TagReferencePolicyType) *TagReferencePolicyApplyConfiguration { b.Type = &value return b } diff --git a/image/applyconfigurations/internal/internal.go b/image/applyconfigurations/internal/internal.go index a66912f382..8c46c4a5e3 100644 --- a/image/applyconfigurations/internal/internal.go +++ b/image/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/image/clientset/versioned/clientset.go b/image/clientset/versioned/clientset.go index fc810cbc59..982409785f 100644 --- a/image/clientset/versioned/clientset.go +++ b/image/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" imagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" discovery "k8s.io/client-go/discovery" diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_image.go b/image/clientset/versioned/typed/image/v1/fake/fake_image.go index e4da2a3e96..6144aefe9f 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_image.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_image.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/image/v1" imagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedimagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImages implements ImageInterface -type FakeImages struct { +// fakeImages implements ImageInterface +type fakeImages struct { + *gentype.FakeClientWithListAndApply[*v1.Image, *v1.ImageList, *imagev1.ImageApplyConfiguration] Fake *FakeImageV1 } -var imagesResource = v1.SchemeGroupVersion.WithResource("images") - -var imagesKind = v1.SchemeGroupVersion.WithKind("Image") - -// Get takes name of the image, and returns the corresponding image object, and an error if there is any. -func (c *FakeImages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imagesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// List takes label and field selectors, and returns the list of Images that match those selectors. -func (c *FakeImages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageList, err error) { - emptyResult := &v1.ImageList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imagesResource, imagesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageList{ListMeta: obj.(*v1.ImageList).ListMeta} - for _, item := range obj.(*v1.ImageList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested images. -func (c *FakeImages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imagesResource, opts)) -} - -// Create takes the representation of a image and creates it. Returns the server's representation of the image, and an error, if there is any. -func (c *FakeImages) Create(ctx context.Context, image *v1.Image, opts metav1.CreateOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagesResource, image, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// Update takes the representation of a image and updates it. Returns the server's representation of the image, and an error, if there is any. -func (c *FakeImages) Update(ctx context.Context, image *v1.Image, opts metav1.UpdateOptions) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imagesResource, image, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// Delete takes name of the image and deletes it. Returns an error if one occurs. -func (c *FakeImages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagesResource, name, opts), &v1.Image{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imagesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImageList{}) - return err -} - -// Patch applies the patch and returns the patched image. -func (c *FakeImages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Image, err error) { - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Image), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied image. -func (c *FakeImages) Apply(ctx context.Context, image *imagev1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Image, err error) { - if image == nil { - return nil, fmt.Errorf("image provided to Apply must not be nil") - } - data, err := json.Marshal(image) - if err != nil { - return nil, err - } - name := image.Name - if name == nil { - return nil, fmt.Errorf("image.Name must be provided to Apply") - } - emptyResult := &v1.Image{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImages(fake *FakeImageV1) typedimagev1.ImageInterface { + return &fakeImages{ + gentype.NewFakeClientWithListAndApply[*v1.Image, *v1.ImageList, *imagev1.ImageApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("images"), + v1.SchemeGroupVersion.WithKind("Image"), + func() *v1.Image { return &v1.Image{} }, + func() *v1.ImageList { return &v1.ImageList{} }, + func(dst, src *v1.ImageList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageList) []*v1.Image { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ImageList, items []*v1.Image) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Image), err } diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_image_client.go b/image/clientset/versioned/typed/image/v1/fake/fake_image_client.go index c135a79bb6..521c72c03c 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_image_client.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_image_client.go @@ -13,35 +13,35 @@ type FakeImageV1 struct { } func (c *FakeImageV1) Images() v1.ImageInterface { - return &FakeImages{c} + return newFakeImages(c) } func (c *FakeImageV1) ImageSignatures() v1.ImageSignatureInterface { - return &FakeImageSignatures{c} + return newFakeImageSignatures(c) } func (c *FakeImageV1) ImageStreams(namespace string) v1.ImageStreamInterface { - return &FakeImageStreams{c, namespace} + return newFakeImageStreams(c, namespace) } func (c *FakeImageV1) ImageStreamImages(namespace string) v1.ImageStreamImageInterface { - return &FakeImageStreamImages{c, namespace} + return newFakeImageStreamImages(c, namespace) } func (c *FakeImageV1) ImageStreamImports(namespace string) v1.ImageStreamImportInterface { - return &FakeImageStreamImports{c, namespace} + return newFakeImageStreamImports(c, namespace) } func (c *FakeImageV1) ImageStreamMappings(namespace string) v1.ImageStreamMappingInterface { - return &FakeImageStreamMappings{c, namespace} + return newFakeImageStreamMappings(c, namespace) } func (c *FakeImageV1) ImageStreamTags(namespace string) v1.ImageStreamTagInterface { - return &FakeImageStreamTags{c, namespace} + return newFakeImageStreamTags(c, namespace) } func (c *FakeImageV1) ImageTags(namespace string) v1.ImageTagInterface { - return &FakeImageTags{c, namespace} + return newFakeImageTags(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagesignature.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagesignature.go index 0a186b2ff9..1a37da991d 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagesignature.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagesignature.go @@ -3,36 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/image/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + imagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageSignatures implements ImageSignatureInterface -type FakeImageSignatures struct { +// fakeImageSignatures implements ImageSignatureInterface +type fakeImageSignatures struct { + *gentype.FakeClient[*v1.ImageSignature] Fake *FakeImageV1 } -var imagesignaturesResource = v1.SchemeGroupVersion.WithResource("imagesignatures") - -var imagesignaturesKind = v1.SchemeGroupVersion.WithKind("ImageSignature") - -// Create takes the representation of a imageSignature and creates it. Returns the server's representation of the imageSignature, and an error, if there is any. -func (c *FakeImageSignatures) Create(ctx context.Context, imageSignature *v1.ImageSignature, opts metav1.CreateOptions) (result *v1.ImageSignature, err error) { - emptyResult := &v1.ImageSignature{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagesignaturesResource, imageSignature, opts), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImageSignatures(fake *FakeImageV1) imagev1.ImageSignatureInterface { + return &fakeImageSignatures{ + gentype.NewFakeClient[*v1.ImageSignature]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("imagesignatures"), + v1.SchemeGroupVersion.WithKind("ImageSignature"), + func() *v1.ImageSignature { return &v1.ImageSignature{} }, + ), + fake, } - return obj.(*v1.ImageSignature), err -} - -// Delete takes name of the imageSignature and deletes it. Returns an error if one occurs. -func (c *FakeImageSignatures) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagesignaturesResource, name, opts), &v1.ImageSignature{}) - return err } diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagestream.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagestream.go index 3ba173567e..bb9f2f14f8 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagestream.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagestream.go @@ -3,188 +3,44 @@ package fake import ( - "context" - json "encoding/json" - "fmt" + context "context" v1 "github.com/openshift/api/image/v1" imagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" + typedimagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeImageStreams implements ImageStreamInterface -type FakeImageStreams struct { +// fakeImageStreams implements ImageStreamInterface +type fakeImageStreams struct { + *gentype.FakeClientWithListAndApply[*v1.ImageStream, *v1.ImageStreamList, *imagev1.ImageStreamApplyConfiguration] Fake *FakeImageV1 - ns string } -var imagestreamsResource = v1.SchemeGroupVersion.WithResource("imagestreams") - -var imagestreamsKind = v1.SchemeGroupVersion.WithKind("ImageStream") - -// Get takes name of the imageStream, and returns the corresponding imageStream object, and an error if there is any. -func (c *FakeImageStreams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageStream, err error) { - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(imagestreamsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStream), err -} - -// List takes label and field selectors, and returns the list of ImageStreams that match those selectors. -func (c *FakeImageStreams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageStreamList, err error) { - emptyResult := &v1.ImageStreamList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(imagestreamsResource, imagestreamsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageStreamList{ListMeta: obj.(*v1.ImageStreamList).ListMeta} - for _, item := range obj.(*v1.ImageStreamList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imageStreams. -func (c *FakeImageStreams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(imagestreamsResource, c.ns, opts)) - -} - -// Create takes the representation of a imageStream and creates it. Returns the server's representation of the imageStream, and an error, if there is any. -func (c *FakeImageStreams) Create(ctx context.Context, imageStream *v1.ImageStream, opts metav1.CreateOptions) (result *v1.ImageStream, err error) { - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(imagestreamsResource, c.ns, imageStream, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStream), err -} - -// Update takes the representation of a imageStream and updates it. Returns the server's representation of the imageStream, and an error, if there is any. -func (c *FakeImageStreams) Update(ctx context.Context, imageStream *v1.ImageStream, opts metav1.UpdateOptions) (result *v1.ImageStream, err error) { - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(imagestreamsResource, c.ns, imageStream, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStream), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeImageStreams) UpdateStatus(ctx context.Context, imageStream *v1.ImageStream, opts metav1.UpdateOptions) (result *v1.ImageStream, err error) { - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(imagestreamsResource, "status", c.ns, imageStream, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStream), err -} - -// Delete takes name of the imageStream and deletes it. Returns an error if one occurs. -func (c *FakeImageStreams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(imagestreamsResource, c.ns, name, opts), &v1.ImageStream{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImageStreams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(imagestreamsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImageStreamList{}) - return err -} - -// Patch applies the patch and returns the patched imageStream. -func (c *FakeImageStreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageStream, err error) { - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagestreamsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStream), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imageStream. -func (c *FakeImageStreams) Apply(ctx context.Context, imageStream *imagev1.ImageStreamApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageStream, err error) { - if imageStream == nil { - return nil, fmt.Errorf("imageStream provided to Apply must not be nil") - } - data, err := json.Marshal(imageStream) - if err != nil { - return nil, err - } - name := imageStream.Name - if name == nil { - return nil, fmt.Errorf("imageStream.Name must be provided to Apply") - } - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagestreamsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStream), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeImageStreams) ApplyStatus(ctx context.Context, imageStream *imagev1.ImageStreamApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageStream, err error) { - if imageStream == nil { - return nil, fmt.Errorf("imageStream provided to Apply must not be nil") - } - data, err := json.Marshal(imageStream) - if err != nil { - return nil, err - } - name := imageStream.Name - if name == nil { - return nil, fmt.Errorf("imageStream.Name must be provided to Apply") - } - emptyResult := &v1.ImageStream{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagestreamsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImageStreams(fake *FakeImageV1, namespace string) typedimagev1.ImageStreamInterface { + return &fakeImageStreams{ + gentype.NewFakeClientWithListAndApply[*v1.ImageStream, *v1.ImageStreamList, *imagev1.ImageStreamApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("imagestreams"), + v1.SchemeGroupVersion.WithKind("ImageStream"), + func() *v1.ImageStream { return &v1.ImageStream{} }, + func() *v1.ImageStreamList { return &v1.ImageStreamList{} }, + func(dst, src *v1.ImageStreamList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageStreamList) []*v1.ImageStream { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ImageStreamList, items []*v1.ImageStream) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.ImageStream), err } // Secrets takes name of the imageStream, and returns the corresponding secretList object, and an error if there is any. -func (c *FakeImageStreams) Secrets(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *v1.SecretList, err error) { +func (c *fakeImageStreams) Secrets(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *v1.SecretList, err error) { emptyResult := &v1.SecretList{} obj, err := c.Fake. - Invokes(testing.NewGetSubresourceActionWithOptions(imagestreamsResource, c.ns, "secrets", imageStreamName, options), emptyResult) + Invokes(testing.NewGetSubresourceActionWithOptions(c.Resource(), c.Namespace(), "secrets", imageStreamName, options), emptyResult) if obj == nil { return emptyResult, err @@ -193,10 +49,10 @@ func (c *FakeImageStreams) Secrets(ctx context.Context, imageStreamName string, } // Layers takes name of the imageStream, and returns the corresponding imageStreamLayers object, and an error if there is any. -func (c *FakeImageStreams) Layers(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *v1.ImageStreamLayers, err error) { +func (c *fakeImageStreams) Layers(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *v1.ImageStreamLayers, err error) { emptyResult := &v1.ImageStreamLayers{} obj, err := c.Fake. - Invokes(testing.NewGetSubresourceActionWithOptions(imagestreamsResource, c.ns, "layers", imageStreamName, options), emptyResult) + Invokes(testing.NewGetSubresourceActionWithOptions(c.Resource(), c.Namespace(), "layers", imageStreamName, options), emptyResult) if obj == nil { return emptyResult, err diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimage.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimage.go index 4b3949eb50..d958273923 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimage.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimage.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/image/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + imagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageStreamImages implements ImageStreamImageInterface -type FakeImageStreamImages struct { +// fakeImageStreamImages implements ImageStreamImageInterface +type fakeImageStreamImages struct { + *gentype.FakeClient[*v1.ImageStreamImage] Fake *FakeImageV1 - ns string } -var imagestreamimagesResource = v1.SchemeGroupVersion.WithResource("imagestreamimages") - -var imagestreamimagesKind = v1.SchemeGroupVersion.WithKind("ImageStreamImage") - -// Get takes name of the imageStreamImage, and returns the corresponding imageStreamImage object, and an error if there is any. -func (c *FakeImageStreamImages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageStreamImage, err error) { - emptyResult := &v1.ImageStreamImage{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(imagestreamimagesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImageStreamImages(fake *FakeImageV1, namespace string) imagev1.ImageStreamImageInterface { + return &fakeImageStreamImages{ + gentype.NewFakeClient[*v1.ImageStreamImage]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("imagestreamimages"), + v1.SchemeGroupVersion.WithKind("ImageStreamImage"), + func() *v1.ImageStreamImage { return &v1.ImageStreamImage{} }, + ), + fake, } - return obj.(*v1.ImageStreamImage), err } diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimport.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimport.go index 07fea75630..be51c112d6 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimport.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamimport.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/image/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + imagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageStreamImports implements ImageStreamImportInterface -type FakeImageStreamImports struct { +// fakeImageStreamImports implements ImageStreamImportInterface +type fakeImageStreamImports struct { + *gentype.FakeClient[*v1.ImageStreamImport] Fake *FakeImageV1 - ns string } -var imagestreamimportsResource = v1.SchemeGroupVersion.WithResource("imagestreamimports") - -var imagestreamimportsKind = v1.SchemeGroupVersion.WithKind("ImageStreamImport") - -// Create takes the representation of a imageStreamImport and creates it. Returns the server's representation of the imageStreamImport, and an error, if there is any. -func (c *FakeImageStreamImports) Create(ctx context.Context, imageStreamImport *v1.ImageStreamImport, opts metav1.CreateOptions) (result *v1.ImageStreamImport, err error) { - emptyResult := &v1.ImageStreamImport{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(imagestreamimportsResource, c.ns, imageStreamImport, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImageStreamImports(fake *FakeImageV1, namespace string) imagev1.ImageStreamImportInterface { + return &fakeImageStreamImports{ + gentype.NewFakeClient[*v1.ImageStreamImport]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("imagestreamimports"), + v1.SchemeGroupVersion.WithKind("ImageStreamImport"), + func() *v1.ImageStreamImport { return &v1.ImageStreamImport{} }, + ), + fake, } - return obj.(*v1.ImageStreamImport), err } diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreammapping.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreammapping.go index 74c405d76f..66648fe1e4 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreammapping.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreammapping.go @@ -3,55 +3,40 @@ package fake import ( - "context" - json "encoding/json" - "fmt" + context "context" v1 "github.com/openshift/api/image/v1" imagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" + typedimagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeImageStreamMappings implements ImageStreamMappingInterface -type FakeImageStreamMappings struct { +// fakeImageStreamMappings implements ImageStreamMappingInterface +type fakeImageStreamMappings struct { + *gentype.FakeClientWithApply[*v1.ImageStreamMapping, *imagev1.ImageStreamMappingApplyConfiguration] Fake *FakeImageV1 - ns string } -var imagestreammappingsResource = v1.SchemeGroupVersion.WithResource("imagestreammappings") - -var imagestreammappingsKind = v1.SchemeGroupVersion.WithKind("ImageStreamMapping") - -// Apply takes the given apply declarative configuration, applies it and returns the applied imageStreamMapping. -func (c *FakeImageStreamMappings) Apply(ctx context.Context, imageStreamMapping *imagev1.ImageStreamMappingApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageStreamMapping, err error) { - if imageStreamMapping == nil { - return nil, fmt.Errorf("imageStreamMapping provided to Apply must not be nil") - } - data, err := json.Marshal(imageStreamMapping) - if err != nil { - return nil, err - } - name := imageStreamMapping.Name - if name == nil { - return nil, fmt.Errorf("imageStreamMapping.Name must be provided to Apply") - } - emptyResult := &v1.ImageStreamMapping{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(imagestreammappingsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImageStreamMappings(fake *FakeImageV1, namespace string) typedimagev1.ImageStreamMappingInterface { + return &fakeImageStreamMappings{ + gentype.NewFakeClientWithApply[*v1.ImageStreamMapping, *imagev1.ImageStreamMappingApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("imagestreammappings"), + v1.SchemeGroupVersion.WithKind("ImageStreamMapping"), + func() *v1.ImageStreamMapping { return &v1.ImageStreamMapping{} }, + ), + fake, } - return obj.(*v1.ImageStreamMapping), err } // Create takes the representation of a imageStreamMapping and creates it. Returns the server's representation of the status, and an error, if there is any. -func (c *FakeImageStreamMappings) Create(ctx context.Context, imageStreamMapping *v1.ImageStreamMapping, opts metav1.CreateOptions) (result *metav1.Status, err error) { +func (c *fakeImageStreamMappings) Create(ctx context.Context, imageStreamMapping *v1.ImageStreamMapping, opts metav1.CreateOptions) (result *metav1.Status, err error) { emptyResult := &metav1.Status{} obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(imagestreammappingsResource, c.ns, imageStreamMapping, opts), emptyResult) + Invokes(testing.NewCreateActionWithOptions(c.Resource(), c.Namespace(), imageStreamMapping, opts), emptyResult) if obj == nil { return emptyResult, err diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamtag.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamtag.go index ddabe4bfd3..13a101d4a5 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamtag.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagestreamtag.go @@ -3,87 +3,32 @@ package fake import ( - "context" - v1 "github.com/openshift/api/image/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - testing "k8s.io/client-go/testing" + imagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageStreamTags implements ImageStreamTagInterface -type FakeImageStreamTags struct { +// fakeImageStreamTags implements ImageStreamTagInterface +type fakeImageStreamTags struct { + *gentype.FakeClientWithList[*v1.ImageStreamTag, *v1.ImageStreamTagList] Fake *FakeImageV1 - ns string -} - -var imagestreamtagsResource = v1.SchemeGroupVersion.WithResource("imagestreamtags") - -var imagestreamtagsKind = v1.SchemeGroupVersion.WithKind("ImageStreamTag") - -// Get takes name of the imageStreamTag, and returns the corresponding imageStreamTag object, and an error if there is any. -func (c *FakeImageStreamTags) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageStreamTag, err error) { - emptyResult := &v1.ImageStreamTag{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(imagestreamtagsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStreamTag), err -} - -// List takes label and field selectors, and returns the list of ImageStreamTags that match those selectors. -func (c *FakeImageStreamTags) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageStreamTagList, err error) { - emptyResult := &v1.ImageStreamTagList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(imagestreamtagsResource, imagestreamtagsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageStreamTagList{ListMeta: obj.(*v1.ImageStreamTagList).ListMeta} - for _, item := range obj.(*v1.ImageStreamTagList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err } -// Create takes the representation of a imageStreamTag and creates it. Returns the server's representation of the imageStreamTag, and an error, if there is any. -func (c *FakeImageStreamTags) Create(ctx context.Context, imageStreamTag *v1.ImageStreamTag, opts metav1.CreateOptions) (result *v1.ImageStreamTag, err error) { - emptyResult := &v1.ImageStreamTag{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(imagestreamtagsResource, c.ns, imageStreamTag, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImageStreamTags(fake *FakeImageV1, namespace string) imagev1.ImageStreamTagInterface { + return &fakeImageStreamTags{ + gentype.NewFakeClientWithList[*v1.ImageStreamTag, *v1.ImageStreamTagList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("imagestreamtags"), + v1.SchemeGroupVersion.WithKind("ImageStreamTag"), + func() *v1.ImageStreamTag { return &v1.ImageStreamTag{} }, + func() *v1.ImageStreamTagList { return &v1.ImageStreamTagList{} }, + func(dst, src *v1.ImageStreamTagList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageStreamTagList) []*v1.ImageStreamTag { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ImageStreamTagList, items []*v1.ImageStreamTag) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ImageStreamTag), err -} - -// Update takes the representation of a imageStreamTag and updates it. Returns the server's representation of the imageStreamTag, and an error, if there is any. -func (c *FakeImageStreamTags) Update(ctx context.Context, imageStreamTag *v1.ImageStreamTag, opts metav1.UpdateOptions) (result *v1.ImageStreamTag, err error) { - emptyResult := &v1.ImageStreamTag{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(imagestreamtagsResource, c.ns, imageStreamTag, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageStreamTag), err -} - -// Delete takes name of the imageStreamTag and deletes it. Returns an error if one occurs. -func (c *FakeImageStreamTags) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(imagestreamtagsResource, c.ns, name, opts), &v1.ImageStreamTag{}) - - return err } diff --git a/image/clientset/versioned/typed/image/v1/fake/fake_imagetag.go b/image/clientset/versioned/typed/image/v1/fake/fake_imagetag.go index 06bd9b02ca..24507fc6d5 100644 --- a/image/clientset/versioned/typed/image/v1/fake/fake_imagetag.go +++ b/image/clientset/versioned/typed/image/v1/fake/fake_imagetag.go @@ -3,87 +3,30 @@ package fake import ( - "context" - v1 "github.com/openshift/api/image/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - testing "k8s.io/client-go/testing" + imagev1 "github.com/openshift/client-go/image/clientset/versioned/typed/image/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageTags implements ImageTagInterface -type FakeImageTags struct { +// fakeImageTags implements ImageTagInterface +type fakeImageTags struct { + *gentype.FakeClientWithList[*v1.ImageTag, *v1.ImageTagList] Fake *FakeImageV1 - ns string -} - -var imagetagsResource = v1.SchemeGroupVersion.WithResource("imagetags") - -var imagetagsKind = v1.SchemeGroupVersion.WithKind("ImageTag") - -// Get takes name of the imageTag, and returns the corresponding imageTag object, and an error if there is any. -func (c *FakeImageTags) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImageTag, err error) { - emptyResult := &v1.ImageTag{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(imagetagsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTag), err -} - -// List takes label and field selectors, and returns the list of ImageTags that match those selectors. -func (c *FakeImageTags) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImageTagList, err error) { - emptyResult := &v1.ImageTagList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(imagetagsResource, imagetagsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImageTagList{ListMeta: obj.(*v1.ImageTagList).ListMeta} - for _, item := range obj.(*v1.ImageTagList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err } -// Create takes the representation of a imageTag and creates it. Returns the server's representation of the imageTag, and an error, if there is any. -func (c *FakeImageTags) Create(ctx context.Context, imageTag *v1.ImageTag, opts metav1.CreateOptions) (result *v1.ImageTag, err error) { - emptyResult := &v1.ImageTag{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(imagetagsResource, c.ns, imageTag, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeImageTags(fake *FakeImageV1, namespace string) imagev1.ImageTagInterface { + return &fakeImageTags{ + gentype.NewFakeClientWithList[*v1.ImageTag, *v1.ImageTagList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("imagetags"), + v1.SchemeGroupVersion.WithKind("ImageTag"), + func() *v1.ImageTag { return &v1.ImageTag{} }, + func() *v1.ImageTagList { return &v1.ImageTagList{} }, + func(dst, src *v1.ImageTagList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImageTagList) []*v1.ImageTag { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ImageTagList, items []*v1.ImageTag) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.ImageTag), err -} - -// Update takes the representation of a imageTag and updates it. Returns the server's representation of the imageTag, and an error, if there is any. -func (c *FakeImageTags) Update(ctx context.Context, imageTag *v1.ImageTag, opts metav1.UpdateOptions) (result *v1.ImageTag, err error) { - emptyResult := &v1.ImageTag{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(imagetagsResource, c.ns, imageTag, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImageTag), err -} - -// Delete takes name of the imageTag and deletes it. Returns an error if one occurs. -func (c *FakeImageTags) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(imagetagsResource, c.ns, name, opts), &v1.ImageTag{}) - - return err } diff --git a/image/clientset/versioned/typed/image/v1/image.go b/image/clientset/versioned/typed/image/v1/image.go index 5cf011812d..6976e8debc 100644 --- a/image/clientset/versioned/typed/image/v1/image.go +++ b/image/clientset/versioned/typed/image/v1/image.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/image/v1" - imagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" + imagev1 "github.com/openshift/api/image/v1" + applyconfigurationsimagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ImagesGetter interface { // ImageInterface has methods to work with Image resources. type ImageInterface interface { - Create(ctx context.Context, image *v1.Image, opts metav1.CreateOptions) (*v1.Image, error) - Update(ctx context.Context, image *v1.Image, opts metav1.UpdateOptions) (*v1.Image, error) + Create(ctx context.Context, image *imagev1.Image, opts metav1.CreateOptions) (*imagev1.Image, error) + Update(ctx context.Context, image *imagev1.Image, opts metav1.UpdateOptions) (*imagev1.Image, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Image, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imagev1.Image, error) + List(ctx context.Context, opts metav1.ListOptions) (*imagev1.ImageList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Image, err error) - Apply(ctx context.Context, image *imagev1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Image, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *imagev1.Image, err error) + Apply(ctx context.Context, image *applyconfigurationsimagev1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *imagev1.Image, err error) ImageExpansion } // images implements ImageInterface type images struct { - *gentype.ClientWithListAndApply[*v1.Image, *v1.ImageList, *imagev1.ImageApplyConfiguration] + *gentype.ClientWithListAndApply[*imagev1.Image, *imagev1.ImageList, *applyconfigurationsimagev1.ImageApplyConfiguration] } // newImages returns a Images func newImages(c *ImageV1Client) *images { return &images{ - gentype.NewClientWithListAndApply[*v1.Image, *v1.ImageList, *imagev1.ImageApplyConfiguration]( + gentype.NewClientWithListAndApply[*imagev1.Image, *imagev1.ImageList, *applyconfigurationsimagev1.ImageApplyConfiguration]( "images", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Image { return &v1.Image{} }, - func() *v1.ImageList { return &v1.ImageList{} }), + func() *imagev1.Image { return &imagev1.Image{} }, + func() *imagev1.ImageList { return &imagev1.ImageList{} }, + ), } } diff --git a/image/clientset/versioned/typed/image/v1/image_client.go b/image/clientset/versioned/typed/image/v1/image_client.go index dfd1471082..7c93797a55 100644 --- a/image/clientset/versioned/typed/image/v1/image_client.go +++ b/image/clientset/versioned/typed/image/v1/image_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/image/v1" - "github.com/openshift/client-go/image/clientset/versioned/scheme" + imagev1 "github.com/openshift/api/image/v1" + scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -104,10 +104,10 @@ func New(c rest.Interface) *ImageV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := imagev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/image/clientset/versioned/typed/image/v1/imagesignature.go b/image/clientset/versioned/typed/image/v1/imagesignature.go index 8e643c9242..a53b63c62f 100644 --- a/image/clientset/versioned/typed/image/v1/imagesignature.go +++ b/image/clientset/versioned/typed/image/v1/imagesignature.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,24 +19,25 @@ type ImageSignaturesGetter interface { // ImageSignatureInterface has methods to work with ImageSignature resources. type ImageSignatureInterface interface { - Create(ctx context.Context, imageSignature *v1.ImageSignature, opts metav1.CreateOptions) (*v1.ImageSignature, error) + Create(ctx context.Context, imageSignature *imagev1.ImageSignature, opts metav1.CreateOptions) (*imagev1.ImageSignature, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error ImageSignatureExpansion } // imageSignatures implements ImageSignatureInterface type imageSignatures struct { - *gentype.Client[*v1.ImageSignature] + *gentype.Client[*imagev1.ImageSignature] } // newImageSignatures returns a ImageSignatures func newImageSignatures(c *ImageV1Client) *imageSignatures { return &imageSignatures{ - gentype.NewClient[*v1.ImageSignature]( + gentype.NewClient[*imagev1.ImageSignature]( "imagesignatures", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ImageSignature { return &v1.ImageSignature{} }), + func() *imagev1.ImageSignature { return &imagev1.ImageSignature{} }, + ), } } diff --git a/image/clientset/versioned/typed/image/v1/imagestream.go b/image/clientset/versioned/typed/image/v1/imagestream.go index 49c841e2b4..90fc21df2d 100644 --- a/image/clientset/versioned/typed/image/v1/imagestream.go +++ b/image/clientset/versioned/typed/image/v1/imagestream.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/image/v1" - imagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" + imagev1 "github.com/openshift/api/image/v1" + applyconfigurationsimagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,46 +22,47 @@ type ImageStreamsGetter interface { // ImageStreamInterface has methods to work with ImageStream resources. type ImageStreamInterface interface { - Create(ctx context.Context, imageStream *v1.ImageStream, opts metav1.CreateOptions) (*v1.ImageStream, error) - Update(ctx context.Context, imageStream *v1.ImageStream, opts metav1.UpdateOptions) (*v1.ImageStream, error) + Create(ctx context.Context, imageStream *imagev1.ImageStream, opts metav1.CreateOptions) (*imagev1.ImageStream, error) + Update(ctx context.Context, imageStream *imagev1.ImageStream, opts metav1.UpdateOptions) (*imagev1.ImageStream, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imageStream *v1.ImageStream, opts metav1.UpdateOptions) (*v1.ImageStream, error) + UpdateStatus(ctx context.Context, imageStream *imagev1.ImageStream, opts metav1.UpdateOptions) (*imagev1.ImageStream, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImageStream, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageStreamList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imagev1.ImageStream, error) + List(ctx context.Context, opts metav1.ListOptions) (*imagev1.ImageStreamList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImageStream, err error) - Apply(ctx context.Context, imageStream *imagev1.ImageStreamApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageStream, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *imagev1.ImageStream, err error) + Apply(ctx context.Context, imageStream *applyconfigurationsimagev1.ImageStreamApplyConfiguration, opts metav1.ApplyOptions) (result *imagev1.ImageStream, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imageStream *imagev1.ImageStreamApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImageStream, err error) - Secrets(ctx context.Context, imageStreamName string, options metav1.GetOptions) (*v1.SecretList, error) - Layers(ctx context.Context, imageStreamName string, options metav1.GetOptions) (*v1.ImageStreamLayers, error) + ApplyStatus(ctx context.Context, imageStream *applyconfigurationsimagev1.ImageStreamApplyConfiguration, opts metav1.ApplyOptions) (result *imagev1.ImageStream, err error) + Secrets(ctx context.Context, imageStreamName string, options metav1.GetOptions) (*imagev1.SecretList, error) + Layers(ctx context.Context, imageStreamName string, options metav1.GetOptions) (*imagev1.ImageStreamLayers, error) ImageStreamExpansion } // imageStreams implements ImageStreamInterface type imageStreams struct { - *gentype.ClientWithListAndApply[*v1.ImageStream, *v1.ImageStreamList, *imagev1.ImageStreamApplyConfiguration] + *gentype.ClientWithListAndApply[*imagev1.ImageStream, *imagev1.ImageStreamList, *applyconfigurationsimagev1.ImageStreamApplyConfiguration] } // newImageStreams returns a ImageStreams func newImageStreams(c *ImageV1Client, namespace string) *imageStreams { return &imageStreams{ - gentype.NewClientWithListAndApply[*v1.ImageStream, *v1.ImageStreamList, *imagev1.ImageStreamApplyConfiguration]( + gentype.NewClientWithListAndApply[*imagev1.ImageStream, *imagev1.ImageStreamList, *applyconfigurationsimagev1.ImageStreamApplyConfiguration]( "imagestreams", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.ImageStream { return &v1.ImageStream{} }, - func() *v1.ImageStreamList { return &v1.ImageStreamList{} }), + func() *imagev1.ImageStream { return &imagev1.ImageStream{} }, + func() *imagev1.ImageStreamList { return &imagev1.ImageStreamList{} }, + ), } } -// Secrets takes name of the imageStream, and returns the corresponding v1.SecretList object, and an error if there is any. -func (c *imageStreams) Secrets(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *v1.SecretList, err error) { - result = &v1.SecretList{} +// Secrets takes name of the imageStream, and returns the corresponding imagev1.SecretList object, and an error if there is any. +func (c *imageStreams) Secrets(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *imagev1.SecretList, err error) { + result = &imagev1.SecretList{} err = c.GetClient().Get(). Namespace(c.GetNamespace()). Resource("imagestreams"). @@ -73,9 +74,9 @@ func (c *imageStreams) Secrets(ctx context.Context, imageStreamName string, opti return } -// Layers takes name of the imageStream, and returns the corresponding v1.ImageStreamLayers object, and an error if there is any. -func (c *imageStreams) Layers(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *v1.ImageStreamLayers, err error) { - result = &v1.ImageStreamLayers{} +// Layers takes name of the imageStream, and returns the corresponding imagev1.ImageStreamLayers object, and an error if there is any. +func (c *imageStreams) Layers(ctx context.Context, imageStreamName string, options metav1.GetOptions) (result *imagev1.ImageStreamLayers, err error) { + result = &imagev1.ImageStreamLayers{} err = c.GetClient().Get(). Namespace(c.GetNamespace()). Resource("imagestreams"). diff --git a/image/clientset/versioned/typed/image/v1/imagestreamimage.go b/image/clientset/versioned/typed/image/v1/imagestreamimage.go index 947240b125..ea329220bb 100644 --- a/image/clientset/versioned/typed/image/v1/imagestreamimage.go +++ b/image/clientset/versioned/typed/image/v1/imagestreamimage.go @@ -3,11 +3,11 @@ package v1 import ( - "context" + context "context" imagev1 "github.com/openshift/api/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" ) @@ -19,7 +19,7 @@ type ImageStreamImagesGetter interface { // ImageStreamImageInterface has methods to work with ImageStreamImage resources. type ImageStreamImageInterface interface { - Get(ctx context.Context, name string, opts v1.GetOptions) (*imagev1.ImageStreamImage, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imagev1.ImageStreamImage, error) ImageStreamImageExpansion } @@ -36,6 +36,7 @@ func newImageStreamImages(c *ImageV1Client, namespace string) *imageStreamImages c.RESTClient(), scheme.ParameterCodec, namespace, - func() *imagev1.ImageStreamImage { return &imagev1.ImageStreamImage{} }), + func() *imagev1.ImageStreamImage { return &imagev1.ImageStreamImage{} }, + ), } } diff --git a/image/clientset/versioned/typed/image/v1/imagestreamimport.go b/image/clientset/versioned/typed/image/v1/imagestreamimport.go index 730bff723c..7fbd420a40 100644 --- a/image/clientset/versioned/typed/image/v1/imagestreamimport.go +++ b/image/clientset/versioned/typed/image/v1/imagestreamimport.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type ImageStreamImportsGetter interface { // ImageStreamImportInterface has methods to work with ImageStreamImport resources. type ImageStreamImportInterface interface { - Create(ctx context.Context, imageStreamImport *v1.ImageStreamImport, opts metav1.CreateOptions) (*v1.ImageStreamImport, error) + Create(ctx context.Context, imageStreamImport *imagev1.ImageStreamImport, opts metav1.CreateOptions) (*imagev1.ImageStreamImport, error) ImageStreamImportExpansion } // imageStreamImports implements ImageStreamImportInterface type imageStreamImports struct { - *gentype.Client[*v1.ImageStreamImport] + *gentype.Client[*imagev1.ImageStreamImport] } // newImageStreamImports returns a ImageStreamImports func newImageStreamImports(c *ImageV1Client, namespace string) *imageStreamImports { return &imageStreamImports{ - gentype.NewClient[*v1.ImageStreamImport]( + gentype.NewClient[*imagev1.ImageStreamImport]( "imagestreamimports", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.ImageStreamImport { return &v1.ImageStreamImport{} }), + func() *imagev1.ImageStreamImport { return &imagev1.ImageStreamImport{} }, + ), } } diff --git a/image/clientset/versioned/typed/image/v1/imagestreammapping.go b/image/clientset/versioned/typed/image/v1/imagestreammapping.go index 8405537976..eae9d77dfd 100644 --- a/image/clientset/versioned/typed/image/v1/imagestreammapping.go +++ b/image/clientset/versioned/typed/image/v1/imagestreammapping.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - imagev1 "github.com/openshift/api/image/v1" - v1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" + apiimagev1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/client-go/image/applyconfigurations/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -20,31 +20,32 @@ type ImageStreamMappingsGetter interface { // ImageStreamMappingInterface has methods to work with ImageStreamMapping resources. type ImageStreamMappingInterface interface { - Apply(ctx context.Context, imageStreamMapping *v1.ImageStreamMappingApplyConfiguration, opts metav1.ApplyOptions) (result *imagev1.ImageStreamMapping, err error) - Create(ctx context.Context, imageStreamMapping *imagev1.ImageStreamMapping, opts metav1.CreateOptions) (*metav1.Status, error) + Apply(ctx context.Context, imageStreamMapping *imagev1.ImageStreamMappingApplyConfiguration, opts metav1.ApplyOptions) (result *apiimagev1.ImageStreamMapping, err error) + Create(ctx context.Context, imageStreamMapping *apiimagev1.ImageStreamMapping, opts metav1.CreateOptions) (*metav1.Status, error) ImageStreamMappingExpansion } // imageStreamMappings implements ImageStreamMappingInterface type imageStreamMappings struct { - *gentype.ClientWithApply[*imagev1.ImageStreamMapping, *v1.ImageStreamMappingApplyConfiguration] + *gentype.ClientWithApply[*apiimagev1.ImageStreamMapping, *imagev1.ImageStreamMappingApplyConfiguration] } // newImageStreamMappings returns a ImageStreamMappings func newImageStreamMappings(c *ImageV1Client, namespace string) *imageStreamMappings { return &imageStreamMappings{ - gentype.NewClientWithApply[*imagev1.ImageStreamMapping, *v1.ImageStreamMappingApplyConfiguration]( + gentype.NewClientWithApply[*apiimagev1.ImageStreamMapping, *imagev1.ImageStreamMappingApplyConfiguration]( "imagestreammappings", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *imagev1.ImageStreamMapping { return &imagev1.ImageStreamMapping{} }), + func() *apiimagev1.ImageStreamMapping { return &apiimagev1.ImageStreamMapping{} }, + ), } } // Create takes the representation of a imageStreamMapping and creates it. Returns the server's representation of the status, and an error, if there is any. -func (c *imageStreamMappings) Create(ctx context.Context, imageStreamMapping *imagev1.ImageStreamMapping, opts metav1.CreateOptions) (result *metav1.Status, err error) { +func (c *imageStreamMappings) Create(ctx context.Context, imageStreamMapping *apiimagev1.ImageStreamMapping, opts metav1.CreateOptions) (result *metav1.Status, err error) { result = &metav1.Status{} err = c.GetClient().Post(). Namespace(c.GetNamespace()). diff --git a/image/clientset/versioned/typed/image/v1/imagestreamtag.go b/image/clientset/versioned/typed/image/v1/imagestreamtag.go index 8029bc15d1..2f09ab86cb 100644 --- a/image/clientset/versioned/typed/image/v1/imagestreamtag.go +++ b/image/clientset/versioned/typed/image/v1/imagestreamtag.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,28 +19,29 @@ type ImageStreamTagsGetter interface { // ImageStreamTagInterface has methods to work with ImageStreamTag resources. type ImageStreamTagInterface interface { - Create(ctx context.Context, imageStreamTag *v1.ImageStreamTag, opts metav1.CreateOptions) (*v1.ImageStreamTag, error) - Update(ctx context.Context, imageStreamTag *v1.ImageStreamTag, opts metav1.UpdateOptions) (*v1.ImageStreamTag, error) + Create(ctx context.Context, imageStreamTag *imagev1.ImageStreamTag, opts metav1.CreateOptions) (*imagev1.ImageStreamTag, error) + Update(ctx context.Context, imageStreamTag *imagev1.ImageStreamTag, opts metav1.UpdateOptions) (*imagev1.ImageStreamTag, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImageStreamTag, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageStreamTagList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imagev1.ImageStreamTag, error) + List(ctx context.Context, opts metav1.ListOptions) (*imagev1.ImageStreamTagList, error) ImageStreamTagExpansion } // imageStreamTags implements ImageStreamTagInterface type imageStreamTags struct { - *gentype.ClientWithList[*v1.ImageStreamTag, *v1.ImageStreamTagList] + *gentype.ClientWithList[*imagev1.ImageStreamTag, *imagev1.ImageStreamTagList] } // newImageStreamTags returns a ImageStreamTags func newImageStreamTags(c *ImageV1Client, namespace string) *imageStreamTags { return &imageStreamTags{ - gentype.NewClientWithList[*v1.ImageStreamTag, *v1.ImageStreamTagList]( + gentype.NewClientWithList[*imagev1.ImageStreamTag, *imagev1.ImageStreamTagList]( "imagestreamtags", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.ImageStreamTag { return &v1.ImageStreamTag{} }, - func() *v1.ImageStreamTagList { return &v1.ImageStreamTagList{} }), + func() *imagev1.ImageStreamTag { return &imagev1.ImageStreamTag{} }, + func() *imagev1.ImageStreamTagList { return &imagev1.ImageStreamTagList{} }, + ), } } diff --git a/image/clientset/versioned/typed/image/v1/imagetag.go b/image/clientset/versioned/typed/image/v1/imagetag.go index f56c8b8049..1d69b558d4 100644 --- a/image/clientset/versioned/typed/image/v1/imagetag.go +++ b/image/clientset/versioned/typed/image/v1/imagetag.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/image/v1" + imagev1 "github.com/openshift/api/image/v1" scheme "github.com/openshift/client-go/image/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,28 +19,29 @@ type ImageTagsGetter interface { // ImageTagInterface has methods to work with ImageTag resources. type ImageTagInterface interface { - Create(ctx context.Context, imageTag *v1.ImageTag, opts metav1.CreateOptions) (*v1.ImageTag, error) - Update(ctx context.Context, imageTag *v1.ImageTag, opts metav1.UpdateOptions) (*v1.ImageTag, error) + Create(ctx context.Context, imageTag *imagev1.ImageTag, opts metav1.CreateOptions) (*imagev1.ImageTag, error) + Update(ctx context.Context, imageTag *imagev1.ImageTag, opts metav1.UpdateOptions) (*imagev1.ImageTag, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImageTag, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImageTagList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imagev1.ImageTag, error) + List(ctx context.Context, opts metav1.ListOptions) (*imagev1.ImageTagList, error) ImageTagExpansion } // imageTags implements ImageTagInterface type imageTags struct { - *gentype.ClientWithList[*v1.ImageTag, *v1.ImageTagList] + *gentype.ClientWithList[*imagev1.ImageTag, *imagev1.ImageTagList] } // newImageTags returns a ImageTags func newImageTags(c *ImageV1Client, namespace string) *imageTags { return &imageTags{ - gentype.NewClientWithList[*v1.ImageTag, *v1.ImageTagList]( + gentype.NewClientWithList[*imagev1.ImageTag, *imagev1.ImageTagList]( "imagetags", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.ImageTag { return &v1.ImageTag{} }, - func() *v1.ImageTagList { return &v1.ImageTagList{} }), + func() *imagev1.ImageTag { return &imagev1.ImageTag{} }, + func() *imagev1.ImageTagList { return &imagev1.ImageTagList{} }, + ), } } diff --git a/image/informers/externalversions/generic.go b/image/informers/externalversions/generic.go index 55f59dedef..2f1bda6d8e 100644 --- a/image/informers/externalversions/generic.go +++ b/image/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/image/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/image/informers/externalversions/image/v1/image.go b/image/informers/externalversions/image/v1/image.go index ee2d0a7067..63cf355ffa 100644 --- a/image/informers/externalversions/image/v1/image.go +++ b/image/informers/externalversions/image/v1/image.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - imagev1 "github.com/openshift/api/image/v1" + apiimagev1 "github.com/openshift/api/image/v1" versioned "github.com/openshift/client-go/image/clientset/versioned" internalinterfaces "github.com/openshift/client-go/image/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/image/listers/image/v1" + imagev1 "github.com/openshift/client-go/image/listers/image/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Images. type ImageInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImageLister + Lister() imagev1.ImageLister } type imageInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImageInformer(client versioned.Interface, resyncPeriod time.Dura return client.ImageV1().Images().Watch(context.TODO(), options) }, }, - &imagev1.Image{}, + &apiimagev1.Image{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imageInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *imageInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&imagev1.Image{}, f.defaultInformer) + return f.factory.InformerFor(&apiimagev1.Image{}, f.defaultInformer) } -func (f *imageInformer) Lister() v1.ImageLister { - return v1.NewImageLister(f.Informer().GetIndexer()) +func (f *imageInformer) Lister() imagev1.ImageLister { + return imagev1.NewImageLister(f.Informer().GetIndexer()) } diff --git a/image/informers/externalversions/image/v1/imagestream.go b/image/informers/externalversions/image/v1/imagestream.go index 4a94cc5c7d..5c2c8295ac 100644 --- a/image/informers/externalversions/image/v1/imagestream.go +++ b/image/informers/externalversions/image/v1/imagestream.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - imagev1 "github.com/openshift/api/image/v1" + apiimagev1 "github.com/openshift/api/image/v1" versioned "github.com/openshift/client-go/image/clientset/versioned" internalinterfaces "github.com/openshift/client-go/image/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/image/listers/image/v1" + imagev1 "github.com/openshift/client-go/image/listers/image/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImageStreams. type ImageStreamInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImageStreamLister + Lister() imagev1.ImageStreamLister } type imageStreamInformer struct { @@ -55,7 +55,7 @@ func NewFilteredImageStreamInformer(client versioned.Interface, namespace string return client.ImageV1().ImageStreams(namespace).Watch(context.TODO(), options) }, }, - &imagev1.ImageStream{}, + &apiimagev1.ImageStream{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *imageStreamInformer) defaultInformer(client versioned.Interface, resync } func (f *imageStreamInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&imagev1.ImageStream{}, f.defaultInformer) + return f.factory.InformerFor(&apiimagev1.ImageStream{}, f.defaultInformer) } -func (f *imageStreamInformer) Lister() v1.ImageStreamLister { - return v1.NewImageStreamLister(f.Informer().GetIndexer()) +func (f *imageStreamInformer) Lister() imagev1.ImageStreamLister { + return imagev1.NewImageStreamLister(f.Informer().GetIndexer()) } diff --git a/image/listers/image/v1/image.go b/image/listers/image/v1/image.go index 1a4cb748a7..9ac1044d96 100644 --- a/image/listers/image/v1/image.go +++ b/image/listers/image/v1/image.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + imagev1 "github.com/openshift/api/image/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageLister helps list Images. @@ -14,19 +14,19 @@ import ( type ImageLister interface { // List lists all Images in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Image, err error) + List(selector labels.Selector) (ret []*imagev1.Image, err error) // Get retrieves the Image from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Image, error) + Get(name string) (*imagev1.Image, error) ImageListerExpansion } // imageLister implements the ImageLister interface. type imageLister struct { - listers.ResourceIndexer[*v1.Image] + listers.ResourceIndexer[*imagev1.Image] } // NewImageLister returns a new ImageLister. func NewImageLister(indexer cache.Indexer) ImageLister { - return &imageLister{listers.New[*v1.Image](indexer, v1.Resource("image"))} + return &imageLister{listers.New[*imagev1.Image](indexer, imagev1.Resource("image"))} } diff --git a/image/listers/image/v1/imagestream.go b/image/listers/image/v1/imagestream.go index b2a567c556..e9f1474501 100644 --- a/image/listers/image/v1/imagestream.go +++ b/image/listers/image/v1/imagestream.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + imagev1 "github.com/openshift/api/image/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageStreamLister helps list ImageStreams. @@ -14,7 +14,7 @@ import ( type ImageStreamLister interface { // List lists all ImageStreams in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageStream, err error) + List(selector labels.Selector) (ret []*imagev1.ImageStream, err error) // ImageStreams returns an object that can list and get ImageStreams. ImageStreams(namespace string) ImageStreamNamespaceLister ImageStreamListerExpansion @@ -22,17 +22,17 @@ type ImageStreamLister interface { // imageStreamLister implements the ImageStreamLister interface. type imageStreamLister struct { - listers.ResourceIndexer[*v1.ImageStream] + listers.ResourceIndexer[*imagev1.ImageStream] } // NewImageStreamLister returns a new ImageStreamLister. func NewImageStreamLister(indexer cache.Indexer) ImageStreamLister { - return &imageStreamLister{listers.New[*v1.ImageStream](indexer, v1.Resource("imagestream"))} + return &imageStreamLister{listers.New[*imagev1.ImageStream](indexer, imagev1.Resource("imagestream"))} } // ImageStreams returns an object that can list and get ImageStreams. func (s *imageStreamLister) ImageStreams(namespace string) ImageStreamNamespaceLister { - return imageStreamNamespaceLister{listers.NewNamespaced[*v1.ImageStream](s.ResourceIndexer, namespace)} + return imageStreamNamespaceLister{listers.NewNamespaced[*imagev1.ImageStream](s.ResourceIndexer, namespace)} } // ImageStreamNamespaceLister helps list and get ImageStreams. @@ -40,15 +40,15 @@ func (s *imageStreamLister) ImageStreams(namespace string) ImageStreamNamespaceL type ImageStreamNamespaceLister interface { // List lists all ImageStreams in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageStream, err error) + List(selector labels.Selector) (ret []*imagev1.ImageStream, err error) // Get retrieves the ImageStream from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImageStream, error) + Get(name string) (*imagev1.ImageStream, error) ImageStreamNamespaceListerExpansion } // imageStreamNamespaceLister implements the ImageStreamNamespaceLister // interface. type imageStreamNamespaceLister struct { - listers.ResourceIndexer[*v1.ImageStream] + listers.ResourceIndexer[*imagev1.ImageStream] } diff --git a/image/listers/image/v1/imagestreamtag.go b/image/listers/image/v1/imagestreamtag.go index 1e227c2200..5e77428504 100644 --- a/image/listers/image/v1/imagestreamtag.go +++ b/image/listers/image/v1/imagestreamtag.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + imagev1 "github.com/openshift/api/image/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageStreamTagLister helps list ImageStreamTags. @@ -14,7 +14,7 @@ import ( type ImageStreamTagLister interface { // List lists all ImageStreamTags in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageStreamTag, err error) + List(selector labels.Selector) (ret []*imagev1.ImageStreamTag, err error) // ImageStreamTags returns an object that can list and get ImageStreamTags. ImageStreamTags(namespace string) ImageStreamTagNamespaceLister ImageStreamTagListerExpansion @@ -22,17 +22,17 @@ type ImageStreamTagLister interface { // imageStreamTagLister implements the ImageStreamTagLister interface. type imageStreamTagLister struct { - listers.ResourceIndexer[*v1.ImageStreamTag] + listers.ResourceIndexer[*imagev1.ImageStreamTag] } // NewImageStreamTagLister returns a new ImageStreamTagLister. func NewImageStreamTagLister(indexer cache.Indexer) ImageStreamTagLister { - return &imageStreamTagLister{listers.New[*v1.ImageStreamTag](indexer, v1.Resource("imagestreamtag"))} + return &imageStreamTagLister{listers.New[*imagev1.ImageStreamTag](indexer, imagev1.Resource("imagestreamtag"))} } // ImageStreamTags returns an object that can list and get ImageStreamTags. func (s *imageStreamTagLister) ImageStreamTags(namespace string) ImageStreamTagNamespaceLister { - return imageStreamTagNamespaceLister{listers.NewNamespaced[*v1.ImageStreamTag](s.ResourceIndexer, namespace)} + return imageStreamTagNamespaceLister{listers.NewNamespaced[*imagev1.ImageStreamTag](s.ResourceIndexer, namespace)} } // ImageStreamTagNamespaceLister helps list and get ImageStreamTags. @@ -40,15 +40,15 @@ func (s *imageStreamTagLister) ImageStreamTags(namespace string) ImageStreamTagN type ImageStreamTagNamespaceLister interface { // List lists all ImageStreamTags in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageStreamTag, err error) + List(selector labels.Selector) (ret []*imagev1.ImageStreamTag, err error) // Get retrieves the ImageStreamTag from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImageStreamTag, error) + Get(name string) (*imagev1.ImageStreamTag, error) ImageStreamTagNamespaceListerExpansion } // imageStreamTagNamespaceLister implements the ImageStreamTagNamespaceLister // interface. type imageStreamTagNamespaceLister struct { - listers.ResourceIndexer[*v1.ImageStreamTag] + listers.ResourceIndexer[*imagev1.ImageStreamTag] } diff --git a/image/listers/image/v1/imagetag.go b/image/listers/image/v1/imagetag.go index 8cb9dc0d9f..511e2aae3c 100644 --- a/image/listers/image/v1/imagetag.go +++ b/image/listers/image/v1/imagetag.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/image/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + imagev1 "github.com/openshift/api/image/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageTagLister helps list ImageTags. @@ -14,7 +14,7 @@ import ( type ImageTagLister interface { // List lists all ImageTags in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageTag, err error) + List(selector labels.Selector) (ret []*imagev1.ImageTag, err error) // ImageTags returns an object that can list and get ImageTags. ImageTags(namespace string) ImageTagNamespaceLister ImageTagListerExpansion @@ -22,17 +22,17 @@ type ImageTagLister interface { // imageTagLister implements the ImageTagLister interface. type imageTagLister struct { - listers.ResourceIndexer[*v1.ImageTag] + listers.ResourceIndexer[*imagev1.ImageTag] } // NewImageTagLister returns a new ImageTagLister. func NewImageTagLister(indexer cache.Indexer) ImageTagLister { - return &imageTagLister{listers.New[*v1.ImageTag](indexer, v1.Resource("imagetag"))} + return &imageTagLister{listers.New[*imagev1.ImageTag](indexer, imagev1.Resource("imagetag"))} } // ImageTags returns an object that can list and get ImageTags. func (s *imageTagLister) ImageTags(namespace string) ImageTagNamespaceLister { - return imageTagNamespaceLister{listers.NewNamespaced[*v1.ImageTag](s.ResourceIndexer, namespace)} + return imageTagNamespaceLister{listers.NewNamespaced[*imagev1.ImageTag](s.ResourceIndexer, namespace)} } // ImageTagNamespaceLister helps list and get ImageTags. @@ -40,15 +40,15 @@ func (s *imageTagLister) ImageTags(namespace string) ImageTagNamespaceLister { type ImageTagNamespaceLister interface { // List lists all ImageTags in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImageTag, err error) + List(selector labels.Selector) (ret []*imagev1.ImageTag, err error) // Get retrieves the ImageTag from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImageTag, error) + Get(name string) (*imagev1.ImageTag, error) ImageTagNamespaceListerExpansion } // imageTagNamespaceLister implements the ImageTagNamespaceLister // interface. type imageTagNamespaceLister struct { - listers.ResourceIndexer[*v1.ImageTag] + listers.ResourceIndexer[*imagev1.ImageTag] } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/azurenetworkaccess.go b/imageregistry/applyconfigurations/imageregistry/v1/azurenetworkaccess.go index 91cade56cd..b68361a67a 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/azurenetworkaccess.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/azurenetworkaccess.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" ) // AzureNetworkAccessApplyConfiguration represents a declarative configuration of the AzureNetworkAccess type for use // with apply. type AzureNetworkAccessApplyConfiguration struct { - Type *v1.AzureNetworkAccessType `json:"type,omitempty"` + Type *imageregistryv1.AzureNetworkAccessType `json:"type,omitempty"` Internal *AzureNetworkAccessInternalApplyConfiguration `json:"internal,omitempty"` } @@ -22,7 +22,7 @@ func AzureNetworkAccess() *AzureNetworkAccessApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AzureNetworkAccessApplyConfiguration) WithType(value v1.AzureNetworkAccessType) *AzureNetworkAccessApplyConfiguration { +func (b *AzureNetworkAccessApplyConfiguration) WithType(value imageregistryv1.AzureNetworkAccessType) *AzureNetworkAccessApplyConfiguration { b.Type = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/config.go b/imageregistry/applyconfigurations/imageregistry/v1/config.go index 3bb051501c..926bab638a 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/config.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/config.go @@ -3,21 +3,21 @@ package v1 import ( - apiimageregistryv1 "github.com/openshift/api/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" internal "github.com/openshift/client-go/imageregistry/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConfigApplyConfiguration represents a declarative configuration of the Config type for use // with apply. type ConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImageRegistrySpecApplyConfiguration `json:"spec,omitempty"` - Status *ImageRegistryStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImageRegistrySpecApplyConfiguration `json:"spec,omitempty"` + Status *ImageRegistryStatusApplyConfiguration `json:"status,omitempty"` } // Config constructs a declarative configuration of the Config type for use with @@ -41,18 +41,18 @@ func Config(name string) *ConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConfig(config *apiimageregistryv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { +func ExtractConfig(config *imageregistryv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { return extractConfig(config, fieldManager, "") } // ExtractConfigStatus is the same as ExtractConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConfigStatus(config *apiimageregistryv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { +func ExtractConfigStatus(config *imageregistryv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { return extractConfig(config, fieldManager, "status") } -func extractConfig(config *apiimageregistryv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { +func extractConfig(config *imageregistryv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { b := &ConfigApplyConfiguration{} err := managedfields.ExtractInto(config, internal.Parser().Type("com.github.openshift.api.imageregistry.v1.Config"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractConfig(config *apiimageregistryv1.Config, fieldManager string, subre // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConf // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfigurat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyCo // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfi // If called multiple times, the UID field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfigur // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigAppl // If called multiple times, the Generation field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithGeneration(value int64) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Con // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) * // overwriting an existing map entries in Labels field with the same key. func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *Config // overwriting an existing map entries in Annotations field with the same key. func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *C // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefere func (b *ConfigApplyConfiguration) WithFinalizers(values ...string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ConfigApplyConfiguration) WithStatus(value *ImageRegistryStatusApplyCon // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/encryptionalibaba.go b/imageregistry/applyconfigurations/imageregistry/v1/encryptionalibaba.go index 1dd639b11e..43701ed7d3 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/encryptionalibaba.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/encryptionalibaba.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" ) // EncryptionAlibabaApplyConfiguration represents a declarative configuration of the EncryptionAlibaba type for use // with apply. type EncryptionAlibabaApplyConfiguration struct { - Method *v1.AlibabaEncryptionMethod `json:"method,omitempty"` - KMS *KMSEncryptionAlibabaApplyConfiguration `json:"kms,omitempty"` + Method *imageregistryv1.AlibabaEncryptionMethod `json:"method,omitempty"` + KMS *KMSEncryptionAlibabaApplyConfiguration `json:"kms,omitempty"` } // EncryptionAlibabaApplyConfiguration constructs a declarative configuration of the EncryptionAlibaba type for use with @@ -22,7 +22,7 @@ func EncryptionAlibaba() *EncryptionAlibabaApplyConfiguration { // WithMethod sets the Method field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Method field is set to the value of the last call. -func (b *EncryptionAlibabaApplyConfiguration) WithMethod(value v1.AlibabaEncryptionMethod) *EncryptionAlibabaApplyConfiguration { +func (b *EncryptionAlibabaApplyConfiguration) WithMethod(value imageregistryv1.AlibabaEncryptionMethod) *EncryptionAlibabaApplyConfiguration { b.Method = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imagepruner.go b/imageregistry/applyconfigurations/imageregistry/v1/imagepruner.go index af669d0a7d..8a2b01a572 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imagepruner.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imagepruner.go @@ -3,21 +3,21 @@ package v1 import ( - apiimageregistryv1 "github.com/openshift/api/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" internal "github.com/openshift/client-go/imageregistry/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ImagePrunerApplyConfiguration represents a declarative configuration of the ImagePruner type for use // with apply. type ImagePrunerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ImagePrunerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ImagePrunerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ImagePrunerSpecApplyConfiguration `json:"spec,omitempty"` + Status *ImagePrunerStatusApplyConfiguration `json:"status,omitempty"` } // ImagePruner constructs a declarative configuration of the ImagePruner type for use with @@ -41,18 +41,18 @@ func ImagePruner(name string) *ImagePrunerApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractImagePruner(imagePruner *apiimageregistryv1.ImagePruner, fieldManager string) (*ImagePrunerApplyConfiguration, error) { +func ExtractImagePruner(imagePruner *imageregistryv1.ImagePruner, fieldManager string) (*ImagePrunerApplyConfiguration, error) { return extractImagePruner(imagePruner, fieldManager, "") } // ExtractImagePrunerStatus is the same as ExtractImagePruner except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractImagePrunerStatus(imagePruner *apiimageregistryv1.ImagePruner, fieldManager string) (*ImagePrunerApplyConfiguration, error) { +func ExtractImagePrunerStatus(imagePruner *imageregistryv1.ImagePruner, fieldManager string) (*ImagePrunerApplyConfiguration, error) { return extractImagePruner(imagePruner, fieldManager, "status") } -func extractImagePruner(imagePruner *apiimageregistryv1.ImagePruner, fieldManager string, subresource string) (*ImagePrunerApplyConfiguration, error) { +func extractImagePruner(imagePruner *imageregistryv1.ImagePruner, fieldManager string, subresource string) (*ImagePrunerApplyConfiguration, error) { b := &ImagePrunerApplyConfiguration{} err := managedfields.ExtractInto(imagePruner, internal.Parser().Type("com.github.openshift.api.imageregistry.v1.ImagePruner"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractImagePruner(imagePruner *apiimageregistryv1.ImagePruner, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithKind(value string) *ImagePrunerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ImagePrunerApplyConfiguration) WithKind(value string) *ImagePrunerApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithAPIVersion(value string) *ImagePrunerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ImagePrunerApplyConfiguration) WithAPIVersion(value string) *ImagePrune // If called multiple times, the Name field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithName(value string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ImagePrunerApplyConfiguration) WithName(value string) *ImagePrunerApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithGenerateName(value string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ImagePrunerApplyConfiguration) WithGenerateName(value string) *ImagePru // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithNamespace(value string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ImagePrunerApplyConfiguration) WithNamespace(value string) *ImagePruner // If called multiple times, the UID field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithUID(value types.UID) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ImagePrunerApplyConfiguration) WithUID(value types.UID) *ImagePrunerApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithResourceVersion(value string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ImagePrunerApplyConfiguration) WithResourceVersion(value string) *Image // If called multiple times, the Generation field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithGeneration(value int64) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImagePrunerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImagePrunerApplyConfiguration { +func (b *ImagePrunerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImagePrunerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImagePrunerApplyConfiguration { +func (b *ImagePrunerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ImagePrunerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImagePrunerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ImagePrunerApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *ImagePrunerApplyConfiguration) WithLabels(entries map[string]string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ImagePrunerApplyConfiguration) WithLabels(entries map[string]string) *I // overwriting an existing map entries in Annotations field with the same key. func (b *ImagePrunerApplyConfiguration) WithAnnotations(entries map[string]string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ImagePrunerApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImagePrunerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ImagePrunerApplyConfiguration { +func (b *ImagePrunerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ImagePrunerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *ImagePrunerApplyConfiguration) WithFinalizers(values ...string) *ImagePrunerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ImagePrunerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ImagePrunerApplyConfiguration) WithStatus(value *ImagePrunerStatusApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImagePrunerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageprunerspec.go b/imageregistry/applyconfigurations/imageregistry/v1/imageprunerspec.go index 5874c67929..d0f1a98ae1 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageprunerspec.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageprunerspec.go @@ -7,7 +7,7 @@ import ( operatorv1 "github.com/openshift/api/operator/v1" corev1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ImagePrunerSpecApplyConfiguration represents a declarative configuration of the ImagePrunerSpec type for use @@ -17,7 +17,7 @@ type ImagePrunerSpecApplyConfiguration struct { Suspend *bool `json:"suspend,omitempty"` KeepTagRevisions *int `json:"keepTagRevisions,omitempty"` KeepYoungerThan *time.Duration `json:"keepYoungerThan,omitempty"` - KeepYoungerThanDuration *v1.Duration `json:"keepYoungerThanDuration,omitempty"` + KeepYoungerThanDuration *metav1.Duration `json:"keepYoungerThanDuration,omitempty"` Resources *corev1.ResourceRequirements `json:"resources,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` @@ -69,7 +69,7 @@ func (b *ImagePrunerSpecApplyConfiguration) WithKeepYoungerThan(value time.Durat // WithKeepYoungerThanDuration sets the KeepYoungerThanDuration field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the KeepYoungerThanDuration field is set to the value of the last call. -func (b *ImagePrunerSpecApplyConfiguration) WithKeepYoungerThanDuration(value v1.Duration) *ImagePrunerSpecApplyConfiguration { +func (b *ImagePrunerSpecApplyConfiguration) WithKeepYoungerThanDuration(value metav1.Duration) *ImagePrunerSpecApplyConfiguration { b.KeepYoungerThanDuration = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageprunerstatus.go b/imageregistry/applyconfigurations/imageregistry/v1/imageprunerstatus.go index 24715f2bb6..bd63423e5c 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageprunerstatus.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageprunerstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" ) // ImagePrunerStatusApplyConfiguration represents a declarative configuration of the ImagePrunerStatus type for use // with apply. type ImagePrunerStatusApplyConfiguration struct { - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Conditions []v1.OperatorConditionApplyConfiguration `json:"conditions,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Conditions []operatorv1.OperatorConditionApplyConfiguration `json:"conditions,omitempty"` } // ImagePrunerStatusApplyConfiguration constructs a declarative configuration of the ImagePrunerStatus type for use with @@ -30,7 +30,7 @@ func (b *ImagePrunerStatusApplyConfiguration) WithObservedGeneration(value int64 // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ImagePrunerStatusApplyConfiguration) WithConditions(values ...*v1.OperatorConditionApplyConfiguration) *ImagePrunerStatusApplyConfiguration { +func (b *ImagePrunerStatusApplyConfiguration) WithConditions(values ...*operatorv1.OperatorConditionApplyConfiguration) *ImagePrunerStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigrequestslimits.go b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigrequestslimits.go index 19033ef20a..0712bb5fa6 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigrequestslimits.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigrequestslimits.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ImageRegistryConfigRequestsLimitsApplyConfiguration represents a declarative configuration of the ImageRegistryConfigRequestsLimits type for use // with apply. type ImageRegistryConfigRequestsLimitsApplyConfiguration struct { - MaxRunning *int `json:"maxRunning,omitempty"` - MaxInQueue *int `json:"maxInQueue,omitempty"` - MaxWaitInQueue *v1.Duration `json:"maxWaitInQueue,omitempty"` + MaxRunning *int `json:"maxRunning,omitempty"` + MaxInQueue *int `json:"maxInQueue,omitempty"` + MaxWaitInQueue *metav1.Duration `json:"maxWaitInQueue,omitempty"` } // ImageRegistryConfigRequestsLimitsApplyConfiguration constructs a declarative configuration of the ImageRegistryConfigRequestsLimits type for use with @@ -39,7 +39,7 @@ func (b *ImageRegistryConfigRequestsLimitsApplyConfiguration) WithMaxInQueue(val // WithMaxWaitInQueue sets the MaxWaitInQueue field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxWaitInQueue field is set to the value of the last call. -func (b *ImageRegistryConfigRequestsLimitsApplyConfiguration) WithMaxWaitInQueue(value v1.Duration) *ImageRegistryConfigRequestsLimitsApplyConfiguration { +func (b *ImageRegistryConfigRequestsLimitsApplyConfiguration) WithMaxWaitInQueue(value metav1.Duration) *ImageRegistryConfigRequestsLimitsApplyConfiguration { b.MaxWaitInQueue = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorage.go b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorage.go index 76c3cf8680..a89b4d11de 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorage.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorage.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" ) // ImageRegistryConfigStorageApplyConfiguration represents a declarative configuration of the ImageRegistryConfigStorage type for use // with apply. type ImageRegistryConfigStorageApplyConfiguration struct { - EmptyDir *v1.ImageRegistryConfigStorageEmptyDir `json:"emptyDir,omitempty"` + EmptyDir *imageregistryv1.ImageRegistryConfigStorageEmptyDir `json:"emptyDir,omitempty"` S3 *ImageRegistryConfigStorageS3ApplyConfiguration `json:"s3,omitempty"` GCS *ImageRegistryConfigStorageGCSApplyConfiguration `json:"gcs,omitempty"` Swift *ImageRegistryConfigStorageSwiftApplyConfiguration `json:"swift,omitempty"` @@ -29,7 +29,7 @@ func ImageRegistryConfigStorage() *ImageRegistryConfigStorageApplyConfiguration // WithEmptyDir sets the EmptyDir field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EmptyDir field is set to the value of the last call. -func (b *ImageRegistryConfigStorageApplyConfiguration) WithEmptyDir(value v1.ImageRegistryConfigStorageEmptyDir) *ImageRegistryConfigStorageApplyConfiguration { +func (b *ImageRegistryConfigStorageApplyConfiguration) WithEmptyDir(value imageregistryv1.ImageRegistryConfigStorageEmptyDir) *ImageRegistryConfigStorageApplyConfiguration { b.EmptyDir = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstoragealibabaoss.go b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstoragealibabaoss.go index 5b01927208..bd8278532c 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstoragealibabaoss.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstoragealibabaoss.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" ) // ImageRegistryConfigStorageAlibabaOSSApplyConfiguration represents a declarative configuration of the ImageRegistryConfigStorageAlibabaOSS type for use // with apply. type ImageRegistryConfigStorageAlibabaOSSApplyConfiguration struct { - Bucket *string `json:"bucket,omitempty"` - Region *string `json:"region,omitempty"` - EndpointAccessibility *v1.EndpointAccessibility `json:"endpointAccessibility,omitempty"` - Encryption *EncryptionAlibabaApplyConfiguration `json:"encryption,omitempty"` + Bucket *string `json:"bucket,omitempty"` + Region *string `json:"region,omitempty"` + EndpointAccessibility *imageregistryv1.EndpointAccessibility `json:"endpointAccessibility,omitempty"` + Encryption *EncryptionAlibabaApplyConfiguration `json:"encryption,omitempty"` } // ImageRegistryConfigStorageAlibabaOSSApplyConfiguration constructs a declarative configuration of the ImageRegistryConfigStorageAlibabaOSS type for use with @@ -40,7 +40,7 @@ func (b *ImageRegistryConfigStorageAlibabaOSSApplyConfiguration) WithRegion(valu // WithEndpointAccessibility sets the EndpointAccessibility field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EndpointAccessibility field is set to the value of the last call. -func (b *ImageRegistryConfigStorageAlibabaOSSApplyConfiguration) WithEndpointAccessibility(value v1.EndpointAccessibility) *ImageRegistryConfigStorageAlibabaOSSApplyConfiguration { +func (b *ImageRegistryConfigStorageAlibabaOSSApplyConfiguration) WithEndpointAccessibility(value imageregistryv1.EndpointAccessibility) *ImageRegistryConfigStorageAlibabaOSSApplyConfiguration { b.EndpointAccessibility = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorages3cloudfront.go b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorages3cloudfront.go index d5b0231edd..001cfff4b4 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorages3cloudfront.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryconfigstorages3cloudfront.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ImageRegistryConfigStorageS3CloudFrontApplyConfiguration represents a declarative configuration of the ImageRegistryConfigStorageS3CloudFront type for use // with apply. type ImageRegistryConfigStorageS3CloudFrontApplyConfiguration struct { - BaseURL *string `json:"baseURL,omitempty"` - PrivateKey *v1.SecretKeySelector `json:"privateKey,omitempty"` - KeypairID *string `json:"keypairID,omitempty"` - Duration *metav1.Duration `json:"duration,omitempty"` + BaseURL *string `json:"baseURL,omitempty"` + PrivateKey *corev1.SecretKeySelector `json:"privateKey,omitempty"` + KeypairID *string `json:"keypairID,omitempty"` + Duration *metav1.Duration `json:"duration,omitempty"` } // ImageRegistryConfigStorageS3CloudFrontApplyConfiguration constructs a declarative configuration of the ImageRegistryConfigStorageS3CloudFront type for use with @@ -33,7 +33,7 @@ func (b *ImageRegistryConfigStorageS3CloudFrontApplyConfiguration) WithBaseURL(v // WithPrivateKey sets the PrivateKey field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PrivateKey field is set to the value of the last call. -func (b *ImageRegistryConfigStorageS3CloudFrontApplyConfiguration) WithPrivateKey(value v1.SecretKeySelector) *ImageRegistryConfigStorageS3CloudFrontApplyConfiguration { +func (b *ImageRegistryConfigStorageS3CloudFrontApplyConfiguration) WithPrivateKey(value corev1.SecretKeySelector) *ImageRegistryConfigStorageS3CloudFrontApplyConfiguration { b.PrivateKey = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryspec.go b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryspec.go index 8a06738417..53474ff0bc 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageregistryspec.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageregistryspec.go @@ -3,8 +3,8 @@ package v1 import ( - operatorv1 "github.com/openshift/api/operator/v1" - v1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -12,23 +12,23 @@ import ( // ImageRegistrySpecApplyConfiguration represents a declarative configuration of the ImageRegistrySpec type for use // with apply. type ImageRegistrySpecApplyConfiguration struct { - v1.OperatorSpecApplyConfiguration `json:",inline"` - HTTPSecret *string `json:"httpSecret,omitempty"` - Proxy *ImageRegistryConfigProxyApplyConfiguration `json:"proxy,omitempty"` - Storage *ImageRegistryConfigStorageApplyConfiguration `json:"storage,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - DisableRedirect *bool `json:"disableRedirect,omitempty"` - Requests *ImageRegistryConfigRequestsApplyConfiguration `json:"requests,omitempty"` - DefaultRoute *bool `json:"defaultRoute,omitempty"` - Routes []ImageRegistryConfigRouteApplyConfiguration `json:"routes,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - Logging *int64 `json:"logging,omitempty"` - Resources *corev1.ResourceRequirements `json:"resources,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - RolloutStrategy *string `json:"rolloutStrategy,omitempty"` - Affinity *corev1.Affinity `json:"affinity,omitempty"` - TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + operatorv1.OperatorSpecApplyConfiguration `json:",inline"` + HTTPSecret *string `json:"httpSecret,omitempty"` + Proxy *ImageRegistryConfigProxyApplyConfiguration `json:"proxy,omitempty"` + Storage *ImageRegistryConfigStorageApplyConfiguration `json:"storage,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + DisableRedirect *bool `json:"disableRedirect,omitempty"` + Requests *ImageRegistryConfigRequestsApplyConfiguration `json:"requests,omitempty"` + DefaultRoute *bool `json:"defaultRoute,omitempty"` + Routes []ImageRegistryConfigRouteApplyConfiguration `json:"routes,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + Logging *int64 `json:"logging,omitempty"` + Resources *corev1.ResourceRequirements `json:"resources,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + RolloutStrategy *string `json:"rolloutStrategy,omitempty"` + Affinity *corev1.Affinity `json:"affinity,omitempty"` + TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` } // ImageRegistrySpecApplyConfiguration constructs a declarative configuration of the ImageRegistrySpec type for use with @@ -40,24 +40,24 @@ func ImageRegistrySpec() *ImageRegistrySpecApplyConfiguration { // WithManagementState sets the ManagementState field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ImageRegistrySpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ImageRegistrySpecApplyConfiguration { - b.ManagementState = &value +func (b *ImageRegistrySpecApplyConfiguration) WithManagementState(value apioperatorv1.ManagementState) *ImageRegistrySpecApplyConfiguration { + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } // WithLogLevel sets the LogLevel field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ImageRegistrySpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ImageRegistrySpecApplyConfiguration { - b.LogLevel = &value +func (b *ImageRegistrySpecApplyConfiguration) WithLogLevel(value apioperatorv1.LogLevel) *ImageRegistrySpecApplyConfiguration { + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } // WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ImageRegistrySpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ImageRegistrySpecApplyConfiguration { - b.OperatorLogLevel = &value +func (b *ImageRegistrySpecApplyConfiguration) WithOperatorLogLevel(value apioperatorv1.LogLevel) *ImageRegistrySpecApplyConfiguration { + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -65,7 +65,7 @@ func (b *ImageRegistrySpecApplyConfiguration) WithOperatorLogLevel(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ImageRegistrySpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ImageRegistrySpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -73,7 +73,7 @@ func (b *ImageRegistrySpecApplyConfiguration) WithUnsupportedConfigOverrides(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ImageRegistrySpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ImageRegistrySpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/imageregistry/applyconfigurations/imageregistry/v1/imageregistrystatus.go b/imageregistry/applyconfigurations/imageregistry/v1/imageregistrystatus.go index 65d5ad9e3f..da44400792 100644 --- a/imageregistry/applyconfigurations/imageregistry/v1/imageregistrystatus.go +++ b/imageregistry/applyconfigurations/imageregistry/v1/imageregistrystatus.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" ) // ImageRegistryStatusApplyConfiguration represents a declarative configuration of the ImageRegistryStatus type for use // with apply. type ImageRegistryStatusApplyConfiguration struct { - v1.OperatorStatusApplyConfiguration `json:",inline"` - StorageManaged *bool `json:"storageManaged,omitempty"` - Storage *ImageRegistryConfigStorageApplyConfiguration `json:"storage,omitempty"` + operatorv1.OperatorStatusApplyConfiguration `json:",inline"` + StorageManaged *bool `json:"storageManaged,omitempty"` + Storage *ImageRegistryConfigStorageApplyConfiguration `json:"storage,omitempty"` } // ImageRegistryStatusApplyConfiguration constructs a declarative configuration of the ImageRegistryStatus type for use with @@ -24,19 +24,19 @@ func ImageRegistryStatus() *ImageRegistryStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ImageRegistryStatusApplyConfiguration) WithObservedGeneration(value int64) *ImageRegistryStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ImageRegistryStatusApplyConfiguration) WithConditions(values ...*v1.OperatorConditionApplyConfiguration) *ImageRegistryStatusApplyConfiguration { +func (b *ImageRegistryStatusApplyConfiguration) WithConditions(values ...*operatorv1.OperatorConditionApplyConfiguration) *ImageRegistryStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -45,7 +45,7 @@ func (b *ImageRegistryStatusApplyConfiguration) WithConditions(values ...*v1.Ope // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ImageRegistryStatusApplyConfiguration) WithVersion(value string) *ImageRegistryStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -53,7 +53,7 @@ func (b *ImageRegistryStatusApplyConfiguration) WithVersion(value string) *Image // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ImageRegistryStatusApplyConfiguration) WithReadyReplicas(value int32) *ImageRegistryStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -61,19 +61,19 @@ func (b *ImageRegistryStatusApplyConfiguration) WithReadyReplicas(value int32) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ImageRegistryStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ImageRegistryStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } // WithGenerations adds the given value to the Generations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ImageRegistryStatusApplyConfiguration) WithGenerations(values ...*v1.GenerationStatusApplyConfiguration) *ImageRegistryStatusApplyConfiguration { +func (b *ImageRegistryStatusApplyConfiguration) WithGenerations(values ...*operatorv1.GenerationStatusApplyConfiguration) *ImageRegistryStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/imageregistry/applyconfigurations/internal/internal.go b/imageregistry/applyconfigurations/internal/internal.go index 6da07dc8e4..c7ee7da38b 100644 --- a/imageregistry/applyconfigurations/internal/internal.go +++ b/imageregistry/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/imageregistry/clientset/versioned/clientset.go b/imageregistry/clientset/versioned/clientset.go index 9c8a95109a..c7b1959a72 100644 --- a/imageregistry/clientset/versioned/clientset.go +++ b/imageregistry/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" imageregistryv1 "github.com/openshift/client-go/imageregistry/clientset/versioned/typed/imageregistry/v1" discovery "k8s.io/client-go/discovery" diff --git a/imageregistry/clientset/versioned/typed/imageregistry/v1/config.go b/imageregistry/clientset/versioned/typed/imageregistry/v1/config.go index cb35d0ab83..6c77a63e93 100644 --- a/imageregistry/clientset/versioned/typed/imageregistry/v1/config.go +++ b/imageregistry/clientset/versioned/typed/imageregistry/v1/config.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/imageregistry/v1" - imageregistryv1 "github.com/openshift/client-go/imageregistry/applyconfigurations/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" + applyconfigurationsimageregistryv1 "github.com/openshift/client-go/imageregistry/applyconfigurations/imageregistry/v1" scheme "github.com/openshift/client-go/imageregistry/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ConfigsGetter interface { // ConfigInterface has methods to work with Config resources. type ConfigInterface interface { - Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (*v1.Config, error) - Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + Create(ctx context.Context, config *imageregistryv1.Config, opts metav1.CreateOptions) (*imageregistryv1.Config, error) + Update(ctx context.Context, config *imageregistryv1.Config, opts metav1.UpdateOptions) (*imageregistryv1.Config, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + UpdateStatus(ctx context.Context, config *imageregistryv1.Config, opts metav1.UpdateOptions) (*imageregistryv1.Config, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Config, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imageregistryv1.Config, error) + List(ctx context.Context, opts metav1.ListOptions) (*imageregistryv1.ConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) - Apply(ctx context.Context, config *imageregistryv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *imageregistryv1.Config, err error) + Apply(ctx context.Context, config *applyconfigurationsimageregistryv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *imageregistryv1.Config, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, config *imageregistryv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) + ApplyStatus(ctx context.Context, config *applyconfigurationsimageregistryv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *imageregistryv1.Config, err error) ConfigExpansion } // configs implements ConfigInterface type configs struct { - *gentype.ClientWithListAndApply[*v1.Config, *v1.ConfigList, *imageregistryv1.ConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*imageregistryv1.Config, *imageregistryv1.ConfigList, *applyconfigurationsimageregistryv1.ConfigApplyConfiguration] } // newConfigs returns a Configs func newConfigs(c *ImageregistryV1Client) *configs { return &configs{ - gentype.NewClientWithListAndApply[*v1.Config, *v1.ConfigList, *imageregistryv1.ConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*imageregistryv1.Config, *imageregistryv1.ConfigList, *applyconfigurationsimageregistryv1.ConfigApplyConfiguration]( "configs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Config { return &v1.Config{} }, - func() *v1.ConfigList { return &v1.ConfigList{} }), + func() *imageregistryv1.Config { return &imageregistryv1.Config{} }, + func() *imageregistryv1.ConfigList { return &imageregistryv1.ConfigList{} }, + ), } } diff --git a/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_config.go b/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_config.go index 0cbca76ed0..b06768d529 100644 --- a/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_config.go +++ b/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_config.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/imageregistry/v1" imageregistryv1 "github.com/openshift/client-go/imageregistry/applyconfigurations/imageregistry/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedimageregistryv1 "github.com/openshift/client-go/imageregistry/clientset/versioned/typed/imageregistry/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConfigs implements ConfigInterface -type FakeConfigs struct { +// fakeConfigs implements ConfigInterface +type fakeConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.Config, *v1.ConfigList, *imageregistryv1.ConfigApplyConfiguration] Fake *FakeImageregistryV1 } -var configsResource = v1.SchemeGroupVersion.WithResource("configs") - -var configsKind = v1.SchemeGroupVersion.WithKind("Config") - -// Get takes name of the config, and returns the corresponding config object, and an error if there is any. -func (c *FakeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(configsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// List takes label and field selectors, and returns the list of Configs that match those selectors. -func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigList, err error) { - emptyResult := &v1.ConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(configsResource, configsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConfigList{ListMeta: obj.(*v1.ConfigList).ListMeta} - for _, item := range obj.(*v1.ConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested configs. -func (c *FakeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(configsResource, opts)) -} - -// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(configsResource, config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(configsResource, config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(configsResource, "status", config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Delete takes name of the config and deletes it. Returns an error if one occurs. -func (c *FakeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &v1.Config{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(configsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConfigList{}) - return err -} - -// Patch applies the patch and returns the patched config. -func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied config. -func (c *FakeConfigs) Apply(ctx context.Context, config *imageregistryv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { - if config == nil { - return nil, fmt.Errorf("config provided to Apply must not be nil") - } - data, err := json.Marshal(config) - if err != nil { - return nil, err - } - name := config.Name - if name == nil { - return nil, fmt.Errorf("config.Name must be provided to Apply") - } - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *imageregistryv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { - if config == nil { - return nil, fmt.Errorf("config provided to Apply must not be nil") - } - data, err := json.Marshal(config) - if err != nil { - return nil, err - } - name := config.Name - if name == nil { - return nil, fmt.Errorf("config.Name must be provided to Apply") - } - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConfigs(fake *FakeImageregistryV1) typedimageregistryv1.ConfigInterface { + return &fakeConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.Config, *v1.ConfigList, *imageregistryv1.ConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("configs"), + v1.SchemeGroupVersion.WithKind("Config"), + func() *v1.Config { return &v1.Config{} }, + func() *v1.ConfigList { return &v1.ConfigList{} }, + func(dst, src *v1.ConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConfigList) []*v1.Config { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConfigList, items []*v1.Config) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Config), err } diff --git a/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imagepruner.go b/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imagepruner.go index 4772392ab4..cb19166125 100644 --- a/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imagepruner.go +++ b/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imagepruner.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/imageregistry/v1" imageregistryv1 "github.com/openshift/client-go/imageregistry/applyconfigurations/imageregistry/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedimageregistryv1 "github.com/openshift/client-go/imageregistry/clientset/versioned/typed/imageregistry/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeImagePruners implements ImagePrunerInterface -type FakeImagePruners struct { +// fakeImagePruners implements ImagePrunerInterface +type fakeImagePruners struct { + *gentype.FakeClientWithListAndApply[*v1.ImagePruner, *v1.ImagePrunerList, *imageregistryv1.ImagePrunerApplyConfiguration] Fake *FakeImageregistryV1 } -var imageprunersResource = v1.SchemeGroupVersion.WithResource("imagepruners") - -var imageprunersKind = v1.SchemeGroupVersion.WithKind("ImagePruner") - -// Get takes name of the imagePruner, and returns the corresponding imagePruner object, and an error if there is any. -func (c *FakeImagePruners) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ImagePruner, err error) { - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imageprunersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImagePruner), err -} - -// List takes label and field selectors, and returns the list of ImagePruners that match those selectors. -func (c *FakeImagePruners) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ImagePrunerList, err error) { - emptyResult := &v1.ImagePrunerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imageprunersResource, imageprunersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ImagePrunerList{ListMeta: obj.(*v1.ImagePrunerList).ListMeta} - for _, item := range obj.(*v1.ImagePrunerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imagePruners. -func (c *FakeImagePruners) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imageprunersResource, opts)) -} - -// Create takes the representation of a imagePruner and creates it. Returns the server's representation of the imagePruner, and an error, if there is any. -func (c *FakeImagePruners) Create(ctx context.Context, imagePruner *v1.ImagePruner, opts metav1.CreateOptions) (result *v1.ImagePruner, err error) { - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imageprunersResource, imagePruner, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImagePruner), err -} - -// Update takes the representation of a imagePruner and updates it. Returns the server's representation of the imagePruner, and an error, if there is any. -func (c *FakeImagePruners) Update(ctx context.Context, imagePruner *v1.ImagePruner, opts metav1.UpdateOptions) (result *v1.ImagePruner, err error) { - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imageprunersResource, imagePruner, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImagePruner), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeImagePruners) UpdateStatus(ctx context.Context, imagePruner *v1.ImagePruner, opts metav1.UpdateOptions) (result *v1.ImagePruner, err error) { - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(imageprunersResource, "status", imagePruner, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImagePruner), err -} - -// Delete takes name of the imagePruner and deletes it. Returns an error if one occurs. -func (c *FakeImagePruners) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imageprunersResource, name, opts), &v1.ImagePruner{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImagePruners) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imageprunersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ImagePrunerList{}) - return err -} - -// Patch applies the patch and returns the patched imagePruner. -func (c *FakeImagePruners) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImagePruner, err error) { - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imageprunersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImagePruner), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imagePruner. -func (c *FakeImagePruners) Apply(ctx context.Context, imagePruner *imageregistryv1.ImagePrunerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImagePruner, err error) { - if imagePruner == nil { - return nil, fmt.Errorf("imagePruner provided to Apply must not be nil") - } - data, err := json.Marshal(imagePruner) - if err != nil { - return nil, err - } - name := imagePruner.Name - if name == nil { - return nil, fmt.Errorf("imagePruner.Name must be provided to Apply") - } - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imageprunersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ImagePruner), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeImagePruners) ApplyStatus(ctx context.Context, imagePruner *imageregistryv1.ImagePrunerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImagePruner, err error) { - if imagePruner == nil { - return nil, fmt.Errorf("imagePruner provided to Apply must not be nil") - } - data, err := json.Marshal(imagePruner) - if err != nil { - return nil, err - } - name := imagePruner.Name - if name == nil { - return nil, fmt.Errorf("imagePruner.Name must be provided to Apply") - } - emptyResult := &v1.ImagePruner{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imageprunersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImagePruners(fake *FakeImageregistryV1) typedimageregistryv1.ImagePrunerInterface { + return &fakeImagePruners{ + gentype.NewFakeClientWithListAndApply[*v1.ImagePruner, *v1.ImagePrunerList, *imageregistryv1.ImagePrunerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("imagepruners"), + v1.SchemeGroupVersion.WithKind("ImagePruner"), + func() *v1.ImagePruner { return &v1.ImagePruner{} }, + func() *v1.ImagePrunerList { return &v1.ImagePrunerList{} }, + func(dst, src *v1.ImagePrunerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ImagePrunerList) []*v1.ImagePruner { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ImagePrunerList, items []*v1.ImagePruner) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.ImagePruner), err } diff --git a/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imageregistry_client.go b/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imageregistry_client.go index 4c384a3467..b8ca4d1e09 100644 --- a/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imageregistry_client.go +++ b/imageregistry/clientset/versioned/typed/imageregistry/v1/fake/fake_imageregistry_client.go @@ -13,11 +13,11 @@ type FakeImageregistryV1 struct { } func (c *FakeImageregistryV1) Configs() v1.ConfigInterface { - return &FakeConfigs{c} + return newFakeConfigs(c) } func (c *FakeImageregistryV1) ImagePruners() v1.ImagePrunerInterface { - return &FakeImagePruners{c} + return newFakeImagePruners(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/imageregistry/clientset/versioned/typed/imageregistry/v1/imagepruner.go b/imageregistry/clientset/versioned/typed/imageregistry/v1/imagepruner.go index 12557488f4..c922be75dd 100644 --- a/imageregistry/clientset/versioned/typed/imageregistry/v1/imagepruner.go +++ b/imageregistry/clientset/versioned/typed/imageregistry/v1/imagepruner.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/imageregistry/v1" - imageregistryv1 "github.com/openshift/client-go/imageregistry/applyconfigurations/imageregistry/v1" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" + applyconfigurationsimageregistryv1 "github.com/openshift/client-go/imageregistry/applyconfigurations/imageregistry/v1" scheme "github.com/openshift/client-go/imageregistry/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ImagePrunersGetter interface { // ImagePrunerInterface has methods to work with ImagePruner resources. type ImagePrunerInterface interface { - Create(ctx context.Context, imagePruner *v1.ImagePruner, opts metav1.CreateOptions) (*v1.ImagePruner, error) - Update(ctx context.Context, imagePruner *v1.ImagePruner, opts metav1.UpdateOptions) (*v1.ImagePruner, error) + Create(ctx context.Context, imagePruner *imageregistryv1.ImagePruner, opts metav1.CreateOptions) (*imageregistryv1.ImagePruner, error) + Update(ctx context.Context, imagePruner *imageregistryv1.ImagePruner, opts metav1.UpdateOptions) (*imageregistryv1.ImagePruner, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imagePruner *v1.ImagePruner, opts metav1.UpdateOptions) (*v1.ImagePruner, error) + UpdateStatus(ctx context.Context, imagePruner *imageregistryv1.ImagePruner, opts metav1.UpdateOptions) (*imageregistryv1.ImagePruner, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ImagePruner, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ImagePrunerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*imageregistryv1.ImagePruner, error) + List(ctx context.Context, opts metav1.ListOptions) (*imageregistryv1.ImagePrunerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ImagePruner, err error) - Apply(ctx context.Context, imagePruner *imageregistryv1.ImagePrunerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImagePruner, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *imageregistryv1.ImagePruner, err error) + Apply(ctx context.Context, imagePruner *applyconfigurationsimageregistryv1.ImagePrunerApplyConfiguration, opts metav1.ApplyOptions) (result *imageregistryv1.ImagePruner, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imagePruner *imageregistryv1.ImagePrunerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ImagePruner, err error) + ApplyStatus(ctx context.Context, imagePruner *applyconfigurationsimageregistryv1.ImagePrunerApplyConfiguration, opts metav1.ApplyOptions) (result *imageregistryv1.ImagePruner, err error) ImagePrunerExpansion } // imagePruners implements ImagePrunerInterface type imagePruners struct { - *gentype.ClientWithListAndApply[*v1.ImagePruner, *v1.ImagePrunerList, *imageregistryv1.ImagePrunerApplyConfiguration] + *gentype.ClientWithListAndApply[*imageregistryv1.ImagePruner, *imageregistryv1.ImagePrunerList, *applyconfigurationsimageregistryv1.ImagePrunerApplyConfiguration] } // newImagePruners returns a ImagePruners func newImagePruners(c *ImageregistryV1Client) *imagePruners { return &imagePruners{ - gentype.NewClientWithListAndApply[*v1.ImagePruner, *v1.ImagePrunerList, *imageregistryv1.ImagePrunerApplyConfiguration]( + gentype.NewClientWithListAndApply[*imageregistryv1.ImagePruner, *imageregistryv1.ImagePrunerList, *applyconfigurationsimageregistryv1.ImagePrunerApplyConfiguration]( "imagepruners", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ImagePruner { return &v1.ImagePruner{} }, - func() *v1.ImagePrunerList { return &v1.ImagePrunerList{} }), + func() *imageregistryv1.ImagePruner { return &imageregistryv1.ImagePruner{} }, + func() *imageregistryv1.ImagePrunerList { return &imageregistryv1.ImagePrunerList{} }, + ), } } diff --git a/imageregistry/clientset/versioned/typed/imageregistry/v1/imageregistry_client.go b/imageregistry/clientset/versioned/typed/imageregistry/v1/imageregistry_client.go index b5ecf58431..2b8f386df2 100644 --- a/imageregistry/clientset/versioned/typed/imageregistry/v1/imageregistry_client.go +++ b/imageregistry/clientset/versioned/typed/imageregistry/v1/imageregistry_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/imageregistry/v1" - "github.com/openshift/client-go/imageregistry/clientset/versioned/scheme" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" + scheme "github.com/openshift/client-go/imageregistry/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *ImageregistryV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := imageregistryv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/imageregistry/informers/externalversions/generic.go b/imageregistry/informers/externalversions/generic.go index aa2db9bb36..3aa8ec11ea 100644 --- a/imageregistry/informers/externalversions/generic.go +++ b/imageregistry/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/imageregistry/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/imageregistry/informers/externalversions/imageregistry/v1/config.go b/imageregistry/informers/externalversions/imageregistry/v1/config.go index e9fb7a0871..65674f2101 100644 --- a/imageregistry/informers/externalversions/imageregistry/v1/config.go +++ b/imageregistry/informers/externalversions/imageregistry/v1/config.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - imageregistryv1 "github.com/openshift/api/imageregistry/v1" + apiimageregistryv1 "github.com/openshift/api/imageregistry/v1" versioned "github.com/openshift/client-go/imageregistry/clientset/versioned" internalinterfaces "github.com/openshift/client-go/imageregistry/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/imageregistry/listers/imageregistry/v1" + imageregistryv1 "github.com/openshift/client-go/imageregistry/listers/imageregistry/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Configs. type ConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConfigLister + Lister() imageregistryv1.ConfigLister } type configInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConfigInformer(client versioned.Interface, resyncPeriod time.Dur return client.ImageregistryV1().Configs().Watch(context.TODO(), options) }, }, - &imageregistryv1.Config{}, + &apiimageregistryv1.Config{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *configInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *configInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&imageregistryv1.Config{}, f.defaultInformer) + return f.factory.InformerFor(&apiimageregistryv1.Config{}, f.defaultInformer) } -func (f *configInformer) Lister() v1.ConfigLister { - return v1.NewConfigLister(f.Informer().GetIndexer()) +func (f *configInformer) Lister() imageregistryv1.ConfigLister { + return imageregistryv1.NewConfigLister(f.Informer().GetIndexer()) } diff --git a/imageregistry/informers/externalversions/imageregistry/v1/imagepruner.go b/imageregistry/informers/externalversions/imageregistry/v1/imagepruner.go index 8990675695..8513b2ad6e 100644 --- a/imageregistry/informers/externalversions/imageregistry/v1/imagepruner.go +++ b/imageregistry/informers/externalversions/imageregistry/v1/imagepruner.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - imageregistryv1 "github.com/openshift/api/imageregistry/v1" + apiimageregistryv1 "github.com/openshift/api/imageregistry/v1" versioned "github.com/openshift/client-go/imageregistry/clientset/versioned" internalinterfaces "github.com/openshift/client-go/imageregistry/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/imageregistry/listers/imageregistry/v1" + imageregistryv1 "github.com/openshift/client-go/imageregistry/listers/imageregistry/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImagePruners. type ImagePrunerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ImagePrunerLister + Lister() imageregistryv1.ImagePrunerLister } type imagePrunerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImagePrunerInformer(client versioned.Interface, resyncPeriod tim return client.ImageregistryV1().ImagePruners().Watch(context.TODO(), options) }, }, - &imageregistryv1.ImagePruner{}, + &apiimageregistryv1.ImagePruner{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imagePrunerInformer) defaultInformer(client versioned.Interface, resync } func (f *imagePrunerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&imageregistryv1.ImagePruner{}, f.defaultInformer) + return f.factory.InformerFor(&apiimageregistryv1.ImagePruner{}, f.defaultInformer) } -func (f *imagePrunerInformer) Lister() v1.ImagePrunerLister { - return v1.NewImagePrunerLister(f.Informer().GetIndexer()) +func (f *imagePrunerInformer) Lister() imageregistryv1.ImagePrunerLister { + return imageregistryv1.NewImagePrunerLister(f.Informer().GetIndexer()) } diff --git a/imageregistry/listers/imageregistry/v1/config.go b/imageregistry/listers/imageregistry/v1/config.go index edaea1c4b2..edc4af7604 100644 --- a/imageregistry/listers/imageregistry/v1/config.go +++ b/imageregistry/listers/imageregistry/v1/config.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/imageregistry/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConfigLister helps list Configs. @@ -14,19 +14,19 @@ import ( type ConfigLister interface { // List lists all Configs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Config, err error) + List(selector labels.Selector) (ret []*imageregistryv1.Config, err error) // Get retrieves the Config from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Config, error) + Get(name string) (*imageregistryv1.Config, error) ConfigListerExpansion } // configLister implements the ConfigLister interface. type configLister struct { - listers.ResourceIndexer[*v1.Config] + listers.ResourceIndexer[*imageregistryv1.Config] } // NewConfigLister returns a new ConfigLister. func NewConfigLister(indexer cache.Indexer) ConfigLister { - return &configLister{listers.New[*v1.Config](indexer, v1.Resource("config"))} + return &configLister{listers.New[*imageregistryv1.Config](indexer, imageregistryv1.Resource("config"))} } diff --git a/imageregistry/listers/imageregistry/v1/imagepruner.go b/imageregistry/listers/imageregistry/v1/imagepruner.go index 7f797399f7..bf81828a99 100644 --- a/imageregistry/listers/imageregistry/v1/imagepruner.go +++ b/imageregistry/listers/imageregistry/v1/imagepruner.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/imageregistry/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + imageregistryv1 "github.com/openshift/api/imageregistry/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImagePrunerLister helps list ImagePruners. @@ -14,19 +14,19 @@ import ( type ImagePrunerLister interface { // List lists all ImagePruners in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ImagePruner, err error) + List(selector labels.Selector) (ret []*imageregistryv1.ImagePruner, err error) // Get retrieves the ImagePruner from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ImagePruner, error) + Get(name string) (*imageregistryv1.ImagePruner, error) ImagePrunerListerExpansion } // imagePrunerLister implements the ImagePrunerLister interface. type imagePrunerLister struct { - listers.ResourceIndexer[*v1.ImagePruner] + listers.ResourceIndexer[*imageregistryv1.ImagePruner] } // NewImagePrunerLister returns a new ImagePrunerLister. func NewImagePrunerLister(indexer cache.Indexer) ImagePrunerLister { - return &imagePrunerLister{listers.New[*v1.ImagePruner](indexer, v1.Resource("imagepruner"))} + return &imagePrunerLister{listers.New[*imageregistryv1.ImagePruner](indexer, imageregistryv1.Resource("imagepruner"))} } diff --git a/insights/applyconfigurations/insights/v1alpha1/datagather.go b/insights/applyconfigurations/insights/v1alpha1/datagather.go index db404bc054..c3f1bd496e 100644 --- a/insights/applyconfigurations/insights/v1alpha1/datagather.go +++ b/insights/applyconfigurations/insights/v1alpha1/datagather.go @@ -69,7 +69,7 @@ func extractDataGather(dataGather *insightsv1alpha1.DataGather, fieldManager str // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithKind(value string) *DataGatherApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *DataGatherApplyConfiguration) WithKind(value string) *DataGatherApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithAPIVersion(value string) *DataGatherApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *DataGatherApplyConfiguration) WithAPIVersion(value string) *DataGatherA // If called multiple times, the Name field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithName(value string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *DataGatherApplyConfiguration) WithName(value string) *DataGatherApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithGenerateName(value string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *DataGatherApplyConfiguration) WithGenerateName(value string) *DataGathe // If called multiple times, the Namespace field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithNamespace(value string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *DataGatherApplyConfiguration) WithNamespace(value string) *DataGatherAp // If called multiple times, the UID field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithUID(value types.UID) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *DataGatherApplyConfiguration) WithUID(value types.UID) *DataGatherApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithResourceVersion(value string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *DataGatherApplyConfiguration) WithResourceVersion(value string) *DataGa // If called multiple times, the Generation field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithGeneration(value int64) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *DataGatherApplyConfiguration) WithGeneration(value int64) *DataGatherAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *DataGatherApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *DataGatherApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *DataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *DataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *DataGatherApplyConfiguration) WithLabels(entries map[string]string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *DataGatherApplyConfiguration) WithLabels(entries map[string]string) *Da // overwriting an existing map entries in Annotations field with the same key. func (b *DataGatherApplyConfiguration) WithAnnotations(entries map[string]string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *DataGatherApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *DataGatherApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *DataGatherApplyConfiguration) WithFinalizers(values ...string) *DataGatherApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *DataGatherApplyConfiguration) WithStatus(value *DataGatherStatusApplyCo // GetName retrieves the value of the Name field in the declarative configuration. func (b *DataGatherApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/insights/applyconfigurations/insights/v1alpha1/datagatherspec.go b/insights/applyconfigurations/insights/v1alpha1/datagatherspec.go index fdd26a12e8..96a017bad9 100644 --- a/insights/applyconfigurations/insights/v1alpha1/datagatherspec.go +++ b/insights/applyconfigurations/insights/v1alpha1/datagatherspec.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/insights/v1alpha1" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" ) // DataGatherSpecApplyConfiguration represents a declarative configuration of the DataGatherSpec type for use // with apply. type DataGatherSpecApplyConfiguration struct { - DataPolicy *v1alpha1.DataPolicy `json:"dataPolicy,omitempty"` + DataPolicy *insightsv1alpha1.DataPolicy `json:"dataPolicy,omitempty"` Gatherers []GathererConfigApplyConfiguration `json:"gatherers,omitempty"` } @@ -22,7 +22,7 @@ func DataGatherSpec() *DataGatherSpecApplyConfiguration { // WithDataPolicy sets the DataPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DataPolicy field is set to the value of the last call. -func (b *DataGatherSpecApplyConfiguration) WithDataPolicy(value v1alpha1.DataPolicy) *DataGatherSpecApplyConfiguration { +func (b *DataGatherSpecApplyConfiguration) WithDataPolicy(value insightsv1alpha1.DataPolicy) *DataGatherSpecApplyConfiguration { b.DataPolicy = &value return b } diff --git a/insights/applyconfigurations/insights/v1alpha1/datagatherstatus.go b/insights/applyconfigurations/insights/v1alpha1/datagatherstatus.go index 0ffb0c58ff..ede8dd5d30 100644 --- a/insights/applyconfigurations/insights/v1alpha1/datagatherstatus.go +++ b/insights/applyconfigurations/insights/v1alpha1/datagatherstatus.go @@ -3,7 +3,7 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/insights/v1alpha1" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -12,7 +12,7 @@ import ( // with apply. type DataGatherStatusApplyConfiguration struct { Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - State *v1alpha1.DataGatherState `json:"dataGatherState,omitempty"` + State *insightsv1alpha1.DataGatherState `json:"dataGatherState,omitempty"` Gatherers []GathererStatusApplyConfiguration `json:"gatherers,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` FinishTime *metav1.Time `json:"finishTime,omitempty"` @@ -43,7 +43,7 @@ func (b *DataGatherStatusApplyConfiguration) WithConditions(values ...*v1.Condit // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *DataGatherStatusApplyConfiguration) WithState(value v1alpha1.DataGatherState) *DataGatherStatusApplyConfiguration { +func (b *DataGatherStatusApplyConfiguration) WithState(value insightsv1alpha1.DataGatherState) *DataGatherStatusApplyConfiguration { b.State = &value return b } diff --git a/insights/applyconfigurations/insights/v1alpha1/gathererconfig.go b/insights/applyconfigurations/insights/v1alpha1/gathererconfig.go index cfbbb35167..09ac244697 100644 --- a/insights/applyconfigurations/insights/v1alpha1/gathererconfig.go +++ b/insights/applyconfigurations/insights/v1alpha1/gathererconfig.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/insights/v1alpha1" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" ) // GathererConfigApplyConfiguration represents a declarative configuration of the GathererConfig type for use // with apply. type GathererConfigApplyConfiguration struct { - Name *string `json:"name,omitempty"` - State *v1alpha1.GathererState `json:"state,omitempty"` + Name *string `json:"name,omitempty"` + State *insightsv1alpha1.GathererState `json:"state,omitempty"` } // GathererConfigApplyConfiguration constructs a declarative configuration of the GathererConfig type for use with @@ -30,7 +30,7 @@ func (b *GathererConfigApplyConfiguration) WithName(value string) *GathererConfi // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *GathererConfigApplyConfiguration) WithState(value v1alpha1.GathererState) *GathererConfigApplyConfiguration { +func (b *GathererConfigApplyConfiguration) WithState(value insightsv1alpha1.GathererState) *GathererConfigApplyConfiguration { b.State = &value return b } diff --git a/insights/applyconfigurations/insights/v1alpha1/healthcheck.go b/insights/applyconfigurations/insights/v1alpha1/healthcheck.go index 7c382ed018..5267b86b15 100644 --- a/insights/applyconfigurations/insights/v1alpha1/healthcheck.go +++ b/insights/applyconfigurations/insights/v1alpha1/healthcheck.go @@ -3,16 +3,16 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/insights/v1alpha1" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" ) // HealthCheckApplyConfiguration represents a declarative configuration of the HealthCheck type for use // with apply. type HealthCheckApplyConfiguration struct { - Description *string `json:"description,omitempty"` - TotalRisk *int32 `json:"totalRisk,omitempty"` - AdvisorURI *string `json:"advisorURI,omitempty"` - State *v1alpha1.HealthCheckState `json:"state,omitempty"` + Description *string `json:"description,omitempty"` + TotalRisk *int32 `json:"totalRisk,omitempty"` + AdvisorURI *string `json:"advisorURI,omitempty"` + State *insightsv1alpha1.HealthCheckState `json:"state,omitempty"` } // HealthCheckApplyConfiguration constructs a declarative configuration of the HealthCheck type for use with @@ -48,7 +48,7 @@ func (b *HealthCheckApplyConfiguration) WithAdvisorURI(value string) *HealthChec // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *HealthCheckApplyConfiguration) WithState(value v1alpha1.HealthCheckState) *HealthCheckApplyConfiguration { +func (b *HealthCheckApplyConfiguration) WithState(value insightsv1alpha1.HealthCheckState) *HealthCheckApplyConfiguration { b.State = &value return b } diff --git a/insights/applyconfigurations/internal/internal.go b/insights/applyconfigurations/internal/internal.go index 5992c3a53b..4272a7636c 100644 --- a/insights/applyconfigurations/internal/internal.go +++ b/insights/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/insights/clientset/versioned/clientset.go b/insights/clientset/versioned/clientset.go index 8bec9f99c4..231531b425 100644 --- a/insights/clientset/versioned/clientset.go +++ b/insights/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" insightsv1alpha1 "github.com/openshift/client-go/insights/clientset/versioned/typed/insights/v1alpha1" discovery "k8s.io/client-go/discovery" diff --git a/insights/clientset/versioned/typed/insights/v1alpha1/datagather.go b/insights/clientset/versioned/typed/insights/v1alpha1/datagather.go index e6f1006912..6574cdea03 100644 --- a/insights/clientset/versioned/typed/insights/v1alpha1/datagather.go +++ b/insights/clientset/versioned/typed/insights/v1alpha1/datagather.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/insights/v1alpha1" - insightsv1alpha1 "github.com/openshift/client-go/insights/applyconfigurations/insights/v1alpha1" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" + applyconfigurationsinsightsv1alpha1 "github.com/openshift/client-go/insights/applyconfigurations/insights/v1alpha1" scheme "github.com/openshift/client-go/insights/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type DataGathersGetter interface { // DataGatherInterface has methods to work with DataGather resources. type DataGatherInterface interface { - Create(ctx context.Context, dataGather *v1alpha1.DataGather, opts v1.CreateOptions) (*v1alpha1.DataGather, error) - Update(ctx context.Context, dataGather *v1alpha1.DataGather, opts v1.UpdateOptions) (*v1alpha1.DataGather, error) + Create(ctx context.Context, dataGather *insightsv1alpha1.DataGather, opts v1.CreateOptions) (*insightsv1alpha1.DataGather, error) + Update(ctx context.Context, dataGather *insightsv1alpha1.DataGather, opts v1.UpdateOptions) (*insightsv1alpha1.DataGather, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, dataGather *v1alpha1.DataGather, opts v1.UpdateOptions) (*v1alpha1.DataGather, error) + UpdateStatus(ctx context.Context, dataGather *insightsv1alpha1.DataGather, opts v1.UpdateOptions) (*insightsv1alpha1.DataGather, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.DataGather, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.DataGatherList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*insightsv1alpha1.DataGather, error) + List(ctx context.Context, opts v1.ListOptions) (*insightsv1alpha1.DataGatherList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DataGather, err error) - Apply(ctx context.Context, dataGather *insightsv1alpha1.DataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DataGather, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *insightsv1alpha1.DataGather, err error) + Apply(ctx context.Context, dataGather *applyconfigurationsinsightsv1alpha1.DataGatherApplyConfiguration, opts v1.ApplyOptions) (result *insightsv1alpha1.DataGather, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, dataGather *insightsv1alpha1.DataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DataGather, err error) + ApplyStatus(ctx context.Context, dataGather *applyconfigurationsinsightsv1alpha1.DataGatherApplyConfiguration, opts v1.ApplyOptions) (result *insightsv1alpha1.DataGather, err error) DataGatherExpansion } // dataGathers implements DataGatherInterface type dataGathers struct { - *gentype.ClientWithListAndApply[*v1alpha1.DataGather, *v1alpha1.DataGatherList, *insightsv1alpha1.DataGatherApplyConfiguration] + *gentype.ClientWithListAndApply[*insightsv1alpha1.DataGather, *insightsv1alpha1.DataGatherList, *applyconfigurationsinsightsv1alpha1.DataGatherApplyConfiguration] } // newDataGathers returns a DataGathers func newDataGathers(c *InsightsV1alpha1Client) *dataGathers { return &dataGathers{ - gentype.NewClientWithListAndApply[*v1alpha1.DataGather, *v1alpha1.DataGatherList, *insightsv1alpha1.DataGatherApplyConfiguration]( + gentype.NewClientWithListAndApply[*insightsv1alpha1.DataGather, *insightsv1alpha1.DataGatherList, *applyconfigurationsinsightsv1alpha1.DataGatherApplyConfiguration]( "datagathers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.DataGather { return &v1alpha1.DataGather{} }, - func() *v1alpha1.DataGatherList { return &v1alpha1.DataGatherList{} }), + func() *insightsv1alpha1.DataGather { return &insightsv1alpha1.DataGather{} }, + func() *insightsv1alpha1.DataGatherList { return &insightsv1alpha1.DataGatherList{} }, + ), } } diff --git a/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_datagather.go b/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_datagather.go index 0ebd32e7dd..e04886274a 100644 --- a/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_datagather.go +++ b/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_datagather.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/insights/v1alpha1" insightsv1alpha1 "github.com/openshift/client-go/insights/applyconfigurations/insights/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedinsightsv1alpha1 "github.com/openshift/client-go/insights/clientset/versioned/typed/insights/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeDataGathers implements DataGatherInterface -type FakeDataGathers struct { +// fakeDataGathers implements DataGatherInterface +type fakeDataGathers struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.DataGather, *v1alpha1.DataGatherList, *insightsv1alpha1.DataGatherApplyConfiguration] Fake *FakeInsightsV1alpha1 } -var datagathersResource = v1alpha1.SchemeGroupVersion.WithResource("datagathers") - -var datagathersKind = v1alpha1.SchemeGroupVersion.WithKind("DataGather") - -// Get takes name of the dataGather, and returns the corresponding dataGather object, and an error if there is any. -func (c *FakeDataGathers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DataGather, err error) { - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(datagathersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DataGather), err -} - -// List takes label and field selectors, and returns the list of DataGathers that match those selectors. -func (c *FakeDataGathers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DataGatherList, err error) { - emptyResult := &v1alpha1.DataGatherList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(datagathersResource, datagathersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.DataGatherList{ListMeta: obj.(*v1alpha1.DataGatherList).ListMeta} - for _, item := range obj.(*v1alpha1.DataGatherList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dataGathers. -func (c *FakeDataGathers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(datagathersResource, opts)) -} - -// Create takes the representation of a dataGather and creates it. Returns the server's representation of the dataGather, and an error, if there is any. -func (c *FakeDataGathers) Create(ctx context.Context, dataGather *v1alpha1.DataGather, opts v1.CreateOptions) (result *v1alpha1.DataGather, err error) { - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(datagathersResource, dataGather, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DataGather), err -} - -// Update takes the representation of a dataGather and updates it. Returns the server's representation of the dataGather, and an error, if there is any. -func (c *FakeDataGathers) Update(ctx context.Context, dataGather *v1alpha1.DataGather, opts v1.UpdateOptions) (result *v1alpha1.DataGather, err error) { - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(datagathersResource, dataGather, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DataGather), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDataGathers) UpdateStatus(ctx context.Context, dataGather *v1alpha1.DataGather, opts v1.UpdateOptions) (result *v1alpha1.DataGather, err error) { - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(datagathersResource, "status", dataGather, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DataGather), err -} - -// Delete takes name of the dataGather and deletes it. Returns an error if one occurs. -func (c *FakeDataGathers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(datagathersResource, name, opts), &v1alpha1.DataGather{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDataGathers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(datagathersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.DataGatherList{}) - return err -} - -// Patch applies the patch and returns the patched dataGather. -func (c *FakeDataGathers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DataGather, err error) { - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(datagathersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DataGather), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied dataGather. -func (c *FakeDataGathers) Apply(ctx context.Context, dataGather *insightsv1alpha1.DataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DataGather, err error) { - if dataGather == nil { - return nil, fmt.Errorf("dataGather provided to Apply must not be nil") - } - data, err := json.Marshal(dataGather) - if err != nil { - return nil, err - } - name := dataGather.Name - if name == nil { - return nil, fmt.Errorf("dataGather.Name must be provided to Apply") - } - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(datagathersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DataGather), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDataGathers) ApplyStatus(ctx context.Context, dataGather *insightsv1alpha1.DataGatherApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DataGather, err error) { - if dataGather == nil { - return nil, fmt.Errorf("dataGather provided to Apply must not be nil") - } - data, err := json.Marshal(dataGather) - if err != nil { - return nil, err - } - name := dataGather.Name - if name == nil { - return nil, fmt.Errorf("dataGather.Name must be provided to Apply") - } - emptyResult := &v1alpha1.DataGather{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(datagathersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeDataGathers(fake *FakeInsightsV1alpha1) typedinsightsv1alpha1.DataGatherInterface { + return &fakeDataGathers{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.DataGather, *v1alpha1.DataGatherList, *insightsv1alpha1.DataGatherApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("datagathers"), + v1alpha1.SchemeGroupVersion.WithKind("DataGather"), + func() *v1alpha1.DataGather { return &v1alpha1.DataGather{} }, + func() *v1alpha1.DataGatherList { return &v1alpha1.DataGatherList{} }, + func(dst, src *v1alpha1.DataGatherList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.DataGatherList) []*v1alpha1.DataGather { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.DataGatherList, items []*v1alpha1.DataGather) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.DataGather), err } diff --git a/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_insights_client.go b/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_insights_client.go index 8c272ce1f0..46d56f1126 100644 --- a/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_insights_client.go +++ b/insights/clientset/versioned/typed/insights/v1alpha1/fake/fake_insights_client.go @@ -13,7 +13,7 @@ type FakeInsightsV1alpha1 struct { } func (c *FakeInsightsV1alpha1) DataGathers() v1alpha1.DataGatherInterface { - return &FakeDataGathers{c} + return newFakeDataGathers(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/insights/clientset/versioned/typed/insights/v1alpha1/insights_client.go b/insights/clientset/versioned/typed/insights/v1alpha1/insights_client.go index 020bb5a393..8ca16c0d5f 100644 --- a/insights/clientset/versioned/typed/insights/v1alpha1/insights_client.go +++ b/insights/clientset/versioned/typed/insights/v1alpha1/insights_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/insights/v1alpha1" - "github.com/openshift/client-go/insights/clientset/versioned/scheme" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" + scheme "github.com/openshift/client-go/insights/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *InsightsV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := insightsv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/insights/informers/externalversions/generic.go b/insights/informers/externalversions/generic.go index 55908d9500..cab0470e3a 100644 --- a/insights/informers/externalversions/generic.go +++ b/insights/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1alpha1 "github.com/openshift/api/insights/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/insights/informers/externalversions/insights/v1alpha1/datagather.go b/insights/informers/externalversions/insights/v1alpha1/datagather.go index bcb2b25ebc..a667a4b315 100644 --- a/insights/informers/externalversions/insights/v1alpha1/datagather.go +++ b/insights/informers/externalversions/insights/v1alpha1/datagather.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" + apiinsightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" versioned "github.com/openshift/client-go/insights/clientset/versioned" internalinterfaces "github.com/openshift/client-go/insights/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/insights/listers/insights/v1alpha1" + insightsv1alpha1 "github.com/openshift/client-go/insights/listers/insights/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DataGathers. type DataGatherInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.DataGatherLister + Lister() insightsv1alpha1.DataGatherLister } type dataGatherInformer struct { @@ -54,7 +54,7 @@ func NewFilteredDataGatherInformer(client versioned.Interface, resyncPeriod time return client.InsightsV1alpha1().DataGathers().Watch(context.TODO(), options) }, }, - &insightsv1alpha1.DataGather{}, + &apiinsightsv1alpha1.DataGather{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *dataGatherInformer) defaultInformer(client versioned.Interface, resyncP } func (f *dataGatherInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&insightsv1alpha1.DataGather{}, f.defaultInformer) + return f.factory.InformerFor(&apiinsightsv1alpha1.DataGather{}, f.defaultInformer) } -func (f *dataGatherInformer) Lister() v1alpha1.DataGatherLister { - return v1alpha1.NewDataGatherLister(f.Informer().GetIndexer()) +func (f *dataGatherInformer) Lister() insightsv1alpha1.DataGatherLister { + return insightsv1alpha1.NewDataGatherLister(f.Informer().GetIndexer()) } diff --git a/insights/listers/insights/v1alpha1/datagather.go b/insights/listers/insights/v1alpha1/datagather.go index fe5e008dc7..846d8ee230 100644 --- a/insights/listers/insights/v1alpha1/datagather.go +++ b/insights/listers/insights/v1alpha1/datagather.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/insights/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + insightsv1alpha1 "github.com/openshift/api/insights/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DataGatherLister helps list DataGathers. @@ -14,19 +14,19 @@ import ( type DataGatherLister interface { // List lists all DataGathers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.DataGather, err error) + List(selector labels.Selector) (ret []*insightsv1alpha1.DataGather, err error) // Get retrieves the DataGather from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.DataGather, error) + Get(name string) (*insightsv1alpha1.DataGather, error) DataGatherListerExpansion } // dataGatherLister implements the DataGatherLister interface. type dataGatherLister struct { - listers.ResourceIndexer[*v1alpha1.DataGather] + listers.ResourceIndexer[*insightsv1alpha1.DataGather] } // NewDataGatherLister returns a new DataGatherLister. func NewDataGatherLister(indexer cache.Indexer) DataGatherLister { - return &dataGatherLister{listers.New[*v1alpha1.DataGather](indexer, v1alpha1.Resource("datagather"))} + return &dataGatherLister{listers.New[*insightsv1alpha1.DataGather](indexer, insightsv1alpha1.Resource("datagather"))} } diff --git a/machine/applyconfigurations/internal/internal.go b/machine/applyconfigurations/internal/internal.go index 2141bcab25..227d9aeea8 100644 --- a/machine/applyconfigurations/internal/internal.go +++ b/machine/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/machine/applyconfigurations/machine/v1/awsresourcereference.go b/machine/applyconfigurations/machine/v1/awsresourcereference.go index 84df3f381d..8ff173c13a 100644 --- a/machine/applyconfigurations/machine/v1/awsresourcereference.go +++ b/machine/applyconfigurations/machine/v1/awsresourcereference.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/machine/v1" + machinev1 "github.com/openshift/api/machine/v1" ) // AWSResourceReferenceApplyConfiguration represents a declarative configuration of the AWSResourceReference type for use // with apply. type AWSResourceReferenceApplyConfiguration struct { - Type *v1.AWSResourceReferenceType `json:"type,omitempty"` + Type *machinev1.AWSResourceReferenceType `json:"type,omitempty"` ID *string `json:"id,omitempty"` ARN *string `json:"arn,omitempty"` Filters *[]AWSResourceFilterApplyConfiguration `json:"filters,omitempty"` @@ -24,7 +24,7 @@ func AWSResourceReference() *AWSResourceReferenceApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AWSResourceReferenceApplyConfiguration) WithType(value v1.AWSResourceReferenceType) *AWSResourceReferenceApplyConfiguration { +func (b *AWSResourceReferenceApplyConfiguration) WithType(value machinev1.AWSResourceReferenceType) *AWSResourceReferenceApplyConfiguration { b.Type = &value return b } diff --git a/machine/applyconfigurations/machine/v1/controlplanemachineset.go b/machine/applyconfigurations/machine/v1/controlplanemachineset.go index e8bb7e930b..aabd99b087 100644 --- a/machine/applyconfigurations/machine/v1/controlplanemachineset.go +++ b/machine/applyconfigurations/machine/v1/controlplanemachineset.go @@ -3,21 +3,21 @@ package v1 import ( - apimachinev1 "github.com/openshift/api/machine/v1" + machinev1 "github.com/openshift/api/machine/v1" internal "github.com/openshift/client-go/machine/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ControlPlaneMachineSetApplyConfiguration represents a declarative configuration of the ControlPlaneMachineSet type for use // with apply. type ControlPlaneMachineSetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ControlPlaneMachineSetSpecApplyConfiguration `json:"spec,omitempty"` - Status *ControlPlaneMachineSetStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ControlPlaneMachineSetSpecApplyConfiguration `json:"spec,omitempty"` + Status *ControlPlaneMachineSetStatusApplyConfiguration `json:"status,omitempty"` } // ControlPlaneMachineSet constructs a declarative configuration of the ControlPlaneMachineSet type for use with @@ -42,18 +42,18 @@ func ControlPlaneMachineSet(name, namespace string) *ControlPlaneMachineSetApply // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractControlPlaneMachineSet(controlPlaneMachineSet *apimachinev1.ControlPlaneMachineSet, fieldManager string) (*ControlPlaneMachineSetApplyConfiguration, error) { +func ExtractControlPlaneMachineSet(controlPlaneMachineSet *machinev1.ControlPlaneMachineSet, fieldManager string) (*ControlPlaneMachineSetApplyConfiguration, error) { return extractControlPlaneMachineSet(controlPlaneMachineSet, fieldManager, "") } // ExtractControlPlaneMachineSetStatus is the same as ExtractControlPlaneMachineSet except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractControlPlaneMachineSetStatus(controlPlaneMachineSet *apimachinev1.ControlPlaneMachineSet, fieldManager string) (*ControlPlaneMachineSetApplyConfiguration, error) { +func ExtractControlPlaneMachineSetStatus(controlPlaneMachineSet *machinev1.ControlPlaneMachineSet, fieldManager string) (*ControlPlaneMachineSetApplyConfiguration, error) { return extractControlPlaneMachineSet(controlPlaneMachineSet, fieldManager, "status") } -func extractControlPlaneMachineSet(controlPlaneMachineSet *apimachinev1.ControlPlaneMachineSet, fieldManager string, subresource string) (*ControlPlaneMachineSetApplyConfiguration, error) { +func extractControlPlaneMachineSet(controlPlaneMachineSet *machinev1.ControlPlaneMachineSet, fieldManager string, subresource string) (*ControlPlaneMachineSetApplyConfiguration, error) { b := &ControlPlaneMachineSetApplyConfiguration{} err := managedfields.ExtractInto(controlPlaneMachineSet, internal.Parser().Type("com.github.openshift.api.machine.v1.ControlPlaneMachineSet"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractControlPlaneMachineSet(controlPlaneMachineSet *apimachinev1.ControlP // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithKind(value string) *ControlPlaneMachineSetApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithKind(value string) *Contr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithAPIVersion(value string) *ControlPlaneMachineSetApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithAPIVersion(value string) // If called multiple times, the Name field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithName(value string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithName(value string) *Contr // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithGenerateName(value string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithGenerateName(value string // If called multiple times, the Namespace field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithNamespace(value string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithNamespace(value string) * // If called multiple times, the UID field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithUID(value types.UID) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithUID(value types.UID) *Con // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithResourceVersion(value string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithResourceVersion(value str // If called multiple times, the Generation field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithGeneration(value int64) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ControlPlaneMachineSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ControlPlaneMachineSetApplyConfiguration { +func (b *ControlPlaneMachineSetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ControlPlaneMachineSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ControlPlaneMachineSetApplyConfiguration { +func (b *ControlPlaneMachineSetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithDeletionTimestamp(value m // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ControlPlaneMachineSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithDeletionGracePeriodSecond // overwriting an existing map entries in Labels field with the same key. func (b *ControlPlaneMachineSetApplyConfiguration) WithLabels(entries map[string]string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithLabels(entries map[string // overwriting an existing map entries in Annotations field with the same key. func (b *ControlPlaneMachineSetApplyConfiguration) WithAnnotations(entries map[string]string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithAnnotations(entries map[s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ControlPlaneMachineSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ControlPlaneMachineSetApplyConfiguration { +func (b *ControlPlaneMachineSetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithOwnerReferences(values .. func (b *ControlPlaneMachineSetApplyConfiguration) WithFinalizers(values ...string) *ControlPlaneMachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ControlPlaneMachineSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *ControlPlaneMachineSetApplyConfiguration) WithStatus(value *ControlPlan // GetName retrieves the value of the Name field in the declarative configuration. func (b *ControlPlaneMachineSetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machine/applyconfigurations/machine/v1/controlplanemachinesetspec.go b/machine/applyconfigurations/machine/v1/controlplanemachinesetspec.go index fe2e2159b9..f03a1058c7 100644 --- a/machine/applyconfigurations/machine/v1/controlplanemachinesetspec.go +++ b/machine/applyconfigurations/machine/v1/controlplanemachinesetspec.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/machine/v1" + machinev1 "github.com/openshift/api/machine/v1" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -11,7 +11,7 @@ import ( // with apply. type ControlPlaneMachineSetSpecApplyConfiguration struct { MachineNamePrefix *string `json:"machineNamePrefix,omitempty"` - State *v1.ControlPlaneMachineSetState `json:"state,omitempty"` + State *machinev1.ControlPlaneMachineSetState `json:"state,omitempty"` Replicas *int32 `json:"replicas,omitempty"` Strategy *ControlPlaneMachineSetStrategyApplyConfiguration `json:"strategy,omitempty"` Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` @@ -35,7 +35,7 @@ func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithMachineNamePrefix(val // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithState(value v1.ControlPlaneMachineSetState) *ControlPlaneMachineSetSpecApplyConfiguration { +func (b *ControlPlaneMachineSetSpecApplyConfiguration) WithState(value machinev1.ControlPlaneMachineSetState) *ControlPlaneMachineSetSpecApplyConfiguration { b.State = &value return b } diff --git a/machine/applyconfigurations/machine/v1/controlplanemachinesetstatus.go b/machine/applyconfigurations/machine/v1/controlplanemachinesetstatus.go index bf342282a9..ae2d6f91fa 100644 --- a/machine/applyconfigurations/machine/v1/controlplanemachinesetstatus.go +++ b/machine/applyconfigurations/machine/v1/controlplanemachinesetstatus.go @@ -3,18 +3,18 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ControlPlaneMachineSetStatusApplyConfiguration represents a declarative configuration of the ControlPlaneMachineSetStatus type for use // with apply. type ControlPlaneMachineSetStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` - UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"` + UnavailableReplicas *int32 `json:"unavailableReplicas,omitempty"` } // ControlPlaneMachineSetStatusApplyConfiguration constructs a declarative configuration of the ControlPlaneMachineSetStatus type for use with @@ -26,7 +26,7 @@ func ControlPlaneMachineSetStatus() *ControlPlaneMachineSetStatusApplyConfigurat // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ControlPlaneMachineSetStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ControlPlaneMachineSetStatusApplyConfiguration { +func (b *ControlPlaneMachineSetStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ControlPlaneMachineSetStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/machine/applyconfigurations/machine/v1/controlplanemachinesetstrategy.go b/machine/applyconfigurations/machine/v1/controlplanemachinesetstrategy.go index e2f6c81f1a..87b9779549 100644 --- a/machine/applyconfigurations/machine/v1/controlplanemachinesetstrategy.go +++ b/machine/applyconfigurations/machine/v1/controlplanemachinesetstrategy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/machine/v1" + machinev1 "github.com/openshift/api/machine/v1" ) // ControlPlaneMachineSetStrategyApplyConfiguration represents a declarative configuration of the ControlPlaneMachineSetStrategy type for use // with apply. type ControlPlaneMachineSetStrategyApplyConfiguration struct { - Type *v1.ControlPlaneMachineSetStrategyType `json:"type,omitempty"` + Type *machinev1.ControlPlaneMachineSetStrategyType `json:"type,omitempty"` } // ControlPlaneMachineSetStrategyApplyConfiguration constructs a declarative configuration of the ControlPlaneMachineSetStrategy type for use with @@ -21,7 +21,7 @@ func ControlPlaneMachineSetStrategy() *ControlPlaneMachineSetStrategyApplyConfig // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ControlPlaneMachineSetStrategyApplyConfiguration) WithType(value v1.ControlPlaneMachineSetStrategyType) *ControlPlaneMachineSetStrategyApplyConfiguration { +func (b *ControlPlaneMachineSetStrategyApplyConfiguration) WithType(value machinev1.ControlPlaneMachineSetStrategyType) *ControlPlaneMachineSetStrategyApplyConfiguration { b.Type = &value return b } diff --git a/machine/applyconfigurations/machine/v1/controlplanemachinesettemplate.go b/machine/applyconfigurations/machine/v1/controlplanemachinesettemplate.go index 869caa3ab3..99a89638bc 100644 --- a/machine/applyconfigurations/machine/v1/controlplanemachinesettemplate.go +++ b/machine/applyconfigurations/machine/v1/controlplanemachinesettemplate.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/machine/v1" + machinev1 "github.com/openshift/api/machine/v1" ) // ControlPlaneMachineSetTemplateApplyConfiguration represents a declarative configuration of the ControlPlaneMachineSetTemplate type for use // with apply. type ControlPlaneMachineSetTemplateApplyConfiguration struct { - MachineType *v1.ControlPlaneMachineSetMachineType `json:"machineType,omitempty"` + MachineType *machinev1.ControlPlaneMachineSetMachineType `json:"machineType,omitempty"` OpenShiftMachineV1Beta1Machine *OpenShiftMachineV1Beta1MachineTemplateApplyConfiguration `json:"machines_v1beta1_machine_openshift_io,omitempty"` } @@ -22,7 +22,7 @@ func ControlPlaneMachineSetTemplate() *ControlPlaneMachineSetTemplateApplyConfig // WithMachineType sets the MachineType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MachineType field is set to the value of the last call. -func (b *ControlPlaneMachineSetTemplateApplyConfiguration) WithMachineType(value v1.ControlPlaneMachineSetMachineType) *ControlPlaneMachineSetTemplateApplyConfiguration { +func (b *ControlPlaneMachineSetTemplateApplyConfiguration) WithMachineType(value machinev1.ControlPlaneMachineSetMachineType) *ControlPlaneMachineSetTemplateApplyConfiguration { b.MachineType = &value return b } diff --git a/machine/applyconfigurations/machine/v1/failuredomains.go b/machine/applyconfigurations/machine/v1/failuredomains.go index 2672231d00..0a013687ff 100644 --- a/machine/applyconfigurations/machine/v1/failuredomains.go +++ b/machine/applyconfigurations/machine/v1/failuredomains.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // FailureDomainsApplyConfiguration represents a declarative configuration of the FailureDomains type for use // with apply. type FailureDomainsApplyConfiguration struct { - Platform *v1.PlatformType `json:"platform,omitempty"` + Platform *configv1.PlatformType `json:"platform,omitempty"` AWS *[]AWSFailureDomainApplyConfiguration `json:"aws,omitempty"` Azure *[]AzureFailureDomainApplyConfiguration `json:"azure,omitempty"` GCP *[]GCPFailureDomainApplyConfiguration `json:"gcp,omitempty"` @@ -27,7 +27,7 @@ func FailureDomains() *FailureDomainsApplyConfiguration { // WithPlatform sets the Platform field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Platform field is set to the value of the last call. -func (b *FailureDomainsApplyConfiguration) WithPlatform(value v1.PlatformType) *FailureDomainsApplyConfiguration { +func (b *FailureDomainsApplyConfiguration) WithPlatform(value configv1.PlatformType) *FailureDomainsApplyConfiguration { b.Platform = &value return b } diff --git a/machine/applyconfigurations/machine/v1beta1/condition.go b/machine/applyconfigurations/machine/v1beta1/condition.go index 49e898dcb4..5798b9913c 100644 --- a/machine/applyconfigurations/machine/v1beta1/condition.go +++ b/machine/applyconfigurations/machine/v1beta1/condition.go @@ -3,7 +3,7 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/machine/v1beta1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,12 +11,12 @@ import ( // ConditionApplyConfiguration represents a declarative configuration of the Condition type for use // with apply. type ConditionApplyConfiguration struct { - Type *v1beta1.ConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - Severity *v1beta1.ConditionSeverity `json:"severity,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *machinev1beta1.ConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + Severity *machinev1beta1.ConditionSeverity `json:"severity,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ConditionApplyConfiguration constructs a declarative configuration of the Condition type for use with @@ -28,7 +28,7 @@ func Condition() *ConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithType(value v1beta1.ConditionType) *ConditionApplyConfiguration { +func (b *ConditionApplyConfiguration) WithType(value machinev1beta1.ConditionType) *ConditionApplyConfiguration { b.Type = &value return b } @@ -44,7 +44,7 @@ func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *Cond // WithSeverity sets the Severity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Severity field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithSeverity(value v1beta1.ConditionSeverity) *ConditionApplyConfiguration { +func (b *ConditionApplyConfiguration) WithSeverity(value machinev1beta1.ConditionSeverity) *ConditionApplyConfiguration { b.Severity = &value return b } diff --git a/machine/applyconfigurations/machine/v1beta1/machine.go b/machine/applyconfigurations/machine/v1beta1/machine.go index 4ac6311a31..8076a2624e 100644 --- a/machine/applyconfigurations/machine/v1beta1/machine.go +++ b/machine/applyconfigurations/machine/v1beta1/machine.go @@ -71,7 +71,7 @@ func extractMachine(machine *machinev1beta1.Machine, fieldManager string, subres // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineApplyConfiguration) WithKind(value string) *MachineApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *MachineApplyConfiguration) WithKind(value string) *MachineApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineApplyConfiguration) WithAPIVersion(value string) *MachineApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *MachineApplyConfiguration) WithAPIVersion(value string) *MachineApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *MachineApplyConfiguration) WithName(value string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *MachineApplyConfiguration) WithName(value string) *MachineApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineApplyConfiguration) WithGenerateName(value string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *MachineApplyConfiguration) WithGenerateName(value string) *MachineApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineApplyConfiguration) WithNamespace(value string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *MachineApplyConfiguration) WithNamespace(value string) *MachineApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *MachineApplyConfiguration) WithUID(value types.UID) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *MachineApplyConfiguration) WithUID(value types.UID) *MachineApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineApplyConfiguration) WithResourceVersion(value string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *MachineApplyConfiguration) WithResourceVersion(value string) *MachineAp // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineApplyConfiguration) WithGeneration(value int64) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *MachineApplyConfiguration) WithGeneration(value int64) *MachineApplyCon // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *MachineApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *MachineApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Ma // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *MachineApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *MachineApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Ma // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *MachineApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *MachineApplyConfiguration) WithLabels(entries map[string]string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *MachineApplyConfiguration) WithLabels(entries map[string]string) *Machi // overwriting an existing map entries in Annotations field with the same key. func (b *MachineApplyConfiguration) WithAnnotations(entries map[string]string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *MachineApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *MachineApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *MachineApplyConfiguration) WithFinalizers(values ...string) *MachineApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *MachineApplyConfiguration) WithStatus(value *MachineStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machine/applyconfigurations/machine/v1beta1/machinehealthcheck.go b/machine/applyconfigurations/machine/v1beta1/machinehealthcheck.go index f81b469eee..1966d7835a 100644 --- a/machine/applyconfigurations/machine/v1beta1/machinehealthcheck.go +++ b/machine/applyconfigurations/machine/v1beta1/machinehealthcheck.go @@ -71,7 +71,7 @@ func extractMachineHealthCheck(machineHealthCheck *machinev1beta1.MachineHealthC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithKind(value string) *MachineHealthCheckApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithKind(value string) *MachineHe // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithAPIVersion(value string) *MachineHealthCheckApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithAPIVersion(value string) *Mac // If called multiple times, the Name field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithName(value string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithName(value string) *MachineHe // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithGenerateName(value string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithGenerateName(value string) *M // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithNamespace(value string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithNamespace(value string) *Mach // If called multiple times, the UID field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithUID(value types.UID) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithUID(value types.UID) *Machine // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithResourceVersion(value string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithGeneration(value int64) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithGeneration(value int64) *Mach // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithCreationTimestamp(value metav // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineHealthCheckApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *MachineHealthCheckApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *MachineHealthCheckApplyConfiguration) WithLabels(entries map[string]string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *MachineHealthCheckApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *MachineHealthCheckApplyConfiguration) WithAnnotations(entries map[string]string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithOwnerReferences(values ...*v1 if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *MachineHealthCheckApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *MachineHealthCheckApplyConfiguration) WithFinalizers(values ...string) *MachineHealthCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *MachineHealthCheckApplyConfiguration) WithStatus(value *MachineHealthCh // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineHealthCheckApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machine/applyconfigurations/machine/v1beta1/machineset.go b/machine/applyconfigurations/machine/v1beta1/machineset.go index ffbda1369b..6d65c62568 100644 --- a/machine/applyconfigurations/machine/v1beta1/machineset.go +++ b/machine/applyconfigurations/machine/v1beta1/machineset.go @@ -71,7 +71,7 @@ func extractMachineSet(machineSet *machinev1beta1.MachineSet, fieldManager strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithKind(value string) *MachineSetApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *MachineSetApplyConfiguration) WithKind(value string) *MachineSetApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithAPIVersion(value string) *MachineSetApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *MachineSetApplyConfiguration) WithAPIVersion(value string) *MachineSetA // If called multiple times, the Name field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithName(value string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *MachineSetApplyConfiguration) WithName(value string) *MachineSetApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithGenerateName(value string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *MachineSetApplyConfiguration) WithGenerateName(value string) *MachineSe // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithNamespace(value string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *MachineSetApplyConfiguration) WithNamespace(value string) *MachineSetAp // If called multiple times, the UID field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithUID(value types.UID) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *MachineSetApplyConfiguration) WithUID(value types.UID) *MachineSetApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithResourceVersion(value string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *MachineSetApplyConfiguration) WithResourceVersion(value string) *Machin // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithGeneration(value int64) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *MachineSetApplyConfiguration) WithGeneration(value int64) *MachineSetAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *MachineSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *MachineSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *MachineSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *MachineSetApplyConfiguration) WithLabels(entries map[string]string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *MachineSetApplyConfiguration) WithLabels(entries map[string]string) *Ma // overwriting an existing map entries in Annotations field with the same key. func (b *MachineSetApplyConfiguration) WithAnnotations(entries map[string]string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *MachineSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *MachineSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *MachineSetApplyConfiguration) WithFinalizers(values ...string) *MachineSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *MachineSetApplyConfiguration) WithStatus(value *MachineSetStatusApplyCo // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineSetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machine/applyconfigurations/machine/v1beta1/machinesetstatus.go b/machine/applyconfigurations/machine/v1beta1/machinesetstatus.go index 11cf9bb144..583ee66b76 100644 --- a/machine/applyconfigurations/machine/v1beta1/machinesetstatus.go +++ b/machine/applyconfigurations/machine/v1beta1/machinesetstatus.go @@ -3,22 +3,22 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/machine/v1beta1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" ) // MachineSetStatusApplyConfiguration represents a declarative configuration of the MachineSetStatus type for use // with apply. type MachineSetStatusApplyConfiguration struct { - Replicas *int32 `json:"replicas,omitempty"` - FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - ErrorReason *v1beta1.MachineSetStatusError `json:"errorReason,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - Conditions []ConditionApplyConfiguration `json:"conditions,omitempty"` - AuthoritativeAPI *v1beta1.MachineAuthority `json:"authoritativeAPI,omitempty"` - SynchronizedGeneration *int64 `json:"synchronizedGeneration,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` + ReadyReplicas *int32 `json:"readyReplicas,omitempty"` + AvailableReplicas *int32 `json:"availableReplicas,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + ErrorReason *machinev1beta1.MachineSetStatusError `json:"errorReason,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + Conditions []ConditionApplyConfiguration `json:"conditions,omitempty"` + AuthoritativeAPI *machinev1beta1.MachineAuthority `json:"authoritativeAPI,omitempty"` + SynchronizedGeneration *int64 `json:"synchronizedGeneration,omitempty"` } // MachineSetStatusApplyConfiguration constructs a declarative configuration of the MachineSetStatus type for use with @@ -70,7 +70,7 @@ func (b *MachineSetStatusApplyConfiguration) WithObservedGeneration(value int64) // WithErrorReason sets the ErrorReason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ErrorReason field is set to the value of the last call. -func (b *MachineSetStatusApplyConfiguration) WithErrorReason(value v1beta1.MachineSetStatusError) *MachineSetStatusApplyConfiguration { +func (b *MachineSetStatusApplyConfiguration) WithErrorReason(value machinev1beta1.MachineSetStatusError) *MachineSetStatusApplyConfiguration { b.ErrorReason = &value return b } @@ -99,7 +99,7 @@ func (b *MachineSetStatusApplyConfiguration) WithConditions(values ...*Condition // WithAuthoritativeAPI sets the AuthoritativeAPI field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AuthoritativeAPI field is set to the value of the last call. -func (b *MachineSetStatusApplyConfiguration) WithAuthoritativeAPI(value v1beta1.MachineAuthority) *MachineSetStatusApplyConfiguration { +func (b *MachineSetStatusApplyConfiguration) WithAuthoritativeAPI(value machinev1beta1.MachineAuthority) *MachineSetStatusApplyConfiguration { b.AuthoritativeAPI = &value return b } diff --git a/machine/applyconfigurations/machine/v1beta1/machinespec.go b/machine/applyconfigurations/machine/v1beta1/machinespec.go index 25e742c588..a2a1d91c61 100644 --- a/machine/applyconfigurations/machine/v1beta1/machinespec.go +++ b/machine/applyconfigurations/machine/v1beta1/machinespec.go @@ -30,7 +30,7 @@ func MachineSpec() *MachineSpecApplyConfiguration { // If called multiple times, the Name field is set to the value of the last call. func (b *MachineSpecApplyConfiguration) WithName(value string) *MachineSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -39,7 +39,7 @@ func (b *MachineSpecApplyConfiguration) WithName(value string) *MachineSpecApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineSpecApplyConfiguration) WithGenerateName(value string) *MachineSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -48,7 +48,7 @@ func (b *MachineSpecApplyConfiguration) WithGenerateName(value string) *MachineS // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineSpecApplyConfiguration) WithNamespace(value string) *MachineSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -58,11 +58,11 @@ func (b *MachineSpecApplyConfiguration) WithNamespace(value string) *MachineSpec // overwriting an existing map entries in Labels field with the same key. func (b *MachineSpecApplyConfiguration) WithLabels(entries map[string]string) *MachineSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -73,11 +73,11 @@ func (b *MachineSpecApplyConfiguration) WithLabels(entries map[string]string) *M // overwriting an existing map entries in Annotations field with the same key. func (b *MachineSpecApplyConfiguration) WithAnnotations(entries map[string]string) *MachineSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -91,7 +91,7 @@ func (b *MachineSpecApplyConfiguration) WithOwnerReferences(values ...*metav1.Ow if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } diff --git a/machine/applyconfigurations/machine/v1beta1/machinestatus.go b/machine/applyconfigurations/machine/v1beta1/machinestatus.go index acadb0b0d2..ab4a2632c1 100644 --- a/machine/applyconfigurations/machine/v1beta1/machinestatus.go +++ b/machine/applyconfigurations/machine/v1beta1/machinestatus.go @@ -3,7 +3,7 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/machine/v1beta1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -12,17 +12,17 @@ import ( // MachineStatusApplyConfiguration represents a declarative configuration of the MachineStatus type for use // with apply. type MachineStatusApplyConfiguration struct { - NodeRef *v1.ObjectReference `json:"nodeRef,omitempty"` - LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - ErrorReason *v1beta1.MachineStatusError `json:"errorReason,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` - Addresses []v1.NodeAddress `json:"addresses,omitempty"` - LastOperation *LastOperationApplyConfiguration `json:"lastOperation,omitempty"` - Phase *string `json:"phase,omitempty"` - Conditions []ConditionApplyConfiguration `json:"conditions,omitempty"` - AuthoritativeAPI *v1beta1.MachineAuthority `json:"authoritativeAPI,omitempty"` - SynchronizedGeneration *int64 `json:"synchronizedGeneration,omitempty"` + NodeRef *v1.ObjectReference `json:"nodeRef,omitempty"` + LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` + ErrorReason *machinev1beta1.MachineStatusError `json:"errorReason,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` + Addresses []v1.NodeAddress `json:"addresses,omitempty"` + LastOperation *LastOperationApplyConfiguration `json:"lastOperation,omitempty"` + Phase *string `json:"phase,omitempty"` + Conditions []ConditionApplyConfiguration `json:"conditions,omitempty"` + AuthoritativeAPI *machinev1beta1.MachineAuthority `json:"authoritativeAPI,omitempty"` + SynchronizedGeneration *int64 `json:"synchronizedGeneration,omitempty"` } // MachineStatusApplyConfiguration constructs a declarative configuration of the MachineStatus type for use with @@ -50,7 +50,7 @@ func (b *MachineStatusApplyConfiguration) WithLastUpdated(value metav1.Time) *Ma // WithErrorReason sets the ErrorReason field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ErrorReason field is set to the value of the last call. -func (b *MachineStatusApplyConfiguration) WithErrorReason(value v1beta1.MachineStatusError) *MachineStatusApplyConfiguration { +func (b *MachineStatusApplyConfiguration) WithErrorReason(value machinev1beta1.MachineStatusError) *MachineStatusApplyConfiguration { b.ErrorReason = &value return b } @@ -113,7 +113,7 @@ func (b *MachineStatusApplyConfiguration) WithConditions(values ...*ConditionApp // WithAuthoritativeAPI sets the AuthoritativeAPI field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AuthoritativeAPI field is set to the value of the last call. -func (b *MachineStatusApplyConfiguration) WithAuthoritativeAPI(value v1beta1.MachineAuthority) *MachineStatusApplyConfiguration { +func (b *MachineStatusApplyConfiguration) WithAuthoritativeAPI(value machinev1beta1.MachineAuthority) *MachineStatusApplyConfiguration { b.AuthoritativeAPI = &value return b } diff --git a/machine/applyconfigurations/machine/v1beta1/machinetemplatespec.go b/machine/applyconfigurations/machine/v1beta1/machinetemplatespec.go index 329b999ebd..4045a3d4fe 100644 --- a/machine/applyconfigurations/machine/v1beta1/machinetemplatespec.go +++ b/machine/applyconfigurations/machine/v1beta1/machinetemplatespec.go @@ -24,7 +24,7 @@ func MachineTemplateSpec() *MachineTemplateSpecApplyConfiguration { // If called multiple times, the Name field is set to the value of the last call. func (b *MachineTemplateSpecApplyConfiguration) WithName(value string) *MachineTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -33,7 +33,7 @@ func (b *MachineTemplateSpecApplyConfiguration) WithName(value string) *MachineT // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineTemplateSpecApplyConfiguration) WithGenerateName(value string) *MachineTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -42,7 +42,7 @@ func (b *MachineTemplateSpecApplyConfiguration) WithGenerateName(value string) * // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineTemplateSpecApplyConfiguration) WithNamespace(value string) *MachineTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -52,11 +52,11 @@ func (b *MachineTemplateSpecApplyConfiguration) WithNamespace(value string) *Mac // overwriting an existing map entries in Labels field with the same key. func (b *MachineTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *MachineTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -67,11 +67,11 @@ func (b *MachineTemplateSpecApplyConfiguration) WithLabels(entries map[string]st // overwriting an existing map entries in Annotations field with the same key. func (b *MachineTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *MachineTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -85,7 +85,7 @@ func (b *MachineTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } diff --git a/machine/clientset/versioned/clientset.go b/machine/clientset/versioned/clientset.go index 327fc350f8..dbfaf7d27a 100644 --- a/machine/clientset/versioned/clientset.go +++ b/machine/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" machinev1 "github.com/openshift/client-go/machine/clientset/versioned/typed/machine/v1" machinev1beta1 "github.com/openshift/client-go/machine/clientset/versioned/typed/machine/v1beta1" diff --git a/machine/clientset/versioned/typed/machine/v1/controlplanemachineset.go b/machine/clientset/versioned/typed/machine/v1/controlplanemachineset.go index 97780cbe1e..bd66c772f7 100644 --- a/machine/clientset/versioned/typed/machine/v1/controlplanemachineset.go +++ b/machine/clientset/versioned/typed/machine/v1/controlplanemachineset.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/machine/v1" - machinev1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1" + machinev1 "github.com/openshift/api/machine/v1" + applyconfigurationsmachinev1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1" scheme "github.com/openshift/client-go/machine/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ControlPlaneMachineSetsGetter interface { // ControlPlaneMachineSetInterface has methods to work with ControlPlaneMachineSet resources. type ControlPlaneMachineSetInterface interface { - Create(ctx context.Context, controlPlaneMachineSet *v1.ControlPlaneMachineSet, opts metav1.CreateOptions) (*v1.ControlPlaneMachineSet, error) - Update(ctx context.Context, controlPlaneMachineSet *v1.ControlPlaneMachineSet, opts metav1.UpdateOptions) (*v1.ControlPlaneMachineSet, error) + Create(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSet, opts metav1.CreateOptions) (*machinev1.ControlPlaneMachineSet, error) + Update(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSet, opts metav1.UpdateOptions) (*machinev1.ControlPlaneMachineSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, controlPlaneMachineSet *v1.ControlPlaneMachineSet, opts metav1.UpdateOptions) (*v1.ControlPlaneMachineSet, error) + UpdateStatus(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSet, opts metav1.UpdateOptions) (*machinev1.ControlPlaneMachineSet, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControlPlaneMachineSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ControlPlaneMachineSetList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machinev1.ControlPlaneMachineSet, error) + List(ctx context.Context, opts metav1.ListOptions) (*machinev1.ControlPlaneMachineSetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControlPlaneMachineSet, err error) - Apply(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControlPlaneMachineSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machinev1.ControlPlaneMachineSet, err error) + Apply(ctx context.Context, controlPlaneMachineSet *applyconfigurationsmachinev1.ControlPlaneMachineSetApplyConfiguration, opts metav1.ApplyOptions) (result *machinev1.ControlPlaneMachineSet, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControlPlaneMachineSet, err error) + ApplyStatus(ctx context.Context, controlPlaneMachineSet *applyconfigurationsmachinev1.ControlPlaneMachineSetApplyConfiguration, opts metav1.ApplyOptions) (result *machinev1.ControlPlaneMachineSet, err error) ControlPlaneMachineSetExpansion } // controlPlaneMachineSets implements ControlPlaneMachineSetInterface type controlPlaneMachineSets struct { - *gentype.ClientWithListAndApply[*v1.ControlPlaneMachineSet, *v1.ControlPlaneMachineSetList, *machinev1.ControlPlaneMachineSetApplyConfiguration] + *gentype.ClientWithListAndApply[*machinev1.ControlPlaneMachineSet, *machinev1.ControlPlaneMachineSetList, *applyconfigurationsmachinev1.ControlPlaneMachineSetApplyConfiguration] } // newControlPlaneMachineSets returns a ControlPlaneMachineSets func newControlPlaneMachineSets(c *MachineV1Client, namespace string) *controlPlaneMachineSets { return &controlPlaneMachineSets{ - gentype.NewClientWithListAndApply[*v1.ControlPlaneMachineSet, *v1.ControlPlaneMachineSetList, *machinev1.ControlPlaneMachineSetApplyConfiguration]( + gentype.NewClientWithListAndApply[*machinev1.ControlPlaneMachineSet, *machinev1.ControlPlaneMachineSetList, *applyconfigurationsmachinev1.ControlPlaneMachineSetApplyConfiguration]( "controlplanemachinesets", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.ControlPlaneMachineSet { return &v1.ControlPlaneMachineSet{} }, - func() *v1.ControlPlaneMachineSetList { return &v1.ControlPlaneMachineSetList{} }), + func() *machinev1.ControlPlaneMachineSet { return &machinev1.ControlPlaneMachineSet{} }, + func() *machinev1.ControlPlaneMachineSetList { return &machinev1.ControlPlaneMachineSetList{} }, + ), } } diff --git a/machine/clientset/versioned/typed/machine/v1/fake/fake_controlplanemachineset.go b/machine/clientset/versioned/typed/machine/v1/fake/fake_controlplanemachineset.go index 710b87b0f5..f70c87741c 100644 --- a/machine/clientset/versioned/typed/machine/v1/fake/fake_controlplanemachineset.go +++ b/machine/clientset/versioned/typed/machine/v1/fake/fake_controlplanemachineset.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/machine/v1" machinev1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachinev1 "github.com/openshift/client-go/machine/clientset/versioned/typed/machine/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeControlPlaneMachineSets implements ControlPlaneMachineSetInterface -type FakeControlPlaneMachineSets struct { +// fakeControlPlaneMachineSets implements ControlPlaneMachineSetInterface +type fakeControlPlaneMachineSets struct { + *gentype.FakeClientWithListAndApply[*v1.ControlPlaneMachineSet, *v1.ControlPlaneMachineSetList, *machinev1.ControlPlaneMachineSetApplyConfiguration] Fake *FakeMachineV1 - ns string -} - -var controlplanemachinesetsResource = v1.SchemeGroupVersion.WithResource("controlplanemachinesets") - -var controlplanemachinesetsKind = v1.SchemeGroupVersion.WithKind("ControlPlaneMachineSet") - -// Get takes name of the controlPlaneMachineSet, and returns the corresponding controlPlaneMachineSet object, and an error if there is any. -func (c *FakeControlPlaneMachineSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControlPlaneMachineSet, err error) { - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(controlplanemachinesetsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControlPlaneMachineSet), err -} - -// List takes label and field selectors, and returns the list of ControlPlaneMachineSets that match those selectors. -func (c *FakeControlPlaneMachineSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControlPlaneMachineSetList, err error) { - emptyResult := &v1.ControlPlaneMachineSetList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(controlplanemachinesetsResource, controlplanemachinesetsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ControlPlaneMachineSetList{ListMeta: obj.(*v1.ControlPlaneMachineSetList).ListMeta} - for _, item := range obj.(*v1.ControlPlaneMachineSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested controlPlaneMachineSets. -func (c *FakeControlPlaneMachineSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(controlplanemachinesetsResource, c.ns, opts)) - -} - -// Create takes the representation of a controlPlaneMachineSet and creates it. Returns the server's representation of the controlPlaneMachineSet, and an error, if there is any. -func (c *FakeControlPlaneMachineSets) Create(ctx context.Context, controlPlaneMachineSet *v1.ControlPlaneMachineSet, opts metav1.CreateOptions) (result *v1.ControlPlaneMachineSet, err error) { - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(controlplanemachinesetsResource, c.ns, controlPlaneMachineSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControlPlaneMachineSet), err -} - -// Update takes the representation of a controlPlaneMachineSet and updates it. Returns the server's representation of the controlPlaneMachineSet, and an error, if there is any. -func (c *FakeControlPlaneMachineSets) Update(ctx context.Context, controlPlaneMachineSet *v1.ControlPlaneMachineSet, opts metav1.UpdateOptions) (result *v1.ControlPlaneMachineSet, err error) { - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(controlplanemachinesetsResource, c.ns, controlPlaneMachineSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControlPlaneMachineSet), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeControlPlaneMachineSets) UpdateStatus(ctx context.Context, controlPlaneMachineSet *v1.ControlPlaneMachineSet, opts metav1.UpdateOptions) (result *v1.ControlPlaneMachineSet, err error) { - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(controlplanemachinesetsResource, "status", c.ns, controlPlaneMachineSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControlPlaneMachineSet), err -} - -// Delete takes name of the controlPlaneMachineSet and deletes it. Returns an error if one occurs. -func (c *FakeControlPlaneMachineSets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(controlplanemachinesetsResource, c.ns, name, opts), &v1.ControlPlaneMachineSet{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeControlPlaneMachineSets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(controlplanemachinesetsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ControlPlaneMachineSetList{}) - return err -} - -// Patch applies the patch and returns the patched controlPlaneMachineSet. -func (c *FakeControlPlaneMachineSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControlPlaneMachineSet, err error) { - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(controlplanemachinesetsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControlPlaneMachineSet), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied controlPlaneMachineSet. -func (c *FakeControlPlaneMachineSets) Apply(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControlPlaneMachineSet, err error) { - if controlPlaneMachineSet == nil { - return nil, fmt.Errorf("controlPlaneMachineSet provided to Apply must not be nil") - } - data, err := json.Marshal(controlPlaneMachineSet) - if err != nil { - return nil, err - } - name := controlPlaneMachineSet.Name - if name == nil { - return nil, fmt.Errorf("controlPlaneMachineSet.Name must be provided to Apply") - } - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(controlplanemachinesetsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControlPlaneMachineSet), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeControlPlaneMachineSets) ApplyStatus(ctx context.Context, controlPlaneMachineSet *machinev1.ControlPlaneMachineSetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControlPlaneMachineSet, err error) { - if controlPlaneMachineSet == nil { - return nil, fmt.Errorf("controlPlaneMachineSet provided to Apply must not be nil") - } - data, err := json.Marshal(controlPlaneMachineSet) - if err != nil { - return nil, err - } - name := controlPlaneMachineSet.Name - if name == nil { - return nil, fmt.Errorf("controlPlaneMachineSet.Name must be provided to Apply") - } - emptyResult := &v1.ControlPlaneMachineSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(controlplanemachinesetsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeControlPlaneMachineSets(fake *FakeMachineV1, namespace string) typedmachinev1.ControlPlaneMachineSetInterface { + return &fakeControlPlaneMachineSets{ + gentype.NewFakeClientWithListAndApply[*v1.ControlPlaneMachineSet, *v1.ControlPlaneMachineSetList, *machinev1.ControlPlaneMachineSetApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("controlplanemachinesets"), + v1.SchemeGroupVersion.WithKind("ControlPlaneMachineSet"), + func() *v1.ControlPlaneMachineSet { return &v1.ControlPlaneMachineSet{} }, + func() *v1.ControlPlaneMachineSetList { return &v1.ControlPlaneMachineSetList{} }, + func(dst, src *v1.ControlPlaneMachineSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ControlPlaneMachineSetList) []*v1.ControlPlaneMachineSet { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ControlPlaneMachineSetList, items []*v1.ControlPlaneMachineSet) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ControlPlaneMachineSet), err } diff --git a/machine/clientset/versioned/typed/machine/v1/fake/fake_machine_client.go b/machine/clientset/versioned/typed/machine/v1/fake/fake_machine_client.go index 8e45935458..d78dc16eb8 100644 --- a/machine/clientset/versioned/typed/machine/v1/fake/fake_machine_client.go +++ b/machine/clientset/versioned/typed/machine/v1/fake/fake_machine_client.go @@ -13,7 +13,7 @@ type FakeMachineV1 struct { } func (c *FakeMachineV1) ControlPlaneMachineSets(namespace string) v1.ControlPlaneMachineSetInterface { - return &FakeControlPlaneMachineSets{c, namespace} + return newFakeControlPlaneMachineSets(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/machine/clientset/versioned/typed/machine/v1/machine_client.go b/machine/clientset/versioned/typed/machine/v1/machine_client.go index cc8837e7b3..7b25ef933b 100644 --- a/machine/clientset/versioned/typed/machine/v1/machine_client.go +++ b/machine/clientset/versioned/typed/machine/v1/machine_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/machine/v1" - "github.com/openshift/client-go/machine/clientset/versioned/scheme" + machinev1 "github.com/openshift/api/machine/v1" + scheme "github.com/openshift/client-go/machine/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *MachineV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := machinev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine.go b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine.go index cbc5cfaea0..3659217ade 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine.go @@ -3,179 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1beta1 "github.com/openshift/api/machine/v1beta1" machinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachinev1beta1 "github.com/openshift/client-go/machine/clientset/versioned/typed/machine/v1beta1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachines implements MachineInterface -type FakeMachines struct { +// fakeMachines implements MachineInterface +type fakeMachines struct { + *gentype.FakeClientWithListAndApply[*v1beta1.Machine, *v1beta1.MachineList, *machinev1beta1.MachineApplyConfiguration] Fake *FakeMachineV1beta1 - ns string -} - -var machinesResource = v1beta1.SchemeGroupVersion.WithResource("machines") - -var machinesKind = v1beta1.SchemeGroupVersion.WithKind("Machine") - -// Get takes name of the machine, and returns the corresponding machine object, and an error if there is any. -func (c *FakeMachines) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Machine, err error) { - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(machinesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Machine), err -} - -// List takes label and field selectors, and returns the list of Machines that match those selectors. -func (c *FakeMachines) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MachineList, err error) { - emptyResult := &v1beta1.MachineList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(machinesResource, machinesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.MachineList{ListMeta: obj.(*v1beta1.MachineList).ListMeta} - for _, item := range obj.(*v1beta1.MachineList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machines. -func (c *FakeMachines) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(machinesResource, c.ns, opts)) - -} - -// Create takes the representation of a machine and creates it. Returns the server's representation of the machine, and an error, if there is any. -func (c *FakeMachines) Create(ctx context.Context, machine *v1beta1.Machine, opts v1.CreateOptions) (result *v1beta1.Machine, err error) { - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(machinesResource, c.ns, machine, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Machine), err -} - -// Update takes the representation of a machine and updates it. Returns the server's representation of the machine, and an error, if there is any. -func (c *FakeMachines) Update(ctx context.Context, machine *v1beta1.Machine, opts v1.UpdateOptions) (result *v1beta1.Machine, err error) { - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(machinesResource, c.ns, machine, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Machine), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachines) UpdateStatus(ctx context.Context, machine *v1beta1.Machine, opts v1.UpdateOptions) (result *v1beta1.Machine, err error) { - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(machinesResource, "status", c.ns, machine, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Machine), err -} - -// Delete takes name of the machine and deletes it. Returns an error if one occurs. -func (c *FakeMachines) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(machinesResource, c.ns, name, opts), &v1beta1.Machine{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachines) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(machinesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.MachineList{}) - return err -} - -// Patch applies the patch and returns the patched machine. -func (c *FakeMachines) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Machine, err error) { - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Machine), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machine. -func (c *FakeMachines) Apply(ctx context.Context, machine *machinev1beta1.MachineApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Machine, err error) { - if machine == nil { - return nil, fmt.Errorf("machine provided to Apply must not be nil") - } - data, err := json.Marshal(machine) - if err != nil { - return nil, err - } - name := machine.Name - if name == nil { - return nil, fmt.Errorf("machine.Name must be provided to Apply") - } - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.Machine), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachines) ApplyStatus(ctx context.Context, machine *machinev1beta1.MachineApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Machine, err error) { - if machine == nil { - return nil, fmt.Errorf("machine provided to Apply must not be nil") - } - data, err := json.Marshal(machine) - if err != nil { - return nil, err - } - name := machine.Name - if name == nil { - return nil, fmt.Errorf("machine.Name must be provided to Apply") - } - emptyResult := &v1beta1.Machine{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeMachines(fake *FakeMachineV1beta1, namespace string) typedmachinev1beta1.MachineInterface { + return &fakeMachines{ + gentype.NewFakeClientWithListAndApply[*v1beta1.Machine, *v1beta1.MachineList, *machinev1beta1.MachineApplyConfiguration]( + fake.Fake, + namespace, + v1beta1.SchemeGroupVersion.WithResource("machines"), + v1beta1.SchemeGroupVersion.WithKind("Machine"), + func() *v1beta1.Machine { return &v1beta1.Machine{} }, + func() *v1beta1.MachineList { return &v1beta1.MachineList{} }, + func(dst, src *v1beta1.MachineList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.MachineList) []*v1beta1.Machine { return gentype.ToPointerSlice(list.Items) }, + func(list *v1beta1.MachineList, items []*v1beta1.Machine) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.Machine), err } diff --git a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine_client.go b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine_client.go index f6dd022d40..205fe6f8a1 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine_client.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machine_client.go @@ -13,15 +13,15 @@ type FakeMachineV1beta1 struct { } func (c *FakeMachineV1beta1) Machines(namespace string) v1beta1.MachineInterface { - return &FakeMachines{c, namespace} + return newFakeMachines(c, namespace) } func (c *FakeMachineV1beta1) MachineHealthChecks(namespace string) v1beta1.MachineHealthCheckInterface { - return &FakeMachineHealthChecks{c, namespace} + return newFakeMachineHealthChecks(c, namespace) } func (c *FakeMachineV1beta1) MachineSets(namespace string) v1beta1.MachineSetInterface { - return &FakeMachineSets{c, namespace} + return newFakeMachineSets(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machinehealthcheck.go b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machinehealthcheck.go index e8394abacf..eccd715dd6 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machinehealthcheck.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machinehealthcheck.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1beta1 "github.com/openshift/api/machine/v1beta1" machinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachinev1beta1 "github.com/openshift/client-go/machine/clientset/versioned/typed/machine/v1beta1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineHealthChecks implements MachineHealthCheckInterface -type FakeMachineHealthChecks struct { +// fakeMachineHealthChecks implements MachineHealthCheckInterface +type fakeMachineHealthChecks struct { + *gentype.FakeClientWithListAndApply[*v1beta1.MachineHealthCheck, *v1beta1.MachineHealthCheckList, *machinev1beta1.MachineHealthCheckApplyConfiguration] Fake *FakeMachineV1beta1 - ns string -} - -var machinehealthchecksResource = v1beta1.SchemeGroupVersion.WithResource("machinehealthchecks") - -var machinehealthchecksKind = v1beta1.SchemeGroupVersion.WithKind("MachineHealthCheck") - -// Get takes name of the machineHealthCheck, and returns the corresponding machineHealthCheck object, and an error if there is any. -func (c *FakeMachineHealthChecks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MachineHealthCheck, err error) { - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(machinehealthchecksResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineHealthCheck), err -} - -// List takes label and field selectors, and returns the list of MachineHealthChecks that match those selectors. -func (c *FakeMachineHealthChecks) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MachineHealthCheckList, err error) { - emptyResult := &v1beta1.MachineHealthCheckList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(machinehealthchecksResource, machinehealthchecksKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.MachineHealthCheckList{ListMeta: obj.(*v1beta1.MachineHealthCheckList).ListMeta} - for _, item := range obj.(*v1beta1.MachineHealthCheckList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineHealthChecks. -func (c *FakeMachineHealthChecks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(machinehealthchecksResource, c.ns, opts)) - -} - -// Create takes the representation of a machineHealthCheck and creates it. Returns the server's representation of the machineHealthCheck, and an error, if there is any. -func (c *FakeMachineHealthChecks) Create(ctx context.Context, machineHealthCheck *v1beta1.MachineHealthCheck, opts v1.CreateOptions) (result *v1beta1.MachineHealthCheck, err error) { - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(machinehealthchecksResource, c.ns, machineHealthCheck, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineHealthCheck), err -} - -// Update takes the representation of a machineHealthCheck and updates it. Returns the server's representation of the machineHealthCheck, and an error, if there is any. -func (c *FakeMachineHealthChecks) Update(ctx context.Context, machineHealthCheck *v1beta1.MachineHealthCheck, opts v1.UpdateOptions) (result *v1beta1.MachineHealthCheck, err error) { - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(machinehealthchecksResource, c.ns, machineHealthCheck, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineHealthCheck), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineHealthChecks) UpdateStatus(ctx context.Context, machineHealthCheck *v1beta1.MachineHealthCheck, opts v1.UpdateOptions) (result *v1beta1.MachineHealthCheck, err error) { - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(machinehealthchecksResource, "status", c.ns, machineHealthCheck, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineHealthCheck), err -} - -// Delete takes name of the machineHealthCheck and deletes it. Returns an error if one occurs. -func (c *FakeMachineHealthChecks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(machinehealthchecksResource, c.ns, name, opts), &v1beta1.MachineHealthCheck{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineHealthChecks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(machinehealthchecksResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.MachineHealthCheckList{}) - return err -} - -// Patch applies the patch and returns the patched machineHealthCheck. -func (c *FakeMachineHealthChecks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MachineHealthCheck, err error) { - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinehealthchecksResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineHealthCheck), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineHealthCheck. -func (c *FakeMachineHealthChecks) Apply(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineHealthCheck, err error) { - if machineHealthCheck == nil { - return nil, fmt.Errorf("machineHealthCheck provided to Apply must not be nil") - } - data, err := json.Marshal(machineHealthCheck) - if err != nil { - return nil, err - } - name := machineHealthCheck.Name - if name == nil { - return nil, fmt.Errorf("machineHealthCheck.Name must be provided to Apply") - } - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinehealthchecksResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineHealthCheck), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineHealthChecks) ApplyStatus(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineHealthCheck, err error) { - if machineHealthCheck == nil { - return nil, fmt.Errorf("machineHealthCheck provided to Apply must not be nil") - } - data, err := json.Marshal(machineHealthCheck) - if err != nil { - return nil, err - } - name := machineHealthCheck.Name - if name == nil { - return nil, fmt.Errorf("machineHealthCheck.Name must be provided to Apply") - } - emptyResult := &v1beta1.MachineHealthCheck{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinehealthchecksResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeMachineHealthChecks(fake *FakeMachineV1beta1, namespace string) typedmachinev1beta1.MachineHealthCheckInterface { + return &fakeMachineHealthChecks{ + gentype.NewFakeClientWithListAndApply[*v1beta1.MachineHealthCheck, *v1beta1.MachineHealthCheckList, *machinev1beta1.MachineHealthCheckApplyConfiguration]( + fake.Fake, + namespace, + v1beta1.SchemeGroupVersion.WithResource("machinehealthchecks"), + v1beta1.SchemeGroupVersion.WithKind("MachineHealthCheck"), + func() *v1beta1.MachineHealthCheck { return &v1beta1.MachineHealthCheck{} }, + func() *v1beta1.MachineHealthCheckList { return &v1beta1.MachineHealthCheckList{} }, + func(dst, src *v1beta1.MachineHealthCheckList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.MachineHealthCheckList) []*v1beta1.MachineHealthCheck { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1beta1.MachineHealthCheckList, items []*v1beta1.MachineHealthCheck) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.MachineHealthCheck), err } diff --git a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machineset.go b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machineset.go index 829683c5a5..43b196ff2a 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machineset.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/fake/fake_machineset.go @@ -3,179 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1beta1 "github.com/openshift/api/machine/v1beta1" machinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachinev1beta1 "github.com/openshift/client-go/machine/clientset/versioned/typed/machine/v1beta1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineSets implements MachineSetInterface -type FakeMachineSets struct { +// fakeMachineSets implements MachineSetInterface +type fakeMachineSets struct { + *gentype.FakeClientWithListAndApply[*v1beta1.MachineSet, *v1beta1.MachineSetList, *machinev1beta1.MachineSetApplyConfiguration] Fake *FakeMachineV1beta1 - ns string -} - -var machinesetsResource = v1beta1.SchemeGroupVersion.WithResource("machinesets") - -var machinesetsKind = v1beta1.SchemeGroupVersion.WithKind("MachineSet") - -// Get takes name of the machineSet, and returns the corresponding machineSet object, and an error if there is any. -func (c *FakeMachineSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MachineSet, err error) { - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(machinesetsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineSet), err -} - -// List takes label and field selectors, and returns the list of MachineSets that match those selectors. -func (c *FakeMachineSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MachineSetList, err error) { - emptyResult := &v1beta1.MachineSetList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(machinesetsResource, machinesetsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1beta1.MachineSetList{ListMeta: obj.(*v1beta1.MachineSetList).ListMeta} - for _, item := range obj.(*v1beta1.MachineSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineSets. -func (c *FakeMachineSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(machinesetsResource, c.ns, opts)) - -} - -// Create takes the representation of a machineSet and creates it. Returns the server's representation of the machineSet, and an error, if there is any. -func (c *FakeMachineSets) Create(ctx context.Context, machineSet *v1beta1.MachineSet, opts v1.CreateOptions) (result *v1beta1.MachineSet, err error) { - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(machinesetsResource, c.ns, machineSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineSet), err -} - -// Update takes the representation of a machineSet and updates it. Returns the server's representation of the machineSet, and an error, if there is any. -func (c *FakeMachineSets) Update(ctx context.Context, machineSet *v1beta1.MachineSet, opts v1.UpdateOptions) (result *v1beta1.MachineSet, err error) { - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(machinesetsResource, c.ns, machineSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineSet), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineSets) UpdateStatus(ctx context.Context, machineSet *v1beta1.MachineSet, opts v1.UpdateOptions) (result *v1beta1.MachineSet, err error) { - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(machinesetsResource, "status", c.ns, machineSet, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineSet), err -} - -// Delete takes name of the machineSet and deletes it. Returns an error if one occurs. -func (c *FakeMachineSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(machinesetsResource, c.ns, name, opts), &v1beta1.MachineSet{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(machinesetsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1beta1.MachineSetList{}) - return err -} - -// Patch applies the patch and returns the patched machineSet. -func (c *FakeMachineSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MachineSet, err error) { - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinesetsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineSet), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineSet. -func (c *FakeMachineSets) Apply(ctx context.Context, machineSet *machinev1beta1.MachineSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineSet, err error) { - if machineSet == nil { - return nil, fmt.Errorf("machineSet provided to Apply must not be nil") - } - data, err := json.Marshal(machineSet) - if err != nil { - return nil, err - } - name := machineSet.Name - if name == nil { - return nil, fmt.Errorf("machineSet.Name must be provided to Apply") - } - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinesetsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1beta1.MachineSet), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineSets) ApplyStatus(ctx context.Context, machineSet *machinev1beta1.MachineSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineSet, err error) { - if machineSet == nil { - return nil, fmt.Errorf("machineSet provided to Apply must not be nil") - } - data, err := json.Marshal(machineSet) - if err != nil { - return nil, err - } - name := machineSet.Name - if name == nil { - return nil, fmt.Errorf("machineSet.Name must be provided to Apply") - } - emptyResult := &v1beta1.MachineSet{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(machinesetsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeMachineSets(fake *FakeMachineV1beta1, namespace string) typedmachinev1beta1.MachineSetInterface { + return &fakeMachineSets{ + gentype.NewFakeClientWithListAndApply[*v1beta1.MachineSet, *v1beta1.MachineSetList, *machinev1beta1.MachineSetApplyConfiguration]( + fake.Fake, + namespace, + v1beta1.SchemeGroupVersion.WithResource("machinesets"), + v1beta1.SchemeGroupVersion.WithKind("MachineSet"), + func() *v1beta1.MachineSet { return &v1beta1.MachineSet{} }, + func() *v1beta1.MachineSetList { return &v1beta1.MachineSetList{} }, + func(dst, src *v1beta1.MachineSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1beta1.MachineSetList) []*v1beta1.MachineSet { return gentype.ToPointerSlice(list.Items) }, + func(list *v1beta1.MachineSetList, items []*v1beta1.MachineSet) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1beta1.MachineSet), err } diff --git a/machine/clientset/versioned/typed/machine/v1beta1/machine.go b/machine/clientset/versioned/typed/machine/v1beta1/machine.go index 7f48011a09..f847751c4e 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/machine.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/machine.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/openshift/api/machine/v1beta1" - machinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + applyconfigurationsmachinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" scheme "github.com/openshift/client-go/machine/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type MachinesGetter interface { // MachineInterface has methods to work with Machine resources. type MachineInterface interface { - Create(ctx context.Context, machine *v1beta1.Machine, opts v1.CreateOptions) (*v1beta1.Machine, error) - Update(ctx context.Context, machine *v1beta1.Machine, opts v1.UpdateOptions) (*v1beta1.Machine, error) + Create(ctx context.Context, machine *machinev1beta1.Machine, opts v1.CreateOptions) (*machinev1beta1.Machine, error) + Update(ctx context.Context, machine *machinev1beta1.Machine, opts v1.UpdateOptions) (*machinev1beta1.Machine, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machine *v1beta1.Machine, opts v1.UpdateOptions) (*v1beta1.Machine, error) + UpdateStatus(ctx context.Context, machine *machinev1beta1.Machine, opts v1.UpdateOptions) (*machinev1beta1.Machine, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Machine, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MachineList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machinev1beta1.Machine, error) + List(ctx context.Context, opts v1.ListOptions) (*machinev1beta1.MachineList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Machine, err error) - Apply(ctx context.Context, machine *machinev1beta1.MachineApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Machine, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machinev1beta1.Machine, err error) + Apply(ctx context.Context, machine *applyconfigurationsmachinev1beta1.MachineApplyConfiguration, opts v1.ApplyOptions) (result *machinev1beta1.Machine, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machine *machinev1beta1.MachineApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Machine, err error) + ApplyStatus(ctx context.Context, machine *applyconfigurationsmachinev1beta1.MachineApplyConfiguration, opts v1.ApplyOptions) (result *machinev1beta1.Machine, err error) MachineExpansion } // machines implements MachineInterface type machines struct { - *gentype.ClientWithListAndApply[*v1beta1.Machine, *v1beta1.MachineList, *machinev1beta1.MachineApplyConfiguration] + *gentype.ClientWithListAndApply[*machinev1beta1.Machine, *machinev1beta1.MachineList, *applyconfigurationsmachinev1beta1.MachineApplyConfiguration] } // newMachines returns a Machines func newMachines(c *MachineV1beta1Client, namespace string) *machines { return &machines{ - gentype.NewClientWithListAndApply[*v1beta1.Machine, *v1beta1.MachineList, *machinev1beta1.MachineApplyConfiguration]( + gentype.NewClientWithListAndApply[*machinev1beta1.Machine, *machinev1beta1.MachineList, *applyconfigurationsmachinev1beta1.MachineApplyConfiguration]( "machines", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.Machine { return &v1beta1.Machine{} }, - func() *v1beta1.MachineList { return &v1beta1.MachineList{} }), + func() *machinev1beta1.Machine { return &machinev1beta1.Machine{} }, + func() *machinev1beta1.MachineList { return &machinev1beta1.MachineList{} }, + ), } } diff --git a/machine/clientset/versioned/typed/machine/v1beta1/machine_client.go b/machine/clientset/versioned/typed/machine/v1beta1/machine_client.go index 0ccff6258e..d9bea82ebb 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/machine_client.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/machine_client.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "net/http" + http "net/http" - v1beta1 "github.com/openshift/api/machine/v1beta1" - "github.com/openshift/client-go/machine/clientset/versioned/scheme" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + scheme "github.com/openshift/client-go/machine/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -79,10 +79,10 @@ func New(c rest.Interface) *MachineV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := machinev1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/machine/clientset/versioned/typed/machine/v1beta1/machinehealthcheck.go b/machine/clientset/versioned/typed/machine/v1beta1/machinehealthcheck.go index 88eca73248..14900f1092 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/machinehealthcheck.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/machinehealthcheck.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/openshift/api/machine/v1beta1" - machinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + applyconfigurationsmachinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" scheme "github.com/openshift/client-go/machine/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type MachineHealthChecksGetter interface { // MachineHealthCheckInterface has methods to work with MachineHealthCheck resources. type MachineHealthCheckInterface interface { - Create(ctx context.Context, machineHealthCheck *v1beta1.MachineHealthCheck, opts v1.CreateOptions) (*v1beta1.MachineHealthCheck, error) - Update(ctx context.Context, machineHealthCheck *v1beta1.MachineHealthCheck, opts v1.UpdateOptions) (*v1beta1.MachineHealthCheck, error) + Create(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheck, opts v1.CreateOptions) (*machinev1beta1.MachineHealthCheck, error) + Update(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheck, opts v1.UpdateOptions) (*machinev1beta1.MachineHealthCheck, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineHealthCheck *v1beta1.MachineHealthCheck, opts v1.UpdateOptions) (*v1beta1.MachineHealthCheck, error) + UpdateStatus(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheck, opts v1.UpdateOptions) (*machinev1beta1.MachineHealthCheck, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MachineHealthCheck, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MachineHealthCheckList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machinev1beta1.MachineHealthCheck, error) + List(ctx context.Context, opts v1.ListOptions) (*machinev1beta1.MachineHealthCheckList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MachineHealthCheck, err error) - Apply(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineHealthCheck, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machinev1beta1.MachineHealthCheck, err error) + Apply(ctx context.Context, machineHealthCheck *applyconfigurationsmachinev1beta1.MachineHealthCheckApplyConfiguration, opts v1.ApplyOptions) (result *machinev1beta1.MachineHealthCheck, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineHealthCheck *machinev1beta1.MachineHealthCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineHealthCheck, err error) + ApplyStatus(ctx context.Context, machineHealthCheck *applyconfigurationsmachinev1beta1.MachineHealthCheckApplyConfiguration, opts v1.ApplyOptions) (result *machinev1beta1.MachineHealthCheck, err error) MachineHealthCheckExpansion } // machineHealthChecks implements MachineHealthCheckInterface type machineHealthChecks struct { - *gentype.ClientWithListAndApply[*v1beta1.MachineHealthCheck, *v1beta1.MachineHealthCheckList, *machinev1beta1.MachineHealthCheckApplyConfiguration] + *gentype.ClientWithListAndApply[*machinev1beta1.MachineHealthCheck, *machinev1beta1.MachineHealthCheckList, *applyconfigurationsmachinev1beta1.MachineHealthCheckApplyConfiguration] } // newMachineHealthChecks returns a MachineHealthChecks func newMachineHealthChecks(c *MachineV1beta1Client, namespace string) *machineHealthChecks { return &machineHealthChecks{ - gentype.NewClientWithListAndApply[*v1beta1.MachineHealthCheck, *v1beta1.MachineHealthCheckList, *machinev1beta1.MachineHealthCheckApplyConfiguration]( + gentype.NewClientWithListAndApply[*machinev1beta1.MachineHealthCheck, *machinev1beta1.MachineHealthCheckList, *applyconfigurationsmachinev1beta1.MachineHealthCheckApplyConfiguration]( "machinehealthchecks", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.MachineHealthCheck { return &v1beta1.MachineHealthCheck{} }, - func() *v1beta1.MachineHealthCheckList { return &v1beta1.MachineHealthCheckList{} }), + func() *machinev1beta1.MachineHealthCheck { return &machinev1beta1.MachineHealthCheck{} }, + func() *machinev1beta1.MachineHealthCheckList { return &machinev1beta1.MachineHealthCheckList{} }, + ), } } diff --git a/machine/clientset/versioned/typed/machine/v1beta1/machineset.go b/machine/clientset/versioned/typed/machine/v1beta1/machineset.go index 34fd55b9de..070c0df768 100644 --- a/machine/clientset/versioned/typed/machine/v1beta1/machineset.go +++ b/machine/clientset/versioned/typed/machine/v1beta1/machineset.go @@ -3,10 +3,10 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/openshift/api/machine/v1beta1" - machinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + applyconfigurationsmachinev1beta1 "github.com/openshift/client-go/machine/applyconfigurations/machine/v1beta1" scheme "github.com/openshift/client-go/machine/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type MachineSetsGetter interface { // MachineSetInterface has methods to work with MachineSet resources. type MachineSetInterface interface { - Create(ctx context.Context, machineSet *v1beta1.MachineSet, opts v1.CreateOptions) (*v1beta1.MachineSet, error) - Update(ctx context.Context, machineSet *v1beta1.MachineSet, opts v1.UpdateOptions) (*v1beta1.MachineSet, error) + Create(ctx context.Context, machineSet *machinev1beta1.MachineSet, opts v1.CreateOptions) (*machinev1beta1.MachineSet, error) + Update(ctx context.Context, machineSet *machinev1beta1.MachineSet, opts v1.UpdateOptions) (*machinev1beta1.MachineSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineSet *v1beta1.MachineSet, opts v1.UpdateOptions) (*v1beta1.MachineSet, error) + UpdateStatus(ctx context.Context, machineSet *machinev1beta1.MachineSet, opts v1.UpdateOptions) (*machinev1beta1.MachineSet, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MachineSet, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MachineSetList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machinev1beta1.MachineSet, error) + List(ctx context.Context, opts v1.ListOptions) (*machinev1beta1.MachineSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MachineSet, err error) - Apply(ctx context.Context, machineSet *machinev1beta1.MachineSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machinev1beta1.MachineSet, err error) + Apply(ctx context.Context, machineSet *applyconfigurationsmachinev1beta1.MachineSetApplyConfiguration, opts v1.ApplyOptions) (result *machinev1beta1.MachineSet, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineSet *machinev1beta1.MachineSetApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.MachineSet, err error) + ApplyStatus(ctx context.Context, machineSet *applyconfigurationsmachinev1beta1.MachineSetApplyConfiguration, opts v1.ApplyOptions) (result *machinev1beta1.MachineSet, err error) MachineSetExpansion } // machineSets implements MachineSetInterface type machineSets struct { - *gentype.ClientWithListAndApply[*v1beta1.MachineSet, *v1beta1.MachineSetList, *machinev1beta1.MachineSetApplyConfiguration] + *gentype.ClientWithListAndApply[*machinev1beta1.MachineSet, *machinev1beta1.MachineSetList, *applyconfigurationsmachinev1beta1.MachineSetApplyConfiguration] } // newMachineSets returns a MachineSets func newMachineSets(c *MachineV1beta1Client, namespace string) *machineSets { return &machineSets{ - gentype.NewClientWithListAndApply[*v1beta1.MachineSet, *v1beta1.MachineSetList, *machinev1beta1.MachineSetApplyConfiguration]( + gentype.NewClientWithListAndApply[*machinev1beta1.MachineSet, *machinev1beta1.MachineSetList, *applyconfigurationsmachinev1beta1.MachineSetApplyConfiguration]( "machinesets", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.MachineSet { return &v1beta1.MachineSet{} }, - func() *v1beta1.MachineSetList { return &v1beta1.MachineSetList{} }), + func() *machinev1beta1.MachineSet { return &machinev1beta1.MachineSet{} }, + func() *machinev1beta1.MachineSetList { return &machinev1beta1.MachineSetList{} }, + ), } } diff --git a/machine/informers/externalversions/generic.go b/machine/informers/externalversions/generic.go index 8e1118040c..fdb4d37f98 100644 --- a/machine/informers/externalversions/generic.go +++ b/machine/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/machine/v1" v1beta1 "github.com/openshift/api/machine/v1beta1" diff --git a/machine/informers/externalversions/machine/v1/controlplanemachineset.go b/machine/informers/externalversions/machine/v1/controlplanemachineset.go index 04a67838cb..1877db8a56 100644 --- a/machine/informers/externalversions/machine/v1/controlplanemachineset.go +++ b/machine/informers/externalversions/machine/v1/controlplanemachineset.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - machinev1 "github.com/openshift/api/machine/v1" + apimachinev1 "github.com/openshift/api/machine/v1" versioned "github.com/openshift/client-go/machine/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machine/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/machine/listers/machine/v1" + machinev1 "github.com/openshift/client-go/machine/listers/machine/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ControlPlaneMachineSets. type ControlPlaneMachineSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ControlPlaneMachineSetLister + Lister() machinev1.ControlPlaneMachineSetLister } type controlPlaneMachineSetInformer struct { @@ -55,7 +55,7 @@ func NewFilteredControlPlaneMachineSetInformer(client versioned.Interface, names return client.MachineV1().ControlPlaneMachineSets(namespace).Watch(context.TODO(), options) }, }, - &machinev1.ControlPlaneMachineSet{}, + &apimachinev1.ControlPlaneMachineSet{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *controlPlaneMachineSetInformer) defaultInformer(client versioned.Interf } func (f *controlPlaneMachineSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machinev1.ControlPlaneMachineSet{}, f.defaultInformer) + return f.factory.InformerFor(&apimachinev1.ControlPlaneMachineSet{}, f.defaultInformer) } -func (f *controlPlaneMachineSetInformer) Lister() v1.ControlPlaneMachineSetLister { - return v1.NewControlPlaneMachineSetLister(f.Informer().GetIndexer()) +func (f *controlPlaneMachineSetInformer) Lister() machinev1.ControlPlaneMachineSetLister { + return machinev1.NewControlPlaneMachineSetLister(f.Informer().GetIndexer()) } diff --git a/machine/informers/externalversions/machine/v1beta1/machine.go b/machine/informers/externalversions/machine/v1beta1/machine.go index c943acffb7..dd649d2ebc 100644 --- a/machine/informers/externalversions/machine/v1beta1/machine.go +++ b/machine/informers/externalversions/machine/v1beta1/machine.go @@ -3,13 +3,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - machinev1beta1 "github.com/openshift/api/machine/v1beta1" + apimachinev1beta1 "github.com/openshift/api/machine/v1beta1" versioned "github.com/openshift/client-go/machine/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machine/informers/externalversions/internalinterfaces" - v1beta1 "github.com/openshift/client-go/machine/listers/machine/v1beta1" + machinev1beta1 "github.com/openshift/client-go/machine/listers/machine/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Machines. type MachineInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.MachineLister + Lister() machinev1beta1.MachineLister } type machineInformer struct { @@ -55,7 +55,7 @@ func NewFilteredMachineInformer(client versioned.Interface, namespace string, re return client.MachineV1beta1().Machines(namespace).Watch(context.TODO(), options) }, }, - &machinev1beta1.Machine{}, + &apimachinev1beta1.Machine{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *machineInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *machineInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machinev1beta1.Machine{}, f.defaultInformer) + return f.factory.InformerFor(&apimachinev1beta1.Machine{}, f.defaultInformer) } -func (f *machineInformer) Lister() v1beta1.MachineLister { - return v1beta1.NewMachineLister(f.Informer().GetIndexer()) +func (f *machineInformer) Lister() machinev1beta1.MachineLister { + return machinev1beta1.NewMachineLister(f.Informer().GetIndexer()) } diff --git a/machine/informers/externalversions/machine/v1beta1/machinehealthcheck.go b/machine/informers/externalversions/machine/v1beta1/machinehealthcheck.go index 534bcb3730..82d2882558 100644 --- a/machine/informers/externalversions/machine/v1beta1/machinehealthcheck.go +++ b/machine/informers/externalversions/machine/v1beta1/machinehealthcheck.go @@ -3,13 +3,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - machinev1beta1 "github.com/openshift/api/machine/v1beta1" + apimachinev1beta1 "github.com/openshift/api/machine/v1beta1" versioned "github.com/openshift/client-go/machine/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machine/informers/externalversions/internalinterfaces" - v1beta1 "github.com/openshift/client-go/machine/listers/machine/v1beta1" + machinev1beta1 "github.com/openshift/client-go/machine/listers/machine/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineHealthChecks. type MachineHealthCheckInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.MachineHealthCheckLister + Lister() machinev1beta1.MachineHealthCheckLister } type machineHealthCheckInformer struct { @@ -55,7 +55,7 @@ func NewFilteredMachineHealthCheckInformer(client versioned.Interface, namespace return client.MachineV1beta1().MachineHealthChecks(namespace).Watch(context.TODO(), options) }, }, - &machinev1beta1.MachineHealthCheck{}, + &apimachinev1beta1.MachineHealthCheck{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *machineHealthCheckInformer) defaultInformer(client versioned.Interface, } func (f *machineHealthCheckInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machinev1beta1.MachineHealthCheck{}, f.defaultInformer) + return f.factory.InformerFor(&apimachinev1beta1.MachineHealthCheck{}, f.defaultInformer) } -func (f *machineHealthCheckInformer) Lister() v1beta1.MachineHealthCheckLister { - return v1beta1.NewMachineHealthCheckLister(f.Informer().GetIndexer()) +func (f *machineHealthCheckInformer) Lister() machinev1beta1.MachineHealthCheckLister { + return machinev1beta1.NewMachineHealthCheckLister(f.Informer().GetIndexer()) } diff --git a/machine/informers/externalversions/machine/v1beta1/machineset.go b/machine/informers/externalversions/machine/v1beta1/machineset.go index 62ffcfbc55..8e7d67f875 100644 --- a/machine/informers/externalversions/machine/v1beta1/machineset.go +++ b/machine/informers/externalversions/machine/v1beta1/machineset.go @@ -3,13 +3,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - machinev1beta1 "github.com/openshift/api/machine/v1beta1" + apimachinev1beta1 "github.com/openshift/api/machine/v1beta1" versioned "github.com/openshift/client-go/machine/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machine/informers/externalversions/internalinterfaces" - v1beta1 "github.com/openshift/client-go/machine/listers/machine/v1beta1" + machinev1beta1 "github.com/openshift/client-go/machine/listers/machine/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineSets. type MachineSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.MachineSetLister + Lister() machinev1beta1.MachineSetLister } type machineSetInformer struct { @@ -55,7 +55,7 @@ func NewFilteredMachineSetInformer(client versioned.Interface, namespace string, return client.MachineV1beta1().MachineSets(namespace).Watch(context.TODO(), options) }, }, - &machinev1beta1.MachineSet{}, + &apimachinev1beta1.MachineSet{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *machineSetInformer) defaultInformer(client versioned.Interface, resyncP } func (f *machineSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machinev1beta1.MachineSet{}, f.defaultInformer) + return f.factory.InformerFor(&apimachinev1beta1.MachineSet{}, f.defaultInformer) } -func (f *machineSetInformer) Lister() v1beta1.MachineSetLister { - return v1beta1.NewMachineSetLister(f.Informer().GetIndexer()) +func (f *machineSetInformer) Lister() machinev1beta1.MachineSetLister { + return machinev1beta1.NewMachineSetLister(f.Informer().GetIndexer()) } diff --git a/machine/listers/machine/v1/controlplanemachineset.go b/machine/listers/machine/v1/controlplanemachineset.go index 10d5958104..2eda554cb4 100644 --- a/machine/listers/machine/v1/controlplanemachineset.go +++ b/machine/listers/machine/v1/controlplanemachineset.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/machine/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machinev1 "github.com/openshift/api/machine/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ControlPlaneMachineSetLister helps list ControlPlaneMachineSets. @@ -14,7 +14,7 @@ import ( type ControlPlaneMachineSetLister interface { // List lists all ControlPlaneMachineSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ControlPlaneMachineSet, err error) + List(selector labels.Selector) (ret []*machinev1.ControlPlaneMachineSet, err error) // ControlPlaneMachineSets returns an object that can list and get ControlPlaneMachineSets. ControlPlaneMachineSets(namespace string) ControlPlaneMachineSetNamespaceLister ControlPlaneMachineSetListerExpansion @@ -22,17 +22,17 @@ type ControlPlaneMachineSetLister interface { // controlPlaneMachineSetLister implements the ControlPlaneMachineSetLister interface. type controlPlaneMachineSetLister struct { - listers.ResourceIndexer[*v1.ControlPlaneMachineSet] + listers.ResourceIndexer[*machinev1.ControlPlaneMachineSet] } // NewControlPlaneMachineSetLister returns a new ControlPlaneMachineSetLister. func NewControlPlaneMachineSetLister(indexer cache.Indexer) ControlPlaneMachineSetLister { - return &controlPlaneMachineSetLister{listers.New[*v1.ControlPlaneMachineSet](indexer, v1.Resource("controlplanemachineset"))} + return &controlPlaneMachineSetLister{listers.New[*machinev1.ControlPlaneMachineSet](indexer, machinev1.Resource("controlplanemachineset"))} } // ControlPlaneMachineSets returns an object that can list and get ControlPlaneMachineSets. func (s *controlPlaneMachineSetLister) ControlPlaneMachineSets(namespace string) ControlPlaneMachineSetNamespaceLister { - return controlPlaneMachineSetNamespaceLister{listers.NewNamespaced[*v1.ControlPlaneMachineSet](s.ResourceIndexer, namespace)} + return controlPlaneMachineSetNamespaceLister{listers.NewNamespaced[*machinev1.ControlPlaneMachineSet](s.ResourceIndexer, namespace)} } // ControlPlaneMachineSetNamespaceLister helps list and get ControlPlaneMachineSets. @@ -40,15 +40,15 @@ func (s *controlPlaneMachineSetLister) ControlPlaneMachineSets(namespace string) type ControlPlaneMachineSetNamespaceLister interface { // List lists all ControlPlaneMachineSets in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ControlPlaneMachineSet, err error) + List(selector labels.Selector) (ret []*machinev1.ControlPlaneMachineSet, err error) // Get retrieves the ControlPlaneMachineSet from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ControlPlaneMachineSet, error) + Get(name string) (*machinev1.ControlPlaneMachineSet, error) ControlPlaneMachineSetNamespaceListerExpansion } // controlPlaneMachineSetNamespaceLister implements the ControlPlaneMachineSetNamespaceLister // interface. type controlPlaneMachineSetNamespaceLister struct { - listers.ResourceIndexer[*v1.ControlPlaneMachineSet] + listers.ResourceIndexer[*machinev1.ControlPlaneMachineSet] } diff --git a/machine/listers/machine/v1beta1/machine.go b/machine/listers/machine/v1beta1/machine.go index 08cd965e32..9ac5d3c0ab 100644 --- a/machine/listers/machine/v1beta1/machine.go +++ b/machine/listers/machine/v1beta1/machine.go @@ -3,10 +3,10 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/machine/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineLister helps list Machines. @@ -14,7 +14,7 @@ import ( type MachineLister interface { // List lists all Machines in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.Machine, err error) + List(selector labels.Selector) (ret []*machinev1beta1.Machine, err error) // Machines returns an object that can list and get Machines. Machines(namespace string) MachineNamespaceLister MachineListerExpansion @@ -22,17 +22,17 @@ type MachineLister interface { // machineLister implements the MachineLister interface. type machineLister struct { - listers.ResourceIndexer[*v1beta1.Machine] + listers.ResourceIndexer[*machinev1beta1.Machine] } // NewMachineLister returns a new MachineLister. func NewMachineLister(indexer cache.Indexer) MachineLister { - return &machineLister{listers.New[*v1beta1.Machine](indexer, v1beta1.Resource("machine"))} + return &machineLister{listers.New[*machinev1beta1.Machine](indexer, machinev1beta1.Resource("machine"))} } // Machines returns an object that can list and get Machines. func (s *machineLister) Machines(namespace string) MachineNamespaceLister { - return machineNamespaceLister{listers.NewNamespaced[*v1beta1.Machine](s.ResourceIndexer, namespace)} + return machineNamespaceLister{listers.NewNamespaced[*machinev1beta1.Machine](s.ResourceIndexer, namespace)} } // MachineNamespaceLister helps list and get Machines. @@ -40,15 +40,15 @@ func (s *machineLister) Machines(namespace string) MachineNamespaceLister { type MachineNamespaceLister interface { // List lists all Machines in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.Machine, err error) + List(selector labels.Selector) (ret []*machinev1beta1.Machine, err error) // Get retrieves the Machine from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.Machine, error) + Get(name string) (*machinev1beta1.Machine, error) MachineNamespaceListerExpansion } // machineNamespaceLister implements the MachineNamespaceLister // interface. type machineNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.Machine] + listers.ResourceIndexer[*machinev1beta1.Machine] } diff --git a/machine/listers/machine/v1beta1/machinehealthcheck.go b/machine/listers/machine/v1beta1/machinehealthcheck.go index 294b554aba..782528f385 100644 --- a/machine/listers/machine/v1beta1/machinehealthcheck.go +++ b/machine/listers/machine/v1beta1/machinehealthcheck.go @@ -3,10 +3,10 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/machine/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineHealthCheckLister helps list MachineHealthChecks. @@ -14,7 +14,7 @@ import ( type MachineHealthCheckLister interface { // List lists all MachineHealthChecks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.MachineHealthCheck, err error) + List(selector labels.Selector) (ret []*machinev1beta1.MachineHealthCheck, err error) // MachineHealthChecks returns an object that can list and get MachineHealthChecks. MachineHealthChecks(namespace string) MachineHealthCheckNamespaceLister MachineHealthCheckListerExpansion @@ -22,17 +22,17 @@ type MachineHealthCheckLister interface { // machineHealthCheckLister implements the MachineHealthCheckLister interface. type machineHealthCheckLister struct { - listers.ResourceIndexer[*v1beta1.MachineHealthCheck] + listers.ResourceIndexer[*machinev1beta1.MachineHealthCheck] } // NewMachineHealthCheckLister returns a new MachineHealthCheckLister. func NewMachineHealthCheckLister(indexer cache.Indexer) MachineHealthCheckLister { - return &machineHealthCheckLister{listers.New[*v1beta1.MachineHealthCheck](indexer, v1beta1.Resource("machinehealthcheck"))} + return &machineHealthCheckLister{listers.New[*machinev1beta1.MachineHealthCheck](indexer, machinev1beta1.Resource("machinehealthcheck"))} } // MachineHealthChecks returns an object that can list and get MachineHealthChecks. func (s *machineHealthCheckLister) MachineHealthChecks(namespace string) MachineHealthCheckNamespaceLister { - return machineHealthCheckNamespaceLister{listers.NewNamespaced[*v1beta1.MachineHealthCheck](s.ResourceIndexer, namespace)} + return machineHealthCheckNamespaceLister{listers.NewNamespaced[*machinev1beta1.MachineHealthCheck](s.ResourceIndexer, namespace)} } // MachineHealthCheckNamespaceLister helps list and get MachineHealthChecks. @@ -40,15 +40,15 @@ func (s *machineHealthCheckLister) MachineHealthChecks(namespace string) Machine type MachineHealthCheckNamespaceLister interface { // List lists all MachineHealthChecks in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.MachineHealthCheck, err error) + List(selector labels.Selector) (ret []*machinev1beta1.MachineHealthCheck, err error) // Get retrieves the MachineHealthCheck from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.MachineHealthCheck, error) + Get(name string) (*machinev1beta1.MachineHealthCheck, error) MachineHealthCheckNamespaceListerExpansion } // machineHealthCheckNamespaceLister implements the MachineHealthCheckNamespaceLister // interface. type machineHealthCheckNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.MachineHealthCheck] + listers.ResourceIndexer[*machinev1beta1.MachineHealthCheck] } diff --git a/machine/listers/machine/v1beta1/machineset.go b/machine/listers/machine/v1beta1/machineset.go index 869e578af1..e13201e9f7 100644 --- a/machine/listers/machine/v1beta1/machineset.go +++ b/machine/listers/machine/v1beta1/machineset.go @@ -3,10 +3,10 @@ package v1beta1 import ( - v1beta1 "github.com/openshift/api/machine/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machinev1beta1 "github.com/openshift/api/machine/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineSetLister helps list MachineSets. @@ -14,7 +14,7 @@ import ( type MachineSetLister interface { // List lists all MachineSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.MachineSet, err error) + List(selector labels.Selector) (ret []*machinev1beta1.MachineSet, err error) // MachineSets returns an object that can list and get MachineSets. MachineSets(namespace string) MachineSetNamespaceLister MachineSetListerExpansion @@ -22,17 +22,17 @@ type MachineSetLister interface { // machineSetLister implements the MachineSetLister interface. type machineSetLister struct { - listers.ResourceIndexer[*v1beta1.MachineSet] + listers.ResourceIndexer[*machinev1beta1.MachineSet] } // NewMachineSetLister returns a new MachineSetLister. func NewMachineSetLister(indexer cache.Indexer) MachineSetLister { - return &machineSetLister{listers.New[*v1beta1.MachineSet](indexer, v1beta1.Resource("machineset"))} + return &machineSetLister{listers.New[*machinev1beta1.MachineSet](indexer, machinev1beta1.Resource("machineset"))} } // MachineSets returns an object that can list and get MachineSets. func (s *machineSetLister) MachineSets(namespace string) MachineSetNamespaceLister { - return machineSetNamespaceLister{listers.NewNamespaced[*v1beta1.MachineSet](s.ResourceIndexer, namespace)} + return machineSetNamespaceLister{listers.NewNamespaced[*machinev1beta1.MachineSet](s.ResourceIndexer, namespace)} } // MachineSetNamespaceLister helps list and get MachineSets. @@ -40,15 +40,15 @@ func (s *machineSetLister) MachineSets(namespace string) MachineSetNamespaceList type MachineSetNamespaceLister interface { // List lists all MachineSets in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.MachineSet, err error) + List(selector labels.Selector) (ret []*machinev1beta1.MachineSet, err error) // Get retrieves the MachineSet from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.MachineSet, error) + Get(name string) (*machinev1beta1.MachineSet, error) MachineSetNamespaceListerExpansion } // machineSetNamespaceLister implements the MachineSetNamespaceLister // interface. type machineSetNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.MachineSet] + listers.ResourceIndexer[*machinev1beta1.MachineSet] } diff --git a/machineconfiguration/applyconfigurations/internal/internal.go b/machineconfiguration/applyconfigurations/internal/internal.go index 4d678f4d6b..f7f17b64d1 100644 --- a/machineconfiguration/applyconfigurations/internal/internal.go +++ b/machineconfiguration/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go index 64294969a0..1abcad2e8e 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/certexpiry.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // CertExpiryApplyConfiguration represents a declarative configuration of the CertExpiry type for use // with apply. type CertExpiryApplyConfiguration struct { - Bundle *string `json:"bundle,omitempty"` - Subject *string `json:"subject,omitempty"` - Expiry *v1.Time `json:"expiry,omitempty"` + Bundle *string `json:"bundle,omitempty"` + Subject *string `json:"subject,omitempty"` + Expiry *metav1.Time `json:"expiry,omitempty"` } // CertExpiryApplyConfiguration constructs a declarative configuration of the CertExpiry type for use with @@ -39,7 +39,7 @@ func (b *CertExpiryApplyConfiguration) WithSubject(value string) *CertExpiryAppl // WithExpiry sets the Expiry field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Expiry field is set to the value of the last call. -func (b *CertExpiryApplyConfiguration) WithExpiry(value v1.Time) *CertExpiryApplyConfiguration { +func (b *CertExpiryApplyConfiguration) WithExpiry(value metav1.Time) *CertExpiryApplyConfiguration { b.Expiry = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go index cc5979c1ab..a4c0f9fd90 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ContainerRuntimeConfigApplyConfiguration represents a declarative configuration of the ContainerRuntimeConfig type for use // with apply. type ContainerRuntimeConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ContainerRuntimeConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *ContainerRuntimeConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ContainerRuntimeConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ContainerRuntimeConfigStatusApplyConfiguration `json:"status,omitempty"` } // ContainerRuntimeConfig constructs a declarative configuration of the ContainerRuntimeConfig type for use with @@ -41,18 +41,18 @@ func ContainerRuntimeConfig(name string) *ContainerRuntimeConfigApplyConfigurati // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractContainerRuntimeConfig(containerRuntimeConfig *apimachineconfigurationv1.ContainerRuntimeConfig, fieldManager string) (*ContainerRuntimeConfigApplyConfiguration, error) { +func ExtractContainerRuntimeConfig(containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfig, fieldManager string) (*ContainerRuntimeConfigApplyConfiguration, error) { return extractContainerRuntimeConfig(containerRuntimeConfig, fieldManager, "") } // ExtractContainerRuntimeConfigStatus is the same as ExtractContainerRuntimeConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractContainerRuntimeConfigStatus(containerRuntimeConfig *apimachineconfigurationv1.ContainerRuntimeConfig, fieldManager string) (*ContainerRuntimeConfigApplyConfiguration, error) { +func ExtractContainerRuntimeConfigStatus(containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfig, fieldManager string) (*ContainerRuntimeConfigApplyConfiguration, error) { return extractContainerRuntimeConfig(containerRuntimeConfig, fieldManager, "status") } -func extractContainerRuntimeConfig(containerRuntimeConfig *apimachineconfigurationv1.ContainerRuntimeConfig, fieldManager string, subresource string) (*ContainerRuntimeConfigApplyConfiguration, error) { +func extractContainerRuntimeConfig(containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfig, fieldManager string, subresource string) (*ContainerRuntimeConfigApplyConfiguration, error) { b := &ContainerRuntimeConfigApplyConfiguration{} err := managedfields.ExtractInto(containerRuntimeConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.ContainerRuntimeConfig"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractContainerRuntimeConfig(containerRuntimeConfig *apimachineconfigurati // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithKind(value string) *ContainerRuntimeConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithKind(value string) *Conta // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithAPIVersion(value string) *ContainerRuntimeConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithAPIVersion(value string) // If called multiple times, the Name field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithName(value string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithName(value string) *Conta // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithGenerateName(value string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithGenerateName(value string // If called multiple times, the Namespace field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithNamespace(value string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithNamespace(value string) * // If called multiple times, the UID field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithUID(value types.UID) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithUID(value types.UID) *Con // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithResourceVersion(value string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithResourceVersion(value str // If called multiple times, the Generation field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithGeneration(value int64) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ContainerRuntimeConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ContainerRuntimeConfigApplyConfiguration { +func (b *ContainerRuntimeConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ContainerRuntimeConfigApplyConfiguration { +func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionTimestamp(value m // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithDeletionGracePeriodSecond // overwriting an existing map entries in Labels field with the same key. func (b *ContainerRuntimeConfigApplyConfiguration) WithLabels(entries map[string]string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithLabels(entries map[string // overwriting an existing map entries in Annotations field with the same key. func (b *ContainerRuntimeConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithAnnotations(entries map[s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ContainerRuntimeConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ContainerRuntimeConfigApplyConfiguration { +func (b *ContainerRuntimeConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithOwnerReferences(values .. func (b *ContainerRuntimeConfigApplyConfiguration) WithFinalizers(values ...string) *ContainerRuntimeConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ContainerRuntimeConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ContainerRuntimeConfigApplyConfiguration) WithStatus(value *ContainerRu // GetName retrieves the value of the Name field in the declarative configuration. func (b *ContainerRuntimeConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go index 8858ba1ac8..8e73a5dc26 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // ContainerRuntimeConfigConditionApplyConfiguration represents a declarative configuration of the ContainerRuntimeConfigCondition type for use // with apply. type ContainerRuntimeConfigConditionApplyConfiguration struct { - Type *v1.ContainerRuntimeConfigStatusConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *machineconfigurationv1.ContainerRuntimeConfigStatusConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ContainerRuntimeConfigConditionApplyConfiguration constructs a declarative configuration of the ContainerRuntimeConfigCondition type for use with @@ -27,7 +27,7 @@ func ContainerRuntimeConfigCondition() *ContainerRuntimeConfigConditionApplyConf // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithType(value v1.ContainerRuntimeConfigStatusConditionType) *ContainerRuntimeConfigConditionApplyConfiguration { +func (b *ContainerRuntimeConfigConditionApplyConfiguration) WithType(value machineconfigurationv1.ContainerRuntimeConfigStatusConditionType) *ContainerRuntimeConfigConditionApplyConfiguration { b.Type = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go index 39bb351c63..8e7a0a2a23 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfigspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ContainerRuntimeConfigSpecApplyConfiguration represents a declarative configuration of the ContainerRuntimeConfigSpec type for use // with apply. type ContainerRuntimeConfigSpecApplyConfiguration struct { - MachineConfigPoolSelector *v1.LabelSelectorApplyConfiguration `json:"machineConfigPoolSelector,omitempty"` + MachineConfigPoolSelector *metav1.LabelSelectorApplyConfiguration `json:"machineConfigPoolSelector,omitempty"` ContainerRuntimeConfig *ContainerRuntimeConfigurationApplyConfiguration `json:"containerRuntimeConfig,omitempty"` } @@ -22,7 +22,7 @@ func ContainerRuntimeConfigSpec() *ContainerRuntimeConfigSpecApplyConfiguration // WithMachineConfigPoolSelector sets the MachineConfigPoolSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MachineConfigPoolSelector field is set to the value of the last call. -func (b *ContainerRuntimeConfigSpecApplyConfiguration) WithMachineConfigPoolSelector(value *v1.LabelSelectorApplyConfiguration) *ContainerRuntimeConfigSpecApplyConfiguration { +func (b *ContainerRuntimeConfigSpecApplyConfiguration) WithMachineConfigPoolSelector(value *metav1.LabelSelectorApplyConfiguration) *ContainerRuntimeConfigSpecApplyConfiguration { b.MachineConfigPoolSelector = value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go index f1a8d8f4f7..5be7a98c09 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/containerruntimeconfiguration.go @@ -3,18 +3,18 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" resource "k8s.io/apimachinery/pkg/api/resource" ) // ContainerRuntimeConfigurationApplyConfiguration represents a declarative configuration of the ContainerRuntimeConfiguration type for use // with apply. type ContainerRuntimeConfigurationApplyConfiguration struct { - PidsLimit *int64 `json:"pidsLimit,omitempty"` - LogLevel *string `json:"logLevel,omitempty"` - LogSizeMax *resource.Quantity `json:"logSizeMax,omitempty"` - OverlaySize *resource.Quantity `json:"overlaySize,omitempty"` - DefaultRuntime *v1.ContainerRuntimeDefaultRuntime `json:"defaultRuntime,omitempty"` + PidsLimit *int64 `json:"pidsLimit,omitempty"` + LogLevel *string `json:"logLevel,omitempty"` + LogSizeMax *resource.Quantity `json:"logSizeMax,omitempty"` + OverlaySize *resource.Quantity `json:"overlaySize,omitempty"` + DefaultRuntime *machineconfigurationv1.ContainerRuntimeDefaultRuntime `json:"defaultRuntime,omitempty"` } // ContainerRuntimeConfigurationApplyConfiguration constructs a declarative configuration of the ContainerRuntimeConfiguration type for use with @@ -58,7 +58,7 @@ func (b *ContainerRuntimeConfigurationApplyConfiguration) WithOverlaySize(value // WithDefaultRuntime sets the DefaultRuntime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DefaultRuntime field is set to the value of the last call. -func (b *ContainerRuntimeConfigurationApplyConfiguration) WithDefaultRuntime(value v1.ContainerRuntimeDefaultRuntime) *ContainerRuntimeConfigurationApplyConfiguration { +func (b *ContainerRuntimeConfigurationApplyConfiguration) WithDefaultRuntime(value machineconfigurationv1.ContainerRuntimeDefaultRuntime) *ContainerRuntimeConfigurationApplyConfiguration { b.DefaultRuntime = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go index 56f20a64cc..fbfa92b057 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllercertificate.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ControllerCertificateApplyConfiguration represents a declarative configuration of the ControllerCertificate type for use // with apply. type ControllerCertificateApplyConfiguration struct { - Subject *string `json:"subject,omitempty"` - Signer *string `json:"signer,omitempty"` - NotBefore *v1.Time `json:"notBefore,omitempty"` - NotAfter *v1.Time `json:"notAfter,omitempty"` - BundleFile *string `json:"bundleFile,omitempty"` + Subject *string `json:"subject,omitempty"` + Signer *string `json:"signer,omitempty"` + NotBefore *metav1.Time `json:"notBefore,omitempty"` + NotAfter *metav1.Time `json:"notAfter,omitempty"` + BundleFile *string `json:"bundleFile,omitempty"` } // ControllerCertificateApplyConfiguration constructs a declarative configuration of the ControllerCertificate type for use with @@ -41,7 +41,7 @@ func (b *ControllerCertificateApplyConfiguration) WithSigner(value string) *Cont // WithNotBefore sets the NotBefore field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NotBefore field is set to the value of the last call. -func (b *ControllerCertificateApplyConfiguration) WithNotBefore(value v1.Time) *ControllerCertificateApplyConfiguration { +func (b *ControllerCertificateApplyConfiguration) WithNotBefore(value metav1.Time) *ControllerCertificateApplyConfiguration { b.NotBefore = &value return b } @@ -49,7 +49,7 @@ func (b *ControllerCertificateApplyConfiguration) WithNotBefore(value v1.Time) * // WithNotAfter sets the NotAfter field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NotAfter field is set to the value of the last call. -func (b *ControllerCertificateApplyConfiguration) WithNotAfter(value v1.Time) *ControllerCertificateApplyConfiguration { +func (b *ControllerCertificateApplyConfiguration) WithNotAfter(value metav1.Time) *ControllerCertificateApplyConfiguration { b.NotAfter = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go index 5638d3d018..3d622812ba 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ControllerConfigApplyConfiguration represents a declarative configuration of the ControllerConfig type for use // with apply. type ControllerConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ControllerConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *ControllerConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ControllerConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ControllerConfigStatusApplyConfiguration `json:"status,omitempty"` } // ControllerConfig constructs a declarative configuration of the ControllerConfig type for use with @@ -41,18 +41,18 @@ func ControllerConfig(name string) *ControllerConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractControllerConfig(controllerConfig *apimachineconfigurationv1.ControllerConfig, fieldManager string) (*ControllerConfigApplyConfiguration, error) { +func ExtractControllerConfig(controllerConfig *machineconfigurationv1.ControllerConfig, fieldManager string) (*ControllerConfigApplyConfiguration, error) { return extractControllerConfig(controllerConfig, fieldManager, "") } // ExtractControllerConfigStatus is the same as ExtractControllerConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractControllerConfigStatus(controllerConfig *apimachineconfigurationv1.ControllerConfig, fieldManager string) (*ControllerConfigApplyConfiguration, error) { +func ExtractControllerConfigStatus(controllerConfig *machineconfigurationv1.ControllerConfig, fieldManager string) (*ControllerConfigApplyConfiguration, error) { return extractControllerConfig(controllerConfig, fieldManager, "status") } -func extractControllerConfig(controllerConfig *apimachineconfigurationv1.ControllerConfig, fieldManager string, subresource string) (*ControllerConfigApplyConfiguration, error) { +func extractControllerConfig(controllerConfig *machineconfigurationv1.ControllerConfig, fieldManager string, subresource string) (*ControllerConfigApplyConfiguration, error) { b := &ControllerConfigApplyConfiguration{} err := managedfields.ExtractInto(controllerConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.ControllerConfig"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractControllerConfig(controllerConfig *apimachineconfigurationv1.Control // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithKind(value string) *ControllerConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ControllerConfigApplyConfiguration) WithKind(value string) *ControllerC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithAPIVersion(value string) *ControllerConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ControllerConfigApplyConfiguration) WithAPIVersion(value string) *Contr // If called multiple times, the Name field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithName(value string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ControllerConfigApplyConfiguration) WithName(value string) *ControllerC // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithGenerateName(value string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ControllerConfigApplyConfiguration) WithGenerateName(value string) *Con // If called multiple times, the Namespace field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithNamespace(value string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ControllerConfigApplyConfiguration) WithNamespace(value string) *Contro // If called multiple times, the UID field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithUID(value types.UID) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ControllerConfigApplyConfiguration) WithUID(value types.UID) *Controlle // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithResourceVersion(value string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ControllerConfigApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithGeneration(value int64) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ControllerConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ControllerConfigApplyConfiguration { +func (b *ControllerConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ControllerConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ControllerConfigApplyConfiguration { +func (b *ControllerConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ControllerConfigApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ControllerConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ControllerConfigApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *ControllerConfigApplyConfiguration) WithLabels(entries map[string]string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ControllerConfigApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *ControllerConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ControllerConfigApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ControllerConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ControllerConfigApplyConfiguration { +func (b *ControllerConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ControllerConfigApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *ControllerConfigApplyConfiguration) WithFinalizers(values ...string) *ControllerConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ControllerConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ControllerConfigApplyConfiguration) WithStatus(value *ControllerConfigS // GetName retrieves the value of the Name field in the declarative configuration. func (b *ControllerConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go index d44864fe8a..25998b1871 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/controllerconfigstatuscondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // ControllerConfigStatusConditionApplyConfiguration represents a declarative configuration of the ControllerConfigStatusCondition type for use // with apply. type ControllerConfigStatusConditionApplyConfiguration struct { - Type *v1.ControllerConfigStatusConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *machineconfigurationv1.ControllerConfigStatusConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ControllerConfigStatusConditionApplyConfiguration constructs a declarative configuration of the ControllerConfigStatusCondition type for use with @@ -27,7 +27,7 @@ func ControllerConfigStatusCondition() *ControllerConfigStatusConditionApplyConf // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ControllerConfigStatusConditionApplyConfiguration) WithType(value v1.ControllerConfigStatusConditionType) *ControllerConfigStatusConditionApplyConfiguration { +func (b *ControllerConfigStatusConditionApplyConfiguration) WithType(value machineconfigurationv1.ControllerConfigStatusConditionType) *ControllerConfigStatusConditionApplyConfiguration { b.Type = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go index 748fc7bdf3..65c3bf8ebb 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // KubeletConfigApplyConfiguration represents a declarative configuration of the KubeletConfig type for use // with apply. type KubeletConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *KubeletConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *KubeletConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *KubeletConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *KubeletConfigStatusApplyConfiguration `json:"status,omitempty"` } // KubeletConfig constructs a declarative configuration of the KubeletConfig type for use with @@ -41,18 +41,18 @@ func KubeletConfig(name string) *KubeletConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractKubeletConfig(kubeletConfig *apimachineconfigurationv1.KubeletConfig, fieldManager string) (*KubeletConfigApplyConfiguration, error) { +func ExtractKubeletConfig(kubeletConfig *machineconfigurationv1.KubeletConfig, fieldManager string) (*KubeletConfigApplyConfiguration, error) { return extractKubeletConfig(kubeletConfig, fieldManager, "") } // ExtractKubeletConfigStatus is the same as ExtractKubeletConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractKubeletConfigStatus(kubeletConfig *apimachineconfigurationv1.KubeletConfig, fieldManager string) (*KubeletConfigApplyConfiguration, error) { +func ExtractKubeletConfigStatus(kubeletConfig *machineconfigurationv1.KubeletConfig, fieldManager string) (*KubeletConfigApplyConfiguration, error) { return extractKubeletConfig(kubeletConfig, fieldManager, "status") } -func extractKubeletConfig(kubeletConfig *apimachineconfigurationv1.KubeletConfig, fieldManager string, subresource string) (*KubeletConfigApplyConfiguration, error) { +func extractKubeletConfig(kubeletConfig *machineconfigurationv1.KubeletConfig, fieldManager string, subresource string) (*KubeletConfigApplyConfiguration, error) { b := &KubeletConfigApplyConfiguration{} err := managedfields.ExtractInto(kubeletConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.KubeletConfig"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractKubeletConfig(kubeletConfig *apimachineconfigurationv1.KubeletConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithKind(value string) *KubeletConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *KubeletConfigApplyConfiguration) WithKind(value string) *KubeletConfigA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithAPIVersion(value string) *KubeletConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *KubeletConfigApplyConfiguration) WithAPIVersion(value string) *KubeletC // If called multiple times, the Name field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithName(value string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *KubeletConfigApplyConfiguration) WithName(value string) *KubeletConfigA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithGenerateName(value string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *KubeletConfigApplyConfiguration) WithGenerateName(value string) *Kubele // If called multiple times, the Namespace field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithNamespace(value string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *KubeletConfigApplyConfiguration) WithNamespace(value string) *KubeletCo // If called multiple times, the UID field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithUID(value types.UID) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *KubeletConfigApplyConfiguration) WithUID(value types.UID) *KubeletConfi // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithResourceVersion(value string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *KubeletConfigApplyConfiguration) WithResourceVersion(value string) *Kub // If called multiple times, the Generation field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithGeneration(value int64) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeletConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeletConfigApplyConfiguration { +func (b *KubeletConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeletConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeletConfigApplyConfiguration { +func (b *KubeletConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *KubeletConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *KubeletConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *KubeletConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *KubeletConfigApplyConfiguration) WithLabels(entries map[string]string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *KubeletConfigApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *KubeletConfigApplyConfiguration) WithAnnotations(entries map[string]string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *KubeletConfigApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeletConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubeletConfigApplyConfiguration { +func (b *KubeletConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *KubeletConfigApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *KubeletConfigApplyConfiguration) WithFinalizers(values ...string) *KubeletConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *KubeletConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *KubeletConfigApplyConfiguration) WithStatus(value *KubeletConfigStatusA // GetName retrieves the value of the Name field in the declarative configuration. func (b *KubeletConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go index 8a31e5b187..7fbe03e3b3 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // KubeletConfigConditionApplyConfiguration represents a declarative configuration of the KubeletConfigCondition type for use // with apply. type KubeletConfigConditionApplyConfiguration struct { - Type *v1.KubeletConfigStatusConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *machineconfigurationv1.KubeletConfigStatusConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // KubeletConfigConditionApplyConfiguration constructs a declarative configuration of the KubeletConfigCondition type for use with @@ -27,7 +27,7 @@ func KubeletConfigCondition() *KubeletConfigConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *KubeletConfigConditionApplyConfiguration) WithType(value v1.KubeletConfigStatusConditionType) *KubeletConfigConditionApplyConfiguration { +func (b *KubeletConfigConditionApplyConfiguration) WithType(value machineconfigurationv1.KubeletConfigStatusConditionType) *KubeletConfigConditionApplyConfiguration { b.Type = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go index 4ef39ecd43..1232fb70a1 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/kubeletconfigspec.go @@ -5,17 +5,17 @@ package v1 import ( configv1 "github.com/openshift/api/config/v1" runtime "k8s.io/apimachinery/pkg/runtime" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // KubeletConfigSpecApplyConfiguration represents a declarative configuration of the KubeletConfigSpec type for use // with apply. type KubeletConfigSpecApplyConfiguration struct { - AutoSizingReserved *bool `json:"autoSizingReserved,omitempty"` - LogLevel *int32 `json:"logLevel,omitempty"` - MachineConfigPoolSelector *v1.LabelSelectorApplyConfiguration `json:"machineConfigPoolSelector,omitempty"` - KubeletConfig *runtime.RawExtension `json:"kubeletConfig,omitempty"` - TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` + AutoSizingReserved *bool `json:"autoSizingReserved,omitempty"` + LogLevel *int32 `json:"logLevel,omitempty"` + MachineConfigPoolSelector *metav1.LabelSelectorApplyConfiguration `json:"machineConfigPoolSelector,omitempty"` + KubeletConfig *runtime.RawExtension `json:"kubeletConfig,omitempty"` + TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` } // KubeletConfigSpecApplyConfiguration constructs a declarative configuration of the KubeletConfigSpec type for use with @@ -43,7 +43,7 @@ func (b *KubeletConfigSpecApplyConfiguration) WithLogLevel(value int32) *Kubelet // WithMachineConfigPoolSelector sets the MachineConfigPoolSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MachineConfigPoolSelector field is set to the value of the last call. -func (b *KubeletConfigSpecApplyConfiguration) WithMachineConfigPoolSelector(value *v1.LabelSelectorApplyConfiguration) *KubeletConfigSpecApplyConfiguration { +func (b *KubeletConfigSpecApplyConfiguration) WithMachineConfigPoolSelector(value *metav1.LabelSelectorApplyConfiguration) *KubeletConfigSpecApplyConfiguration { b.MachineConfigPoolSelector = value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go index ca857afdc5..49ec0fb852 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfig.go @@ -3,20 +3,20 @@ package v1 import ( - apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // MachineConfigApplyConfiguration represents a declarative configuration of the MachineConfig type for use // with apply. type MachineConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MachineConfigSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigSpecApplyConfiguration `json:"spec,omitempty"` } // MachineConfig constructs a declarative configuration of the MachineConfig type for use with @@ -40,10 +40,10 @@ func MachineConfig(name string) *MachineConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractMachineConfig(machineConfig *apimachineconfigurationv1.MachineConfig, fieldManager string) (*MachineConfigApplyConfiguration, error) { +func ExtractMachineConfig(machineConfig *machineconfigurationv1.MachineConfig, fieldManager string) (*MachineConfigApplyConfiguration, error) { return extractMachineConfig(machineConfig, fieldManager, "") } -func extractMachineConfig(machineConfig *apimachineconfigurationv1.MachineConfig, fieldManager string, subresource string) (*MachineConfigApplyConfiguration, error) { +func extractMachineConfig(machineConfig *machineconfigurationv1.MachineConfig, fieldManager string, subresource string) (*MachineConfigApplyConfiguration, error) { b := &MachineConfigApplyConfiguration{} err := managedfields.ExtractInto(machineConfig, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.MachineConfig"), fieldManager, b, subresource) if err != nil { @@ -60,7 +60,7 @@ func extractMachineConfig(machineConfig *apimachineconfigurationv1.MachineConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithKind(value string) *MachineConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -68,7 +68,7 @@ func (b *MachineConfigApplyConfiguration) WithKind(value string) *MachineConfigA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithAPIVersion(value string) *MachineConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -77,7 +77,7 @@ func (b *MachineConfigApplyConfiguration) WithAPIVersion(value string) *MachineC // If called multiple times, the Name field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithName(value string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -86,7 +86,7 @@ func (b *MachineConfigApplyConfiguration) WithName(value string) *MachineConfigA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithGenerateName(value string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -95,7 +95,7 @@ func (b *MachineConfigApplyConfiguration) WithGenerateName(value string) *Machin // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithNamespace(value string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -104,7 +104,7 @@ func (b *MachineConfigApplyConfiguration) WithNamespace(value string) *MachineCo // If called multiple times, the UID field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithUID(value types.UID) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -113,7 +113,7 @@ func (b *MachineConfigApplyConfiguration) WithUID(value types.UID) *MachineConfi // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithResourceVersion(value string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -122,25 +122,25 @@ func (b *MachineConfigApplyConfiguration) WithResourceVersion(value string) *Mac // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithGeneration(value int64) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *MachineConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigApplyConfiguration { +func (b *MachineConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *MachineConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigApplyConfiguration { +func (b *MachineConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *MachineConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -159,11 +159,11 @@ func (b *MachineConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *MachineConfigApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -174,11 +174,11 @@ func (b *MachineConfigApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *MachineConfigApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -186,13 +186,13 @@ func (b *MachineConfigApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *MachineConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigApplyConfiguration { +func (b *MachineConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -203,14 +203,14 @@ func (b *MachineConfigApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *MachineConfigApplyConfiguration) WithFinalizers(values ...string) *MachineConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *MachineConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -225,5 +225,5 @@ func (b *MachineConfigApplyConfiguration) WithSpec(value *MachineConfigSpecApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go index 7622e124eb..93726a2724 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpool.go @@ -3,21 +3,21 @@ package v1 import ( - apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // MachineConfigPoolApplyConfiguration represents a declarative configuration of the MachineConfigPool type for use // with apply. type MachineConfigPoolApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MachineConfigPoolSpecApplyConfiguration `json:"spec,omitempty"` - Status *MachineConfigPoolStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigPoolSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineConfigPoolStatusApplyConfiguration `json:"status,omitempty"` } // MachineConfigPool constructs a declarative configuration of the MachineConfigPool type for use with @@ -41,18 +41,18 @@ func MachineConfigPool(name string) *MachineConfigPoolApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractMachineConfigPool(machineConfigPool *apimachineconfigurationv1.MachineConfigPool, fieldManager string) (*MachineConfigPoolApplyConfiguration, error) { +func ExtractMachineConfigPool(machineConfigPool *machineconfigurationv1.MachineConfigPool, fieldManager string) (*MachineConfigPoolApplyConfiguration, error) { return extractMachineConfigPool(machineConfigPool, fieldManager, "") } // ExtractMachineConfigPoolStatus is the same as ExtractMachineConfigPool except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractMachineConfigPoolStatus(machineConfigPool *apimachineconfigurationv1.MachineConfigPool, fieldManager string) (*MachineConfigPoolApplyConfiguration, error) { +func ExtractMachineConfigPoolStatus(machineConfigPool *machineconfigurationv1.MachineConfigPool, fieldManager string) (*MachineConfigPoolApplyConfiguration, error) { return extractMachineConfigPool(machineConfigPool, fieldManager, "status") } -func extractMachineConfigPool(machineConfigPool *apimachineconfigurationv1.MachineConfigPool, fieldManager string, subresource string) (*MachineConfigPoolApplyConfiguration, error) { +func extractMachineConfigPool(machineConfigPool *machineconfigurationv1.MachineConfigPool, fieldManager string, subresource string) (*MachineConfigPoolApplyConfiguration, error) { b := &MachineConfigPoolApplyConfiguration{} err := managedfields.ExtractInto(machineConfigPool, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.MachineConfigPool"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractMachineConfigPool(machineConfigPool *apimachineconfigurationv1.Machi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithKind(value string) *MachineConfigPoolApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithKind(value string) *MachineCon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithAPIVersion(value string) *MachineConfigPoolApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithAPIVersion(value string) *Mach // If called multiple times, the Name field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithName(value string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithName(value string) *MachineCon // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithGenerateName(value string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithGenerateName(value string) *Ma // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithNamespace(value string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithNamespace(value string) *Machi // If called multiple times, the UID field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithUID(value types.UID) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithUID(value types.UID) *MachineC // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithResourceVersion(value string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *MachineConfigPoolApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithGeneration(value int64) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *MachineConfigPoolApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigPoolApplyConfiguration { +func (b *MachineConfigPoolApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *MachineConfigPoolApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigPoolApplyConfiguration { +func (b *MachineConfigPoolApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *MachineConfigPoolApplyConfiguration) WithDeletionTimestamp(value metav1 // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineConfigPoolApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *MachineConfigPoolApplyConfiguration) WithDeletionGracePeriodSeconds(val // overwriting an existing map entries in Labels field with the same key. func (b *MachineConfigPoolApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *MachineConfigPoolApplyConfiguration) WithLabels(entries map[string]stri // overwriting an existing map entries in Annotations field with the same key. func (b *MachineConfigPoolApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *MachineConfigPoolApplyConfiguration) WithAnnotations(entries map[string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *MachineConfigPoolApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigPoolApplyConfiguration { +func (b *MachineConfigPoolApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *MachineConfigPoolApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *MachineConfigPoolApplyConfiguration) WithFinalizers(values ...string) *MachineConfigPoolApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *MachineConfigPoolApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *MachineConfigPoolApplyConfiguration) WithStatus(value *MachineConfigPoo // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineConfigPoolApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go index 89e2f91360..09bad851e8 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // MachineConfigPoolConditionApplyConfiguration represents a declarative configuration of the MachineConfigPoolCondition type for use // with apply. type MachineConfigPoolConditionApplyConfiguration struct { - Type *v1.MachineConfigPoolConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *machineconfigurationv1.MachineConfigPoolConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // MachineConfigPoolConditionApplyConfiguration constructs a declarative configuration of the MachineConfigPoolCondition type for use with @@ -27,7 +27,7 @@ func MachineConfigPoolCondition() *MachineConfigPoolConditionApplyConfiguration // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *MachineConfigPoolConditionApplyConfiguration) WithType(value v1.MachineConfigPoolConditionType) *MachineConfigPoolConditionApplyConfiguration { +func (b *MachineConfigPoolConditionApplyConfiguration) WithType(value machineconfigurationv1.MachineConfigPoolConditionType) *MachineConfigPoolConditionApplyConfiguration { b.Type = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go index 13640f0a64..1b3d4db608 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolspec.go @@ -4,14 +4,14 @@ package v1 import ( intstr "k8s.io/apimachinery/pkg/util/intstr" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // MachineConfigPoolSpecApplyConfiguration represents a declarative configuration of the MachineConfigPoolSpec type for use // with apply. type MachineConfigPoolSpecApplyConfiguration struct { - MachineConfigSelector *v1.LabelSelectorApplyConfiguration `json:"machineConfigSelector,omitempty"` - NodeSelector *v1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + MachineConfigSelector *metav1.LabelSelectorApplyConfiguration `json:"machineConfigSelector,omitempty"` + NodeSelector *metav1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"` Paused *bool `json:"paused,omitempty"` MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` Configuration *MachineConfigPoolStatusConfigurationApplyConfiguration `json:"configuration,omitempty"` @@ -27,7 +27,7 @@ func MachineConfigPoolSpec() *MachineConfigPoolSpecApplyConfiguration { // WithMachineConfigSelector sets the MachineConfigSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MachineConfigSelector field is set to the value of the last call. -func (b *MachineConfigPoolSpecApplyConfiguration) WithMachineConfigSelector(value *v1.LabelSelectorApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { +func (b *MachineConfigPoolSpecApplyConfiguration) WithMachineConfigSelector(value *metav1.LabelSelectorApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { b.MachineConfigSelector = value return b } @@ -35,7 +35,7 @@ func (b *MachineConfigPoolSpecApplyConfiguration) WithMachineConfigSelector(valu // WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeSelector field is set to the value of the last call. -func (b *MachineConfigPoolSpecApplyConfiguration) WithNodeSelector(value *v1.LabelSelectorApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { +func (b *MachineConfigPoolSpecApplyConfiguration) WithNodeSelector(value *metav1.LabelSelectorApplyConfiguration) *MachineConfigPoolSpecApplyConfiguration { b.NodeSelector = value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go index 506d6a66fa..4fc95a273c 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/machineconfigpoolstatusconfiguration.go @@ -4,14 +4,14 @@ package v1 import ( types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/client-go/applyconfigurations/core/v1" + corev1 "k8s.io/client-go/applyconfigurations/core/v1" ) // MachineConfigPoolStatusConfigurationApplyConfiguration represents a declarative configuration of the MachineConfigPoolStatusConfiguration type for use // with apply. type MachineConfigPoolStatusConfigurationApplyConfiguration struct { - v1.ObjectReferenceApplyConfiguration `json:",inline"` - Source []v1.ObjectReferenceApplyConfiguration `json:"source,omitempty"` + corev1.ObjectReferenceApplyConfiguration `json:",inline"` + Source []corev1.ObjectReferenceApplyConfiguration `json:"source,omitempty"` } // MachineConfigPoolStatusConfigurationApplyConfiguration constructs a declarative configuration of the MachineConfigPoolStatusConfiguration type for use with @@ -24,7 +24,7 @@ func MachineConfigPoolStatusConfiguration() *MachineConfigPoolStatusConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithKind(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.Kind = &value + b.ObjectReferenceApplyConfiguration.Kind = &value return b } @@ -32,7 +32,7 @@ func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithKind(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithNamespace(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.Namespace = &value + b.ObjectReferenceApplyConfiguration.Namespace = &value return b } @@ -40,7 +40,7 @@ func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithNamespace(v // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithName(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.Name = &value + b.ObjectReferenceApplyConfiguration.Name = &value return b } @@ -48,7 +48,7 @@ func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithName(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithUID(value types.UID) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.UID = &value + b.ObjectReferenceApplyConfiguration.UID = &value return b } @@ -56,7 +56,7 @@ func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithUID(value t // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithAPIVersion(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.APIVersion = &value + b.ObjectReferenceApplyConfiguration.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithAPIVersion( // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithResourceVersion(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.ResourceVersion = &value + b.ObjectReferenceApplyConfiguration.ResourceVersion = &value return b } @@ -72,14 +72,14 @@ func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithResourceVer // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FieldPath field is set to the value of the last call. func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithFieldPath(value string) *MachineConfigPoolStatusConfigurationApplyConfiguration { - b.FieldPath = &value + b.ObjectReferenceApplyConfiguration.FieldPath = &value return b } // WithSource adds the given value to the Source field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Source field. -func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithSource(values ...*v1.ObjectReferenceApplyConfiguration) *MachineConfigPoolStatusConfigurationApplyConfiguration { +func (b *MachineConfigPoolStatusConfigurationApplyConfiguration) WithSource(values ...*corev1.ObjectReferenceApplyConfiguration) *MachineConfigPoolStatusConfigurationApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithSource") diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go index 8554a31acd..06616ae2cf 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/networkinfo.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // NetworkInfoApplyConfiguration represents a declarative configuration of the NetworkInfo type for use // with apply. type NetworkInfoApplyConfiguration struct { - MTUMigration *v1.MTUMigration `json:"mtuMigration,omitempty"` + MTUMigration *configv1.MTUMigration `json:"mtuMigration,omitempty"` } // NetworkInfoApplyConfiguration constructs a declarative configuration of the NetworkInfo type for use with @@ -21,7 +21,7 @@ func NetworkInfo() *NetworkInfoApplyConfiguration { // WithMTUMigration sets the MTUMigration field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MTUMigration field is set to the value of the last call. -func (b *NetworkInfoApplyConfiguration) WithMTUMigration(value v1.MTUMigration) *NetworkInfoApplyConfiguration { +func (b *NetworkInfoApplyConfiguration) WithMTUMigration(value configv1.MTUMigration) *NetworkInfoApplyConfiguration { b.MTUMigration = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go index 2df50cb210..fe88aef35e 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/poolsynchronizerstatus.go @@ -3,19 +3,19 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" ) // PoolSynchronizerStatusApplyConfiguration represents a declarative configuration of the PoolSynchronizerStatus type for use // with apply. type PoolSynchronizerStatusApplyConfiguration struct { - PoolSynchronizerType *v1.PoolSynchronizerType `json:"poolSynchronizerType,omitempty"` - MachineCount *int64 `json:"machineCount,omitempty"` - UpdatedMachineCount *int64 `json:"updatedMachineCount,omitempty"` - ReadyMachineCount *int64 `json:"readyMachineCount,omitempty"` - AvailableMachineCount *int64 `json:"availableMachineCount,omitempty"` - UnavailableMachineCount *int64 `json:"unavailableMachineCount,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + PoolSynchronizerType *machineconfigurationv1.PoolSynchronizerType `json:"poolSynchronizerType,omitempty"` + MachineCount *int64 `json:"machineCount,omitempty"` + UpdatedMachineCount *int64 `json:"updatedMachineCount,omitempty"` + ReadyMachineCount *int64 `json:"readyMachineCount,omitempty"` + AvailableMachineCount *int64 `json:"availableMachineCount,omitempty"` + UnavailableMachineCount *int64 `json:"unavailableMachineCount,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` } // PoolSynchronizerStatusApplyConfiguration constructs a declarative configuration of the PoolSynchronizerStatus type for use with @@ -27,7 +27,7 @@ func PoolSynchronizerStatus() *PoolSynchronizerStatusApplyConfiguration { // WithPoolSynchronizerType sets the PoolSynchronizerType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PoolSynchronizerType field is set to the value of the last call. -func (b *PoolSynchronizerStatusApplyConfiguration) WithPoolSynchronizerType(value v1.PoolSynchronizerType) *PoolSynchronizerStatusApplyConfiguration { +func (b *PoolSynchronizerStatusApplyConfiguration) WithPoolSynchronizerType(value machineconfigurationv1.PoolSynchronizerType) *PoolSynchronizerStatusApplyConfiguration { b.PoolSynchronizerType = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go index bb0e75e418..e5abd13fbf 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineconfignode.go @@ -69,7 +69,7 @@ func extractMachineConfigNode(machineConfigNode *machineconfigurationv1alpha1.Ma // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithKind(value string) *MachineConfigNodeApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithKind(value string) *MachineCon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithAPIVersion(value string) *MachineConfigNodeApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithAPIVersion(value string) *Mach // If called multiple times, the Name field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithName(value string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithName(value string) *MachineCon // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithGenerateName(value string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithGenerateName(value string) *Ma // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithNamespace(value string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithNamespace(value string) *Machi // If called multiple times, the UID field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithUID(value types.UID) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithUID(value types.UID) *MachineC // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithResourceVersion(value string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithGeneration(value int64) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithGeneration(value int64) *Machi // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithCreationTimestamp(value metav1 // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithDeletionTimestamp(value metav1 // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineConfigNodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *MachineConfigNodeApplyConfiguration) WithDeletionGracePeriodSeconds(val // overwriting an existing map entries in Labels field with the same key. func (b *MachineConfigNodeApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *MachineConfigNodeApplyConfiguration) WithLabels(entries map[string]stri // overwriting an existing map entries in Annotations field with the same key. func (b *MachineConfigNodeApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithOwnerReferences(values ...*v1. if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *MachineConfigNodeApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *MachineConfigNodeApplyConfiguration) WithFinalizers(values ...string) *MachineConfigNodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *MachineConfigNodeApplyConfiguration) WithStatus(value *MachineConfigNod // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineConfigNodeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go index 4943956c8c..e936def7df 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuild.go @@ -69,7 +69,7 @@ func extractMachineOSBuild(machineOSBuild *machineconfigurationv1alpha1.MachineO // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithKind(value string) *MachineOSBuildApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *MachineOSBuildApplyConfiguration) WithKind(value string) *MachineOSBuil // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithAPIVersion(value string) *MachineOSBuildApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *MachineOSBuildApplyConfiguration) WithAPIVersion(value string) *Machine // If called multiple times, the Name field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithName(value string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *MachineOSBuildApplyConfiguration) WithName(value string) *MachineOSBuil // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithGenerateName(value string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *MachineOSBuildApplyConfiguration) WithGenerateName(value string) *Machi // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithNamespace(value string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *MachineOSBuildApplyConfiguration) WithNamespace(value string) *MachineO // If called multiple times, the UID field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithUID(value types.UID) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *MachineOSBuildApplyConfiguration) WithUID(value types.UID) *MachineOSBu // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithResourceVersion(value string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *MachineOSBuildApplyConfiguration) WithResourceVersion(value string) *Ma // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithGeneration(value int64) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *MachineOSBuildApplyConfiguration) WithGeneration(value int64) *MachineO // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *MachineOSBuildApplyConfiguration) WithCreationTimestamp(value metav1.Ti // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *MachineOSBuildApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineOSBuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *MachineOSBuildApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *MachineOSBuildApplyConfiguration) WithLabels(entries map[string]string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *MachineOSBuildApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *MachineOSBuildApplyConfiguration) WithAnnotations(entries map[string]string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *MachineOSBuildApplyConfiguration) WithOwnerReferences(values ...*v1.Own if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *MachineOSBuildApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *MachineOSBuildApplyConfiguration) WithFinalizers(values ...string) *MachineOSBuildApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *MachineOSBuildApplyConfiguration) WithStatus(value *MachineOSBuildStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineOSBuildApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go index 57a5ef3a54..b831bfae16 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosbuilderreference.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" ) // MachineOSBuilderReferenceApplyConfiguration represents a declarative configuration of the MachineOSBuilderReference type for use // with apply. type MachineOSBuilderReferenceApplyConfiguration struct { - ImageBuilderType *v1alpha1.MachineOSImageBuilderType `json:"imageBuilderType,omitempty"` - PodImageBuilder *ObjectReferenceApplyConfiguration `json:"buildPod,omitempty"` + ImageBuilderType *machineconfigurationv1alpha1.MachineOSImageBuilderType `json:"imageBuilderType,omitempty"` + PodImageBuilder *ObjectReferenceApplyConfiguration `json:"buildPod,omitempty"` } // MachineOSBuilderReferenceApplyConfiguration constructs a declarative configuration of the MachineOSBuilderReference type for use with @@ -22,7 +22,7 @@ func MachineOSBuilderReference() *MachineOSBuilderReferenceApplyConfiguration { // WithImageBuilderType sets the ImageBuilderType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ImageBuilderType field is set to the value of the last call. -func (b *MachineOSBuilderReferenceApplyConfiguration) WithImageBuilderType(value v1alpha1.MachineOSImageBuilderType) *MachineOSBuilderReferenceApplyConfiguration { +func (b *MachineOSBuilderReferenceApplyConfiguration) WithImageBuilderType(value machineconfigurationv1alpha1.MachineOSImageBuilderType) *MachineOSBuilderReferenceApplyConfiguration { b.ImageBuilderType = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go index eae0fd07cd..c198ffa9c4 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosconfig.go @@ -69,7 +69,7 @@ func extractMachineOSConfig(machineOSConfig *machineconfigurationv1alpha1.Machin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithKind(value string) *MachineOSConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *MachineOSConfigApplyConfiguration) WithKind(value string) *MachineOSCon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithAPIVersion(value string) *MachineOSConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *MachineOSConfigApplyConfiguration) WithAPIVersion(value string) *Machin // If called multiple times, the Name field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithName(value string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *MachineOSConfigApplyConfiguration) WithName(value string) *MachineOSCon // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithGenerateName(value string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *MachineOSConfigApplyConfiguration) WithGenerateName(value string) *Mach // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithNamespace(value string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *MachineOSConfigApplyConfiguration) WithNamespace(value string) *Machine // If called multiple times, the UID field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithUID(value types.UID) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *MachineOSConfigApplyConfiguration) WithUID(value types.UID) *MachineOSC // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithResourceVersion(value string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *MachineOSConfigApplyConfiguration) WithResourceVersion(value string) *M // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithGeneration(value int64) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *MachineOSConfigApplyConfiguration) WithGeneration(value int64) *Machine // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *MachineOSConfigApplyConfiguration) WithCreationTimestamp(value metav1.T // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *MachineOSConfigApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineOSConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *MachineOSConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *MachineOSConfigApplyConfiguration) WithLabels(entries map[string]string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *MachineOSConfigApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *MachineOSConfigApplyConfiguration) WithAnnotations(entries map[string]string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *MachineOSConfigApplyConfiguration) WithOwnerReferences(values ...*v1.Ow if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *MachineOSConfigApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *MachineOSConfigApplyConfiguration) WithFinalizers(values ...string) *MachineOSConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *MachineOSConfigApplyConfiguration) WithStatus(value *MachineOSConfigSta // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineOSConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go index 045e9345a5..fc8a097812 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineoscontainerfile.go @@ -3,14 +3,14 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" ) // MachineOSContainerfileApplyConfiguration represents a declarative configuration of the MachineOSContainerfile type for use // with apply. type MachineOSContainerfileApplyConfiguration struct { - ContainerfileArch *v1alpha1.ContainerfileArch `json:"containerfileArch,omitempty"` - Content *string `json:"content,omitempty"` + ContainerfileArch *machineconfigurationv1alpha1.ContainerfileArch `json:"containerfileArch,omitempty"` + Content *string `json:"content,omitempty"` } // MachineOSContainerfileApplyConfiguration constructs a declarative configuration of the MachineOSContainerfile type for use with @@ -22,7 +22,7 @@ func MachineOSContainerfile() *MachineOSContainerfileApplyConfiguration { // WithContainerfileArch sets the ContainerfileArch field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ContainerfileArch field is set to the value of the last call. -func (b *MachineOSContainerfileApplyConfiguration) WithContainerfileArch(value v1alpha1.ContainerfileArch) *MachineOSContainerfileApplyConfiguration { +func (b *MachineOSContainerfileApplyConfiguration) WithContainerfileArch(value machineconfigurationv1alpha1.ContainerfileArch) *MachineOSContainerfileApplyConfiguration { b.ContainerfileArch = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go index f8fb27e793..266110d4b3 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/machineosimagebuilder.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" ) // MachineOSImageBuilderApplyConfiguration represents a declarative configuration of the MachineOSImageBuilder type for use // with apply. type MachineOSImageBuilderApplyConfiguration struct { - ImageBuilderType *v1alpha1.MachineOSImageBuilderType `json:"imageBuilderType,omitempty"` + ImageBuilderType *machineconfigurationv1alpha1.MachineOSImageBuilderType `json:"imageBuilderType,omitempty"` } // MachineOSImageBuilderApplyConfiguration constructs a declarative configuration of the MachineOSImageBuilder type for use with @@ -21,7 +21,7 @@ func MachineOSImageBuilder() *MachineOSImageBuilderApplyConfiguration { // WithImageBuilderType sets the ImageBuilderType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ImageBuilderType field is set to the value of the last call. -func (b *MachineOSImageBuilderApplyConfiguration) WithImageBuilderType(value v1alpha1.MachineOSImageBuilderType) *MachineOSImageBuilderApplyConfiguration { +func (b *MachineOSImageBuilderApplyConfiguration) WithImageBuilderType(value machineconfigurationv1alpha1.MachineOSImageBuilderType) *MachineOSImageBuilderApplyConfiguration { b.ImageBuilderType = &value return b } diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go index f39642c080..94f302eb18 100644 --- a/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1/pinnedimageset.go @@ -69,7 +69,7 @@ func extractPinnedImageSet(pinnedImageSet *machineconfigurationv1alpha1.PinnedIm // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithKind(value string) *PinnedImageSetApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *PinnedImageSetApplyConfiguration) WithKind(value string) *PinnedImageSe // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithAPIVersion(value string) *PinnedImageSetApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *PinnedImageSetApplyConfiguration) WithAPIVersion(value string) *PinnedI // If called multiple times, the Name field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithName(value string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *PinnedImageSetApplyConfiguration) WithName(value string) *PinnedImageSe // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithGenerateName(value string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *PinnedImageSetApplyConfiguration) WithGenerateName(value string) *Pinne // If called multiple times, the Namespace field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithNamespace(value string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *PinnedImageSetApplyConfiguration) WithNamespace(value string) *PinnedIm // If called multiple times, the UID field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithUID(value types.UID) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *PinnedImageSetApplyConfiguration) WithUID(value types.UID) *PinnedImage // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithResourceVersion(value string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *PinnedImageSetApplyConfiguration) WithResourceVersion(value string) *Pi // If called multiple times, the Generation field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithGeneration(value int64) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *PinnedImageSetApplyConfiguration) WithGeneration(value int64) *PinnedIm // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *PinnedImageSetApplyConfiguration) WithCreationTimestamp(value metav1.Ti // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *PinnedImageSetApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PinnedImageSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *PinnedImageSetApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *PinnedImageSetApplyConfiguration) WithLabels(entries map[string]string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *PinnedImageSetApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *PinnedImageSetApplyConfiguration) WithAnnotations(entries map[string]string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *PinnedImageSetApplyConfiguration) WithOwnerReferences(values ...*v1.Own if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *PinnedImageSetApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *PinnedImageSetApplyConfiguration) WithFinalizers(values ...string) *PinnedImageSetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *PinnedImageSetApplyConfiguration) WithStatus(value *PinnedImageSetStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *PinnedImageSetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/machineconfiguration/clientset/versioned/clientset.go b/machineconfiguration/clientset/versioned/clientset.go index f58c537850..25cd7daff9 100644 --- a/machineconfiguration/clientset/versioned/clientset.go +++ b/machineconfiguration/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1" diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go index 48f5855875..f8a25a5c9f 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/containerruntimeconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/machineconfiguration/v1" - machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type ContainerRuntimeConfigsGetter interface { // ContainerRuntimeConfigInterface has methods to work with ContainerRuntimeConfig resources. type ContainerRuntimeConfigInterface interface { - Create(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.CreateOptions) (*v1.ContainerRuntimeConfig, error) - Update(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (*v1.ContainerRuntimeConfig, error) + Create(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfig, opts metav1.CreateOptions) (*machineconfigurationv1.ContainerRuntimeConfig, error) + Update(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.ContainerRuntimeConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (*v1.ContainerRuntimeConfig, error) + UpdateStatus(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.ContainerRuntimeConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ContainerRuntimeConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ContainerRuntimeConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.ContainerRuntimeConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.ContainerRuntimeConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ContainerRuntimeConfig, err error) - Apply(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.ContainerRuntimeConfig, err error) + Apply(ctx context.Context, containerRuntimeConfig *applyconfigurationsmachineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.ContainerRuntimeConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) + ApplyStatus(ctx context.Context, containerRuntimeConfig *applyconfigurationsmachineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.ContainerRuntimeConfig, err error) ContainerRuntimeConfigExpansion } // containerRuntimeConfigs implements ContainerRuntimeConfigInterface type containerRuntimeConfigs struct { - *gentype.ClientWithListAndApply[*v1.ContainerRuntimeConfig, *v1.ContainerRuntimeConfigList, *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1.ContainerRuntimeConfig, *machineconfigurationv1.ContainerRuntimeConfigList, *applyconfigurationsmachineconfigurationv1.ContainerRuntimeConfigApplyConfiguration] } // newContainerRuntimeConfigs returns a ContainerRuntimeConfigs func newContainerRuntimeConfigs(c *MachineconfigurationV1Client) *containerRuntimeConfigs { return &containerRuntimeConfigs{ - gentype.NewClientWithListAndApply[*v1.ContainerRuntimeConfig, *v1.ContainerRuntimeConfigList, *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1.ContainerRuntimeConfig, *machineconfigurationv1.ContainerRuntimeConfigList, *applyconfigurationsmachineconfigurationv1.ContainerRuntimeConfigApplyConfiguration]( "containerruntimeconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ContainerRuntimeConfig { return &v1.ContainerRuntimeConfig{} }, - func() *v1.ContainerRuntimeConfigList { return &v1.ContainerRuntimeConfigList{} }), + func() *machineconfigurationv1.ContainerRuntimeConfig { + return &machineconfigurationv1.ContainerRuntimeConfig{} + }, + func() *machineconfigurationv1.ContainerRuntimeConfigList { + return &machineconfigurationv1.ContainerRuntimeConfigList{} + }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go index 4b67c0d90c..ab29b63b1e 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/controllerconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/machineconfiguration/v1" - machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,39 @@ type ControllerConfigsGetter interface { // ControllerConfigInterface has methods to work with ControllerConfig resources. type ControllerConfigInterface interface { - Create(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.CreateOptions) (*v1.ControllerConfig, error) - Update(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (*v1.ControllerConfig, error) + Create(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfig, opts metav1.CreateOptions) (*machineconfigurationv1.ControllerConfig, error) + Update(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.ControllerConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (*v1.ControllerConfig, error) + UpdateStatus(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.ControllerConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ControllerConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.ControllerConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.ControllerConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerConfig, err error) - Apply(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.ControllerConfig, err error) + Apply(ctx context.Context, controllerConfig *applyconfigurationsmachineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.ControllerConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) + ApplyStatus(ctx context.Context, controllerConfig *applyconfigurationsmachineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.ControllerConfig, err error) ControllerConfigExpansion } // controllerConfigs implements ControllerConfigInterface type controllerConfigs struct { - *gentype.ClientWithListAndApply[*v1.ControllerConfig, *v1.ControllerConfigList, *machineconfigurationv1.ControllerConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1.ControllerConfig, *machineconfigurationv1.ControllerConfigList, *applyconfigurationsmachineconfigurationv1.ControllerConfigApplyConfiguration] } // newControllerConfigs returns a ControllerConfigs func newControllerConfigs(c *MachineconfigurationV1Client) *controllerConfigs { return &controllerConfigs{ - gentype.NewClientWithListAndApply[*v1.ControllerConfig, *v1.ControllerConfigList, *machineconfigurationv1.ControllerConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1.ControllerConfig, *machineconfigurationv1.ControllerConfigList, *applyconfigurationsmachineconfigurationv1.ControllerConfigApplyConfiguration]( "controllerconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ControllerConfig { return &v1.ControllerConfig{} }, - func() *v1.ControllerConfigList { return &v1.ControllerConfigList{} }), + func() *machineconfigurationv1.ControllerConfig { return &machineconfigurationv1.ControllerConfig{} }, + func() *machineconfigurationv1.ControllerConfigList { + return &machineconfigurationv1.ControllerConfigList{} + }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_containerruntimeconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_containerruntimeconfig.go index 6be41f2a8e..a04b18c273 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_containerruntimeconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_containerruntimeconfig.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/machineconfiguration/v1" machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeContainerRuntimeConfigs implements ContainerRuntimeConfigInterface -type FakeContainerRuntimeConfigs struct { +// fakeContainerRuntimeConfigs implements ContainerRuntimeConfigInterface +type fakeContainerRuntimeConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.ContainerRuntimeConfig, *v1.ContainerRuntimeConfigList, *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration] Fake *FakeMachineconfigurationV1 } -var containerruntimeconfigsResource = v1.SchemeGroupVersion.WithResource("containerruntimeconfigs") - -var containerruntimeconfigsKind = v1.SchemeGroupVersion.WithKind("ContainerRuntimeConfig") - -// Get takes name of the containerRuntimeConfig, and returns the corresponding containerRuntimeConfig object, and an error if there is any. -func (c *FakeContainerRuntimeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ContainerRuntimeConfig, err error) { - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(containerruntimeconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ContainerRuntimeConfig), err -} - -// List takes label and field selectors, and returns the list of ContainerRuntimeConfigs that match those selectors. -func (c *FakeContainerRuntimeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ContainerRuntimeConfigList, err error) { - emptyResult := &v1.ContainerRuntimeConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(containerruntimeconfigsResource, containerruntimeconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ContainerRuntimeConfigList{ListMeta: obj.(*v1.ContainerRuntimeConfigList).ListMeta} - for _, item := range obj.(*v1.ContainerRuntimeConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested containerRuntimeConfigs. -func (c *FakeContainerRuntimeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(containerruntimeconfigsResource, opts)) -} - -// Create takes the representation of a containerRuntimeConfig and creates it. Returns the server's representation of the containerRuntimeConfig, and an error, if there is any. -func (c *FakeContainerRuntimeConfigs) Create(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.CreateOptions) (result *v1.ContainerRuntimeConfig, err error) { - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(containerruntimeconfigsResource, containerRuntimeConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ContainerRuntimeConfig), err -} - -// Update takes the representation of a containerRuntimeConfig and updates it. Returns the server's representation of the containerRuntimeConfig, and an error, if there is any. -func (c *FakeContainerRuntimeConfigs) Update(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (result *v1.ContainerRuntimeConfig, err error) { - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(containerruntimeconfigsResource, containerRuntimeConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ContainerRuntimeConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeContainerRuntimeConfigs) UpdateStatus(ctx context.Context, containerRuntimeConfig *v1.ContainerRuntimeConfig, opts metav1.UpdateOptions) (result *v1.ContainerRuntimeConfig, err error) { - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(containerruntimeconfigsResource, "status", containerRuntimeConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ContainerRuntimeConfig), err -} - -// Delete takes name of the containerRuntimeConfig and deletes it. Returns an error if one occurs. -func (c *FakeContainerRuntimeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(containerruntimeconfigsResource, name, opts), &v1.ContainerRuntimeConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeContainerRuntimeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(containerruntimeconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ContainerRuntimeConfigList{}) - return err -} - -// Patch applies the patch and returns the patched containerRuntimeConfig. -func (c *FakeContainerRuntimeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ContainerRuntimeConfig, err error) { - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(containerruntimeconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ContainerRuntimeConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied containerRuntimeConfig. -func (c *FakeContainerRuntimeConfigs) Apply(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) { - if containerRuntimeConfig == nil { - return nil, fmt.Errorf("containerRuntimeConfig provided to Apply must not be nil") - } - data, err := json.Marshal(containerRuntimeConfig) - if err != nil { - return nil, err - } - name := containerRuntimeConfig.Name - if name == nil { - return nil, fmt.Errorf("containerRuntimeConfig.Name must be provided to Apply") - } - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(containerruntimeconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ContainerRuntimeConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeContainerRuntimeConfigs) ApplyStatus(ctx context.Context, containerRuntimeConfig *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ContainerRuntimeConfig, err error) { - if containerRuntimeConfig == nil { - return nil, fmt.Errorf("containerRuntimeConfig provided to Apply must not be nil") - } - data, err := json.Marshal(containerRuntimeConfig) - if err != nil { - return nil, err - } - name := containerRuntimeConfig.Name - if name == nil { - return nil, fmt.Errorf("containerRuntimeConfig.Name must be provided to Apply") - } - emptyResult := &v1.ContainerRuntimeConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(containerruntimeconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeContainerRuntimeConfigs(fake *FakeMachineconfigurationV1) typedmachineconfigurationv1.ContainerRuntimeConfigInterface { + return &fakeContainerRuntimeConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.ContainerRuntimeConfig, *v1.ContainerRuntimeConfigList, *machineconfigurationv1.ContainerRuntimeConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("containerruntimeconfigs"), + v1.SchemeGroupVersion.WithKind("ContainerRuntimeConfig"), + func() *v1.ContainerRuntimeConfig { return &v1.ContainerRuntimeConfig{} }, + func() *v1.ContainerRuntimeConfigList { return &v1.ContainerRuntimeConfigList{} }, + func(dst, src *v1.ContainerRuntimeConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ContainerRuntimeConfigList) []*v1.ContainerRuntimeConfig { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ContainerRuntimeConfigList, items []*v1.ContainerRuntimeConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ContainerRuntimeConfig), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_controllerconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_controllerconfig.go index 3c6b3553ac..1c8be5ba51 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_controllerconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_controllerconfig.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/machineconfiguration/v1" machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeControllerConfigs implements ControllerConfigInterface -type FakeControllerConfigs struct { +// fakeControllerConfigs implements ControllerConfigInterface +type fakeControllerConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.ControllerConfig, *v1.ControllerConfigList, *machineconfigurationv1.ControllerConfigApplyConfiguration] Fake *FakeMachineconfigurationV1 } -var controllerconfigsResource = v1.SchemeGroupVersion.WithResource("controllerconfigs") - -var controllerconfigsKind = v1.SchemeGroupVersion.WithKind("ControllerConfig") - -// Get takes name of the controllerConfig, and returns the corresponding controllerConfig object, and an error if there is any. -func (c *FakeControllerConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControllerConfig, err error) { - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(controllerconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControllerConfig), err -} - -// List takes label and field selectors, and returns the list of ControllerConfigs that match those selectors. -func (c *FakeControllerConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerConfigList, err error) { - emptyResult := &v1.ControllerConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(controllerconfigsResource, controllerconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ControllerConfigList{ListMeta: obj.(*v1.ControllerConfigList).ListMeta} - for _, item := range obj.(*v1.ControllerConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested controllerConfigs. -func (c *FakeControllerConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(controllerconfigsResource, opts)) -} - -// Create takes the representation of a controllerConfig and creates it. Returns the server's representation of the controllerConfig, and an error, if there is any. -func (c *FakeControllerConfigs) Create(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.CreateOptions) (result *v1.ControllerConfig, err error) { - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(controllerconfigsResource, controllerConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControllerConfig), err -} - -// Update takes the representation of a controllerConfig and updates it. Returns the server's representation of the controllerConfig, and an error, if there is any. -func (c *FakeControllerConfigs) Update(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (result *v1.ControllerConfig, err error) { - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(controllerconfigsResource, controllerConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControllerConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeControllerConfigs) UpdateStatus(ctx context.Context, controllerConfig *v1.ControllerConfig, opts metav1.UpdateOptions) (result *v1.ControllerConfig, err error) { - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(controllerconfigsResource, "status", controllerConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControllerConfig), err -} - -// Delete takes name of the controllerConfig and deletes it. Returns an error if one occurs. -func (c *FakeControllerConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(controllerconfigsResource, name, opts), &v1.ControllerConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeControllerConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(controllerconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ControllerConfigList{}) - return err -} - -// Patch applies the patch and returns the patched controllerConfig. -func (c *FakeControllerConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerConfig, err error) { - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(controllerconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControllerConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied controllerConfig. -func (c *FakeControllerConfigs) Apply(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) { - if controllerConfig == nil { - return nil, fmt.Errorf("controllerConfig provided to Apply must not be nil") - } - data, err := json.Marshal(controllerConfig) - if err != nil { - return nil, err - } - name := controllerConfig.Name - if name == nil { - return nil, fmt.Errorf("controllerConfig.Name must be provided to Apply") - } - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(controllerconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ControllerConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeControllerConfigs) ApplyStatus(ctx context.Context, controllerConfig *machineconfigurationv1.ControllerConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ControllerConfig, err error) { - if controllerConfig == nil { - return nil, fmt.Errorf("controllerConfig provided to Apply must not be nil") - } - data, err := json.Marshal(controllerConfig) - if err != nil { - return nil, err - } - name := controllerConfig.Name - if name == nil { - return nil, fmt.Errorf("controllerConfig.Name must be provided to Apply") - } - emptyResult := &v1.ControllerConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(controllerconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeControllerConfigs(fake *FakeMachineconfigurationV1) typedmachineconfigurationv1.ControllerConfigInterface { + return &fakeControllerConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.ControllerConfig, *v1.ControllerConfigList, *machineconfigurationv1.ControllerConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("controllerconfigs"), + v1.SchemeGroupVersion.WithKind("ControllerConfig"), + func() *v1.ControllerConfig { return &v1.ControllerConfig{} }, + func() *v1.ControllerConfigList { return &v1.ControllerConfigList{} }, + func(dst, src *v1.ControllerConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ControllerConfigList) []*v1.ControllerConfig { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ControllerConfigList, items []*v1.ControllerConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ControllerConfig), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_kubeletconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_kubeletconfig.go index 378913f2af..46f08fa384 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_kubeletconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_kubeletconfig.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/machineconfiguration/v1" machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeKubeletConfigs implements KubeletConfigInterface -type FakeKubeletConfigs struct { +// fakeKubeletConfigs implements KubeletConfigInterface +type fakeKubeletConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.KubeletConfig, *v1.KubeletConfigList, *machineconfigurationv1.KubeletConfigApplyConfiguration] Fake *FakeMachineconfigurationV1 } -var kubeletconfigsResource = v1.SchemeGroupVersion.WithResource("kubeletconfigs") - -var kubeletconfigsKind = v1.SchemeGroupVersion.WithKind("KubeletConfig") - -// Get takes name of the kubeletConfig, and returns the corresponding kubeletConfig object, and an error if there is any. -func (c *FakeKubeletConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeletConfig, err error) { - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(kubeletconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeletConfig), err -} - -// List takes label and field selectors, and returns the list of KubeletConfigs that match those selectors. -func (c *FakeKubeletConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeletConfigList, err error) { - emptyResult := &v1.KubeletConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(kubeletconfigsResource, kubeletconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.KubeletConfigList{ListMeta: obj.(*v1.KubeletConfigList).ListMeta} - for _, item := range obj.(*v1.KubeletConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested kubeletConfigs. -func (c *FakeKubeletConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(kubeletconfigsResource, opts)) -} - -// Create takes the representation of a kubeletConfig and creates it. Returns the server's representation of the kubeletConfig, and an error, if there is any. -func (c *FakeKubeletConfigs) Create(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.CreateOptions) (result *v1.KubeletConfig, err error) { - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(kubeletconfigsResource, kubeletConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeletConfig), err -} - -// Update takes the representation of a kubeletConfig and updates it. Returns the server's representation of the kubeletConfig, and an error, if there is any. -func (c *FakeKubeletConfigs) Update(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (result *v1.KubeletConfig, err error) { - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(kubeletconfigsResource, kubeletConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeletConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeletConfigs) UpdateStatus(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (result *v1.KubeletConfig, err error) { - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(kubeletconfigsResource, "status", kubeletConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeletConfig), err -} - -// Delete takes name of the kubeletConfig and deletes it. Returns an error if one occurs. -func (c *FakeKubeletConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeletconfigsResource, name, opts), &v1.KubeletConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeKubeletConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(kubeletconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.KubeletConfigList{}) - return err -} - -// Patch applies the patch and returns the patched kubeletConfig. -func (c *FakeKubeletConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeletConfig, err error) { - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeletconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeletConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied kubeletConfig. -func (c *FakeKubeletConfigs) Apply(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) { - if kubeletConfig == nil { - return nil, fmt.Errorf("kubeletConfig provided to Apply must not be nil") - } - data, err := json.Marshal(kubeletConfig) - if err != nil { - return nil, err - } - name := kubeletConfig.Name - if name == nil { - return nil, fmt.Errorf("kubeletConfig.Name must be provided to Apply") - } - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeletconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeletConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeletConfigs) ApplyStatus(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) { - if kubeletConfig == nil { - return nil, fmt.Errorf("kubeletConfig provided to Apply must not be nil") - } - data, err := json.Marshal(kubeletConfig) - if err != nil { - return nil, err - } - name := kubeletConfig.Name - if name == nil { - return nil, fmt.Errorf("kubeletConfig.Name must be provided to Apply") - } - emptyResult := &v1.KubeletConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeletconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeKubeletConfigs(fake *FakeMachineconfigurationV1) typedmachineconfigurationv1.KubeletConfigInterface { + return &fakeKubeletConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.KubeletConfig, *v1.KubeletConfigList, *machineconfigurationv1.KubeletConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("kubeletconfigs"), + v1.SchemeGroupVersion.WithKind("KubeletConfig"), + func() *v1.KubeletConfig { return &v1.KubeletConfig{} }, + func() *v1.KubeletConfigList { return &v1.KubeletConfigList{} }, + func(dst, src *v1.KubeletConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.KubeletConfigList) []*v1.KubeletConfig { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.KubeletConfigList, items []*v1.KubeletConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.KubeletConfig), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfig.go index 987a2099f7..5740f3dcee 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfig.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/machineconfiguration/v1" machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineConfigs implements MachineConfigInterface -type FakeMachineConfigs struct { +// fakeMachineConfigs implements MachineConfigInterface +type fakeMachineConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.MachineConfig, *v1.MachineConfigList, *machineconfigurationv1.MachineConfigApplyConfiguration] Fake *FakeMachineconfigurationV1 } -var machineconfigsResource = v1.SchemeGroupVersion.WithResource("machineconfigs") - -var machineconfigsKind = v1.SchemeGroupVersion.WithKind("MachineConfig") - -// Get takes name of the machineConfig, and returns the corresponding machineConfig object, and an error if there is any. -func (c *FakeMachineConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MachineConfig, err error) { - emptyResult := &v1.MachineConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(machineconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfig), err -} - -// List takes label and field selectors, and returns the list of MachineConfigs that match those selectors. -func (c *FakeMachineConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MachineConfigList, err error) { - emptyResult := &v1.MachineConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(machineconfigsResource, machineconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.MachineConfigList{ListMeta: obj.(*v1.MachineConfigList).ListMeta} - for _, item := range obj.(*v1.MachineConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineConfigs. -func (c *FakeMachineConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(machineconfigsResource, opts)) -} - -// Create takes the representation of a machineConfig and creates it. Returns the server's representation of the machineConfig, and an error, if there is any. -func (c *FakeMachineConfigs) Create(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.CreateOptions) (result *v1.MachineConfig, err error) { - emptyResult := &v1.MachineConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(machineconfigsResource, machineConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfig), err -} - -// Update takes the representation of a machineConfig and updates it. Returns the server's representation of the machineConfig, and an error, if there is any. -func (c *FakeMachineConfigs) Update(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.UpdateOptions) (result *v1.MachineConfig, err error) { - emptyResult := &v1.MachineConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(machineconfigsResource, machineConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfig), err -} - -// Delete takes name of the machineConfig and deletes it. Returns an error if one occurs. -func (c *FakeMachineConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(machineconfigsResource, name, opts), &v1.MachineConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(machineconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.MachineConfigList{}) - return err -} - -// Patch applies the patch and returns the patched machineConfig. -func (c *FakeMachineConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfig, err error) { - emptyResult := &v1.MachineConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfig. -func (c *FakeMachineConfigs) Apply(ctx context.Context, machineConfig *machineconfigurationv1.MachineConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfig, err error) { - if machineConfig == nil { - return nil, fmt.Errorf("machineConfig provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfig) - if err != nil { - return nil, err - } - name := machineConfig.Name - if name == nil { - return nil, fmt.Errorf("machineConfig.Name must be provided to Apply") - } - emptyResult := &v1.MachineConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeMachineConfigs(fake *FakeMachineconfigurationV1) typedmachineconfigurationv1.MachineConfigInterface { + return &fakeMachineConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.MachineConfig, *v1.MachineConfigList, *machineconfigurationv1.MachineConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("machineconfigs"), + v1.SchemeGroupVersion.WithKind("MachineConfig"), + func() *v1.MachineConfig { return &v1.MachineConfig{} }, + func() *v1.MachineConfigList { return &v1.MachineConfigList{} }, + func(dst, src *v1.MachineConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.MachineConfigList) []*v1.MachineConfig { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.MachineConfigList, items []*v1.MachineConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.MachineConfig), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfigpool.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfigpool.go index e9422f7e04..529f1c773e 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfigpool.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfigpool.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/machineconfiguration/v1" machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineConfigPools implements MachineConfigPoolInterface -type FakeMachineConfigPools struct { +// fakeMachineConfigPools implements MachineConfigPoolInterface +type fakeMachineConfigPools struct { + *gentype.FakeClientWithListAndApply[*v1.MachineConfigPool, *v1.MachineConfigPoolList, *machineconfigurationv1.MachineConfigPoolApplyConfiguration] Fake *FakeMachineconfigurationV1 } -var machineconfigpoolsResource = v1.SchemeGroupVersion.WithResource("machineconfigpools") - -var machineconfigpoolsKind = v1.SchemeGroupVersion.WithKind("MachineConfigPool") - -// Get takes name of the machineConfigPool, and returns the corresponding machineConfigPool object, and an error if there is any. -func (c *FakeMachineConfigPools) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MachineConfigPool, err error) { - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(machineconfigpoolsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfigPool), err -} - -// List takes label and field selectors, and returns the list of MachineConfigPools that match those selectors. -func (c *FakeMachineConfigPools) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MachineConfigPoolList, err error) { - emptyResult := &v1.MachineConfigPoolList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(machineconfigpoolsResource, machineconfigpoolsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.MachineConfigPoolList{ListMeta: obj.(*v1.MachineConfigPoolList).ListMeta} - for _, item := range obj.(*v1.MachineConfigPoolList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineConfigPools. -func (c *FakeMachineConfigPools) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(machineconfigpoolsResource, opts)) -} - -// Create takes the representation of a machineConfigPool and creates it. Returns the server's representation of the machineConfigPool, and an error, if there is any. -func (c *FakeMachineConfigPools) Create(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.CreateOptions) (result *v1.MachineConfigPool, err error) { - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(machineconfigpoolsResource, machineConfigPool, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfigPool), err -} - -// Update takes the representation of a machineConfigPool and updates it. Returns the server's representation of the machineConfigPool, and an error, if there is any. -func (c *FakeMachineConfigPools) Update(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (result *v1.MachineConfigPool, err error) { - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(machineconfigpoolsResource, machineConfigPool, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfigPool), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineConfigPools) UpdateStatus(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (result *v1.MachineConfigPool, err error) { - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(machineconfigpoolsResource, "status", machineConfigPool, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfigPool), err -} - -// Delete takes name of the machineConfigPool and deletes it. Returns an error if one occurs. -func (c *FakeMachineConfigPools) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(machineconfigpoolsResource, name, opts), &v1.MachineConfigPool{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineConfigPools) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(machineconfigpoolsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.MachineConfigPoolList{}) - return err -} - -// Patch applies the patch and returns the patched machineConfigPool. -func (c *FakeMachineConfigPools) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfigPool, err error) { - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigpoolsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfigPool), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfigPool. -func (c *FakeMachineConfigPools) Apply(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) { - if machineConfigPool == nil { - return nil, fmt.Errorf("machineConfigPool provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfigPool) - if err != nil { - return nil, err - } - name := machineConfigPool.Name - if name == nil { - return nil, fmt.Errorf("machineConfigPool.Name must be provided to Apply") - } - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigpoolsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfigPool), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineConfigPools) ApplyStatus(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) { - if machineConfigPool == nil { - return nil, fmt.Errorf("machineConfigPool provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfigPool) - if err != nil { - return nil, err - } - name := machineConfigPool.Name - if name == nil { - return nil, fmt.Errorf("machineConfigPool.Name must be provided to Apply") - } - emptyResult := &v1.MachineConfigPool{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigpoolsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeMachineConfigPools(fake *FakeMachineconfigurationV1) typedmachineconfigurationv1.MachineConfigPoolInterface { + return &fakeMachineConfigPools{ + gentype.NewFakeClientWithListAndApply[*v1.MachineConfigPool, *v1.MachineConfigPoolList, *machineconfigurationv1.MachineConfigPoolApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("machineconfigpools"), + v1.SchemeGroupVersion.WithKind("MachineConfigPool"), + func() *v1.MachineConfigPool { return &v1.MachineConfigPool{} }, + func() *v1.MachineConfigPoolList { return &v1.MachineConfigPoolList{} }, + func(dst, src *v1.MachineConfigPoolList) { dst.ListMeta = src.ListMeta }, + func(list *v1.MachineConfigPoolList) []*v1.MachineConfigPool { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.MachineConfigPoolList, items []*v1.MachineConfigPool) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.MachineConfigPool), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go index c9ef0eeb40..9aa9e3415a 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go @@ -13,23 +13,23 @@ type FakeMachineconfigurationV1 struct { } func (c *FakeMachineconfigurationV1) ContainerRuntimeConfigs() v1.ContainerRuntimeConfigInterface { - return &FakeContainerRuntimeConfigs{c} + return newFakeContainerRuntimeConfigs(c) } func (c *FakeMachineconfigurationV1) ControllerConfigs() v1.ControllerConfigInterface { - return &FakeControllerConfigs{c} + return newFakeControllerConfigs(c) } func (c *FakeMachineconfigurationV1) KubeletConfigs() v1.KubeletConfigInterface { - return &FakeKubeletConfigs{c} + return newFakeKubeletConfigs(c) } func (c *FakeMachineconfigurationV1) MachineConfigs() v1.MachineConfigInterface { - return &FakeMachineConfigs{c} + return newFakeMachineConfigs(c) } func (c *FakeMachineconfigurationV1) MachineConfigPools() v1.MachineConfigPoolInterface { - return &FakeMachineConfigPools{c} + return newFakeMachineConfigPools(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go index c6e677406e..f73f46858b 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/kubeletconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/machineconfiguration/v1" - machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type KubeletConfigsGetter interface { // KubeletConfigInterface has methods to work with KubeletConfig resources. type KubeletConfigInterface interface { - Create(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.CreateOptions) (*v1.KubeletConfig, error) - Update(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (*v1.KubeletConfig, error) + Create(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfig, opts metav1.CreateOptions) (*machineconfigurationv1.KubeletConfig, error) + Update(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.KubeletConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, kubeletConfig *v1.KubeletConfig, opts metav1.UpdateOptions) (*v1.KubeletConfig, error) + UpdateStatus(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.KubeletConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeletConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeletConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.KubeletConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.KubeletConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeletConfig, err error) - Apply(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.KubeletConfig, err error) + Apply(ctx context.Context, kubeletConfig *applyconfigurationsmachineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.KubeletConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, kubeletConfig *machineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeletConfig, err error) + ApplyStatus(ctx context.Context, kubeletConfig *applyconfigurationsmachineconfigurationv1.KubeletConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.KubeletConfig, err error) KubeletConfigExpansion } // kubeletConfigs implements KubeletConfigInterface type kubeletConfigs struct { - *gentype.ClientWithListAndApply[*v1.KubeletConfig, *v1.KubeletConfigList, *machineconfigurationv1.KubeletConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1.KubeletConfig, *machineconfigurationv1.KubeletConfigList, *applyconfigurationsmachineconfigurationv1.KubeletConfigApplyConfiguration] } // newKubeletConfigs returns a KubeletConfigs func newKubeletConfigs(c *MachineconfigurationV1Client) *kubeletConfigs { return &kubeletConfigs{ - gentype.NewClientWithListAndApply[*v1.KubeletConfig, *v1.KubeletConfigList, *machineconfigurationv1.KubeletConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1.KubeletConfig, *machineconfigurationv1.KubeletConfigList, *applyconfigurationsmachineconfigurationv1.KubeletConfigApplyConfiguration]( "kubeletconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.KubeletConfig { return &v1.KubeletConfig{} }, - func() *v1.KubeletConfigList { return &v1.KubeletConfigList{} }), + func() *machineconfigurationv1.KubeletConfig { return &machineconfigurationv1.KubeletConfig{} }, + func() *machineconfigurationv1.KubeletConfigList { return &machineconfigurationv1.KubeletConfigList{} }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go index 9ef51a0ddd..5c2e203793 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/machineconfiguration/v1" - machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type MachineConfigsGetter interface { // MachineConfigInterface has methods to work with MachineConfig resources. type MachineConfigInterface interface { - Create(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.CreateOptions) (*v1.MachineConfig, error) - Update(ctx context.Context, machineConfig *v1.MachineConfig, opts metav1.UpdateOptions) (*v1.MachineConfig, error) + Create(ctx context.Context, machineConfig *machineconfigurationv1.MachineConfig, opts metav1.CreateOptions) (*machineconfigurationv1.MachineConfig, error) + Update(ctx context.Context, machineConfig *machineconfigurationv1.MachineConfig, opts metav1.UpdateOptions) (*machineconfigurationv1.MachineConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MachineConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.MachineConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.MachineConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.MachineConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfig, err error) - Apply(ctx context.Context, machineConfig *machineconfigurationv1.MachineConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.MachineConfig, err error) + Apply(ctx context.Context, machineConfig *applyconfigurationsmachineconfigurationv1.MachineConfigApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.MachineConfig, err error) MachineConfigExpansion } // machineConfigs implements MachineConfigInterface type machineConfigs struct { - *gentype.ClientWithListAndApply[*v1.MachineConfig, *v1.MachineConfigList, *machineconfigurationv1.MachineConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1.MachineConfig, *machineconfigurationv1.MachineConfigList, *applyconfigurationsmachineconfigurationv1.MachineConfigApplyConfiguration] } // newMachineConfigs returns a MachineConfigs func newMachineConfigs(c *MachineconfigurationV1Client) *machineConfigs { return &machineConfigs{ - gentype.NewClientWithListAndApply[*v1.MachineConfig, *v1.MachineConfigList, *machineconfigurationv1.MachineConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1.MachineConfig, *machineconfigurationv1.MachineConfigList, *applyconfigurationsmachineconfigurationv1.MachineConfigApplyConfiguration]( "machineconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.MachineConfig { return &v1.MachineConfig{} }, - func() *v1.MachineConfigList { return &v1.MachineConfigList{} }), + func() *machineconfigurationv1.MachineConfig { return &machineconfigurationv1.MachineConfig{} }, + func() *machineconfigurationv1.MachineConfigList { return &machineconfigurationv1.MachineConfigList{} }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go index da45e61d4f..173cb2c3af 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfigpool.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/machineconfiguration/v1" - machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,39 @@ type MachineConfigPoolsGetter interface { // MachineConfigPoolInterface has methods to work with MachineConfigPool resources. type MachineConfigPoolInterface interface { - Create(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.CreateOptions) (*v1.MachineConfigPool, error) - Update(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (*v1.MachineConfigPool, error) + Create(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPool, opts metav1.CreateOptions) (*machineconfigurationv1.MachineConfigPool, error) + Update(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPool, opts metav1.UpdateOptions) (*machineconfigurationv1.MachineConfigPool, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineConfigPool *v1.MachineConfigPool, opts metav1.UpdateOptions) (*v1.MachineConfigPool, error) + UpdateStatus(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPool, opts metav1.UpdateOptions) (*machineconfigurationv1.MachineConfigPool, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MachineConfigPool, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.MachineConfigPoolList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.MachineConfigPool, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.MachineConfigPoolList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfigPool, err error) - Apply(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.MachineConfigPool, err error) + Apply(ctx context.Context, machineConfigPool *applyconfigurationsmachineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.MachineConfigPool, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineConfigPool *machineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfigPool, err error) + ApplyStatus(ctx context.Context, machineConfigPool *applyconfigurationsmachineconfigurationv1.MachineConfigPoolApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.MachineConfigPool, err error) MachineConfigPoolExpansion } // machineConfigPools implements MachineConfigPoolInterface type machineConfigPools struct { - *gentype.ClientWithListAndApply[*v1.MachineConfigPool, *v1.MachineConfigPoolList, *machineconfigurationv1.MachineConfigPoolApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1.MachineConfigPool, *machineconfigurationv1.MachineConfigPoolList, *applyconfigurationsmachineconfigurationv1.MachineConfigPoolApplyConfiguration] } // newMachineConfigPools returns a MachineConfigPools func newMachineConfigPools(c *MachineconfigurationV1Client) *machineConfigPools { return &machineConfigPools{ - gentype.NewClientWithListAndApply[*v1.MachineConfigPool, *v1.MachineConfigPoolList, *machineconfigurationv1.MachineConfigPoolApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1.MachineConfigPool, *machineconfigurationv1.MachineConfigPoolList, *applyconfigurationsmachineconfigurationv1.MachineConfigPoolApplyConfiguration]( "machineconfigpools", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.MachineConfigPool { return &v1.MachineConfigPool{} }, - func() *v1.MachineConfigPoolList { return &v1.MachineConfigPoolList{} }), + func() *machineconfigurationv1.MachineConfigPool { return &machineconfigurationv1.MachineConfigPool{} }, + func() *machineconfigurationv1.MachineConfigPoolList { + return &machineconfigurationv1.MachineConfigPoolList{} + }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go index 6bc99dd14a..ed688b6202 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/machineconfiguration/v1" - "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -89,10 +89,10 @@ func New(c rest.Interface) *MachineconfigurationV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := machineconfigurationv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfignode.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfignode.go index c840e2c857..84b5e766a3 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfignode.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfignode.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineConfigNodes implements MachineConfigNodeInterface -type FakeMachineConfigNodes struct { +// fakeMachineConfigNodes implements MachineConfigNodeInterface +type fakeMachineConfigNodes struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.MachineConfigNode, *v1alpha1.MachineConfigNodeList, *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration] Fake *FakeMachineconfigurationV1alpha1 } -var machineconfignodesResource = v1alpha1.SchemeGroupVersion.WithResource("machineconfignodes") - -var machineconfignodesKind = v1alpha1.SchemeGroupVersion.WithKind("MachineConfigNode") - -// Get takes name of the machineConfigNode, and returns the corresponding machineConfigNode object, and an error if there is any. -func (c *FakeMachineConfigNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MachineConfigNode, err error) { - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(machineconfignodesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineConfigNode), err -} - -// List takes label and field selectors, and returns the list of MachineConfigNodes that match those selectors. -func (c *FakeMachineConfigNodes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MachineConfigNodeList, err error) { - emptyResult := &v1alpha1.MachineConfigNodeList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(machineconfignodesResource, machineconfignodesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MachineConfigNodeList{ListMeta: obj.(*v1alpha1.MachineConfigNodeList).ListMeta} - for _, item := range obj.(*v1alpha1.MachineConfigNodeList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineConfigNodes. -func (c *FakeMachineConfigNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(machineconfignodesResource, opts)) -} - -// Create takes the representation of a machineConfigNode and creates it. Returns the server's representation of the machineConfigNode, and an error, if there is any. -func (c *FakeMachineConfigNodes) Create(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.CreateOptions) (result *v1alpha1.MachineConfigNode, err error) { - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(machineconfignodesResource, machineConfigNode, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineConfigNode), err -} - -// Update takes the representation of a machineConfigNode and updates it. Returns the server's representation of the machineConfigNode, and an error, if there is any. -func (c *FakeMachineConfigNodes) Update(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (result *v1alpha1.MachineConfigNode, err error) { - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(machineconfignodesResource, machineConfigNode, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineConfigNode), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineConfigNodes) UpdateStatus(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (result *v1alpha1.MachineConfigNode, err error) { - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(machineconfignodesResource, "status", machineConfigNode, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineConfigNode), err -} - -// Delete takes name of the machineConfigNode and deletes it. Returns an error if one occurs. -func (c *FakeMachineConfigNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(machineconfignodesResource, name, opts), &v1alpha1.MachineConfigNode{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineConfigNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(machineconfignodesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.MachineConfigNodeList{}) - return err -} - -// Patch applies the patch and returns the patched machineConfigNode. -func (c *FakeMachineConfigNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineConfigNode, err error) { - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfignodesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineConfigNode), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfigNode. -func (c *FakeMachineConfigNodes) Apply(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) { - if machineConfigNode == nil { - return nil, fmt.Errorf("machineConfigNode provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfigNode) - if err != nil { - return nil, err - } - name := machineConfigNode.Name - if name == nil { - return nil, fmt.Errorf("machineConfigNode.Name must be provided to Apply") - } - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfignodesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineConfigNode), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineConfigNodes) ApplyStatus(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) { - if machineConfigNode == nil { - return nil, fmt.Errorf("machineConfigNode provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfigNode) - if err != nil { - return nil, err - } - name := machineConfigNode.Name - if name == nil { - return nil, fmt.Errorf("machineConfigNode.Name must be provided to Apply") - } - emptyResult := &v1alpha1.MachineConfigNode{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfignodesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeMachineConfigNodes(fake *FakeMachineconfigurationV1alpha1) typedmachineconfigurationv1alpha1.MachineConfigNodeInterface { + return &fakeMachineConfigNodes{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.MachineConfigNode, *v1alpha1.MachineConfigNodeList, *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("machineconfignodes"), + v1alpha1.SchemeGroupVersion.WithKind("MachineConfigNode"), + func() *v1alpha1.MachineConfigNode { return &v1alpha1.MachineConfigNode{} }, + func() *v1alpha1.MachineConfigNodeList { return &v1alpha1.MachineConfigNodeList{} }, + func(dst, src *v1alpha1.MachineConfigNodeList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.MachineConfigNodeList) []*v1alpha1.MachineConfigNode { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.MachineConfigNodeList, items []*v1alpha1.MachineConfigNode) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.MachineConfigNode), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfiguration_client.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfiguration_client.go index 21255968c5..07b75e7e29 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfiguration_client.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineconfiguration_client.go @@ -13,19 +13,19 @@ type FakeMachineconfigurationV1alpha1 struct { } func (c *FakeMachineconfigurationV1alpha1) MachineConfigNodes() v1alpha1.MachineConfigNodeInterface { - return &FakeMachineConfigNodes{c} + return newFakeMachineConfigNodes(c) } func (c *FakeMachineconfigurationV1alpha1) MachineOSBuilds() v1alpha1.MachineOSBuildInterface { - return &FakeMachineOSBuilds{c} + return newFakeMachineOSBuilds(c) } func (c *FakeMachineconfigurationV1alpha1) MachineOSConfigs() v1alpha1.MachineOSConfigInterface { - return &FakeMachineOSConfigs{c} + return newFakeMachineOSConfigs(c) } func (c *FakeMachineconfigurationV1alpha1) PinnedImageSets() v1alpha1.PinnedImageSetInterface { - return &FakePinnedImageSets{c} + return newFakePinnedImageSets(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosbuild.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosbuild.go index b2746249a9..ea833d583b 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosbuild.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosbuild.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineOSBuilds implements MachineOSBuildInterface -type FakeMachineOSBuilds struct { +// fakeMachineOSBuilds implements MachineOSBuildInterface +type fakeMachineOSBuilds struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.MachineOSBuild, *v1alpha1.MachineOSBuildList, *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration] Fake *FakeMachineconfigurationV1alpha1 } -var machineosbuildsResource = v1alpha1.SchemeGroupVersion.WithResource("machineosbuilds") - -var machineosbuildsKind = v1alpha1.SchemeGroupVersion.WithKind("MachineOSBuild") - -// Get takes name of the machineOSBuild, and returns the corresponding machineOSBuild object, and an error if there is any. -func (c *FakeMachineOSBuilds) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MachineOSBuild, err error) { - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(machineosbuildsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSBuild), err -} - -// List takes label and field selectors, and returns the list of MachineOSBuilds that match those selectors. -func (c *FakeMachineOSBuilds) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MachineOSBuildList, err error) { - emptyResult := &v1alpha1.MachineOSBuildList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(machineosbuildsResource, machineosbuildsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MachineOSBuildList{ListMeta: obj.(*v1alpha1.MachineOSBuildList).ListMeta} - for _, item := range obj.(*v1alpha1.MachineOSBuildList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineOSBuilds. -func (c *FakeMachineOSBuilds) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(machineosbuildsResource, opts)) -} - -// Create takes the representation of a machineOSBuild and creates it. Returns the server's representation of the machineOSBuild, and an error, if there is any. -func (c *FakeMachineOSBuilds) Create(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.CreateOptions) (result *v1alpha1.MachineOSBuild, err error) { - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(machineosbuildsResource, machineOSBuild, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSBuild), err -} - -// Update takes the representation of a machineOSBuild and updates it. Returns the server's representation of the machineOSBuild, and an error, if there is any. -func (c *FakeMachineOSBuilds) Update(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (result *v1alpha1.MachineOSBuild, err error) { - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(machineosbuildsResource, machineOSBuild, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSBuild), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineOSBuilds) UpdateStatus(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (result *v1alpha1.MachineOSBuild, err error) { - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(machineosbuildsResource, "status", machineOSBuild, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSBuild), err -} - -// Delete takes name of the machineOSBuild and deletes it. Returns an error if one occurs. -func (c *FakeMachineOSBuilds) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(machineosbuildsResource, name, opts), &v1alpha1.MachineOSBuild{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineOSBuilds) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(machineosbuildsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.MachineOSBuildList{}) - return err -} - -// Patch applies the patch and returns the patched machineOSBuild. -func (c *FakeMachineOSBuilds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSBuild, err error) { - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineosbuildsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSBuild), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineOSBuild. -func (c *FakeMachineOSBuilds) Apply(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) { - if machineOSBuild == nil { - return nil, fmt.Errorf("machineOSBuild provided to Apply must not be nil") - } - data, err := json.Marshal(machineOSBuild) - if err != nil { - return nil, err - } - name := machineOSBuild.Name - if name == nil { - return nil, fmt.Errorf("machineOSBuild.Name must be provided to Apply") - } - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineosbuildsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSBuild), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineOSBuilds) ApplyStatus(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) { - if machineOSBuild == nil { - return nil, fmt.Errorf("machineOSBuild provided to Apply must not be nil") - } - data, err := json.Marshal(machineOSBuild) - if err != nil { - return nil, err - } - name := machineOSBuild.Name - if name == nil { - return nil, fmt.Errorf("machineOSBuild.Name must be provided to Apply") - } - emptyResult := &v1alpha1.MachineOSBuild{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineosbuildsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeMachineOSBuilds(fake *FakeMachineconfigurationV1alpha1) typedmachineconfigurationv1alpha1.MachineOSBuildInterface { + return &fakeMachineOSBuilds{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.MachineOSBuild, *v1alpha1.MachineOSBuildList, *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("machineosbuilds"), + v1alpha1.SchemeGroupVersion.WithKind("MachineOSBuild"), + func() *v1alpha1.MachineOSBuild { return &v1alpha1.MachineOSBuild{} }, + func() *v1alpha1.MachineOSBuildList { return &v1alpha1.MachineOSBuildList{} }, + func(dst, src *v1alpha1.MachineOSBuildList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.MachineOSBuildList) []*v1alpha1.MachineOSBuild { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.MachineOSBuildList, items []*v1alpha1.MachineOSBuild) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.MachineOSBuild), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosconfig.go index 22f7e8e68f..3b078c8136 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_machineosconfig.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineOSConfigs implements MachineOSConfigInterface -type FakeMachineOSConfigs struct { +// fakeMachineOSConfigs implements MachineOSConfigInterface +type fakeMachineOSConfigs struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.MachineOSConfig, *v1alpha1.MachineOSConfigList, *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration] Fake *FakeMachineconfigurationV1alpha1 } -var machineosconfigsResource = v1alpha1.SchemeGroupVersion.WithResource("machineosconfigs") - -var machineosconfigsKind = v1alpha1.SchemeGroupVersion.WithKind("MachineOSConfig") - -// Get takes name of the machineOSConfig, and returns the corresponding machineOSConfig object, and an error if there is any. -func (c *FakeMachineOSConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MachineOSConfig, err error) { - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(machineosconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSConfig), err -} - -// List takes label and field selectors, and returns the list of MachineOSConfigs that match those selectors. -func (c *FakeMachineOSConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.MachineOSConfigList, err error) { - emptyResult := &v1alpha1.MachineOSConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(machineosconfigsResource, machineosconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.MachineOSConfigList{ListMeta: obj.(*v1alpha1.MachineOSConfigList).ListMeta} - for _, item := range obj.(*v1alpha1.MachineOSConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineOSConfigs. -func (c *FakeMachineOSConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(machineosconfigsResource, opts)) -} - -// Create takes the representation of a machineOSConfig and creates it. Returns the server's representation of the machineOSConfig, and an error, if there is any. -func (c *FakeMachineOSConfigs) Create(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.CreateOptions) (result *v1alpha1.MachineOSConfig, err error) { - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(machineosconfigsResource, machineOSConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSConfig), err -} - -// Update takes the representation of a machineOSConfig and updates it. Returns the server's representation of the machineOSConfig, and an error, if there is any. -func (c *FakeMachineOSConfigs) Update(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (result *v1alpha1.MachineOSConfig, err error) { - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(machineosconfigsResource, machineOSConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineOSConfigs) UpdateStatus(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (result *v1alpha1.MachineOSConfig, err error) { - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(machineosconfigsResource, "status", machineOSConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSConfig), err -} - -// Delete takes name of the machineOSConfig and deletes it. Returns an error if one occurs. -func (c *FakeMachineOSConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(machineosconfigsResource, name, opts), &v1alpha1.MachineOSConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineOSConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(machineosconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.MachineOSConfigList{}) - return err -} - -// Patch applies the patch and returns the patched machineOSConfig. -func (c *FakeMachineOSConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSConfig, err error) { - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineosconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineOSConfig. -func (c *FakeMachineOSConfigs) Apply(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) { - if machineOSConfig == nil { - return nil, fmt.Errorf("machineOSConfig provided to Apply must not be nil") - } - data, err := json.Marshal(machineOSConfig) - if err != nil { - return nil, err - } - name := machineOSConfig.Name - if name == nil { - return nil, fmt.Errorf("machineOSConfig.Name must be provided to Apply") - } - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineosconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.MachineOSConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineOSConfigs) ApplyStatus(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) { - if machineOSConfig == nil { - return nil, fmt.Errorf("machineOSConfig provided to Apply must not be nil") - } - data, err := json.Marshal(machineOSConfig) - if err != nil { - return nil, err - } - name := machineOSConfig.Name - if name == nil { - return nil, fmt.Errorf("machineOSConfig.Name must be provided to Apply") - } - emptyResult := &v1alpha1.MachineOSConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineosconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeMachineOSConfigs(fake *FakeMachineconfigurationV1alpha1) typedmachineconfigurationv1alpha1.MachineOSConfigInterface { + return &fakeMachineOSConfigs{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.MachineOSConfig, *v1alpha1.MachineOSConfigList, *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("machineosconfigs"), + v1alpha1.SchemeGroupVersion.WithKind("MachineOSConfig"), + func() *v1alpha1.MachineOSConfig { return &v1alpha1.MachineOSConfig{} }, + func() *v1alpha1.MachineOSConfigList { return &v1alpha1.MachineOSConfigList{} }, + func(dst, src *v1alpha1.MachineOSConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.MachineOSConfigList) []*v1alpha1.MachineOSConfig { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.MachineOSConfigList, items []*v1alpha1.MachineOSConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.MachineOSConfig), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_pinnedimageset.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_pinnedimageset.go index 4a6c2335a3..1d29be7792 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_pinnedimageset.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/fake/fake_pinnedimageset.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakePinnedImageSets implements PinnedImageSetInterface -type FakePinnedImageSets struct { +// fakePinnedImageSets implements PinnedImageSetInterface +type fakePinnedImageSets struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.PinnedImageSet, *v1alpha1.PinnedImageSetList, *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration] Fake *FakeMachineconfigurationV1alpha1 } -var pinnedimagesetsResource = v1alpha1.SchemeGroupVersion.WithResource("pinnedimagesets") - -var pinnedimagesetsKind = v1alpha1.SchemeGroupVersion.WithKind("PinnedImageSet") - -// Get takes name of the pinnedImageSet, and returns the corresponding pinnedImageSet object, and an error if there is any. -func (c *FakePinnedImageSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PinnedImageSet, err error) { - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(pinnedimagesetsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PinnedImageSet), err -} - -// List takes label and field selectors, and returns the list of PinnedImageSets that match those selectors. -func (c *FakePinnedImageSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PinnedImageSetList, err error) { - emptyResult := &v1alpha1.PinnedImageSetList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(pinnedimagesetsResource, pinnedimagesetsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PinnedImageSetList{ListMeta: obj.(*v1alpha1.PinnedImageSetList).ListMeta} - for _, item := range obj.(*v1alpha1.PinnedImageSetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested pinnedImageSets. -func (c *FakePinnedImageSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(pinnedimagesetsResource, opts)) -} - -// Create takes the representation of a pinnedImageSet and creates it. Returns the server's representation of the pinnedImageSet, and an error, if there is any. -func (c *FakePinnedImageSets) Create(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.CreateOptions) (result *v1alpha1.PinnedImageSet, err error) { - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(pinnedimagesetsResource, pinnedImageSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PinnedImageSet), err -} - -// Update takes the representation of a pinnedImageSet and updates it. Returns the server's representation of the pinnedImageSet, and an error, if there is any. -func (c *FakePinnedImageSets) Update(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (result *v1alpha1.PinnedImageSet, err error) { - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(pinnedimagesetsResource, pinnedImageSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PinnedImageSet), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePinnedImageSets) UpdateStatus(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (result *v1alpha1.PinnedImageSet, err error) { - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(pinnedimagesetsResource, "status", pinnedImageSet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PinnedImageSet), err -} - -// Delete takes name of the pinnedImageSet and deletes it. Returns an error if one occurs. -func (c *FakePinnedImageSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(pinnedimagesetsResource, name, opts), &v1alpha1.PinnedImageSet{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePinnedImageSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(pinnedimagesetsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.PinnedImageSetList{}) - return err -} - -// Patch applies the patch and returns the patched pinnedImageSet. -func (c *FakePinnedImageSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnedImageSet, err error) { - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(pinnedimagesetsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PinnedImageSet), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied pinnedImageSet. -func (c *FakePinnedImageSets) Apply(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) { - if pinnedImageSet == nil { - return nil, fmt.Errorf("pinnedImageSet provided to Apply must not be nil") - } - data, err := json.Marshal(pinnedImageSet) - if err != nil { - return nil, err - } - name := pinnedImageSet.Name - if name == nil { - return nil, fmt.Errorf("pinnedImageSet.Name must be provided to Apply") - } - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(pinnedimagesetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PinnedImageSet), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakePinnedImageSets) ApplyStatus(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) { - if pinnedImageSet == nil { - return nil, fmt.Errorf("pinnedImageSet provided to Apply must not be nil") - } - data, err := json.Marshal(pinnedImageSet) - if err != nil { - return nil, err - } - name := pinnedImageSet.Name - if name == nil { - return nil, fmt.Errorf("pinnedImageSet.Name must be provided to Apply") - } - emptyResult := &v1alpha1.PinnedImageSet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(pinnedimagesetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakePinnedImageSets(fake *FakeMachineconfigurationV1alpha1) typedmachineconfigurationv1alpha1.PinnedImageSetInterface { + return &fakePinnedImageSets{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.PinnedImageSet, *v1alpha1.PinnedImageSetList, *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("pinnedimagesets"), + v1alpha1.SchemeGroupVersion.WithKind("PinnedImageSet"), + func() *v1alpha1.PinnedImageSet { return &v1alpha1.PinnedImageSet{} }, + func() *v1alpha1.PinnedImageSetList { return &v1alpha1.PinnedImageSetList{} }, + func(dst, src *v1alpha1.PinnedImageSetList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.PinnedImageSetList) []*v1alpha1.PinnedImageSet { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.PinnedImageSetList, items []*v1alpha1.PinnedImageSet) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.PinnedImageSet), err } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go index 8705869cf7..d84721cb07 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfignode.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + applyconfigurationsmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type MachineConfigNodesGetter interface { // MachineConfigNodeInterface has methods to work with MachineConfigNode resources. type MachineConfigNodeInterface interface { - Create(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.CreateOptions) (*v1alpha1.MachineConfigNode, error) - Update(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (*v1alpha1.MachineConfigNode, error) + Create(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNode, opts v1.CreateOptions) (*machineconfigurationv1alpha1.MachineConfigNode, error) + Update(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNode, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.MachineConfigNode, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineConfigNode *v1alpha1.MachineConfigNode, opts v1.UpdateOptions) (*v1alpha1.MachineConfigNode, error) + UpdateStatus(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNode, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.MachineConfigNode, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MachineConfigNode, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MachineConfigNodeList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machineconfigurationv1alpha1.MachineConfigNode, error) + List(ctx context.Context, opts v1.ListOptions) (*machineconfigurationv1alpha1.MachineConfigNodeList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineConfigNode, err error) - Apply(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machineconfigurationv1alpha1.MachineConfigNode, err error) + Apply(ctx context.Context, machineConfigNode *applyconfigurationsmachineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.MachineConfigNode, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineConfigNode *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineConfigNode, err error) + ApplyStatus(ctx context.Context, machineConfigNode *applyconfigurationsmachineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.MachineConfigNode, err error) MachineConfigNodeExpansion } // machineConfigNodes implements MachineConfigNodeInterface type machineConfigNodes struct { - *gentype.ClientWithListAndApply[*v1alpha1.MachineConfigNode, *v1alpha1.MachineConfigNodeList, *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1alpha1.MachineConfigNode, *machineconfigurationv1alpha1.MachineConfigNodeList, *applyconfigurationsmachineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration] } // newMachineConfigNodes returns a MachineConfigNodes func newMachineConfigNodes(c *MachineconfigurationV1alpha1Client) *machineConfigNodes { return &machineConfigNodes{ - gentype.NewClientWithListAndApply[*v1alpha1.MachineConfigNode, *v1alpha1.MachineConfigNodeList, *machineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1alpha1.MachineConfigNode, *machineconfigurationv1alpha1.MachineConfigNodeList, *applyconfigurationsmachineconfigurationv1alpha1.MachineConfigNodeApplyConfiguration]( "machineconfignodes", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.MachineConfigNode { return &v1alpha1.MachineConfigNode{} }, - func() *v1alpha1.MachineConfigNodeList { return &v1alpha1.MachineConfigNodeList{} }), + func() *machineconfigurationv1alpha1.MachineConfigNode { + return &machineconfigurationv1alpha1.MachineConfigNode{} + }, + func() *machineconfigurationv1alpha1.MachineConfigNodeList { + return &machineconfigurationv1alpha1.MachineConfigNodeList{} + }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go index 2266053dcb..3d6be9ecdb 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineconfiguration_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -84,10 +84,10 @@ func New(c rest.Interface) *MachineconfigurationV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := machineconfigurationv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go index e50a939f5e..6e6c52b2b9 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosbuild.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + applyconfigurationsmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type MachineOSBuildsGetter interface { // MachineOSBuildInterface has methods to work with MachineOSBuild resources. type MachineOSBuildInterface interface { - Create(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.CreateOptions) (*v1alpha1.MachineOSBuild, error) - Update(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (*v1alpha1.MachineOSBuild, error) + Create(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuild, opts v1.CreateOptions) (*machineconfigurationv1alpha1.MachineOSBuild, error) + Update(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuild, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.MachineOSBuild, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineOSBuild *v1alpha1.MachineOSBuild, opts v1.UpdateOptions) (*v1alpha1.MachineOSBuild, error) + UpdateStatus(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuild, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.MachineOSBuild, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MachineOSBuild, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MachineOSBuildList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machineconfigurationv1alpha1.MachineOSBuild, error) + List(ctx context.Context, opts v1.ListOptions) (*machineconfigurationv1alpha1.MachineOSBuildList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSBuild, err error) - Apply(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machineconfigurationv1alpha1.MachineOSBuild, err error) + Apply(ctx context.Context, machineOSBuild *applyconfigurationsmachineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.MachineOSBuild, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineOSBuild *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSBuild, err error) + ApplyStatus(ctx context.Context, machineOSBuild *applyconfigurationsmachineconfigurationv1alpha1.MachineOSBuildApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.MachineOSBuild, err error) MachineOSBuildExpansion } // machineOSBuilds implements MachineOSBuildInterface type machineOSBuilds struct { - *gentype.ClientWithListAndApply[*v1alpha1.MachineOSBuild, *v1alpha1.MachineOSBuildList, *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1alpha1.MachineOSBuild, *machineconfigurationv1alpha1.MachineOSBuildList, *applyconfigurationsmachineconfigurationv1alpha1.MachineOSBuildApplyConfiguration] } // newMachineOSBuilds returns a MachineOSBuilds func newMachineOSBuilds(c *MachineconfigurationV1alpha1Client) *machineOSBuilds { return &machineOSBuilds{ - gentype.NewClientWithListAndApply[*v1alpha1.MachineOSBuild, *v1alpha1.MachineOSBuildList, *machineconfigurationv1alpha1.MachineOSBuildApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1alpha1.MachineOSBuild, *machineconfigurationv1alpha1.MachineOSBuildList, *applyconfigurationsmachineconfigurationv1alpha1.MachineOSBuildApplyConfiguration]( "machineosbuilds", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.MachineOSBuild { return &v1alpha1.MachineOSBuild{} }, - func() *v1alpha1.MachineOSBuildList { return &v1alpha1.MachineOSBuildList{} }), + func() *machineconfigurationv1alpha1.MachineOSBuild { + return &machineconfigurationv1alpha1.MachineOSBuild{} + }, + func() *machineconfigurationv1alpha1.MachineOSBuildList { + return &machineconfigurationv1alpha1.MachineOSBuildList{} + }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go index 9fe30b50e1..191c1996c9 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/machineosconfig.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + applyconfigurationsmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type MachineOSConfigsGetter interface { // MachineOSConfigInterface has methods to work with MachineOSConfig resources. type MachineOSConfigInterface interface { - Create(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.CreateOptions) (*v1alpha1.MachineOSConfig, error) - Update(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (*v1alpha1.MachineOSConfig, error) + Create(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfig, opts v1.CreateOptions) (*machineconfigurationv1alpha1.MachineOSConfig, error) + Update(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfig, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.MachineOSConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineOSConfig *v1alpha1.MachineOSConfig, opts v1.UpdateOptions) (*v1alpha1.MachineOSConfig, error) + UpdateStatus(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfig, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.MachineOSConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.MachineOSConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.MachineOSConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machineconfigurationv1alpha1.MachineOSConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*machineconfigurationv1alpha1.MachineOSConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.MachineOSConfig, err error) - Apply(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machineconfigurationv1alpha1.MachineOSConfig, err error) + Apply(ctx context.Context, machineOSConfig *applyconfigurationsmachineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.MachineOSConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineOSConfig *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.MachineOSConfig, err error) + ApplyStatus(ctx context.Context, machineOSConfig *applyconfigurationsmachineconfigurationv1alpha1.MachineOSConfigApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.MachineOSConfig, err error) MachineOSConfigExpansion } // machineOSConfigs implements MachineOSConfigInterface type machineOSConfigs struct { - *gentype.ClientWithListAndApply[*v1alpha1.MachineOSConfig, *v1alpha1.MachineOSConfigList, *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1alpha1.MachineOSConfig, *machineconfigurationv1alpha1.MachineOSConfigList, *applyconfigurationsmachineconfigurationv1alpha1.MachineOSConfigApplyConfiguration] } // newMachineOSConfigs returns a MachineOSConfigs func newMachineOSConfigs(c *MachineconfigurationV1alpha1Client) *machineOSConfigs { return &machineOSConfigs{ - gentype.NewClientWithListAndApply[*v1alpha1.MachineOSConfig, *v1alpha1.MachineOSConfigList, *machineconfigurationv1alpha1.MachineOSConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1alpha1.MachineOSConfig, *machineconfigurationv1alpha1.MachineOSConfigList, *applyconfigurationsmachineconfigurationv1alpha1.MachineOSConfigApplyConfiguration]( "machineosconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.MachineOSConfig { return &v1alpha1.MachineOSConfig{} }, - func() *v1alpha1.MachineOSConfigList { return &v1alpha1.MachineOSConfigList{} }), + func() *machineconfigurationv1alpha1.MachineOSConfig { + return &machineconfigurationv1alpha1.MachineOSConfig{} + }, + func() *machineconfigurationv1alpha1.MachineOSConfigList { + return &machineconfigurationv1alpha1.MachineOSConfigList{} + }, + ), } } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go index c92632900c..d6aa0f3a26 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1alpha1/pinnedimageset.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + applyconfigurationsmachineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1alpha1" scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type PinnedImageSetsGetter interface { // PinnedImageSetInterface has methods to work with PinnedImageSet resources. type PinnedImageSetInterface interface { - Create(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.CreateOptions) (*v1alpha1.PinnedImageSet, error) - Update(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (*v1alpha1.PinnedImageSet, error) + Create(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSet, opts v1.CreateOptions) (*machineconfigurationv1alpha1.PinnedImageSet, error) + Update(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSet, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.PinnedImageSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, pinnedImageSet *v1alpha1.PinnedImageSet, opts v1.UpdateOptions) (*v1alpha1.PinnedImageSet, error) + UpdateStatus(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSet, opts v1.UpdateOptions) (*machineconfigurationv1alpha1.PinnedImageSet, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PinnedImageSet, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PinnedImageSetList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*machineconfigurationv1alpha1.PinnedImageSet, error) + List(ctx context.Context, opts v1.ListOptions) (*machineconfigurationv1alpha1.PinnedImageSetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnedImageSet, err error) - Apply(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *machineconfigurationv1alpha1.PinnedImageSet, err error) + Apply(ctx context.Context, pinnedImageSet *applyconfigurationsmachineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.PinnedImageSet, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, pinnedImageSet *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PinnedImageSet, err error) + ApplyStatus(ctx context.Context, pinnedImageSet *applyconfigurationsmachineconfigurationv1alpha1.PinnedImageSetApplyConfiguration, opts v1.ApplyOptions) (result *machineconfigurationv1alpha1.PinnedImageSet, err error) PinnedImageSetExpansion } // pinnedImageSets implements PinnedImageSetInterface type pinnedImageSets struct { - *gentype.ClientWithListAndApply[*v1alpha1.PinnedImageSet, *v1alpha1.PinnedImageSetList, *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration] + *gentype.ClientWithListAndApply[*machineconfigurationv1alpha1.PinnedImageSet, *machineconfigurationv1alpha1.PinnedImageSetList, *applyconfigurationsmachineconfigurationv1alpha1.PinnedImageSetApplyConfiguration] } // newPinnedImageSets returns a PinnedImageSets func newPinnedImageSets(c *MachineconfigurationV1alpha1Client) *pinnedImageSets { return &pinnedImageSets{ - gentype.NewClientWithListAndApply[*v1alpha1.PinnedImageSet, *v1alpha1.PinnedImageSetList, *machineconfigurationv1alpha1.PinnedImageSetApplyConfiguration]( + gentype.NewClientWithListAndApply[*machineconfigurationv1alpha1.PinnedImageSet, *machineconfigurationv1alpha1.PinnedImageSetList, *applyconfigurationsmachineconfigurationv1alpha1.PinnedImageSetApplyConfiguration]( "pinnedimagesets", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.PinnedImageSet { return &v1alpha1.PinnedImageSet{} }, - func() *v1alpha1.PinnedImageSetList { return &v1alpha1.PinnedImageSetList{} }), + func() *machineconfigurationv1alpha1.PinnedImageSet { + return &machineconfigurationv1alpha1.PinnedImageSet{} + }, + func() *machineconfigurationv1alpha1.PinnedImageSetList { + return &machineconfigurationv1alpha1.PinnedImageSetList{} + }, + ), } } diff --git a/machineconfiguration/informers/externalversions/generic.go b/machineconfiguration/informers/externalversions/generic.go index 2c95cc84ef..b5dde0cd0b 100644 --- a/machineconfiguration/informers/externalversions/generic.go +++ b/machineconfiguration/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/machineconfiguration/v1" v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/containerruntimeconfig.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/containerruntimeconfig.go index 48bf2aa03a..93e76c66ab 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1/containerruntimeconfig.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/containerruntimeconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ContainerRuntimeConfigs. type ContainerRuntimeConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ContainerRuntimeConfigLister + Lister() machineconfigurationv1.ContainerRuntimeConfigLister } type containerRuntimeConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredContainerRuntimeConfigInformer(client versioned.Interface, resyn return client.MachineconfigurationV1().ContainerRuntimeConfigs().Watch(context.TODO(), options) }, }, - &machineconfigurationv1.ContainerRuntimeConfig{}, + &apimachineconfigurationv1.ContainerRuntimeConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *containerRuntimeConfigInformer) defaultInformer(client versioned.Interf } func (f *containerRuntimeConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1.ContainerRuntimeConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1.ContainerRuntimeConfig{}, f.defaultInformer) } -func (f *containerRuntimeConfigInformer) Lister() v1.ContainerRuntimeConfigLister { - return v1.NewContainerRuntimeConfigLister(f.Informer().GetIndexer()) +func (f *containerRuntimeConfigInformer) Lister() machineconfigurationv1.ContainerRuntimeConfigLister { + return machineconfigurationv1.NewContainerRuntimeConfigLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/controllerconfig.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/controllerconfig.go index f6a913e987..b1930d0f54 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1/controllerconfig.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/controllerconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ControllerConfigs. type ControllerConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ControllerConfigLister + Lister() machineconfigurationv1.ControllerConfigLister } type controllerConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredControllerConfigInformer(client versioned.Interface, resyncPerio return client.MachineconfigurationV1().ControllerConfigs().Watch(context.TODO(), options) }, }, - &machineconfigurationv1.ControllerConfig{}, + &apimachineconfigurationv1.ControllerConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *controllerConfigInformer) defaultInformer(client versioned.Interface, r } func (f *controllerConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1.ControllerConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1.ControllerConfig{}, f.defaultInformer) } -func (f *controllerConfigInformer) Lister() v1.ControllerConfigLister { - return v1.NewControllerConfigLister(f.Informer().GetIndexer()) +func (f *controllerConfigInformer) Lister() machineconfigurationv1.ControllerConfigLister { + return machineconfigurationv1.NewControllerConfigLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/kubeletconfig.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/kubeletconfig.go index 0f5a2f32a1..a9e9fad855 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1/kubeletconfig.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/kubeletconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // KubeletConfigs. type KubeletConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.KubeletConfigLister + Lister() machineconfigurationv1.KubeletConfigLister } type kubeletConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredKubeletConfigInformer(client versioned.Interface, resyncPeriod t return client.MachineconfigurationV1().KubeletConfigs().Watch(context.TODO(), options) }, }, - &machineconfigurationv1.KubeletConfig{}, + &apimachineconfigurationv1.KubeletConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *kubeletConfigInformer) defaultInformer(client versioned.Interface, resy } func (f *kubeletConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1.KubeletConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1.KubeletConfig{}, f.defaultInformer) } -func (f *kubeletConfigInformer) Lister() v1.KubeletConfigLister { - return v1.NewKubeletConfigLister(f.Informer().GetIndexer()) +func (f *kubeletConfigInformer) Lister() machineconfigurationv1.KubeletConfigLister { + return machineconfigurationv1.NewKubeletConfigLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfig.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfig.go index 583c4466fb..f0b1ae9c4e 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfig.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineConfigs. type MachineConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.MachineConfigLister + Lister() machineconfigurationv1.MachineConfigLister } type machineConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredMachineConfigInformer(client versioned.Interface, resyncPeriod t return client.MachineconfigurationV1().MachineConfigs().Watch(context.TODO(), options) }, }, - &machineconfigurationv1.MachineConfig{}, + &apimachineconfigurationv1.MachineConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *machineConfigInformer) defaultInformer(client versioned.Interface, resy } func (f *machineConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1.MachineConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1.MachineConfig{}, f.defaultInformer) } -func (f *machineConfigInformer) Lister() v1.MachineConfigLister { - return v1.NewMachineConfigLister(f.Informer().GetIndexer()) +func (f *machineConfigInformer) Lister() machineconfigurationv1.MachineConfigLister { + return machineconfigurationv1.NewMachineConfigLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfigpool.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfigpool.go index 65088d3f0b..cba2c0f689 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfigpool.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/machineconfigpool.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineConfigPools. type MachineConfigPoolInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.MachineConfigPoolLister + Lister() machineconfigurationv1.MachineConfigPoolLister } type machineConfigPoolInformer struct { @@ -54,7 +54,7 @@ func NewFilteredMachineConfigPoolInformer(client versioned.Interface, resyncPeri return client.MachineconfigurationV1().MachineConfigPools().Watch(context.TODO(), options) }, }, - &machineconfigurationv1.MachineConfigPool{}, + &apimachineconfigurationv1.MachineConfigPool{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *machineConfigPoolInformer) defaultInformer(client versioned.Interface, } func (f *machineConfigPoolInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1.MachineConfigPool{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1.MachineConfigPool{}, f.defaultInformer) } -func (f *machineConfigPoolInformer) Lister() v1.MachineConfigPoolLister { - return v1.NewMachineConfigPoolLister(f.Informer().GetIndexer()) +func (f *machineConfigPoolInformer) Lister() machineconfigurationv1.MachineConfigPoolLister { + return machineconfigurationv1.NewMachineConfigPoolLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineconfignode.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineconfignode.go index 57df7775b8..53cc3a1b39 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineconfignode.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineconfignode.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + apimachineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineConfigNodes. type MachineConfigNodeInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.MachineConfigNodeLister + Lister() machineconfigurationv1alpha1.MachineConfigNodeLister } type machineConfigNodeInformer struct { @@ -54,7 +54,7 @@ func NewFilteredMachineConfigNodeInformer(client versioned.Interface, resyncPeri return client.MachineconfigurationV1alpha1().MachineConfigNodes().Watch(context.TODO(), options) }, }, - &machineconfigurationv1alpha1.MachineConfigNode{}, + &apimachineconfigurationv1alpha1.MachineConfigNode{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *machineConfigNodeInformer) defaultInformer(client versioned.Interface, } func (f *machineConfigNodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1alpha1.MachineConfigNode{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1alpha1.MachineConfigNode{}, f.defaultInformer) } -func (f *machineConfigNodeInformer) Lister() v1alpha1.MachineConfigNodeLister { - return v1alpha1.NewMachineConfigNodeLister(f.Informer().GetIndexer()) +func (f *machineConfigNodeInformer) Lister() machineconfigurationv1alpha1.MachineConfigNodeLister { + return machineconfigurationv1alpha1.NewMachineConfigNodeLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosbuild.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosbuild.go index 6a4ed30b5d..12154a263e 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosbuild.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosbuild.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + apimachineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineOSBuilds. type MachineOSBuildInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.MachineOSBuildLister + Lister() machineconfigurationv1alpha1.MachineOSBuildLister } type machineOSBuildInformer struct { @@ -54,7 +54,7 @@ func NewFilteredMachineOSBuildInformer(client versioned.Interface, resyncPeriod return client.MachineconfigurationV1alpha1().MachineOSBuilds().Watch(context.TODO(), options) }, }, - &machineconfigurationv1alpha1.MachineOSBuild{}, + &apimachineconfigurationv1alpha1.MachineOSBuild{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *machineOSBuildInformer) defaultInformer(client versioned.Interface, res } func (f *machineOSBuildInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1alpha1.MachineOSBuild{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1alpha1.MachineOSBuild{}, f.defaultInformer) } -func (f *machineOSBuildInformer) Lister() v1alpha1.MachineOSBuildLister { - return v1alpha1.NewMachineOSBuildLister(f.Informer().GetIndexer()) +func (f *machineOSBuildInformer) Lister() machineconfigurationv1alpha1.MachineOSBuildLister { + return machineconfigurationv1alpha1.NewMachineOSBuildLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosconfig.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosconfig.go index aaea227acc..d96475801d 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosconfig.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/machineosconfig.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + apimachineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineOSConfigs. type MachineOSConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.MachineOSConfigLister + Lister() machineconfigurationv1alpha1.MachineOSConfigLister } type machineOSConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredMachineOSConfigInformer(client versioned.Interface, resyncPeriod return client.MachineconfigurationV1alpha1().MachineOSConfigs().Watch(context.TODO(), options) }, }, - &machineconfigurationv1alpha1.MachineOSConfig{}, + &apimachineconfigurationv1alpha1.MachineOSConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *machineOSConfigInformer) defaultInformer(client versioned.Interface, re } func (f *machineOSConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1alpha1.MachineOSConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1alpha1.MachineOSConfig{}, f.defaultInformer) } -func (f *machineOSConfigInformer) Lister() v1alpha1.MachineOSConfigLister { - return v1alpha1.NewMachineOSConfigLister(f.Informer().GetIndexer()) +func (f *machineOSConfigInformer) Lister() machineconfigurationv1alpha1.MachineOSConfigLister { + return machineconfigurationv1alpha1.NewMachineOSConfigLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/pinnedimageset.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/pinnedimageset.go index 9282f98958..e5759c4e34 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/pinnedimageset.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1alpha1/pinnedimageset.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + apimachineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" + machineconfigurationv1alpha1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // PinnedImageSets. type PinnedImageSetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.PinnedImageSetLister + Lister() machineconfigurationv1alpha1.PinnedImageSetLister } type pinnedImageSetInformer struct { @@ -54,7 +54,7 @@ func NewFilteredPinnedImageSetInformer(client versioned.Interface, resyncPeriod return client.MachineconfigurationV1alpha1().PinnedImageSets().Watch(context.TODO(), options) }, }, - &machineconfigurationv1alpha1.PinnedImageSet{}, + &apimachineconfigurationv1alpha1.PinnedImageSet{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *pinnedImageSetInformer) defaultInformer(client versioned.Interface, res } func (f *pinnedImageSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&machineconfigurationv1alpha1.PinnedImageSet{}, f.defaultInformer) + return f.factory.InformerFor(&apimachineconfigurationv1alpha1.PinnedImageSet{}, f.defaultInformer) } -func (f *pinnedImageSetInformer) Lister() v1alpha1.PinnedImageSetLister { - return v1alpha1.NewPinnedImageSetLister(f.Informer().GetIndexer()) +func (f *pinnedImageSetInformer) Lister() machineconfigurationv1alpha1.PinnedImageSetLister { + return machineconfigurationv1alpha1.NewPinnedImageSetLister(f.Informer().GetIndexer()) } diff --git a/machineconfiguration/listers/machineconfiguration/v1/containerruntimeconfig.go b/machineconfiguration/listers/machineconfiguration/v1/containerruntimeconfig.go index f1d629de20..5ae9f320b2 100644 --- a/machineconfiguration/listers/machineconfiguration/v1/containerruntimeconfig.go +++ b/machineconfiguration/listers/machineconfiguration/v1/containerruntimeconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ContainerRuntimeConfigLister helps list ContainerRuntimeConfigs. @@ -14,19 +14,19 @@ import ( type ContainerRuntimeConfigLister interface { // List lists all ContainerRuntimeConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ContainerRuntimeConfig, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1.ContainerRuntimeConfig, err error) // Get retrieves the ContainerRuntimeConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ContainerRuntimeConfig, error) + Get(name string) (*machineconfigurationv1.ContainerRuntimeConfig, error) ContainerRuntimeConfigListerExpansion } // containerRuntimeConfigLister implements the ContainerRuntimeConfigLister interface. type containerRuntimeConfigLister struct { - listers.ResourceIndexer[*v1.ContainerRuntimeConfig] + listers.ResourceIndexer[*machineconfigurationv1.ContainerRuntimeConfig] } // NewContainerRuntimeConfigLister returns a new ContainerRuntimeConfigLister. func NewContainerRuntimeConfigLister(indexer cache.Indexer) ContainerRuntimeConfigLister { - return &containerRuntimeConfigLister{listers.New[*v1.ContainerRuntimeConfig](indexer, v1.Resource("containerruntimeconfig"))} + return &containerRuntimeConfigLister{listers.New[*machineconfigurationv1.ContainerRuntimeConfig](indexer, machineconfigurationv1.Resource("containerruntimeconfig"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1/controllerconfig.go b/machineconfiguration/listers/machineconfiguration/v1/controllerconfig.go index cd6420c945..3db0c87431 100644 --- a/machineconfiguration/listers/machineconfiguration/v1/controllerconfig.go +++ b/machineconfiguration/listers/machineconfiguration/v1/controllerconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ControllerConfigLister helps list ControllerConfigs. @@ -14,19 +14,19 @@ import ( type ControllerConfigLister interface { // List lists all ControllerConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ControllerConfig, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1.ControllerConfig, err error) // Get retrieves the ControllerConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ControllerConfig, error) + Get(name string) (*machineconfigurationv1.ControllerConfig, error) ControllerConfigListerExpansion } // controllerConfigLister implements the ControllerConfigLister interface. type controllerConfigLister struct { - listers.ResourceIndexer[*v1.ControllerConfig] + listers.ResourceIndexer[*machineconfigurationv1.ControllerConfig] } // NewControllerConfigLister returns a new ControllerConfigLister. func NewControllerConfigLister(indexer cache.Indexer) ControllerConfigLister { - return &controllerConfigLister{listers.New[*v1.ControllerConfig](indexer, v1.Resource("controllerconfig"))} + return &controllerConfigLister{listers.New[*machineconfigurationv1.ControllerConfig](indexer, machineconfigurationv1.Resource("controllerconfig"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1/kubeletconfig.go b/machineconfiguration/listers/machineconfiguration/v1/kubeletconfig.go index b3a42576ae..df3f5de9f5 100644 --- a/machineconfiguration/listers/machineconfiguration/v1/kubeletconfig.go +++ b/machineconfiguration/listers/machineconfiguration/v1/kubeletconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // KubeletConfigLister helps list KubeletConfigs. @@ -14,19 +14,19 @@ import ( type KubeletConfigLister interface { // List lists all KubeletConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.KubeletConfig, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1.KubeletConfig, err error) // Get retrieves the KubeletConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.KubeletConfig, error) + Get(name string) (*machineconfigurationv1.KubeletConfig, error) KubeletConfigListerExpansion } // kubeletConfigLister implements the KubeletConfigLister interface. type kubeletConfigLister struct { - listers.ResourceIndexer[*v1.KubeletConfig] + listers.ResourceIndexer[*machineconfigurationv1.KubeletConfig] } // NewKubeletConfigLister returns a new KubeletConfigLister. func NewKubeletConfigLister(indexer cache.Indexer) KubeletConfigLister { - return &kubeletConfigLister{listers.New[*v1.KubeletConfig](indexer, v1.Resource("kubeletconfig"))} + return &kubeletConfigLister{listers.New[*machineconfigurationv1.KubeletConfig](indexer, machineconfigurationv1.Resource("kubeletconfig"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1/machineconfig.go b/machineconfiguration/listers/machineconfiguration/v1/machineconfig.go index 5e934628ce..0f6ce741e1 100644 --- a/machineconfiguration/listers/machineconfiguration/v1/machineconfig.go +++ b/machineconfiguration/listers/machineconfiguration/v1/machineconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineConfigLister helps list MachineConfigs. @@ -14,19 +14,19 @@ import ( type MachineConfigLister interface { // List lists all MachineConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.MachineConfig, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1.MachineConfig, err error) // Get retrieves the MachineConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.MachineConfig, error) + Get(name string) (*machineconfigurationv1.MachineConfig, error) MachineConfigListerExpansion } // machineConfigLister implements the MachineConfigLister interface. type machineConfigLister struct { - listers.ResourceIndexer[*v1.MachineConfig] + listers.ResourceIndexer[*machineconfigurationv1.MachineConfig] } // NewMachineConfigLister returns a new MachineConfigLister. func NewMachineConfigLister(indexer cache.Indexer) MachineConfigLister { - return &machineConfigLister{listers.New[*v1.MachineConfig](indexer, v1.Resource("machineconfig"))} + return &machineConfigLister{listers.New[*machineconfigurationv1.MachineConfig](indexer, machineconfigurationv1.Resource("machineconfig"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1/machineconfigpool.go b/machineconfiguration/listers/machineconfiguration/v1/machineconfigpool.go index d55a350f36..3ec690df0b 100644 --- a/machineconfiguration/listers/machineconfiguration/v1/machineconfigpool.go +++ b/machineconfiguration/listers/machineconfiguration/v1/machineconfigpool.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/machineconfiguration/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineConfigPoolLister helps list MachineConfigPools. @@ -14,19 +14,19 @@ import ( type MachineConfigPoolLister interface { // List lists all MachineConfigPools in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.MachineConfigPool, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1.MachineConfigPool, err error) // Get retrieves the MachineConfigPool from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.MachineConfigPool, error) + Get(name string) (*machineconfigurationv1.MachineConfigPool, error) MachineConfigPoolListerExpansion } // machineConfigPoolLister implements the MachineConfigPoolLister interface. type machineConfigPoolLister struct { - listers.ResourceIndexer[*v1.MachineConfigPool] + listers.ResourceIndexer[*machineconfigurationv1.MachineConfigPool] } // NewMachineConfigPoolLister returns a new MachineConfigPoolLister. func NewMachineConfigPoolLister(indexer cache.Indexer) MachineConfigPoolLister { - return &machineConfigPoolLister{listers.New[*v1.MachineConfigPool](indexer, v1.Resource("machineconfigpool"))} + return &machineConfigPoolLister{listers.New[*machineconfigurationv1.MachineConfigPool](indexer, machineconfigurationv1.Resource("machineconfigpool"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1alpha1/machineconfignode.go b/machineconfiguration/listers/machineconfiguration/v1alpha1/machineconfignode.go index 4bd3fb1698..294210e4de 100644 --- a/machineconfiguration/listers/machineconfiguration/v1alpha1/machineconfignode.go +++ b/machineconfiguration/listers/machineconfiguration/v1alpha1/machineconfignode.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineConfigNodeLister helps list MachineConfigNodes. @@ -14,19 +14,19 @@ import ( type MachineConfigNodeLister interface { // List lists all MachineConfigNodes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.MachineConfigNode, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1alpha1.MachineConfigNode, err error) // Get retrieves the MachineConfigNode from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.MachineConfigNode, error) + Get(name string) (*machineconfigurationv1alpha1.MachineConfigNode, error) MachineConfigNodeListerExpansion } // machineConfigNodeLister implements the MachineConfigNodeLister interface. type machineConfigNodeLister struct { - listers.ResourceIndexer[*v1alpha1.MachineConfigNode] + listers.ResourceIndexer[*machineconfigurationv1alpha1.MachineConfigNode] } // NewMachineConfigNodeLister returns a new MachineConfigNodeLister. func NewMachineConfigNodeLister(indexer cache.Indexer) MachineConfigNodeLister { - return &machineConfigNodeLister{listers.New[*v1alpha1.MachineConfigNode](indexer, v1alpha1.Resource("machineconfignode"))} + return &machineConfigNodeLister{listers.New[*machineconfigurationv1alpha1.MachineConfigNode](indexer, machineconfigurationv1alpha1.Resource("machineconfignode"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosbuild.go b/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosbuild.go index 35bd4c0ac6..357f1313c1 100644 --- a/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosbuild.go +++ b/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosbuild.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineOSBuildLister helps list MachineOSBuilds. @@ -14,19 +14,19 @@ import ( type MachineOSBuildLister interface { // List lists all MachineOSBuilds in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.MachineOSBuild, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1alpha1.MachineOSBuild, err error) // Get retrieves the MachineOSBuild from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.MachineOSBuild, error) + Get(name string) (*machineconfigurationv1alpha1.MachineOSBuild, error) MachineOSBuildListerExpansion } // machineOSBuildLister implements the MachineOSBuildLister interface. type machineOSBuildLister struct { - listers.ResourceIndexer[*v1alpha1.MachineOSBuild] + listers.ResourceIndexer[*machineconfigurationv1alpha1.MachineOSBuild] } // NewMachineOSBuildLister returns a new MachineOSBuildLister. func NewMachineOSBuildLister(indexer cache.Indexer) MachineOSBuildLister { - return &machineOSBuildLister{listers.New[*v1alpha1.MachineOSBuild](indexer, v1alpha1.Resource("machineosbuild"))} + return &machineOSBuildLister{listers.New[*machineconfigurationv1alpha1.MachineOSBuild](indexer, machineconfigurationv1alpha1.Resource("machineosbuild"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosconfig.go b/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosconfig.go index e4f4ef567c..76059ce484 100644 --- a/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosconfig.go +++ b/machineconfiguration/listers/machineconfiguration/v1alpha1/machineosconfig.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineOSConfigLister helps list MachineOSConfigs. @@ -14,19 +14,19 @@ import ( type MachineOSConfigLister interface { // List lists all MachineOSConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.MachineOSConfig, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1alpha1.MachineOSConfig, err error) // Get retrieves the MachineOSConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.MachineOSConfig, error) + Get(name string) (*machineconfigurationv1alpha1.MachineOSConfig, error) MachineOSConfigListerExpansion } // machineOSConfigLister implements the MachineOSConfigLister interface. type machineOSConfigLister struct { - listers.ResourceIndexer[*v1alpha1.MachineOSConfig] + listers.ResourceIndexer[*machineconfigurationv1alpha1.MachineOSConfig] } // NewMachineOSConfigLister returns a new MachineOSConfigLister. func NewMachineOSConfigLister(indexer cache.Indexer) MachineOSConfigLister { - return &machineOSConfigLister{listers.New[*v1alpha1.MachineOSConfig](indexer, v1alpha1.Resource("machineosconfig"))} + return &machineOSConfigLister{listers.New[*machineconfigurationv1alpha1.MachineOSConfig](indexer, machineconfigurationv1alpha1.Resource("machineosconfig"))} } diff --git a/machineconfiguration/listers/machineconfiguration/v1alpha1/pinnedimageset.go b/machineconfiguration/listers/machineconfiguration/v1alpha1/pinnedimageset.go index 596e214927..1861270cac 100644 --- a/machineconfiguration/listers/machineconfiguration/v1alpha1/pinnedimageset.go +++ b/machineconfiguration/listers/machineconfiguration/v1alpha1/pinnedimageset.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + machineconfigurationv1alpha1 "github.com/openshift/api/machineconfiguration/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // PinnedImageSetLister helps list PinnedImageSets. @@ -14,19 +14,19 @@ import ( type PinnedImageSetLister interface { // List lists all PinnedImageSets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.PinnedImageSet, err error) + List(selector labels.Selector) (ret []*machineconfigurationv1alpha1.PinnedImageSet, err error) // Get retrieves the PinnedImageSet from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.PinnedImageSet, error) + Get(name string) (*machineconfigurationv1alpha1.PinnedImageSet, error) PinnedImageSetListerExpansion } // pinnedImageSetLister implements the PinnedImageSetLister interface. type pinnedImageSetLister struct { - listers.ResourceIndexer[*v1alpha1.PinnedImageSet] + listers.ResourceIndexer[*machineconfigurationv1alpha1.PinnedImageSet] } // NewPinnedImageSetLister returns a new PinnedImageSetLister. func NewPinnedImageSetLister(indexer cache.Indexer) PinnedImageSetLister { - return &pinnedImageSetLister{listers.New[*v1alpha1.PinnedImageSet](indexer, v1alpha1.Resource("pinnedimageset"))} + return &pinnedImageSetLister{listers.New[*machineconfigurationv1alpha1.PinnedImageSet](indexer, machineconfigurationv1alpha1.Resource("pinnedimageset"))} } diff --git a/monitoring/applyconfigurations/internal/internal.go b/monitoring/applyconfigurations/internal/internal.go index db6cb8b24e..9538194701 100644 --- a/monitoring/applyconfigurations/internal/internal.go +++ b/monitoring/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/monitoring/applyconfigurations/monitoring/v1/alertingrule.go b/monitoring/applyconfigurations/monitoring/v1/alertingrule.go index a6218f8f67..829eb7e84d 100644 --- a/monitoring/applyconfigurations/monitoring/v1/alertingrule.go +++ b/monitoring/applyconfigurations/monitoring/v1/alertingrule.go @@ -3,21 +3,21 @@ package v1 import ( - apimonitoringv1 "github.com/openshift/api/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" internal "github.com/openshift/client-go/monitoring/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // AlertingRuleApplyConfiguration represents a declarative configuration of the AlertingRule type for use // with apply. type AlertingRuleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *AlertingRuleSpecApplyConfiguration `json:"spec,omitempty"` - Status *AlertingRuleStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *AlertingRuleSpecApplyConfiguration `json:"spec,omitempty"` + Status *AlertingRuleStatusApplyConfiguration `json:"status,omitempty"` } // AlertingRule constructs a declarative configuration of the AlertingRule type for use with @@ -42,18 +42,18 @@ func AlertingRule(name, namespace string) *AlertingRuleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractAlertingRule(alertingRule *apimonitoringv1.AlertingRule, fieldManager string) (*AlertingRuleApplyConfiguration, error) { +func ExtractAlertingRule(alertingRule *monitoringv1.AlertingRule, fieldManager string) (*AlertingRuleApplyConfiguration, error) { return extractAlertingRule(alertingRule, fieldManager, "") } // ExtractAlertingRuleStatus is the same as ExtractAlertingRule except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractAlertingRuleStatus(alertingRule *apimonitoringv1.AlertingRule, fieldManager string) (*AlertingRuleApplyConfiguration, error) { +func ExtractAlertingRuleStatus(alertingRule *monitoringv1.AlertingRule, fieldManager string) (*AlertingRuleApplyConfiguration, error) { return extractAlertingRule(alertingRule, fieldManager, "status") } -func extractAlertingRule(alertingRule *apimonitoringv1.AlertingRule, fieldManager string, subresource string) (*AlertingRuleApplyConfiguration, error) { +func extractAlertingRule(alertingRule *monitoringv1.AlertingRule, fieldManager string, subresource string) (*AlertingRuleApplyConfiguration, error) { b := &AlertingRuleApplyConfiguration{} err := managedfields.ExtractInto(alertingRule, internal.Parser().Type("com.github.openshift.api.monitoring.v1.AlertingRule"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractAlertingRule(alertingRule *apimonitoringv1.AlertingRule, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithKind(value string) *AlertingRuleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *AlertingRuleApplyConfiguration) WithKind(value string) *AlertingRuleApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithAPIVersion(value string) *AlertingRuleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *AlertingRuleApplyConfiguration) WithAPIVersion(value string) *AlertingR // If called multiple times, the Name field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithName(value string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *AlertingRuleApplyConfiguration) WithName(value string) *AlertingRuleApp // If called multiple times, the GenerateName field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithGenerateName(value string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *AlertingRuleApplyConfiguration) WithGenerateName(value string) *Alertin // If called multiple times, the Namespace field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithNamespace(value string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *AlertingRuleApplyConfiguration) WithNamespace(value string) *AlertingRu // If called multiple times, the UID field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithUID(value types.UID) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *AlertingRuleApplyConfiguration) WithUID(value types.UID) *AlertingRuleA // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithResourceVersion(value string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *AlertingRuleApplyConfiguration) WithResourceVersion(value string) *Aler // If called multiple times, the Generation field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithGeneration(value int64) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *AlertingRuleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *AlertingRuleApplyConfiguration { +func (b *AlertingRuleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *AlertingRuleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *AlertingRuleApplyConfiguration { +func (b *AlertingRuleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *AlertingRuleApplyConfiguration) WithDeletionTimestamp(value metav1.Time // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *AlertingRuleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *AlertingRuleApplyConfiguration) WithDeletionGracePeriodSeconds(value in // overwriting an existing map entries in Labels field with the same key. func (b *AlertingRuleApplyConfiguration) WithLabels(entries map[string]string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *AlertingRuleApplyConfiguration) WithLabels(entries map[string]string) * // overwriting an existing map entries in Annotations field with the same key. func (b *AlertingRuleApplyConfiguration) WithAnnotations(entries map[string]string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *AlertingRuleApplyConfiguration) WithAnnotations(entries map[string]stri // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *AlertingRuleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *AlertingRuleApplyConfiguration { +func (b *AlertingRuleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *AlertingRuleApplyConfiguration) WithOwnerReferences(values ...*v1.Owner func (b *AlertingRuleApplyConfiguration) WithFinalizers(values ...string) *AlertingRuleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *AlertingRuleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *AlertingRuleApplyConfiguration) WithStatus(value *AlertingRuleStatusApp // GetName retrieves the value of the Name field in the declarative configuration. func (b *AlertingRuleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfig.go b/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfig.go index bc5ac3dbc0..8871cc4ff9 100644 --- a/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfig.go +++ b/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfig.go @@ -3,21 +3,21 @@ package v1 import ( - apimonitoringv1 "github.com/openshift/api/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" internal "github.com/openshift/client-go/monitoring/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // AlertRelabelConfigApplyConfiguration represents a declarative configuration of the AlertRelabelConfig type for use // with apply. type AlertRelabelConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *AlertRelabelConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *AlertRelabelConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *AlertRelabelConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *AlertRelabelConfigStatusApplyConfiguration `json:"status,omitempty"` } // AlertRelabelConfig constructs a declarative configuration of the AlertRelabelConfig type for use with @@ -42,18 +42,18 @@ func AlertRelabelConfig(name, namespace string) *AlertRelabelConfigApplyConfigur // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractAlertRelabelConfig(alertRelabelConfig *apimonitoringv1.AlertRelabelConfig, fieldManager string) (*AlertRelabelConfigApplyConfiguration, error) { +func ExtractAlertRelabelConfig(alertRelabelConfig *monitoringv1.AlertRelabelConfig, fieldManager string) (*AlertRelabelConfigApplyConfiguration, error) { return extractAlertRelabelConfig(alertRelabelConfig, fieldManager, "") } // ExtractAlertRelabelConfigStatus is the same as ExtractAlertRelabelConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractAlertRelabelConfigStatus(alertRelabelConfig *apimonitoringv1.AlertRelabelConfig, fieldManager string) (*AlertRelabelConfigApplyConfiguration, error) { +func ExtractAlertRelabelConfigStatus(alertRelabelConfig *monitoringv1.AlertRelabelConfig, fieldManager string) (*AlertRelabelConfigApplyConfiguration, error) { return extractAlertRelabelConfig(alertRelabelConfig, fieldManager, "status") } -func extractAlertRelabelConfig(alertRelabelConfig *apimonitoringv1.AlertRelabelConfig, fieldManager string, subresource string) (*AlertRelabelConfigApplyConfiguration, error) { +func extractAlertRelabelConfig(alertRelabelConfig *monitoringv1.AlertRelabelConfig, fieldManager string, subresource string) (*AlertRelabelConfigApplyConfiguration, error) { b := &AlertRelabelConfigApplyConfiguration{} err := managedfields.ExtractInto(alertRelabelConfig, internal.Parser().Type("com.github.openshift.api.monitoring.v1.AlertRelabelConfig"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractAlertRelabelConfig(alertRelabelConfig *apimonitoringv1.AlertRelabelC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithKind(value string) *AlertRelabelConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithKind(value string) *AlertRela // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithAPIVersion(value string) *AlertRelabelConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithAPIVersion(value string) *Ale // If called multiple times, the Name field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithName(value string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithName(value string) *AlertRela // If called multiple times, the GenerateName field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithGenerateName(value string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithGenerateName(value string) *A // If called multiple times, the Namespace field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithNamespace(value string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithNamespace(value string) *Aler // If called multiple times, the UID field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithUID(value types.UID) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithUID(value types.UID) *AlertRe // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithResourceVersion(value string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *AlertRelabelConfigApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithGeneration(value int64) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *AlertRelabelConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *AlertRelabelConfigApplyConfiguration { +func (b *AlertRelabelConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *AlertRelabelConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *AlertRelabelConfigApplyConfiguration { +func (b *AlertRelabelConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *AlertRelabelConfigApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *AlertRelabelConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *AlertRelabelConfigApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *AlertRelabelConfigApplyConfiguration) WithLabels(entries map[string]string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *AlertRelabelConfigApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *AlertRelabelConfigApplyConfiguration) WithAnnotations(entries map[string]string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *AlertRelabelConfigApplyConfiguration) WithAnnotations(entries map[strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *AlertRelabelConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *AlertRelabelConfigApplyConfiguration { +func (b *AlertRelabelConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *AlertRelabelConfigApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *AlertRelabelConfigApplyConfiguration) WithFinalizers(values ...string) *AlertRelabelConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *AlertRelabelConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *AlertRelabelConfigApplyConfiguration) WithStatus(value *AlertRelabelCon // GetName retrieves the value of the Name field in the declarative configuration. func (b *AlertRelabelConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfigstatus.go b/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfigstatus.go index d1d6226d2a..2d82be916e 100644 --- a/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfigstatus.go +++ b/monitoring/applyconfigurations/monitoring/v1/alertrelabelconfigstatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // AlertRelabelConfigStatusApplyConfiguration represents a declarative configuration of the AlertRelabelConfigStatus type for use // with apply. type AlertRelabelConfigStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // AlertRelabelConfigStatusApplyConfiguration constructs a declarative configuration of the AlertRelabelConfigStatus type for use with @@ -21,7 +21,7 @@ func AlertRelabelConfigStatus() *AlertRelabelConfigStatusApplyConfiguration { // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *AlertRelabelConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *AlertRelabelConfigStatusApplyConfiguration { +func (b *AlertRelabelConfigStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *AlertRelabelConfigStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/monitoring/applyconfigurations/monitoring/v1/relabelconfig.go b/monitoring/applyconfigurations/monitoring/v1/relabelconfig.go index c05215fa9a..eeca6f094e 100644 --- a/monitoring/applyconfigurations/monitoring/v1/relabelconfig.go +++ b/monitoring/applyconfigurations/monitoring/v1/relabelconfig.go @@ -3,19 +3,19 @@ package v1 import ( - v1 "github.com/openshift/api/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" ) // RelabelConfigApplyConfiguration represents a declarative configuration of the RelabelConfig type for use // with apply. type RelabelConfigApplyConfiguration struct { - SourceLabels []v1.LabelName `json:"sourceLabels,omitempty"` - Separator *string `json:"separator,omitempty"` - TargetLabel *string `json:"targetLabel,omitempty"` - Regex *string `json:"regex,omitempty"` - Modulus *uint64 `json:"modulus,omitempty"` - Replacement *string `json:"replacement,omitempty"` - Action *string `json:"action,omitempty"` + SourceLabels []monitoringv1.LabelName `json:"sourceLabels,omitempty"` + Separator *string `json:"separator,omitempty"` + TargetLabel *string `json:"targetLabel,omitempty"` + Regex *string `json:"regex,omitempty"` + Modulus *uint64 `json:"modulus,omitempty"` + Replacement *string `json:"replacement,omitempty"` + Action *string `json:"action,omitempty"` } // RelabelConfigApplyConfiguration constructs a declarative configuration of the RelabelConfig type for use with @@ -27,7 +27,7 @@ func RelabelConfig() *RelabelConfigApplyConfiguration { // WithSourceLabels adds the given value to the SourceLabels field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the SourceLabels field. -func (b *RelabelConfigApplyConfiguration) WithSourceLabels(values ...v1.LabelName) *RelabelConfigApplyConfiguration { +func (b *RelabelConfigApplyConfiguration) WithSourceLabels(values ...monitoringv1.LabelName) *RelabelConfigApplyConfiguration { for i := range values { b.SourceLabels = append(b.SourceLabels, values[i]) } diff --git a/monitoring/applyconfigurations/monitoring/v1/rule.go b/monitoring/applyconfigurations/monitoring/v1/rule.go index e3443c0725..3f0161d692 100644 --- a/monitoring/applyconfigurations/monitoring/v1/rule.go +++ b/monitoring/applyconfigurations/monitoring/v1/rule.go @@ -3,18 +3,18 @@ package v1 import ( - v1 "github.com/openshift/api/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" intstr "k8s.io/apimachinery/pkg/util/intstr" ) // RuleApplyConfiguration represents a declarative configuration of the Rule type for use // with apply. type RuleApplyConfiguration struct { - Alert *string `json:"alert,omitempty"` - Expr *intstr.IntOrString `json:"expr,omitempty"` - For *v1.Duration `json:"for,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` + Alert *string `json:"alert,omitempty"` + Expr *intstr.IntOrString `json:"expr,omitempty"` + For *monitoringv1.Duration `json:"for,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` } // RuleApplyConfiguration constructs a declarative configuration of the Rule type for use with @@ -42,7 +42,7 @@ func (b *RuleApplyConfiguration) WithExpr(value intstr.IntOrString) *RuleApplyCo // WithFor sets the For field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the For field is set to the value of the last call. -func (b *RuleApplyConfiguration) WithFor(value v1.Duration) *RuleApplyConfiguration { +func (b *RuleApplyConfiguration) WithFor(value monitoringv1.Duration) *RuleApplyConfiguration { b.For = &value return b } diff --git a/monitoring/applyconfigurations/monitoring/v1/rulegroup.go b/monitoring/applyconfigurations/monitoring/v1/rulegroup.go index 3d60554c3c..a2ec525e16 100644 --- a/monitoring/applyconfigurations/monitoring/v1/rulegroup.go +++ b/monitoring/applyconfigurations/monitoring/v1/rulegroup.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" ) // RuleGroupApplyConfiguration represents a declarative configuration of the RuleGroup type for use // with apply. type RuleGroupApplyConfiguration struct { Name *string `json:"name,omitempty"` - Interval *v1.Duration `json:"interval,omitempty"` + Interval *monitoringv1.Duration `json:"interval,omitempty"` Rules []RuleApplyConfiguration `json:"rules,omitempty"` } @@ -31,7 +31,7 @@ func (b *RuleGroupApplyConfiguration) WithName(value string) *RuleGroupApplyConf // WithInterval sets the Interval field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Interval field is set to the value of the last call. -func (b *RuleGroupApplyConfiguration) WithInterval(value v1.Duration) *RuleGroupApplyConfiguration { +func (b *RuleGroupApplyConfiguration) WithInterval(value monitoringv1.Duration) *RuleGroupApplyConfiguration { b.Interval = &value return b } diff --git a/monitoring/clientset/versioned/clientset.go b/monitoring/clientset/versioned/clientset.go index a5f6ef5081..d99b627bdf 100644 --- a/monitoring/clientset/versioned/clientset.go +++ b/monitoring/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" monitoringv1 "github.com/openshift/client-go/monitoring/clientset/versioned/typed/monitoring/v1" discovery "k8s.io/client-go/discovery" diff --git a/monitoring/clientset/versioned/typed/monitoring/v1/alertingrule.go b/monitoring/clientset/versioned/typed/monitoring/v1/alertingrule.go index a258bb30db..e35f97bee6 100644 --- a/monitoring/clientset/versioned/typed/monitoring/v1/alertingrule.go +++ b/monitoring/clientset/versioned/typed/monitoring/v1/alertingrule.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/monitoring/v1" - monitoringv1 "github.com/openshift/client-go/monitoring/applyconfigurations/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" + applyconfigurationsmonitoringv1 "github.com/openshift/client-go/monitoring/applyconfigurations/monitoring/v1" scheme "github.com/openshift/client-go/monitoring/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type AlertingRulesGetter interface { // AlertingRuleInterface has methods to work with AlertingRule resources. type AlertingRuleInterface interface { - Create(ctx context.Context, alertingRule *v1.AlertingRule, opts metav1.CreateOptions) (*v1.AlertingRule, error) - Update(ctx context.Context, alertingRule *v1.AlertingRule, opts metav1.UpdateOptions) (*v1.AlertingRule, error) + Create(ctx context.Context, alertingRule *monitoringv1.AlertingRule, opts metav1.CreateOptions) (*monitoringv1.AlertingRule, error) + Update(ctx context.Context, alertingRule *monitoringv1.AlertingRule, opts metav1.UpdateOptions) (*monitoringv1.AlertingRule, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, alertingRule *v1.AlertingRule, opts metav1.UpdateOptions) (*v1.AlertingRule, error) + UpdateStatus(ctx context.Context, alertingRule *monitoringv1.AlertingRule, opts metav1.UpdateOptions) (*monitoringv1.AlertingRule, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.AlertingRule, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.AlertingRuleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*monitoringv1.AlertingRule, error) + List(ctx context.Context, opts metav1.ListOptions) (*monitoringv1.AlertingRuleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AlertingRule, err error) - Apply(ctx context.Context, alertingRule *monitoringv1.AlertingRuleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertingRule, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *monitoringv1.AlertingRule, err error) + Apply(ctx context.Context, alertingRule *applyconfigurationsmonitoringv1.AlertingRuleApplyConfiguration, opts metav1.ApplyOptions) (result *monitoringv1.AlertingRule, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, alertingRule *monitoringv1.AlertingRuleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertingRule, err error) + ApplyStatus(ctx context.Context, alertingRule *applyconfigurationsmonitoringv1.AlertingRuleApplyConfiguration, opts metav1.ApplyOptions) (result *monitoringv1.AlertingRule, err error) AlertingRuleExpansion } // alertingRules implements AlertingRuleInterface type alertingRules struct { - *gentype.ClientWithListAndApply[*v1.AlertingRule, *v1.AlertingRuleList, *monitoringv1.AlertingRuleApplyConfiguration] + *gentype.ClientWithListAndApply[*monitoringv1.AlertingRule, *monitoringv1.AlertingRuleList, *applyconfigurationsmonitoringv1.AlertingRuleApplyConfiguration] } // newAlertingRules returns a AlertingRules func newAlertingRules(c *MonitoringV1Client, namespace string) *alertingRules { return &alertingRules{ - gentype.NewClientWithListAndApply[*v1.AlertingRule, *v1.AlertingRuleList, *monitoringv1.AlertingRuleApplyConfiguration]( + gentype.NewClientWithListAndApply[*monitoringv1.AlertingRule, *monitoringv1.AlertingRuleList, *applyconfigurationsmonitoringv1.AlertingRuleApplyConfiguration]( "alertingrules", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.AlertingRule { return &v1.AlertingRule{} }, - func() *v1.AlertingRuleList { return &v1.AlertingRuleList{} }), + func() *monitoringv1.AlertingRule { return &monitoringv1.AlertingRule{} }, + func() *monitoringv1.AlertingRuleList { return &monitoringv1.AlertingRuleList{} }, + ), } } diff --git a/monitoring/clientset/versioned/typed/monitoring/v1/alertrelabelconfig.go b/monitoring/clientset/versioned/typed/monitoring/v1/alertrelabelconfig.go index 71c4cc5792..14e0d046d9 100644 --- a/monitoring/clientset/versioned/typed/monitoring/v1/alertrelabelconfig.go +++ b/monitoring/clientset/versioned/typed/monitoring/v1/alertrelabelconfig.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/monitoring/v1" - monitoringv1 "github.com/openshift/client-go/monitoring/applyconfigurations/monitoring/v1" + monitoringv1 "github.com/openshift/api/monitoring/v1" + applyconfigurationsmonitoringv1 "github.com/openshift/client-go/monitoring/applyconfigurations/monitoring/v1" scheme "github.com/openshift/client-go/monitoring/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type AlertRelabelConfigsGetter interface { // AlertRelabelConfigInterface has methods to work with AlertRelabelConfig resources. type AlertRelabelConfigInterface interface { - Create(ctx context.Context, alertRelabelConfig *v1.AlertRelabelConfig, opts metav1.CreateOptions) (*v1.AlertRelabelConfig, error) - Update(ctx context.Context, alertRelabelConfig *v1.AlertRelabelConfig, opts metav1.UpdateOptions) (*v1.AlertRelabelConfig, error) + Create(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfig, opts metav1.CreateOptions) (*monitoringv1.AlertRelabelConfig, error) + Update(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfig, opts metav1.UpdateOptions) (*monitoringv1.AlertRelabelConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, alertRelabelConfig *v1.AlertRelabelConfig, opts metav1.UpdateOptions) (*v1.AlertRelabelConfig, error) + UpdateStatus(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfig, opts metav1.UpdateOptions) (*monitoringv1.AlertRelabelConfig, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.AlertRelabelConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.AlertRelabelConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*monitoringv1.AlertRelabelConfig, error) + List(ctx context.Context, opts metav1.ListOptions) (*monitoringv1.AlertRelabelConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AlertRelabelConfig, err error) - Apply(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertRelabelConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *monitoringv1.AlertRelabelConfig, err error) + Apply(ctx context.Context, alertRelabelConfig *applyconfigurationsmonitoringv1.AlertRelabelConfigApplyConfiguration, opts metav1.ApplyOptions) (result *monitoringv1.AlertRelabelConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertRelabelConfig, err error) + ApplyStatus(ctx context.Context, alertRelabelConfig *applyconfigurationsmonitoringv1.AlertRelabelConfigApplyConfiguration, opts metav1.ApplyOptions) (result *monitoringv1.AlertRelabelConfig, err error) AlertRelabelConfigExpansion } // alertRelabelConfigs implements AlertRelabelConfigInterface type alertRelabelConfigs struct { - *gentype.ClientWithListAndApply[*v1.AlertRelabelConfig, *v1.AlertRelabelConfigList, *monitoringv1.AlertRelabelConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*monitoringv1.AlertRelabelConfig, *monitoringv1.AlertRelabelConfigList, *applyconfigurationsmonitoringv1.AlertRelabelConfigApplyConfiguration] } // newAlertRelabelConfigs returns a AlertRelabelConfigs func newAlertRelabelConfigs(c *MonitoringV1Client, namespace string) *alertRelabelConfigs { return &alertRelabelConfigs{ - gentype.NewClientWithListAndApply[*v1.AlertRelabelConfig, *v1.AlertRelabelConfigList, *monitoringv1.AlertRelabelConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*monitoringv1.AlertRelabelConfig, *monitoringv1.AlertRelabelConfigList, *applyconfigurationsmonitoringv1.AlertRelabelConfigApplyConfiguration]( "alertrelabelconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.AlertRelabelConfig { return &v1.AlertRelabelConfig{} }, - func() *v1.AlertRelabelConfigList { return &v1.AlertRelabelConfigList{} }), + func() *monitoringv1.AlertRelabelConfig { return &monitoringv1.AlertRelabelConfig{} }, + func() *monitoringv1.AlertRelabelConfigList { return &monitoringv1.AlertRelabelConfigList{} }, + ), } } diff --git a/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertingrule.go b/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertingrule.go index ca67c15873..3f4f8a756f 100644 --- a/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertingrule.go +++ b/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertingrule.go @@ -3,179 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/monitoring/v1" monitoringv1 "github.com/openshift/client-go/monitoring/applyconfigurations/monitoring/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmonitoringv1 "github.com/openshift/client-go/monitoring/clientset/versioned/typed/monitoring/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAlertingRules implements AlertingRuleInterface -type FakeAlertingRules struct { +// fakeAlertingRules implements AlertingRuleInterface +type fakeAlertingRules struct { + *gentype.FakeClientWithListAndApply[*v1.AlertingRule, *v1.AlertingRuleList, *monitoringv1.AlertingRuleApplyConfiguration] Fake *FakeMonitoringV1 - ns string -} - -var alertingrulesResource = v1.SchemeGroupVersion.WithResource("alertingrules") - -var alertingrulesKind = v1.SchemeGroupVersion.WithKind("AlertingRule") - -// Get takes name of the alertingRule, and returns the corresponding alertingRule object, and an error if there is any. -func (c *FakeAlertingRules) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.AlertingRule, err error) { - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(alertingrulesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertingRule), err -} - -// List takes label and field selectors, and returns the list of AlertingRules that match those selectors. -func (c *FakeAlertingRules) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AlertingRuleList, err error) { - emptyResult := &v1.AlertingRuleList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(alertingrulesResource, alertingrulesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.AlertingRuleList{ListMeta: obj.(*v1.AlertingRuleList).ListMeta} - for _, item := range obj.(*v1.AlertingRuleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested alertingRules. -func (c *FakeAlertingRules) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(alertingrulesResource, c.ns, opts)) - -} - -// Create takes the representation of a alertingRule and creates it. Returns the server's representation of the alertingRule, and an error, if there is any. -func (c *FakeAlertingRules) Create(ctx context.Context, alertingRule *v1.AlertingRule, opts metav1.CreateOptions) (result *v1.AlertingRule, err error) { - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(alertingrulesResource, c.ns, alertingRule, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertingRule), err -} - -// Update takes the representation of a alertingRule and updates it. Returns the server's representation of the alertingRule, and an error, if there is any. -func (c *FakeAlertingRules) Update(ctx context.Context, alertingRule *v1.AlertingRule, opts metav1.UpdateOptions) (result *v1.AlertingRule, err error) { - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(alertingrulesResource, c.ns, alertingRule, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertingRule), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAlertingRules) UpdateStatus(ctx context.Context, alertingRule *v1.AlertingRule, opts metav1.UpdateOptions) (result *v1.AlertingRule, err error) { - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(alertingrulesResource, "status", c.ns, alertingRule, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertingRule), err -} - -// Delete takes name of the alertingRule and deletes it. Returns an error if one occurs. -func (c *FakeAlertingRules) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(alertingrulesResource, c.ns, name, opts), &v1.AlertingRule{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAlertingRules) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(alertingrulesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.AlertingRuleList{}) - return err -} - -// Patch applies the patch and returns the patched alertingRule. -func (c *FakeAlertingRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AlertingRule, err error) { - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(alertingrulesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertingRule), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied alertingRule. -func (c *FakeAlertingRules) Apply(ctx context.Context, alertingRule *monitoringv1.AlertingRuleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertingRule, err error) { - if alertingRule == nil { - return nil, fmt.Errorf("alertingRule provided to Apply must not be nil") - } - data, err := json.Marshal(alertingRule) - if err != nil { - return nil, err - } - name := alertingRule.Name - if name == nil { - return nil, fmt.Errorf("alertingRule.Name must be provided to Apply") - } - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(alertingrulesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertingRule), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAlertingRules) ApplyStatus(ctx context.Context, alertingRule *monitoringv1.AlertingRuleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertingRule, err error) { - if alertingRule == nil { - return nil, fmt.Errorf("alertingRule provided to Apply must not be nil") - } - data, err := json.Marshal(alertingRule) - if err != nil { - return nil, err - } - name := alertingRule.Name - if name == nil { - return nil, fmt.Errorf("alertingRule.Name must be provided to Apply") - } - emptyResult := &v1.AlertingRule{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(alertingrulesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeAlertingRules(fake *FakeMonitoringV1, namespace string) typedmonitoringv1.AlertingRuleInterface { + return &fakeAlertingRules{ + gentype.NewFakeClientWithListAndApply[*v1.AlertingRule, *v1.AlertingRuleList, *monitoringv1.AlertingRuleApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("alertingrules"), + v1.SchemeGroupVersion.WithKind("AlertingRule"), + func() *v1.AlertingRule { return &v1.AlertingRule{} }, + func() *v1.AlertingRuleList { return &v1.AlertingRuleList{} }, + func(dst, src *v1.AlertingRuleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.AlertingRuleList) []*v1.AlertingRule { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.AlertingRuleList, items []*v1.AlertingRule) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.AlertingRule), err } diff --git a/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertrelabelconfig.go b/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertrelabelconfig.go index 04ec187d27..fea2b9bf53 100644 --- a/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertrelabelconfig.go +++ b/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_alertrelabelconfig.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/monitoring/v1" monitoringv1 "github.com/openshift/client-go/monitoring/applyconfigurations/monitoring/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedmonitoringv1 "github.com/openshift/client-go/monitoring/clientset/versioned/typed/monitoring/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAlertRelabelConfigs implements AlertRelabelConfigInterface -type FakeAlertRelabelConfigs struct { +// fakeAlertRelabelConfigs implements AlertRelabelConfigInterface +type fakeAlertRelabelConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.AlertRelabelConfig, *v1.AlertRelabelConfigList, *monitoringv1.AlertRelabelConfigApplyConfiguration] Fake *FakeMonitoringV1 - ns string -} - -var alertrelabelconfigsResource = v1.SchemeGroupVersion.WithResource("alertrelabelconfigs") - -var alertrelabelconfigsKind = v1.SchemeGroupVersion.WithKind("AlertRelabelConfig") - -// Get takes name of the alertRelabelConfig, and returns the corresponding alertRelabelConfig object, and an error if there is any. -func (c *FakeAlertRelabelConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.AlertRelabelConfig, err error) { - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(alertrelabelconfigsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertRelabelConfig), err -} - -// List takes label and field selectors, and returns the list of AlertRelabelConfigs that match those selectors. -func (c *FakeAlertRelabelConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AlertRelabelConfigList, err error) { - emptyResult := &v1.AlertRelabelConfigList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(alertrelabelconfigsResource, alertrelabelconfigsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.AlertRelabelConfigList{ListMeta: obj.(*v1.AlertRelabelConfigList).ListMeta} - for _, item := range obj.(*v1.AlertRelabelConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested alertRelabelConfigs. -func (c *FakeAlertRelabelConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(alertrelabelconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a alertRelabelConfig and creates it. Returns the server's representation of the alertRelabelConfig, and an error, if there is any. -func (c *FakeAlertRelabelConfigs) Create(ctx context.Context, alertRelabelConfig *v1.AlertRelabelConfig, opts metav1.CreateOptions) (result *v1.AlertRelabelConfig, err error) { - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(alertrelabelconfigsResource, c.ns, alertRelabelConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertRelabelConfig), err -} - -// Update takes the representation of a alertRelabelConfig and updates it. Returns the server's representation of the alertRelabelConfig, and an error, if there is any. -func (c *FakeAlertRelabelConfigs) Update(ctx context.Context, alertRelabelConfig *v1.AlertRelabelConfig, opts metav1.UpdateOptions) (result *v1.AlertRelabelConfig, err error) { - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(alertrelabelconfigsResource, c.ns, alertRelabelConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertRelabelConfig), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAlertRelabelConfigs) UpdateStatus(ctx context.Context, alertRelabelConfig *v1.AlertRelabelConfig, opts metav1.UpdateOptions) (result *v1.AlertRelabelConfig, err error) { - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(alertrelabelconfigsResource, "status", c.ns, alertRelabelConfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertRelabelConfig), err -} - -// Delete takes name of the alertRelabelConfig and deletes it. Returns an error if one occurs. -func (c *FakeAlertRelabelConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(alertrelabelconfigsResource, c.ns, name, opts), &v1.AlertRelabelConfig{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAlertRelabelConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(alertrelabelconfigsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.AlertRelabelConfigList{}) - return err -} - -// Patch applies the patch and returns the patched alertRelabelConfig. -func (c *FakeAlertRelabelConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AlertRelabelConfig, err error) { - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(alertrelabelconfigsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertRelabelConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied alertRelabelConfig. -func (c *FakeAlertRelabelConfigs) Apply(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertRelabelConfig, err error) { - if alertRelabelConfig == nil { - return nil, fmt.Errorf("alertRelabelConfig provided to Apply must not be nil") - } - data, err := json.Marshal(alertRelabelConfig) - if err != nil { - return nil, err - } - name := alertRelabelConfig.Name - if name == nil { - return nil, fmt.Errorf("alertRelabelConfig.Name must be provided to Apply") - } - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(alertrelabelconfigsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AlertRelabelConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAlertRelabelConfigs) ApplyStatus(ctx context.Context, alertRelabelConfig *monitoringv1.AlertRelabelConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.AlertRelabelConfig, err error) { - if alertRelabelConfig == nil { - return nil, fmt.Errorf("alertRelabelConfig provided to Apply must not be nil") - } - data, err := json.Marshal(alertRelabelConfig) - if err != nil { - return nil, err - } - name := alertRelabelConfig.Name - if name == nil { - return nil, fmt.Errorf("alertRelabelConfig.Name must be provided to Apply") - } - emptyResult := &v1.AlertRelabelConfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(alertrelabelconfigsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeAlertRelabelConfigs(fake *FakeMonitoringV1, namespace string) typedmonitoringv1.AlertRelabelConfigInterface { + return &fakeAlertRelabelConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.AlertRelabelConfig, *v1.AlertRelabelConfigList, *monitoringv1.AlertRelabelConfigApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("alertrelabelconfigs"), + v1.SchemeGroupVersion.WithKind("AlertRelabelConfig"), + func() *v1.AlertRelabelConfig { return &v1.AlertRelabelConfig{} }, + func() *v1.AlertRelabelConfigList { return &v1.AlertRelabelConfigList{} }, + func(dst, src *v1.AlertRelabelConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.AlertRelabelConfigList) []*v1.AlertRelabelConfig { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.AlertRelabelConfigList, items []*v1.AlertRelabelConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.AlertRelabelConfig), err } diff --git a/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go b/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go index 5d4b9e97de..f6ebb6eb89 100644 --- a/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go +++ b/monitoring/clientset/versioned/typed/monitoring/v1/fake/fake_monitoring_client.go @@ -13,11 +13,11 @@ type FakeMonitoringV1 struct { } func (c *FakeMonitoringV1) AlertRelabelConfigs(namespace string) v1.AlertRelabelConfigInterface { - return &FakeAlertRelabelConfigs{c, namespace} + return newFakeAlertRelabelConfigs(c, namespace) } func (c *FakeMonitoringV1) AlertingRules(namespace string) v1.AlertingRuleInterface { - return &FakeAlertingRules{c, namespace} + return newFakeAlertingRules(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/monitoring/clientset/versioned/typed/monitoring/v1/monitoring_client.go b/monitoring/clientset/versioned/typed/monitoring/v1/monitoring_client.go index a6768a3538..b71db6c5d1 100644 --- a/monitoring/clientset/versioned/typed/monitoring/v1/monitoring_client.go +++ b/monitoring/clientset/versioned/typed/monitoring/v1/monitoring_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/monitoring/v1" - "github.com/openshift/client-go/monitoring/clientset/versioned/scheme" + monitoringv1 "github.com/openshift/api/monitoring/v1" + scheme "github.com/openshift/client-go/monitoring/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *MonitoringV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := monitoringv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/monitoring/informers/externalversions/generic.go b/monitoring/informers/externalversions/generic.go index 03bdced3c3..cfbbdb7e31 100644 --- a/monitoring/informers/externalversions/generic.go +++ b/monitoring/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/monitoring/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/monitoring/informers/externalversions/monitoring/v1/alertingrule.go b/monitoring/informers/externalversions/monitoring/v1/alertingrule.go index 5a4db71ecd..96aaa4c935 100644 --- a/monitoring/informers/externalversions/monitoring/v1/alertingrule.go +++ b/monitoring/informers/externalversions/monitoring/v1/alertingrule.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - monitoringv1 "github.com/openshift/api/monitoring/v1" + apimonitoringv1 "github.com/openshift/api/monitoring/v1" versioned "github.com/openshift/client-go/monitoring/clientset/versioned" internalinterfaces "github.com/openshift/client-go/monitoring/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/monitoring/listers/monitoring/v1" + monitoringv1 "github.com/openshift/client-go/monitoring/listers/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // AlertingRules. type AlertingRuleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.AlertingRuleLister + Lister() monitoringv1.AlertingRuleLister } type alertingRuleInformer struct { @@ -55,7 +55,7 @@ func NewFilteredAlertingRuleInformer(client versioned.Interface, namespace strin return client.MonitoringV1().AlertingRules(namespace).Watch(context.TODO(), options) }, }, - &monitoringv1.AlertingRule{}, + &apimonitoringv1.AlertingRule{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *alertingRuleInformer) defaultInformer(client versioned.Interface, resyn } func (f *alertingRuleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&monitoringv1.AlertingRule{}, f.defaultInformer) + return f.factory.InformerFor(&apimonitoringv1.AlertingRule{}, f.defaultInformer) } -func (f *alertingRuleInformer) Lister() v1.AlertingRuleLister { - return v1.NewAlertingRuleLister(f.Informer().GetIndexer()) +func (f *alertingRuleInformer) Lister() monitoringv1.AlertingRuleLister { + return monitoringv1.NewAlertingRuleLister(f.Informer().GetIndexer()) } diff --git a/monitoring/informers/externalversions/monitoring/v1/alertrelabelconfig.go b/monitoring/informers/externalversions/monitoring/v1/alertrelabelconfig.go index 033dd01e23..209ae33d61 100644 --- a/monitoring/informers/externalversions/monitoring/v1/alertrelabelconfig.go +++ b/monitoring/informers/externalversions/monitoring/v1/alertrelabelconfig.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - monitoringv1 "github.com/openshift/api/monitoring/v1" + apimonitoringv1 "github.com/openshift/api/monitoring/v1" versioned "github.com/openshift/client-go/monitoring/clientset/versioned" internalinterfaces "github.com/openshift/client-go/monitoring/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/monitoring/listers/monitoring/v1" + monitoringv1 "github.com/openshift/client-go/monitoring/listers/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // AlertRelabelConfigs. type AlertRelabelConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.AlertRelabelConfigLister + Lister() monitoringv1.AlertRelabelConfigLister } type alertRelabelConfigInformer struct { @@ -55,7 +55,7 @@ func NewFilteredAlertRelabelConfigInformer(client versioned.Interface, namespace return client.MonitoringV1().AlertRelabelConfigs(namespace).Watch(context.TODO(), options) }, }, - &monitoringv1.AlertRelabelConfig{}, + &apimonitoringv1.AlertRelabelConfig{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *alertRelabelConfigInformer) defaultInformer(client versioned.Interface, } func (f *alertRelabelConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&monitoringv1.AlertRelabelConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apimonitoringv1.AlertRelabelConfig{}, f.defaultInformer) } -func (f *alertRelabelConfigInformer) Lister() v1.AlertRelabelConfigLister { - return v1.NewAlertRelabelConfigLister(f.Informer().GetIndexer()) +func (f *alertRelabelConfigInformer) Lister() monitoringv1.AlertRelabelConfigLister { + return monitoringv1.NewAlertRelabelConfigLister(f.Informer().GetIndexer()) } diff --git a/monitoring/listers/monitoring/v1/alertingrule.go b/monitoring/listers/monitoring/v1/alertingrule.go index 917822314e..7e1e96e6d4 100644 --- a/monitoring/listers/monitoring/v1/alertingrule.go +++ b/monitoring/listers/monitoring/v1/alertingrule.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/monitoring/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + monitoringv1 "github.com/openshift/api/monitoring/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // AlertingRuleLister helps list AlertingRules. @@ -14,7 +14,7 @@ import ( type AlertingRuleLister interface { // List lists all AlertingRules in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.AlertingRule, err error) + List(selector labels.Selector) (ret []*monitoringv1.AlertingRule, err error) // AlertingRules returns an object that can list and get AlertingRules. AlertingRules(namespace string) AlertingRuleNamespaceLister AlertingRuleListerExpansion @@ -22,17 +22,17 @@ type AlertingRuleLister interface { // alertingRuleLister implements the AlertingRuleLister interface. type alertingRuleLister struct { - listers.ResourceIndexer[*v1.AlertingRule] + listers.ResourceIndexer[*monitoringv1.AlertingRule] } // NewAlertingRuleLister returns a new AlertingRuleLister. func NewAlertingRuleLister(indexer cache.Indexer) AlertingRuleLister { - return &alertingRuleLister{listers.New[*v1.AlertingRule](indexer, v1.Resource("alertingrule"))} + return &alertingRuleLister{listers.New[*monitoringv1.AlertingRule](indexer, monitoringv1.Resource("alertingrule"))} } // AlertingRules returns an object that can list and get AlertingRules. func (s *alertingRuleLister) AlertingRules(namespace string) AlertingRuleNamespaceLister { - return alertingRuleNamespaceLister{listers.NewNamespaced[*v1.AlertingRule](s.ResourceIndexer, namespace)} + return alertingRuleNamespaceLister{listers.NewNamespaced[*monitoringv1.AlertingRule](s.ResourceIndexer, namespace)} } // AlertingRuleNamespaceLister helps list and get AlertingRules. @@ -40,15 +40,15 @@ func (s *alertingRuleLister) AlertingRules(namespace string) AlertingRuleNamespa type AlertingRuleNamespaceLister interface { // List lists all AlertingRules in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.AlertingRule, err error) + List(selector labels.Selector) (ret []*monitoringv1.AlertingRule, err error) // Get retrieves the AlertingRule from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.AlertingRule, error) + Get(name string) (*monitoringv1.AlertingRule, error) AlertingRuleNamespaceListerExpansion } // alertingRuleNamespaceLister implements the AlertingRuleNamespaceLister // interface. type alertingRuleNamespaceLister struct { - listers.ResourceIndexer[*v1.AlertingRule] + listers.ResourceIndexer[*monitoringv1.AlertingRule] } diff --git a/monitoring/listers/monitoring/v1/alertrelabelconfig.go b/monitoring/listers/monitoring/v1/alertrelabelconfig.go index d3ff939aaa..34e55aae1c 100644 --- a/monitoring/listers/monitoring/v1/alertrelabelconfig.go +++ b/monitoring/listers/monitoring/v1/alertrelabelconfig.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/monitoring/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + monitoringv1 "github.com/openshift/api/monitoring/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // AlertRelabelConfigLister helps list AlertRelabelConfigs. @@ -14,7 +14,7 @@ import ( type AlertRelabelConfigLister interface { // List lists all AlertRelabelConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.AlertRelabelConfig, err error) + List(selector labels.Selector) (ret []*monitoringv1.AlertRelabelConfig, err error) // AlertRelabelConfigs returns an object that can list and get AlertRelabelConfigs. AlertRelabelConfigs(namespace string) AlertRelabelConfigNamespaceLister AlertRelabelConfigListerExpansion @@ -22,17 +22,17 @@ type AlertRelabelConfigLister interface { // alertRelabelConfigLister implements the AlertRelabelConfigLister interface. type alertRelabelConfigLister struct { - listers.ResourceIndexer[*v1.AlertRelabelConfig] + listers.ResourceIndexer[*monitoringv1.AlertRelabelConfig] } // NewAlertRelabelConfigLister returns a new AlertRelabelConfigLister. func NewAlertRelabelConfigLister(indexer cache.Indexer) AlertRelabelConfigLister { - return &alertRelabelConfigLister{listers.New[*v1.AlertRelabelConfig](indexer, v1.Resource("alertrelabelconfig"))} + return &alertRelabelConfigLister{listers.New[*monitoringv1.AlertRelabelConfig](indexer, monitoringv1.Resource("alertrelabelconfig"))} } // AlertRelabelConfigs returns an object that can list and get AlertRelabelConfigs. func (s *alertRelabelConfigLister) AlertRelabelConfigs(namespace string) AlertRelabelConfigNamespaceLister { - return alertRelabelConfigNamespaceLister{listers.NewNamespaced[*v1.AlertRelabelConfig](s.ResourceIndexer, namespace)} + return alertRelabelConfigNamespaceLister{listers.NewNamespaced[*monitoringv1.AlertRelabelConfig](s.ResourceIndexer, namespace)} } // AlertRelabelConfigNamespaceLister helps list and get AlertRelabelConfigs. @@ -40,15 +40,15 @@ func (s *alertRelabelConfigLister) AlertRelabelConfigs(namespace string) AlertRe type AlertRelabelConfigNamespaceLister interface { // List lists all AlertRelabelConfigs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.AlertRelabelConfig, err error) + List(selector labels.Selector) (ret []*monitoringv1.AlertRelabelConfig, err error) // Get retrieves the AlertRelabelConfig from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.AlertRelabelConfig, error) + Get(name string) (*monitoringv1.AlertRelabelConfig, error) AlertRelabelConfigNamespaceListerExpansion } // alertRelabelConfigNamespaceLister implements the AlertRelabelConfigNamespaceLister // interface. type alertRelabelConfigNamespaceLister struct { - listers.ResourceIndexer[*v1.AlertRelabelConfig] + listers.ResourceIndexer[*monitoringv1.AlertRelabelConfig] } diff --git a/network/applyconfigurations/internal/internal.go b/network/applyconfigurations/internal/internal.go index 294377e3c5..e7ad2b8a20 100644 --- a/network/applyconfigurations/internal/internal.go +++ b/network/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/network/applyconfigurations/network/v1/clusternetwork.go b/network/applyconfigurations/network/v1/clusternetwork.go index 4bb886512f..c7df12fd8d 100644 --- a/network/applyconfigurations/network/v1/clusternetwork.go +++ b/network/applyconfigurations/network/v1/clusternetwork.go @@ -3,26 +3,26 @@ package v1 import ( - apinetworkv1 "github.com/openshift/api/network/v1" + networkv1 "github.com/openshift/api/network/v1" internal "github.com/openshift/client-go/network/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterNetworkApplyConfiguration represents a declarative configuration of the ClusterNetwork type for use // with apply. type ClusterNetworkApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Network *string `json:"network,omitempty"` - HostSubnetLength *uint32 `json:"hostsubnetlength,omitempty"` - ServiceNetwork *string `json:"serviceNetwork,omitempty"` - PluginName *string `json:"pluginName,omitempty"` - ClusterNetworks []ClusterNetworkEntryApplyConfiguration `json:"clusterNetworks,omitempty"` - VXLANPort *uint32 `json:"vxlanPort,omitempty"` - MTU *uint32 `json:"mtu,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Network *string `json:"network,omitempty"` + HostSubnetLength *uint32 `json:"hostsubnetlength,omitempty"` + ServiceNetwork *string `json:"serviceNetwork,omitempty"` + PluginName *string `json:"pluginName,omitempty"` + ClusterNetworks []ClusterNetworkEntryApplyConfiguration `json:"clusterNetworks,omitempty"` + VXLANPort *uint32 `json:"vxlanPort,omitempty"` + MTU *uint32 `json:"mtu,omitempty"` } // ClusterNetwork constructs a declarative configuration of the ClusterNetwork type for use with @@ -46,18 +46,18 @@ func ClusterNetwork(name string) *ClusterNetworkApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractClusterNetwork(clusterNetwork *apinetworkv1.ClusterNetwork, fieldManager string) (*ClusterNetworkApplyConfiguration, error) { +func ExtractClusterNetwork(clusterNetwork *networkv1.ClusterNetwork, fieldManager string) (*ClusterNetworkApplyConfiguration, error) { return extractClusterNetwork(clusterNetwork, fieldManager, "") } // ExtractClusterNetworkStatus is the same as ExtractClusterNetwork except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractClusterNetworkStatus(clusterNetwork *apinetworkv1.ClusterNetwork, fieldManager string) (*ClusterNetworkApplyConfiguration, error) { +func ExtractClusterNetworkStatus(clusterNetwork *networkv1.ClusterNetwork, fieldManager string) (*ClusterNetworkApplyConfiguration, error) { return extractClusterNetwork(clusterNetwork, fieldManager, "status") } -func extractClusterNetwork(clusterNetwork *apinetworkv1.ClusterNetwork, fieldManager string, subresource string) (*ClusterNetworkApplyConfiguration, error) { +func extractClusterNetwork(clusterNetwork *networkv1.ClusterNetwork, fieldManager string, subresource string) (*ClusterNetworkApplyConfiguration, error) { b := &ClusterNetworkApplyConfiguration{} err := managedfields.ExtractInto(clusterNetwork, internal.Parser().Type("com.github.openshift.api.network.v1.ClusterNetwork"), fieldManager, b, subresource) if err != nil { @@ -74,7 +74,7 @@ func extractClusterNetwork(clusterNetwork *apinetworkv1.ClusterNetwork, fieldMan // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithKind(value string) *ClusterNetworkApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -82,7 +82,7 @@ func (b *ClusterNetworkApplyConfiguration) WithKind(value string) *ClusterNetwor // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithAPIVersion(value string) *ClusterNetworkApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -91,7 +91,7 @@ func (b *ClusterNetworkApplyConfiguration) WithAPIVersion(value string) *Cluster // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithName(value string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -100,7 +100,7 @@ func (b *ClusterNetworkApplyConfiguration) WithName(value string) *ClusterNetwor // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithGenerateName(value string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -109,7 +109,7 @@ func (b *ClusterNetworkApplyConfiguration) WithGenerateName(value string) *Clust // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithNamespace(value string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -118,7 +118,7 @@ func (b *ClusterNetworkApplyConfiguration) WithNamespace(value string) *ClusterN // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithUID(value types.UID) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -127,7 +127,7 @@ func (b *ClusterNetworkApplyConfiguration) WithUID(value types.UID) *ClusterNetw // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithResourceVersion(value string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -136,25 +136,25 @@ func (b *ClusterNetworkApplyConfiguration) WithResourceVersion(value string) *Cl // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithGeneration(value int64) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterNetworkApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterNetworkApplyConfiguration { +func (b *ClusterNetworkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterNetworkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterNetworkApplyConfiguration { +func (b *ClusterNetworkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -163,7 +163,7 @@ func (b *ClusterNetworkApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterNetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -173,11 +173,11 @@ func (b *ClusterNetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ClusterNetworkApplyConfiguration) WithLabels(entries map[string]string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -188,11 +188,11 @@ func (b *ClusterNetworkApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterNetworkApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -200,13 +200,13 @@ func (b *ClusterNetworkApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterNetworkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterNetworkApplyConfiguration { +func (b *ClusterNetworkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -217,14 +217,14 @@ func (b *ClusterNetworkApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ClusterNetworkApplyConfiguration) WithFinalizers(values ...string) *ClusterNetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterNetworkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -292,5 +292,5 @@ func (b *ClusterNetworkApplyConfiguration) WithMTU(value uint32) *ClusterNetwork // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterNetworkApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/network/applyconfigurations/network/v1/egressnetworkpolicy.go b/network/applyconfigurations/network/v1/egressnetworkpolicy.go index 2431570e0d..a4d76be63d 100644 --- a/network/applyconfigurations/network/v1/egressnetworkpolicy.go +++ b/network/applyconfigurations/network/v1/egressnetworkpolicy.go @@ -3,20 +3,20 @@ package v1 import ( - apinetworkv1 "github.com/openshift/api/network/v1" + networkv1 "github.com/openshift/api/network/v1" internal "github.com/openshift/client-go/network/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // EgressNetworkPolicyApplyConfiguration represents a declarative configuration of the EgressNetworkPolicy type for use // with apply. type EgressNetworkPolicyApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *EgressNetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *EgressNetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` } // EgressNetworkPolicy constructs a declarative configuration of the EgressNetworkPolicy type for use with @@ -41,18 +41,18 @@ func EgressNetworkPolicy(name, namespace string) *EgressNetworkPolicyApplyConfig // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractEgressNetworkPolicy(egressNetworkPolicy *apinetworkv1.EgressNetworkPolicy, fieldManager string) (*EgressNetworkPolicyApplyConfiguration, error) { +func ExtractEgressNetworkPolicy(egressNetworkPolicy *networkv1.EgressNetworkPolicy, fieldManager string) (*EgressNetworkPolicyApplyConfiguration, error) { return extractEgressNetworkPolicy(egressNetworkPolicy, fieldManager, "") } // ExtractEgressNetworkPolicyStatus is the same as ExtractEgressNetworkPolicy except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractEgressNetworkPolicyStatus(egressNetworkPolicy *apinetworkv1.EgressNetworkPolicy, fieldManager string) (*EgressNetworkPolicyApplyConfiguration, error) { +func ExtractEgressNetworkPolicyStatus(egressNetworkPolicy *networkv1.EgressNetworkPolicy, fieldManager string) (*EgressNetworkPolicyApplyConfiguration, error) { return extractEgressNetworkPolicy(egressNetworkPolicy, fieldManager, "status") } -func extractEgressNetworkPolicy(egressNetworkPolicy *apinetworkv1.EgressNetworkPolicy, fieldManager string, subresource string) (*EgressNetworkPolicyApplyConfiguration, error) { +func extractEgressNetworkPolicy(egressNetworkPolicy *networkv1.EgressNetworkPolicy, fieldManager string, subresource string) (*EgressNetworkPolicyApplyConfiguration, error) { b := &EgressNetworkPolicyApplyConfiguration{} err := managedfields.ExtractInto(egressNetworkPolicy, internal.Parser().Type("com.github.openshift.api.network.v1.EgressNetworkPolicy"), fieldManager, b, subresource) if err != nil { @@ -70,7 +70,7 @@ func extractEgressNetworkPolicy(egressNetworkPolicy *apinetworkv1.EgressNetworkP // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithKind(value string) *EgressNetworkPolicyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -78,7 +78,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithKind(value string) *EgressNe // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithAPIVersion(value string) *EgressNetworkPolicyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -87,7 +87,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithAPIVersion(value string) *Eg // If called multiple times, the Name field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithName(value string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -96,7 +96,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithName(value string) *EgressNe // If called multiple times, the GenerateName field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithGenerateName(value string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -105,7 +105,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithGenerateName(value string) * // If called multiple times, the Namespace field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithNamespace(value string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -114,7 +114,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithNamespace(value string) *Egr // If called multiple times, the UID field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithUID(value types.UID) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -123,7 +123,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithUID(value types.UID) *Egress // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithResourceVersion(value string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -132,25 +132,25 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithResourceVersion(value string // If called multiple times, the Generation field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithGeneration(value int64) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *EgressNetworkPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EgressNetworkPolicyApplyConfiguration { +func (b *EgressNetworkPolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *EgressNetworkPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EgressNetworkPolicyApplyConfiguration { +func (b *EgressNetworkPolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -159,7 +159,7 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithDeletionTimestamp(value meta // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EgressNetworkPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -169,11 +169,11 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(v // overwriting an existing map entries in Labels field with the same key. func (b *EgressNetworkPolicyApplyConfiguration) WithLabels(entries map[string]string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -184,11 +184,11 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithLabels(entries map[string]st // overwriting an existing map entries in Annotations field with the same key. func (b *EgressNetworkPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -196,13 +196,13 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithAnnotations(entries map[stri // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *EgressNetworkPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EgressNetworkPolicyApplyConfiguration { +func (b *EgressNetworkPolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -213,14 +213,14 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithOwnerReferences(values ...*v func (b *EgressNetworkPolicyApplyConfiguration) WithFinalizers(values ...string) *EgressNetworkPolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *EgressNetworkPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -235,5 +235,5 @@ func (b *EgressNetworkPolicyApplyConfiguration) WithSpec(value *EgressNetworkPol // GetName retrieves the value of the Name field in the declarative configuration. func (b *EgressNetworkPolicyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/network/applyconfigurations/network/v1/egressnetworkpolicyrule.go b/network/applyconfigurations/network/v1/egressnetworkpolicyrule.go index 1e77b877b5..1806975842 100644 --- a/network/applyconfigurations/network/v1/egressnetworkpolicyrule.go +++ b/network/applyconfigurations/network/v1/egressnetworkpolicyrule.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/network/v1" + networkv1 "github.com/openshift/api/network/v1" ) // EgressNetworkPolicyRuleApplyConfiguration represents a declarative configuration of the EgressNetworkPolicyRule type for use // with apply. type EgressNetworkPolicyRuleApplyConfiguration struct { - Type *v1.EgressNetworkPolicyRuleType `json:"type,omitempty"` + Type *networkv1.EgressNetworkPolicyRuleType `json:"type,omitempty"` To *EgressNetworkPolicyPeerApplyConfiguration `json:"to,omitempty"` } @@ -22,7 +22,7 @@ func EgressNetworkPolicyRule() *EgressNetworkPolicyRuleApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *EgressNetworkPolicyRuleApplyConfiguration) WithType(value v1.EgressNetworkPolicyRuleType) *EgressNetworkPolicyRuleApplyConfiguration { +func (b *EgressNetworkPolicyRuleApplyConfiguration) WithType(value networkv1.EgressNetworkPolicyRuleType) *EgressNetworkPolicyRuleApplyConfiguration { b.Type = &value return b } diff --git a/network/applyconfigurations/network/v1/hostsubnet.go b/network/applyconfigurations/network/v1/hostsubnet.go index 3889c5ac77..713fc7c634 100644 --- a/network/applyconfigurations/network/v1/hostsubnet.go +++ b/network/applyconfigurations/network/v1/hostsubnet.go @@ -5,22 +5,22 @@ package v1 import ( networkv1 "github.com/openshift/api/network/v1" internal "github.com/openshift/client-go/network/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // HostSubnetApplyConfiguration represents a declarative configuration of the HostSubnet type for use // with apply. type HostSubnetApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Host *string `json:"host,omitempty"` - HostIP *string `json:"hostIP,omitempty"` - Subnet *string `json:"subnet,omitempty"` - EgressIPs []networkv1.HostSubnetEgressIP `json:"egressIPs,omitempty"` - EgressCIDRs []networkv1.HostSubnetEgressCIDR `json:"egressCIDRs,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Host *string `json:"host,omitempty"` + HostIP *string `json:"hostIP,omitempty"` + Subnet *string `json:"subnet,omitempty"` + EgressIPs []networkv1.HostSubnetEgressIP `json:"egressIPs,omitempty"` + EgressCIDRs []networkv1.HostSubnetEgressCIDR `json:"egressCIDRs,omitempty"` } // HostSubnet constructs a declarative configuration of the HostSubnet type for use with @@ -72,7 +72,7 @@ func extractHostSubnet(hostSubnet *networkv1.HostSubnet, fieldManager string, su // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithKind(value string) *HostSubnetApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -80,7 +80,7 @@ func (b *HostSubnetApplyConfiguration) WithKind(value string) *HostSubnetApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithAPIVersion(value string) *HostSubnetApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -89,7 +89,7 @@ func (b *HostSubnetApplyConfiguration) WithAPIVersion(value string) *HostSubnetA // If called multiple times, the Name field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithName(value string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -98,7 +98,7 @@ func (b *HostSubnetApplyConfiguration) WithName(value string) *HostSubnetApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithGenerateName(value string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -107,7 +107,7 @@ func (b *HostSubnetApplyConfiguration) WithGenerateName(value string) *HostSubne // If called multiple times, the Namespace field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithNamespace(value string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -116,7 +116,7 @@ func (b *HostSubnetApplyConfiguration) WithNamespace(value string) *HostSubnetAp // If called multiple times, the UID field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithUID(value types.UID) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -125,7 +125,7 @@ func (b *HostSubnetApplyConfiguration) WithUID(value types.UID) *HostSubnetApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithResourceVersion(value string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -134,25 +134,25 @@ func (b *HostSubnetApplyConfiguration) WithResourceVersion(value string) *HostSu // If called multiple times, the Generation field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithGeneration(value int64) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *HostSubnetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HostSubnetApplyConfiguration { +func (b *HostSubnetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *HostSubnetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HostSubnetApplyConfiguration { +func (b *HostSubnetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -161,7 +161,7 @@ func (b *HostSubnetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *HostSubnetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -171,11 +171,11 @@ func (b *HostSubnetApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *HostSubnetApplyConfiguration) WithLabels(entries map[string]string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -186,11 +186,11 @@ func (b *HostSubnetApplyConfiguration) WithLabels(entries map[string]string) *Ho // overwriting an existing map entries in Annotations field with the same key. func (b *HostSubnetApplyConfiguration) WithAnnotations(entries map[string]string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -198,13 +198,13 @@ func (b *HostSubnetApplyConfiguration) WithAnnotations(entries map[string]string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *HostSubnetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *HostSubnetApplyConfiguration { +func (b *HostSubnetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -215,14 +215,14 @@ func (b *HostSubnetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *HostSubnetApplyConfiguration) WithFinalizers(values ...string) *HostSubnetApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *HostSubnetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -273,5 +273,5 @@ func (b *HostSubnetApplyConfiguration) WithEgressCIDRs(values ...networkv1.HostS // GetName retrieves the value of the Name field in the declarative configuration. func (b *HostSubnetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/network/applyconfigurations/network/v1/netnamespace.go b/network/applyconfigurations/network/v1/netnamespace.go index 0219a07a44..c821c0ae5d 100644 --- a/network/applyconfigurations/network/v1/netnamespace.go +++ b/network/applyconfigurations/network/v1/netnamespace.go @@ -5,20 +5,20 @@ package v1 import ( networkv1 "github.com/openshift/api/network/v1" internal "github.com/openshift/client-go/network/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NetNamespaceApplyConfiguration represents a declarative configuration of the NetNamespace type for use // with apply. type NetNamespaceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - NetName *string `json:"netname,omitempty"` - NetID *uint32 `json:"netid,omitempty"` - EgressIPs []networkv1.NetNamespaceEgressIP `json:"egressIPs,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + NetName *string `json:"netname,omitempty"` + NetID *uint32 `json:"netid,omitempty"` + EgressIPs []networkv1.NetNamespaceEgressIP `json:"egressIPs,omitempty"` } // NetNamespace constructs a declarative configuration of the NetNamespace type for use with @@ -70,7 +70,7 @@ func extractNetNamespace(netNamespace *networkv1.NetNamespace, fieldManager stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithKind(value string) *NetNamespaceApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -78,7 +78,7 @@ func (b *NetNamespaceApplyConfiguration) WithKind(value string) *NetNamespaceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithAPIVersion(value string) *NetNamespaceApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -87,7 +87,7 @@ func (b *NetNamespaceApplyConfiguration) WithAPIVersion(value string) *NetNamesp // If called multiple times, the Name field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithName(value string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -96,7 +96,7 @@ func (b *NetNamespaceApplyConfiguration) WithName(value string) *NetNamespaceApp // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithGenerateName(value string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -105,7 +105,7 @@ func (b *NetNamespaceApplyConfiguration) WithGenerateName(value string) *NetName // If called multiple times, the Namespace field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithNamespace(value string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -114,7 +114,7 @@ func (b *NetNamespaceApplyConfiguration) WithNamespace(value string) *NetNamespa // If called multiple times, the UID field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithUID(value types.UID) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -123,7 +123,7 @@ func (b *NetNamespaceApplyConfiguration) WithUID(value types.UID) *NetNamespaceA // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithResourceVersion(value string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -132,25 +132,25 @@ func (b *NetNamespaceApplyConfiguration) WithResourceVersion(value string) *NetN // If called multiple times, the Generation field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithGeneration(value int64) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NetNamespaceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NetNamespaceApplyConfiguration { +func (b *NetNamespaceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NetNamespaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NetNamespaceApplyConfiguration { +func (b *NetNamespaceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -159,7 +159,7 @@ func (b *NetNamespaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NetNamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -169,11 +169,11 @@ func (b *NetNamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(value in // overwriting an existing map entries in Labels field with the same key. func (b *NetNamespaceApplyConfiguration) WithLabels(entries map[string]string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -184,11 +184,11 @@ func (b *NetNamespaceApplyConfiguration) WithLabels(entries map[string]string) * // overwriting an existing map entries in Annotations field with the same key. func (b *NetNamespaceApplyConfiguration) WithAnnotations(entries map[string]string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -196,13 +196,13 @@ func (b *NetNamespaceApplyConfiguration) WithAnnotations(entries map[string]stri // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NetNamespaceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NetNamespaceApplyConfiguration { +func (b *NetNamespaceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -213,14 +213,14 @@ func (b *NetNamespaceApplyConfiguration) WithOwnerReferences(values ...*v1.Owner func (b *NetNamespaceApplyConfiguration) WithFinalizers(values ...string) *NetNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *NetNamespaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -253,5 +253,5 @@ func (b *NetNamespaceApplyConfiguration) WithEgressIPs(values ...networkv1.NetNa // GetName retrieves the value of the Name field in the declarative configuration. func (b *NetNamespaceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/network/applyconfigurations/network/v1alpha1/dnsnameresolver.go b/network/applyconfigurations/network/v1alpha1/dnsnameresolver.go index 5af6b141b8..8d5efa487b 100644 --- a/network/applyconfigurations/network/v1alpha1/dnsnameresolver.go +++ b/network/applyconfigurations/network/v1alpha1/dnsnameresolver.go @@ -71,7 +71,7 @@ func extractDNSNameResolver(dNSNameResolver *networkv1alpha1.DNSNameResolver, fi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithKind(value string) *DNSNameResolverApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *DNSNameResolverApplyConfiguration) WithKind(value string) *DNSNameResol // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithAPIVersion(value string) *DNSNameResolverApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *DNSNameResolverApplyConfiguration) WithAPIVersion(value string) *DNSNam // If called multiple times, the Name field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithName(value string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *DNSNameResolverApplyConfiguration) WithName(value string) *DNSNameResol // If called multiple times, the GenerateName field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithGenerateName(value string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *DNSNameResolverApplyConfiguration) WithGenerateName(value string) *DNSN // If called multiple times, the Namespace field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithNamespace(value string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *DNSNameResolverApplyConfiguration) WithNamespace(value string) *DNSName // If called multiple times, the UID field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithUID(value types.UID) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *DNSNameResolverApplyConfiguration) WithUID(value types.UID) *DNSNameRes // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithResourceVersion(value string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *DNSNameResolverApplyConfiguration) WithResourceVersion(value string) *D // If called multiple times, the Generation field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithGeneration(value int64) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *DNSNameResolverApplyConfiguration) WithGeneration(value int64) *DNSName // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *DNSNameResolverApplyConfiguration) WithCreationTimestamp(value metav1.T // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *DNSNameResolverApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *DNSNameResolverApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *DNSNameResolverApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *DNSNameResolverApplyConfiguration) WithLabels(entries map[string]string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *DNSNameResolverApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *DNSNameResolverApplyConfiguration) WithAnnotations(entries map[string]string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *DNSNameResolverApplyConfiguration) WithOwnerReferences(values ...*v1.Ow if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *DNSNameResolverApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *DNSNameResolverApplyConfiguration) WithFinalizers(values ...string) *DNSNameResolverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *DNSNameResolverApplyConfiguration) WithStatus(value *DNSNameResolverSta // GetName retrieves the value of the Name field in the declarative configuration. func (b *DNSNameResolverApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/network/applyconfigurations/network/v1alpha1/dnsnameresolverresolvedname.go b/network/applyconfigurations/network/v1alpha1/dnsnameresolverresolvedname.go index ff46e0625b..15d3e7e20e 100644 --- a/network/applyconfigurations/network/v1alpha1/dnsnameresolverresolvedname.go +++ b/network/applyconfigurations/network/v1alpha1/dnsnameresolverresolvedname.go @@ -3,7 +3,7 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/network/v1alpha1" + networkv1alpha1 "github.com/openshift/api/network/v1alpha1" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -11,7 +11,7 @@ import ( // with apply. type DNSNameResolverResolvedNameApplyConfiguration struct { Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - DNSName *v1alpha1.DNSName `json:"dnsName,omitempty"` + DNSName *networkv1alpha1.DNSName `json:"dnsName,omitempty"` ResolvedAddresses []DNSNameResolverResolvedAddressApplyConfiguration `json:"resolvedAddresses,omitempty"` ResolutionFailures *int32 `json:"resolutionFailures,omitempty"` } @@ -38,7 +38,7 @@ func (b *DNSNameResolverResolvedNameApplyConfiguration) WithConditions(values .. // WithDNSName sets the DNSName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DNSName field is set to the value of the last call. -func (b *DNSNameResolverResolvedNameApplyConfiguration) WithDNSName(value v1alpha1.DNSName) *DNSNameResolverResolvedNameApplyConfiguration { +func (b *DNSNameResolverResolvedNameApplyConfiguration) WithDNSName(value networkv1alpha1.DNSName) *DNSNameResolverResolvedNameApplyConfiguration { b.DNSName = &value return b } diff --git a/network/applyconfigurations/network/v1alpha1/dnsnameresolverspec.go b/network/applyconfigurations/network/v1alpha1/dnsnameresolverspec.go index d131fa5611..96d13fae19 100644 --- a/network/applyconfigurations/network/v1alpha1/dnsnameresolverspec.go +++ b/network/applyconfigurations/network/v1alpha1/dnsnameresolverspec.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/network/v1alpha1" + networkv1alpha1 "github.com/openshift/api/network/v1alpha1" ) // DNSNameResolverSpecApplyConfiguration represents a declarative configuration of the DNSNameResolverSpec type for use // with apply. type DNSNameResolverSpecApplyConfiguration struct { - Name *v1alpha1.DNSName `json:"name,omitempty"` + Name *networkv1alpha1.DNSName `json:"name,omitempty"` } // DNSNameResolverSpecApplyConfiguration constructs a declarative configuration of the DNSNameResolverSpec type for use with @@ -21,7 +21,7 @@ func DNSNameResolverSpec() *DNSNameResolverSpecApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *DNSNameResolverSpecApplyConfiguration) WithName(value v1alpha1.DNSName) *DNSNameResolverSpecApplyConfiguration { +func (b *DNSNameResolverSpecApplyConfiguration) WithName(value networkv1alpha1.DNSName) *DNSNameResolverSpecApplyConfiguration { b.Name = &value return b } diff --git a/network/clientset/versioned/clientset.go b/network/clientset/versioned/clientset.go index 2b134f8abd..4bc1c65449 100644 --- a/network/clientset/versioned/clientset.go +++ b/network/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" networkv1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1" networkv1alpha1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1alpha1" diff --git a/network/clientset/versioned/typed/network/v1/clusternetwork.go b/network/clientset/versioned/typed/network/v1/clusternetwork.go index b5014b11d6..5c20bc3879 100644 --- a/network/clientset/versioned/typed/network/v1/clusternetwork.go +++ b/network/clientset/versioned/typed/network/v1/clusternetwork.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/network/v1" - networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" + networkv1 "github.com/openshift/api/network/v1" + applyconfigurationsnetworkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type ClusterNetworksGetter interface { // ClusterNetworkInterface has methods to work with ClusterNetwork resources. type ClusterNetworkInterface interface { - Create(ctx context.Context, clusterNetwork *v1.ClusterNetwork, opts metav1.CreateOptions) (*v1.ClusterNetwork, error) - Update(ctx context.Context, clusterNetwork *v1.ClusterNetwork, opts metav1.UpdateOptions) (*v1.ClusterNetwork, error) + Create(ctx context.Context, clusterNetwork *networkv1.ClusterNetwork, opts metav1.CreateOptions) (*networkv1.ClusterNetwork, error) + Update(ctx context.Context, clusterNetwork *networkv1.ClusterNetwork, opts metav1.UpdateOptions) (*networkv1.ClusterNetwork, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterNetwork, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterNetworkList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkv1.ClusterNetwork, error) + List(ctx context.Context, opts metav1.ListOptions) (*networkv1.ClusterNetworkList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterNetwork, err error) - Apply(ctx context.Context, clusterNetwork *networkv1.ClusterNetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterNetwork, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *networkv1.ClusterNetwork, err error) + Apply(ctx context.Context, clusterNetwork *applyconfigurationsnetworkv1.ClusterNetworkApplyConfiguration, opts metav1.ApplyOptions) (result *networkv1.ClusterNetwork, err error) ClusterNetworkExpansion } // clusterNetworks implements ClusterNetworkInterface type clusterNetworks struct { - *gentype.ClientWithListAndApply[*v1.ClusterNetwork, *v1.ClusterNetworkList, *networkv1.ClusterNetworkApplyConfiguration] + *gentype.ClientWithListAndApply[*networkv1.ClusterNetwork, *networkv1.ClusterNetworkList, *applyconfigurationsnetworkv1.ClusterNetworkApplyConfiguration] } // newClusterNetworks returns a ClusterNetworks func newClusterNetworks(c *NetworkV1Client) *clusterNetworks { return &clusterNetworks{ - gentype.NewClientWithListAndApply[*v1.ClusterNetwork, *v1.ClusterNetworkList, *networkv1.ClusterNetworkApplyConfiguration]( + gentype.NewClientWithListAndApply[*networkv1.ClusterNetwork, *networkv1.ClusterNetworkList, *applyconfigurationsnetworkv1.ClusterNetworkApplyConfiguration]( "clusternetworks", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterNetwork { return &v1.ClusterNetwork{} }, - func() *v1.ClusterNetworkList { return &v1.ClusterNetworkList{} }), + func() *networkv1.ClusterNetwork { return &networkv1.ClusterNetwork{} }, + func() *networkv1.ClusterNetworkList { return &networkv1.ClusterNetworkList{} }, + ), } } diff --git a/network/clientset/versioned/typed/network/v1/egressnetworkpolicy.go b/network/clientset/versioned/typed/network/v1/egressnetworkpolicy.go index 23c754d31a..8c1c34db03 100644 --- a/network/clientset/versioned/typed/network/v1/egressnetworkpolicy.go +++ b/network/clientset/versioned/typed/network/v1/egressnetworkpolicy.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/network/v1" - networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" + networkv1 "github.com/openshift/api/network/v1" + applyconfigurationsnetworkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type EgressNetworkPoliciesGetter interface { // EgressNetworkPolicyInterface has methods to work with EgressNetworkPolicy resources. type EgressNetworkPolicyInterface interface { - Create(ctx context.Context, egressNetworkPolicy *v1.EgressNetworkPolicy, opts metav1.CreateOptions) (*v1.EgressNetworkPolicy, error) - Update(ctx context.Context, egressNetworkPolicy *v1.EgressNetworkPolicy, opts metav1.UpdateOptions) (*v1.EgressNetworkPolicy, error) + Create(ctx context.Context, egressNetworkPolicy *networkv1.EgressNetworkPolicy, opts metav1.CreateOptions) (*networkv1.EgressNetworkPolicy, error) + Update(ctx context.Context, egressNetworkPolicy *networkv1.EgressNetworkPolicy, opts metav1.UpdateOptions) (*networkv1.EgressNetworkPolicy, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.EgressNetworkPolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.EgressNetworkPolicyList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkv1.EgressNetworkPolicy, error) + List(ctx context.Context, opts metav1.ListOptions) (*networkv1.EgressNetworkPolicyList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EgressNetworkPolicy, err error) - Apply(ctx context.Context, egressNetworkPolicy *networkv1.EgressNetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.EgressNetworkPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *networkv1.EgressNetworkPolicy, err error) + Apply(ctx context.Context, egressNetworkPolicy *applyconfigurationsnetworkv1.EgressNetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *networkv1.EgressNetworkPolicy, err error) EgressNetworkPolicyExpansion } // egressNetworkPolicies implements EgressNetworkPolicyInterface type egressNetworkPolicies struct { - *gentype.ClientWithListAndApply[*v1.EgressNetworkPolicy, *v1.EgressNetworkPolicyList, *networkv1.EgressNetworkPolicyApplyConfiguration] + *gentype.ClientWithListAndApply[*networkv1.EgressNetworkPolicy, *networkv1.EgressNetworkPolicyList, *applyconfigurationsnetworkv1.EgressNetworkPolicyApplyConfiguration] } // newEgressNetworkPolicies returns a EgressNetworkPolicies func newEgressNetworkPolicies(c *NetworkV1Client, namespace string) *egressNetworkPolicies { return &egressNetworkPolicies{ - gentype.NewClientWithListAndApply[*v1.EgressNetworkPolicy, *v1.EgressNetworkPolicyList, *networkv1.EgressNetworkPolicyApplyConfiguration]( + gentype.NewClientWithListAndApply[*networkv1.EgressNetworkPolicy, *networkv1.EgressNetworkPolicyList, *applyconfigurationsnetworkv1.EgressNetworkPolicyApplyConfiguration]( "egressnetworkpolicies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.EgressNetworkPolicy { return &v1.EgressNetworkPolicy{} }, - func() *v1.EgressNetworkPolicyList { return &v1.EgressNetworkPolicyList{} }), + func() *networkv1.EgressNetworkPolicy { return &networkv1.EgressNetworkPolicy{} }, + func() *networkv1.EgressNetworkPolicyList { return &networkv1.EgressNetworkPolicyList{} }, + ), } } diff --git a/network/clientset/versioned/typed/network/v1/fake/fake_clusternetwork.go b/network/clientset/versioned/typed/network/v1/fake/fake_clusternetwork.go index abb6a0dd5f..494aa4231b 100644 --- a/network/clientset/versioned/typed/network/v1/fake/fake_clusternetwork.go +++ b/network/clientset/versioned/typed/network/v1/fake/fake_clusternetwork.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/network/v1" networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typednetworkv1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterNetworks implements ClusterNetworkInterface -type FakeClusterNetworks struct { +// fakeClusterNetworks implements ClusterNetworkInterface +type fakeClusterNetworks struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterNetwork, *v1.ClusterNetworkList, *networkv1.ClusterNetworkApplyConfiguration] Fake *FakeNetworkV1 } -var clusternetworksResource = v1.SchemeGroupVersion.WithResource("clusternetworks") - -var clusternetworksKind = v1.SchemeGroupVersion.WithKind("ClusterNetwork") - -// Get takes name of the clusterNetwork, and returns the corresponding clusterNetwork object, and an error if there is any. -func (c *FakeClusterNetworks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterNetwork, err error) { - emptyResult := &v1.ClusterNetwork{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusternetworksResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterNetwork), err -} - -// List takes label and field selectors, and returns the list of ClusterNetworks that match those selectors. -func (c *FakeClusterNetworks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterNetworkList, err error) { - emptyResult := &v1.ClusterNetworkList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusternetworksResource, clusternetworksKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterNetworkList{ListMeta: obj.(*v1.ClusterNetworkList).ListMeta} - for _, item := range obj.(*v1.ClusterNetworkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterNetworks. -func (c *FakeClusterNetworks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusternetworksResource, opts)) -} - -// Create takes the representation of a clusterNetwork and creates it. Returns the server's representation of the clusterNetwork, and an error, if there is any. -func (c *FakeClusterNetworks) Create(ctx context.Context, clusterNetwork *v1.ClusterNetwork, opts metav1.CreateOptions) (result *v1.ClusterNetwork, err error) { - emptyResult := &v1.ClusterNetwork{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusternetworksResource, clusterNetwork, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterNetwork), err -} - -// Update takes the representation of a clusterNetwork and updates it. Returns the server's representation of the clusterNetwork, and an error, if there is any. -func (c *FakeClusterNetworks) Update(ctx context.Context, clusterNetwork *v1.ClusterNetwork, opts metav1.UpdateOptions) (result *v1.ClusterNetwork, err error) { - emptyResult := &v1.ClusterNetwork{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusternetworksResource, clusterNetwork, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterNetwork), err -} - -// Delete takes name of the clusterNetwork and deletes it. Returns an error if one occurs. -func (c *FakeClusterNetworks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusternetworksResource, name, opts), &v1.ClusterNetwork{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterNetworks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusternetworksResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterNetworkList{}) - return err -} - -// Patch applies the patch and returns the patched clusterNetwork. -func (c *FakeClusterNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterNetwork, err error) { - emptyResult := &v1.ClusterNetwork{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusternetworksResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterNetwork), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterNetwork. -func (c *FakeClusterNetworks) Apply(ctx context.Context, clusterNetwork *networkv1.ClusterNetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterNetwork, err error) { - if clusterNetwork == nil { - return nil, fmt.Errorf("clusterNetwork provided to Apply must not be nil") - } - data, err := json.Marshal(clusterNetwork) - if err != nil { - return nil, err - } - name := clusterNetwork.Name - if name == nil { - return nil, fmt.Errorf("clusterNetwork.Name must be provided to Apply") - } - emptyResult := &v1.ClusterNetwork{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusternetworksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterNetworks(fake *FakeNetworkV1) typednetworkv1.ClusterNetworkInterface { + return &fakeClusterNetworks{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterNetwork, *v1.ClusterNetworkList, *networkv1.ClusterNetworkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clusternetworks"), + v1.SchemeGroupVersion.WithKind("ClusterNetwork"), + func() *v1.ClusterNetwork { return &v1.ClusterNetwork{} }, + func() *v1.ClusterNetworkList { return &v1.ClusterNetworkList{} }, + func(dst, src *v1.ClusterNetworkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterNetworkList) []*v1.ClusterNetwork { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ClusterNetworkList, items []*v1.ClusterNetwork) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ClusterNetwork), err } diff --git a/network/clientset/versioned/typed/network/v1/fake/fake_egressnetworkpolicy.go b/network/clientset/versioned/typed/network/v1/fake/fake_egressnetworkpolicy.go index 13833b5d23..d9f8f28c70 100644 --- a/network/clientset/versioned/typed/network/v1/fake/fake_egressnetworkpolicy.go +++ b/network/clientset/versioned/typed/network/v1/fake/fake_egressnetworkpolicy.go @@ -3,142 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/network/v1" networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typednetworkv1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeEgressNetworkPolicies implements EgressNetworkPolicyInterface -type FakeEgressNetworkPolicies struct { +// fakeEgressNetworkPolicies implements EgressNetworkPolicyInterface +type fakeEgressNetworkPolicies struct { + *gentype.FakeClientWithListAndApply[*v1.EgressNetworkPolicy, *v1.EgressNetworkPolicyList, *networkv1.EgressNetworkPolicyApplyConfiguration] Fake *FakeNetworkV1 - ns string -} - -var egressnetworkpoliciesResource = v1.SchemeGroupVersion.WithResource("egressnetworkpolicies") - -var egressnetworkpoliciesKind = v1.SchemeGroupVersion.WithKind("EgressNetworkPolicy") - -// Get takes name of the egressNetworkPolicy, and returns the corresponding egressNetworkPolicy object, and an error if there is any. -func (c *FakeEgressNetworkPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.EgressNetworkPolicy, err error) { - emptyResult := &v1.EgressNetworkPolicy{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(egressnetworkpoliciesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.EgressNetworkPolicy), err -} - -// List takes label and field selectors, and returns the list of EgressNetworkPolicies that match those selectors. -func (c *FakeEgressNetworkPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EgressNetworkPolicyList, err error) { - emptyResult := &v1.EgressNetworkPolicyList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(egressnetworkpoliciesResource, egressnetworkpoliciesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.EgressNetworkPolicyList{ListMeta: obj.(*v1.EgressNetworkPolicyList).ListMeta} - for _, item := range obj.(*v1.EgressNetworkPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested egressNetworkPolicies. -func (c *FakeEgressNetworkPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(egressnetworkpoliciesResource, c.ns, opts)) - } -// Create takes the representation of a egressNetworkPolicy and creates it. Returns the server's representation of the egressNetworkPolicy, and an error, if there is any. -func (c *FakeEgressNetworkPolicies) Create(ctx context.Context, egressNetworkPolicy *v1.EgressNetworkPolicy, opts metav1.CreateOptions) (result *v1.EgressNetworkPolicy, err error) { - emptyResult := &v1.EgressNetworkPolicy{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(egressnetworkpoliciesResource, c.ns, egressNetworkPolicy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.EgressNetworkPolicy), err -} - -// Update takes the representation of a egressNetworkPolicy and updates it. Returns the server's representation of the egressNetworkPolicy, and an error, if there is any. -func (c *FakeEgressNetworkPolicies) Update(ctx context.Context, egressNetworkPolicy *v1.EgressNetworkPolicy, opts metav1.UpdateOptions) (result *v1.EgressNetworkPolicy, err error) { - emptyResult := &v1.EgressNetworkPolicy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(egressnetworkpoliciesResource, c.ns, egressNetworkPolicy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.EgressNetworkPolicy), err -} - -// Delete takes name of the egressNetworkPolicy and deletes it. Returns an error if one occurs. -func (c *FakeEgressNetworkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(egressnetworkpoliciesResource, c.ns, name, opts), &v1.EgressNetworkPolicy{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEgressNetworkPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(egressnetworkpoliciesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.EgressNetworkPolicyList{}) - return err -} - -// Patch applies the patch and returns the patched egressNetworkPolicy. -func (c *FakeEgressNetworkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EgressNetworkPolicy, err error) { - emptyResult := &v1.EgressNetworkPolicy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(egressnetworkpoliciesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.EgressNetworkPolicy), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied egressNetworkPolicy. -func (c *FakeEgressNetworkPolicies) Apply(ctx context.Context, egressNetworkPolicy *networkv1.EgressNetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.EgressNetworkPolicy, err error) { - if egressNetworkPolicy == nil { - return nil, fmt.Errorf("egressNetworkPolicy provided to Apply must not be nil") - } - data, err := json.Marshal(egressNetworkPolicy) - if err != nil { - return nil, err - } - name := egressNetworkPolicy.Name - if name == nil { - return nil, fmt.Errorf("egressNetworkPolicy.Name must be provided to Apply") - } - emptyResult := &v1.EgressNetworkPolicy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(egressnetworkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeEgressNetworkPolicies(fake *FakeNetworkV1, namespace string) typednetworkv1.EgressNetworkPolicyInterface { + return &fakeEgressNetworkPolicies{ + gentype.NewFakeClientWithListAndApply[*v1.EgressNetworkPolicy, *v1.EgressNetworkPolicyList, *networkv1.EgressNetworkPolicyApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("egressnetworkpolicies"), + v1.SchemeGroupVersion.WithKind("EgressNetworkPolicy"), + func() *v1.EgressNetworkPolicy { return &v1.EgressNetworkPolicy{} }, + func() *v1.EgressNetworkPolicyList { return &v1.EgressNetworkPolicyList{} }, + func(dst, src *v1.EgressNetworkPolicyList) { dst.ListMeta = src.ListMeta }, + func(list *v1.EgressNetworkPolicyList) []*v1.EgressNetworkPolicy { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.EgressNetworkPolicyList, items []*v1.EgressNetworkPolicy) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.EgressNetworkPolicy), err } diff --git a/network/clientset/versioned/typed/network/v1/fake/fake_hostsubnet.go b/network/clientset/versioned/typed/network/v1/fake/fake_hostsubnet.go index 04c157e340..dfdf5435c4 100644 --- a/network/clientset/versioned/typed/network/v1/fake/fake_hostsubnet.go +++ b/network/clientset/versioned/typed/network/v1/fake/fake_hostsubnet.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/network/v1" networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typednetworkv1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeHostSubnets implements HostSubnetInterface -type FakeHostSubnets struct { +// fakeHostSubnets implements HostSubnetInterface +type fakeHostSubnets struct { + *gentype.FakeClientWithListAndApply[*v1.HostSubnet, *v1.HostSubnetList, *networkv1.HostSubnetApplyConfiguration] Fake *FakeNetworkV1 } -var hostsubnetsResource = v1.SchemeGroupVersion.WithResource("hostsubnets") - -var hostsubnetsKind = v1.SchemeGroupVersion.WithKind("HostSubnet") - -// Get takes name of the hostSubnet, and returns the corresponding hostSubnet object, and an error if there is any. -func (c *FakeHostSubnets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HostSubnet, err error) { - emptyResult := &v1.HostSubnet{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(hostsubnetsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.HostSubnet), err -} - -// List takes label and field selectors, and returns the list of HostSubnets that match those selectors. -func (c *FakeHostSubnets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HostSubnetList, err error) { - emptyResult := &v1.HostSubnetList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(hostsubnetsResource, hostsubnetsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.HostSubnetList{ListMeta: obj.(*v1.HostSubnetList).ListMeta} - for _, item := range obj.(*v1.HostSubnetList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested hostSubnets. -func (c *FakeHostSubnets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(hostsubnetsResource, opts)) -} - -// Create takes the representation of a hostSubnet and creates it. Returns the server's representation of the hostSubnet, and an error, if there is any. -func (c *FakeHostSubnets) Create(ctx context.Context, hostSubnet *v1.HostSubnet, opts metav1.CreateOptions) (result *v1.HostSubnet, err error) { - emptyResult := &v1.HostSubnet{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(hostsubnetsResource, hostSubnet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.HostSubnet), err -} - -// Update takes the representation of a hostSubnet and updates it. Returns the server's representation of the hostSubnet, and an error, if there is any. -func (c *FakeHostSubnets) Update(ctx context.Context, hostSubnet *v1.HostSubnet, opts metav1.UpdateOptions) (result *v1.HostSubnet, err error) { - emptyResult := &v1.HostSubnet{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(hostsubnetsResource, hostSubnet, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.HostSubnet), err -} - -// Delete takes name of the hostSubnet and deletes it. Returns an error if one occurs. -func (c *FakeHostSubnets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(hostsubnetsResource, name, opts), &v1.HostSubnet{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeHostSubnets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(hostsubnetsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.HostSubnetList{}) - return err -} - -// Patch applies the patch and returns the patched hostSubnet. -func (c *FakeHostSubnets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HostSubnet, err error) { - emptyResult := &v1.HostSubnet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(hostsubnetsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.HostSubnet), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied hostSubnet. -func (c *FakeHostSubnets) Apply(ctx context.Context, hostSubnet *networkv1.HostSubnetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HostSubnet, err error) { - if hostSubnet == nil { - return nil, fmt.Errorf("hostSubnet provided to Apply must not be nil") - } - data, err := json.Marshal(hostSubnet) - if err != nil { - return nil, err - } - name := hostSubnet.Name - if name == nil { - return nil, fmt.Errorf("hostSubnet.Name must be provided to Apply") - } - emptyResult := &v1.HostSubnet{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(hostsubnetsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeHostSubnets(fake *FakeNetworkV1) typednetworkv1.HostSubnetInterface { + return &fakeHostSubnets{ + gentype.NewFakeClientWithListAndApply[*v1.HostSubnet, *v1.HostSubnetList, *networkv1.HostSubnetApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("hostsubnets"), + v1.SchemeGroupVersion.WithKind("HostSubnet"), + func() *v1.HostSubnet { return &v1.HostSubnet{} }, + func() *v1.HostSubnetList { return &v1.HostSubnetList{} }, + func(dst, src *v1.HostSubnetList) { dst.ListMeta = src.ListMeta }, + func(list *v1.HostSubnetList) []*v1.HostSubnet { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.HostSubnetList, items []*v1.HostSubnet) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.HostSubnet), err } diff --git a/network/clientset/versioned/typed/network/v1/fake/fake_netnamespace.go b/network/clientset/versioned/typed/network/v1/fake/fake_netnamespace.go index 50c7ee767e..f7c860ab18 100644 --- a/network/clientset/versioned/typed/network/v1/fake/fake_netnamespace.go +++ b/network/clientset/versioned/typed/network/v1/fake/fake_netnamespace.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/network/v1" networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typednetworkv1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeNetNamespaces implements NetNamespaceInterface -type FakeNetNamespaces struct { +// fakeNetNamespaces implements NetNamespaceInterface +type fakeNetNamespaces struct { + *gentype.FakeClientWithListAndApply[*v1.NetNamespace, *v1.NetNamespaceList, *networkv1.NetNamespaceApplyConfiguration] Fake *FakeNetworkV1 } -var netnamespacesResource = v1.SchemeGroupVersion.WithResource("netnamespaces") - -var netnamespacesKind = v1.SchemeGroupVersion.WithKind("NetNamespace") - -// Get takes name of the netNamespace, and returns the corresponding netNamespace object, and an error if there is any. -func (c *FakeNetNamespaces) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.NetNamespace, err error) { - emptyResult := &v1.NetNamespace{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(netnamespacesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.NetNamespace), err -} - -// List takes label and field selectors, and returns the list of NetNamespaces that match those selectors. -func (c *FakeNetNamespaces) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetNamespaceList, err error) { - emptyResult := &v1.NetNamespaceList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(netnamespacesResource, netnamespacesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NetNamespaceList{ListMeta: obj.(*v1.NetNamespaceList).ListMeta} - for _, item := range obj.(*v1.NetNamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested netNamespaces. -func (c *FakeNetNamespaces) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(netnamespacesResource, opts)) -} - -// Create takes the representation of a netNamespace and creates it. Returns the server's representation of the netNamespace, and an error, if there is any. -func (c *FakeNetNamespaces) Create(ctx context.Context, netNamespace *v1.NetNamespace, opts metav1.CreateOptions) (result *v1.NetNamespace, err error) { - emptyResult := &v1.NetNamespace{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(netnamespacesResource, netNamespace, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.NetNamespace), err -} - -// Update takes the representation of a netNamespace and updates it. Returns the server's representation of the netNamespace, and an error, if there is any. -func (c *FakeNetNamespaces) Update(ctx context.Context, netNamespace *v1.NetNamespace, opts metav1.UpdateOptions) (result *v1.NetNamespace, err error) { - emptyResult := &v1.NetNamespace{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(netnamespacesResource, netNamespace, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.NetNamespace), err -} - -// Delete takes name of the netNamespace and deletes it. Returns an error if one occurs. -func (c *FakeNetNamespaces) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(netnamespacesResource, name, opts), &v1.NetNamespace{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNetNamespaces) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(netnamespacesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.NetNamespaceList{}) - return err -} - -// Patch applies the patch and returns the patched netNamespace. -func (c *FakeNetNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetNamespace, err error) { - emptyResult := &v1.NetNamespace{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(netnamespacesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.NetNamespace), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied netNamespace. -func (c *FakeNetNamespaces) Apply(ctx context.Context, netNamespace *networkv1.NetNamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetNamespace, err error) { - if netNamespace == nil { - return nil, fmt.Errorf("netNamespace provided to Apply must not be nil") - } - data, err := json.Marshal(netNamespace) - if err != nil { - return nil, err - } - name := netNamespace.Name - if name == nil { - return nil, fmt.Errorf("netNamespace.Name must be provided to Apply") - } - emptyResult := &v1.NetNamespace{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(netnamespacesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeNetNamespaces(fake *FakeNetworkV1) typednetworkv1.NetNamespaceInterface { + return &fakeNetNamespaces{ + gentype.NewFakeClientWithListAndApply[*v1.NetNamespace, *v1.NetNamespaceList, *networkv1.NetNamespaceApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("netnamespaces"), + v1.SchemeGroupVersion.WithKind("NetNamespace"), + func() *v1.NetNamespace { return &v1.NetNamespace{} }, + func() *v1.NetNamespaceList { return &v1.NetNamespaceList{} }, + func(dst, src *v1.NetNamespaceList) { dst.ListMeta = src.ListMeta }, + func(list *v1.NetNamespaceList) []*v1.NetNamespace { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.NetNamespaceList, items []*v1.NetNamespace) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.NetNamespace), err } diff --git a/network/clientset/versioned/typed/network/v1/fake/fake_network_client.go b/network/clientset/versioned/typed/network/v1/fake/fake_network_client.go index 71d6655c7d..a75c3dfa2e 100644 --- a/network/clientset/versioned/typed/network/v1/fake/fake_network_client.go +++ b/network/clientset/versioned/typed/network/v1/fake/fake_network_client.go @@ -13,19 +13,19 @@ type FakeNetworkV1 struct { } func (c *FakeNetworkV1) ClusterNetworks() v1.ClusterNetworkInterface { - return &FakeClusterNetworks{c} + return newFakeClusterNetworks(c) } func (c *FakeNetworkV1) EgressNetworkPolicies(namespace string) v1.EgressNetworkPolicyInterface { - return &FakeEgressNetworkPolicies{c, namespace} + return newFakeEgressNetworkPolicies(c, namespace) } func (c *FakeNetworkV1) HostSubnets() v1.HostSubnetInterface { - return &FakeHostSubnets{c} + return newFakeHostSubnets(c) } func (c *FakeNetworkV1) NetNamespaces() v1.NetNamespaceInterface { - return &FakeNetNamespaces{c} + return newFakeNetNamespaces(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/network/clientset/versioned/typed/network/v1/hostsubnet.go b/network/clientset/versioned/typed/network/v1/hostsubnet.go index 6ef89b73d0..10ec19fd31 100644 --- a/network/clientset/versioned/typed/network/v1/hostsubnet.go +++ b/network/clientset/versioned/typed/network/v1/hostsubnet.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/network/v1" - networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" + networkv1 "github.com/openshift/api/network/v1" + applyconfigurationsnetworkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type HostSubnetsGetter interface { // HostSubnetInterface has methods to work with HostSubnet resources. type HostSubnetInterface interface { - Create(ctx context.Context, hostSubnet *v1.HostSubnet, opts metav1.CreateOptions) (*v1.HostSubnet, error) - Update(ctx context.Context, hostSubnet *v1.HostSubnet, opts metav1.UpdateOptions) (*v1.HostSubnet, error) + Create(ctx context.Context, hostSubnet *networkv1.HostSubnet, opts metav1.CreateOptions) (*networkv1.HostSubnet, error) + Update(ctx context.Context, hostSubnet *networkv1.HostSubnet, opts metav1.UpdateOptions) (*networkv1.HostSubnet, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HostSubnet, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.HostSubnetList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkv1.HostSubnet, error) + List(ctx context.Context, opts metav1.ListOptions) (*networkv1.HostSubnetList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HostSubnet, err error) - Apply(ctx context.Context, hostSubnet *networkv1.HostSubnetApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HostSubnet, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *networkv1.HostSubnet, err error) + Apply(ctx context.Context, hostSubnet *applyconfigurationsnetworkv1.HostSubnetApplyConfiguration, opts metav1.ApplyOptions) (result *networkv1.HostSubnet, err error) HostSubnetExpansion } // hostSubnets implements HostSubnetInterface type hostSubnets struct { - *gentype.ClientWithListAndApply[*v1.HostSubnet, *v1.HostSubnetList, *networkv1.HostSubnetApplyConfiguration] + *gentype.ClientWithListAndApply[*networkv1.HostSubnet, *networkv1.HostSubnetList, *applyconfigurationsnetworkv1.HostSubnetApplyConfiguration] } // newHostSubnets returns a HostSubnets func newHostSubnets(c *NetworkV1Client) *hostSubnets { return &hostSubnets{ - gentype.NewClientWithListAndApply[*v1.HostSubnet, *v1.HostSubnetList, *networkv1.HostSubnetApplyConfiguration]( + gentype.NewClientWithListAndApply[*networkv1.HostSubnet, *networkv1.HostSubnetList, *applyconfigurationsnetworkv1.HostSubnetApplyConfiguration]( "hostsubnets", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.HostSubnet { return &v1.HostSubnet{} }, - func() *v1.HostSubnetList { return &v1.HostSubnetList{} }), + func() *networkv1.HostSubnet { return &networkv1.HostSubnet{} }, + func() *networkv1.HostSubnetList { return &networkv1.HostSubnetList{} }, + ), } } diff --git a/network/clientset/versioned/typed/network/v1/netnamespace.go b/network/clientset/versioned/typed/network/v1/netnamespace.go index eb50562a51..b1cae0b73d 100644 --- a/network/clientset/versioned/typed/network/v1/netnamespace.go +++ b/network/clientset/versioned/typed/network/v1/netnamespace.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/network/v1" - networkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" + networkv1 "github.com/openshift/api/network/v1" + applyconfigurationsnetworkv1 "github.com/openshift/client-go/network/applyconfigurations/network/v1" scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type NetNamespacesGetter interface { // NetNamespaceInterface has methods to work with NetNamespace resources. type NetNamespaceInterface interface { - Create(ctx context.Context, netNamespace *v1.NetNamespace, opts metav1.CreateOptions) (*v1.NetNamespace, error) - Update(ctx context.Context, netNamespace *v1.NetNamespace, opts metav1.UpdateOptions) (*v1.NetNamespace, error) + Create(ctx context.Context, netNamespace *networkv1.NetNamespace, opts metav1.CreateOptions) (*networkv1.NetNamespace, error) + Update(ctx context.Context, netNamespace *networkv1.NetNamespace, opts metav1.UpdateOptions) (*networkv1.NetNamespace, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetNamespace, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NetNamespaceList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkv1.NetNamespace, error) + List(ctx context.Context, opts metav1.ListOptions) (*networkv1.NetNamespaceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetNamespace, err error) - Apply(ctx context.Context, netNamespace *networkv1.NetNamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetNamespace, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *networkv1.NetNamespace, err error) + Apply(ctx context.Context, netNamespace *applyconfigurationsnetworkv1.NetNamespaceApplyConfiguration, opts metav1.ApplyOptions) (result *networkv1.NetNamespace, err error) NetNamespaceExpansion } // netNamespaces implements NetNamespaceInterface type netNamespaces struct { - *gentype.ClientWithListAndApply[*v1.NetNamespace, *v1.NetNamespaceList, *networkv1.NetNamespaceApplyConfiguration] + *gentype.ClientWithListAndApply[*networkv1.NetNamespace, *networkv1.NetNamespaceList, *applyconfigurationsnetworkv1.NetNamespaceApplyConfiguration] } // newNetNamespaces returns a NetNamespaces func newNetNamespaces(c *NetworkV1Client) *netNamespaces { return &netNamespaces{ - gentype.NewClientWithListAndApply[*v1.NetNamespace, *v1.NetNamespaceList, *networkv1.NetNamespaceApplyConfiguration]( + gentype.NewClientWithListAndApply[*networkv1.NetNamespace, *networkv1.NetNamespaceList, *applyconfigurationsnetworkv1.NetNamespaceApplyConfiguration]( "netnamespaces", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.NetNamespace { return &v1.NetNamespace{} }, - func() *v1.NetNamespaceList { return &v1.NetNamespaceList{} }), + func() *networkv1.NetNamespace { return &networkv1.NetNamespace{} }, + func() *networkv1.NetNamespaceList { return &networkv1.NetNamespaceList{} }, + ), } } diff --git a/network/clientset/versioned/typed/network/v1/network_client.go b/network/clientset/versioned/typed/network/v1/network_client.go index eb96117712..b6042cdcd2 100644 --- a/network/clientset/versioned/typed/network/v1/network_client.go +++ b/network/clientset/versioned/typed/network/v1/network_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/network/v1" - "github.com/openshift/client-go/network/clientset/versioned/scheme" + networkv1 "github.com/openshift/api/network/v1" + scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -84,10 +84,10 @@ func New(c rest.Interface) *NetworkV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := networkv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/network/clientset/versioned/typed/network/v1alpha1/dnsnameresolver.go b/network/clientset/versioned/typed/network/v1alpha1/dnsnameresolver.go index f9ef19edc7..871641eaf2 100644 --- a/network/clientset/versioned/typed/network/v1alpha1/dnsnameresolver.go +++ b/network/clientset/versioned/typed/network/v1alpha1/dnsnameresolver.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/network/v1alpha1" - networkv1alpha1 "github.com/openshift/client-go/network/applyconfigurations/network/v1alpha1" + networkv1alpha1 "github.com/openshift/api/network/v1alpha1" + applyconfigurationsnetworkv1alpha1 "github.com/openshift/client-go/network/applyconfigurations/network/v1alpha1" scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type DNSNameResolversGetter interface { // DNSNameResolverInterface has methods to work with DNSNameResolver resources. type DNSNameResolverInterface interface { - Create(ctx context.Context, dNSNameResolver *v1alpha1.DNSNameResolver, opts v1.CreateOptions) (*v1alpha1.DNSNameResolver, error) - Update(ctx context.Context, dNSNameResolver *v1alpha1.DNSNameResolver, opts v1.UpdateOptions) (*v1alpha1.DNSNameResolver, error) + Create(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolver, opts v1.CreateOptions) (*networkv1alpha1.DNSNameResolver, error) + Update(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolver, opts v1.UpdateOptions) (*networkv1alpha1.DNSNameResolver, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, dNSNameResolver *v1alpha1.DNSNameResolver, opts v1.UpdateOptions) (*v1alpha1.DNSNameResolver, error) + UpdateStatus(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolver, opts v1.UpdateOptions) (*networkv1alpha1.DNSNameResolver, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.DNSNameResolver, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.DNSNameResolverList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*networkv1alpha1.DNSNameResolver, error) + List(ctx context.Context, opts v1.ListOptions) (*networkv1alpha1.DNSNameResolverList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DNSNameResolver, err error) - Apply(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolverApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DNSNameResolver, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkv1alpha1.DNSNameResolver, err error) + Apply(ctx context.Context, dNSNameResolver *applyconfigurationsnetworkv1alpha1.DNSNameResolverApplyConfiguration, opts v1.ApplyOptions) (result *networkv1alpha1.DNSNameResolver, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolverApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DNSNameResolver, err error) + ApplyStatus(ctx context.Context, dNSNameResolver *applyconfigurationsnetworkv1alpha1.DNSNameResolverApplyConfiguration, opts v1.ApplyOptions) (result *networkv1alpha1.DNSNameResolver, err error) DNSNameResolverExpansion } // dNSNameResolvers implements DNSNameResolverInterface type dNSNameResolvers struct { - *gentype.ClientWithListAndApply[*v1alpha1.DNSNameResolver, *v1alpha1.DNSNameResolverList, *networkv1alpha1.DNSNameResolverApplyConfiguration] + *gentype.ClientWithListAndApply[*networkv1alpha1.DNSNameResolver, *networkv1alpha1.DNSNameResolverList, *applyconfigurationsnetworkv1alpha1.DNSNameResolverApplyConfiguration] } // newDNSNameResolvers returns a DNSNameResolvers func newDNSNameResolvers(c *NetworkV1alpha1Client, namespace string) *dNSNameResolvers { return &dNSNameResolvers{ - gentype.NewClientWithListAndApply[*v1alpha1.DNSNameResolver, *v1alpha1.DNSNameResolverList, *networkv1alpha1.DNSNameResolverApplyConfiguration]( + gentype.NewClientWithListAndApply[*networkv1alpha1.DNSNameResolver, *networkv1alpha1.DNSNameResolverList, *applyconfigurationsnetworkv1alpha1.DNSNameResolverApplyConfiguration]( "dnsnameresolvers", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.DNSNameResolver { return &v1alpha1.DNSNameResolver{} }, - func() *v1alpha1.DNSNameResolverList { return &v1alpha1.DNSNameResolverList{} }), + func() *networkv1alpha1.DNSNameResolver { return &networkv1alpha1.DNSNameResolver{} }, + func() *networkv1alpha1.DNSNameResolverList { return &networkv1alpha1.DNSNameResolverList{} }, + ), } } diff --git a/network/clientset/versioned/typed/network/v1alpha1/fake/fake_dnsnameresolver.go b/network/clientset/versioned/typed/network/v1alpha1/fake/fake_dnsnameresolver.go index 8a3fcc3c7b..b7bdc96a5d 100644 --- a/network/clientset/versioned/typed/network/v1alpha1/fake/fake_dnsnameresolver.go +++ b/network/clientset/versioned/typed/network/v1alpha1/fake/fake_dnsnameresolver.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/network/v1alpha1" networkv1alpha1 "github.com/openshift/client-go/network/applyconfigurations/network/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typednetworkv1alpha1 "github.com/openshift/client-go/network/clientset/versioned/typed/network/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeDNSNameResolvers implements DNSNameResolverInterface -type FakeDNSNameResolvers struct { +// fakeDNSNameResolvers implements DNSNameResolverInterface +type fakeDNSNameResolvers struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.DNSNameResolver, *v1alpha1.DNSNameResolverList, *networkv1alpha1.DNSNameResolverApplyConfiguration] Fake *FakeNetworkV1alpha1 - ns string -} - -var dnsnameresolversResource = v1alpha1.SchemeGroupVersion.WithResource("dnsnameresolvers") - -var dnsnameresolversKind = v1alpha1.SchemeGroupVersion.WithKind("DNSNameResolver") - -// Get takes name of the dNSNameResolver, and returns the corresponding dNSNameResolver object, and an error if there is any. -func (c *FakeDNSNameResolvers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DNSNameResolver, err error) { - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(dnsnameresolversResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DNSNameResolver), err -} - -// List takes label and field selectors, and returns the list of DNSNameResolvers that match those selectors. -func (c *FakeDNSNameResolvers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DNSNameResolverList, err error) { - emptyResult := &v1alpha1.DNSNameResolverList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(dnsnameresolversResource, dnsnameresolversKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.DNSNameResolverList{ListMeta: obj.(*v1alpha1.DNSNameResolverList).ListMeta} - for _, item := range obj.(*v1alpha1.DNSNameResolverList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dNSNameResolvers. -func (c *FakeDNSNameResolvers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(dnsnameresolversResource, c.ns, opts)) - -} - -// Create takes the representation of a dNSNameResolver and creates it. Returns the server's representation of the dNSNameResolver, and an error, if there is any. -func (c *FakeDNSNameResolvers) Create(ctx context.Context, dNSNameResolver *v1alpha1.DNSNameResolver, opts v1.CreateOptions) (result *v1alpha1.DNSNameResolver, err error) { - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(dnsnameresolversResource, c.ns, dNSNameResolver, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DNSNameResolver), err -} - -// Update takes the representation of a dNSNameResolver and updates it. Returns the server's representation of the dNSNameResolver, and an error, if there is any. -func (c *FakeDNSNameResolvers) Update(ctx context.Context, dNSNameResolver *v1alpha1.DNSNameResolver, opts v1.UpdateOptions) (result *v1alpha1.DNSNameResolver, err error) { - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(dnsnameresolversResource, c.ns, dNSNameResolver, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DNSNameResolver), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDNSNameResolvers) UpdateStatus(ctx context.Context, dNSNameResolver *v1alpha1.DNSNameResolver, opts v1.UpdateOptions) (result *v1alpha1.DNSNameResolver, err error) { - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(dnsnameresolversResource, "status", c.ns, dNSNameResolver, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DNSNameResolver), err -} - -// Delete takes name of the dNSNameResolver and deletes it. Returns an error if one occurs. -func (c *FakeDNSNameResolvers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(dnsnameresolversResource, c.ns, name, opts), &v1alpha1.DNSNameResolver{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDNSNameResolvers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(dnsnameresolversResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.DNSNameResolverList{}) - return err -} - -// Patch applies the patch and returns the patched dNSNameResolver. -func (c *FakeDNSNameResolvers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DNSNameResolver, err error) { - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(dnsnameresolversResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DNSNameResolver), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied dNSNameResolver. -func (c *FakeDNSNameResolvers) Apply(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolverApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DNSNameResolver, err error) { - if dNSNameResolver == nil { - return nil, fmt.Errorf("dNSNameResolver provided to Apply must not be nil") - } - data, err := json.Marshal(dNSNameResolver) - if err != nil { - return nil, err - } - name := dNSNameResolver.Name - if name == nil { - return nil, fmt.Errorf("dNSNameResolver.Name must be provided to Apply") - } - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(dnsnameresolversResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.DNSNameResolver), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDNSNameResolvers) ApplyStatus(ctx context.Context, dNSNameResolver *networkv1alpha1.DNSNameResolverApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.DNSNameResolver, err error) { - if dNSNameResolver == nil { - return nil, fmt.Errorf("dNSNameResolver provided to Apply must not be nil") - } - data, err := json.Marshal(dNSNameResolver) - if err != nil { - return nil, err - } - name := dNSNameResolver.Name - if name == nil { - return nil, fmt.Errorf("dNSNameResolver.Name must be provided to Apply") - } - emptyResult := &v1alpha1.DNSNameResolver{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(dnsnameresolversResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeDNSNameResolvers(fake *FakeNetworkV1alpha1, namespace string) typednetworkv1alpha1.DNSNameResolverInterface { + return &fakeDNSNameResolvers{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.DNSNameResolver, *v1alpha1.DNSNameResolverList, *networkv1alpha1.DNSNameResolverApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("dnsnameresolvers"), + v1alpha1.SchemeGroupVersion.WithKind("DNSNameResolver"), + func() *v1alpha1.DNSNameResolver { return &v1alpha1.DNSNameResolver{} }, + func() *v1alpha1.DNSNameResolverList { return &v1alpha1.DNSNameResolverList{} }, + func(dst, src *v1alpha1.DNSNameResolverList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.DNSNameResolverList) []*v1alpha1.DNSNameResolver { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.DNSNameResolverList, items []*v1alpha1.DNSNameResolver) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.DNSNameResolver), err } diff --git a/network/clientset/versioned/typed/network/v1alpha1/fake/fake_network_client.go b/network/clientset/versioned/typed/network/v1alpha1/fake/fake_network_client.go index a731cd3c13..21e48c26f1 100644 --- a/network/clientset/versioned/typed/network/v1alpha1/fake/fake_network_client.go +++ b/network/clientset/versioned/typed/network/v1alpha1/fake/fake_network_client.go @@ -13,7 +13,7 @@ type FakeNetworkV1alpha1 struct { } func (c *FakeNetworkV1alpha1) DNSNameResolvers(namespace string) v1alpha1.DNSNameResolverInterface { - return &FakeDNSNameResolvers{c, namespace} + return newFakeDNSNameResolvers(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/network/clientset/versioned/typed/network/v1alpha1/network_client.go b/network/clientset/versioned/typed/network/v1alpha1/network_client.go index 2aec8db56e..02ec4142e6 100644 --- a/network/clientset/versioned/typed/network/v1alpha1/network_client.go +++ b/network/clientset/versioned/typed/network/v1alpha1/network_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/network/v1alpha1" - "github.com/openshift/client-go/network/clientset/versioned/scheme" + networkv1alpha1 "github.com/openshift/api/network/v1alpha1" + scheme "github.com/openshift/client-go/network/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *NetworkV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := networkv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/network/informers/externalversions/generic.go b/network/informers/externalversions/generic.go index 4859bc455a..885ca8b06f 100644 --- a/network/informers/externalversions/generic.go +++ b/network/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/network/v1" v1alpha1 "github.com/openshift/api/network/v1alpha1" diff --git a/network/informers/externalversions/network/v1/clusternetwork.go b/network/informers/externalversions/network/v1/clusternetwork.go index d3a837184b..0c1e0725e4 100644 --- a/network/informers/externalversions/network/v1/clusternetwork.go +++ b/network/informers/externalversions/network/v1/clusternetwork.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - networkv1 "github.com/openshift/api/network/v1" + apinetworkv1 "github.com/openshift/api/network/v1" versioned "github.com/openshift/client-go/network/clientset/versioned" internalinterfaces "github.com/openshift/client-go/network/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/network/listers/network/v1" + networkv1 "github.com/openshift/client-go/network/listers/network/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterNetworks. type ClusterNetworkInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterNetworkLister + Lister() networkv1.ClusterNetworkLister } type clusterNetworkInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterNetworkInformer(client versioned.Interface, resyncPeriod return client.NetworkV1().ClusterNetworks().Watch(context.TODO(), options) }, }, - &networkv1.ClusterNetwork{}, + &apinetworkv1.ClusterNetwork{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterNetworkInformer) defaultInformer(client versioned.Interface, res } func (f *clusterNetworkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkv1.ClusterNetwork{}, f.defaultInformer) + return f.factory.InformerFor(&apinetworkv1.ClusterNetwork{}, f.defaultInformer) } -func (f *clusterNetworkInformer) Lister() v1.ClusterNetworkLister { - return v1.NewClusterNetworkLister(f.Informer().GetIndexer()) +func (f *clusterNetworkInformer) Lister() networkv1.ClusterNetworkLister { + return networkv1.NewClusterNetworkLister(f.Informer().GetIndexer()) } diff --git a/network/informers/externalversions/network/v1/egressnetworkpolicy.go b/network/informers/externalversions/network/v1/egressnetworkpolicy.go index cac3b26d79..6d7c3139ee 100644 --- a/network/informers/externalversions/network/v1/egressnetworkpolicy.go +++ b/network/informers/externalversions/network/v1/egressnetworkpolicy.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - networkv1 "github.com/openshift/api/network/v1" + apinetworkv1 "github.com/openshift/api/network/v1" versioned "github.com/openshift/client-go/network/clientset/versioned" internalinterfaces "github.com/openshift/client-go/network/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/network/listers/network/v1" + networkv1 "github.com/openshift/client-go/network/listers/network/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // EgressNetworkPolicies. type EgressNetworkPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.EgressNetworkPolicyLister + Lister() networkv1.EgressNetworkPolicyLister } type egressNetworkPolicyInformer struct { @@ -55,7 +55,7 @@ func NewFilteredEgressNetworkPolicyInformer(client versioned.Interface, namespac return client.NetworkV1().EgressNetworkPolicies(namespace).Watch(context.TODO(), options) }, }, - &networkv1.EgressNetworkPolicy{}, + &apinetworkv1.EgressNetworkPolicy{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *egressNetworkPolicyInformer) defaultInformer(client versioned.Interface } func (f *egressNetworkPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkv1.EgressNetworkPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apinetworkv1.EgressNetworkPolicy{}, f.defaultInformer) } -func (f *egressNetworkPolicyInformer) Lister() v1.EgressNetworkPolicyLister { - return v1.NewEgressNetworkPolicyLister(f.Informer().GetIndexer()) +func (f *egressNetworkPolicyInformer) Lister() networkv1.EgressNetworkPolicyLister { + return networkv1.NewEgressNetworkPolicyLister(f.Informer().GetIndexer()) } diff --git a/network/informers/externalversions/network/v1/hostsubnet.go b/network/informers/externalversions/network/v1/hostsubnet.go index e7b79021ef..74147da3fb 100644 --- a/network/informers/externalversions/network/v1/hostsubnet.go +++ b/network/informers/externalversions/network/v1/hostsubnet.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - networkv1 "github.com/openshift/api/network/v1" + apinetworkv1 "github.com/openshift/api/network/v1" versioned "github.com/openshift/client-go/network/clientset/versioned" internalinterfaces "github.com/openshift/client-go/network/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/network/listers/network/v1" + networkv1 "github.com/openshift/client-go/network/listers/network/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // HostSubnets. type HostSubnetInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.HostSubnetLister + Lister() networkv1.HostSubnetLister } type hostSubnetInformer struct { @@ -54,7 +54,7 @@ func NewFilteredHostSubnetInformer(client versioned.Interface, resyncPeriod time return client.NetworkV1().HostSubnets().Watch(context.TODO(), options) }, }, - &networkv1.HostSubnet{}, + &apinetworkv1.HostSubnet{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *hostSubnetInformer) defaultInformer(client versioned.Interface, resyncP } func (f *hostSubnetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkv1.HostSubnet{}, f.defaultInformer) + return f.factory.InformerFor(&apinetworkv1.HostSubnet{}, f.defaultInformer) } -func (f *hostSubnetInformer) Lister() v1.HostSubnetLister { - return v1.NewHostSubnetLister(f.Informer().GetIndexer()) +func (f *hostSubnetInformer) Lister() networkv1.HostSubnetLister { + return networkv1.NewHostSubnetLister(f.Informer().GetIndexer()) } diff --git a/network/informers/externalversions/network/v1/netnamespace.go b/network/informers/externalversions/network/v1/netnamespace.go index a1a91e947c..5f8567d6b3 100644 --- a/network/informers/externalversions/network/v1/netnamespace.go +++ b/network/informers/externalversions/network/v1/netnamespace.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - networkv1 "github.com/openshift/api/network/v1" + apinetworkv1 "github.com/openshift/api/network/v1" versioned "github.com/openshift/client-go/network/clientset/versioned" internalinterfaces "github.com/openshift/client-go/network/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/network/listers/network/v1" + networkv1 "github.com/openshift/client-go/network/listers/network/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // NetNamespaces. type NetNamespaceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NetNamespaceLister + Lister() networkv1.NetNamespaceLister } type netNamespaceInformer struct { @@ -54,7 +54,7 @@ func NewFilteredNetNamespaceInformer(client versioned.Interface, resyncPeriod ti return client.NetworkV1().NetNamespaces().Watch(context.TODO(), options) }, }, - &networkv1.NetNamespace{}, + &apinetworkv1.NetNamespace{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *netNamespaceInformer) defaultInformer(client versioned.Interface, resyn } func (f *netNamespaceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkv1.NetNamespace{}, f.defaultInformer) + return f.factory.InformerFor(&apinetworkv1.NetNamespace{}, f.defaultInformer) } -func (f *netNamespaceInformer) Lister() v1.NetNamespaceLister { - return v1.NewNetNamespaceLister(f.Informer().GetIndexer()) +func (f *netNamespaceInformer) Lister() networkv1.NetNamespaceLister { + return networkv1.NewNetNamespaceLister(f.Informer().GetIndexer()) } diff --git a/network/informers/externalversions/network/v1alpha1/dnsnameresolver.go b/network/informers/externalversions/network/v1alpha1/dnsnameresolver.go index 8c2953ccd8..5123527b2a 100644 --- a/network/informers/externalversions/network/v1alpha1/dnsnameresolver.go +++ b/network/informers/externalversions/network/v1alpha1/dnsnameresolver.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - networkv1alpha1 "github.com/openshift/api/network/v1alpha1" + apinetworkv1alpha1 "github.com/openshift/api/network/v1alpha1" versioned "github.com/openshift/client-go/network/clientset/versioned" internalinterfaces "github.com/openshift/client-go/network/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/network/listers/network/v1alpha1" + networkv1alpha1 "github.com/openshift/client-go/network/listers/network/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DNSNameResolvers. type DNSNameResolverInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.DNSNameResolverLister + Lister() networkv1alpha1.DNSNameResolverLister } type dNSNameResolverInformer struct { @@ -55,7 +55,7 @@ func NewFilteredDNSNameResolverInformer(client versioned.Interface, namespace st return client.NetworkV1alpha1().DNSNameResolvers(namespace).Watch(context.TODO(), options) }, }, - &networkv1alpha1.DNSNameResolver{}, + &apinetworkv1alpha1.DNSNameResolver{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *dNSNameResolverInformer) defaultInformer(client versioned.Interface, re } func (f *dNSNameResolverInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkv1alpha1.DNSNameResolver{}, f.defaultInformer) + return f.factory.InformerFor(&apinetworkv1alpha1.DNSNameResolver{}, f.defaultInformer) } -func (f *dNSNameResolverInformer) Lister() v1alpha1.DNSNameResolverLister { - return v1alpha1.NewDNSNameResolverLister(f.Informer().GetIndexer()) +func (f *dNSNameResolverInformer) Lister() networkv1alpha1.DNSNameResolverLister { + return networkv1alpha1.NewDNSNameResolverLister(f.Informer().GetIndexer()) } diff --git a/network/listers/network/v1/clusternetwork.go b/network/listers/network/v1/clusternetwork.go index 81af2ecdfd..cfa283fadd 100644 --- a/network/listers/network/v1/clusternetwork.go +++ b/network/listers/network/v1/clusternetwork.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/network/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + networkv1 "github.com/openshift/api/network/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterNetworkLister helps list ClusterNetworks. @@ -14,19 +14,19 @@ import ( type ClusterNetworkLister interface { // List lists all ClusterNetworks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterNetwork, err error) + List(selector labels.Selector) (ret []*networkv1.ClusterNetwork, err error) // Get retrieves the ClusterNetwork from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterNetwork, error) + Get(name string) (*networkv1.ClusterNetwork, error) ClusterNetworkListerExpansion } // clusterNetworkLister implements the ClusterNetworkLister interface. type clusterNetworkLister struct { - listers.ResourceIndexer[*v1.ClusterNetwork] + listers.ResourceIndexer[*networkv1.ClusterNetwork] } // NewClusterNetworkLister returns a new ClusterNetworkLister. func NewClusterNetworkLister(indexer cache.Indexer) ClusterNetworkLister { - return &clusterNetworkLister{listers.New[*v1.ClusterNetwork](indexer, v1.Resource("clusternetwork"))} + return &clusterNetworkLister{listers.New[*networkv1.ClusterNetwork](indexer, networkv1.Resource("clusternetwork"))} } diff --git a/network/listers/network/v1/egressnetworkpolicy.go b/network/listers/network/v1/egressnetworkpolicy.go index bad75b3eea..c7eb08a60d 100644 --- a/network/listers/network/v1/egressnetworkpolicy.go +++ b/network/listers/network/v1/egressnetworkpolicy.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/network/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + networkv1 "github.com/openshift/api/network/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // EgressNetworkPolicyLister helps list EgressNetworkPolicies. @@ -14,7 +14,7 @@ import ( type EgressNetworkPolicyLister interface { // List lists all EgressNetworkPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.EgressNetworkPolicy, err error) + List(selector labels.Selector) (ret []*networkv1.EgressNetworkPolicy, err error) // EgressNetworkPolicies returns an object that can list and get EgressNetworkPolicies. EgressNetworkPolicies(namespace string) EgressNetworkPolicyNamespaceLister EgressNetworkPolicyListerExpansion @@ -22,17 +22,17 @@ type EgressNetworkPolicyLister interface { // egressNetworkPolicyLister implements the EgressNetworkPolicyLister interface. type egressNetworkPolicyLister struct { - listers.ResourceIndexer[*v1.EgressNetworkPolicy] + listers.ResourceIndexer[*networkv1.EgressNetworkPolicy] } // NewEgressNetworkPolicyLister returns a new EgressNetworkPolicyLister. func NewEgressNetworkPolicyLister(indexer cache.Indexer) EgressNetworkPolicyLister { - return &egressNetworkPolicyLister{listers.New[*v1.EgressNetworkPolicy](indexer, v1.Resource("egressnetworkpolicy"))} + return &egressNetworkPolicyLister{listers.New[*networkv1.EgressNetworkPolicy](indexer, networkv1.Resource("egressnetworkpolicy"))} } // EgressNetworkPolicies returns an object that can list and get EgressNetworkPolicies. func (s *egressNetworkPolicyLister) EgressNetworkPolicies(namespace string) EgressNetworkPolicyNamespaceLister { - return egressNetworkPolicyNamespaceLister{listers.NewNamespaced[*v1.EgressNetworkPolicy](s.ResourceIndexer, namespace)} + return egressNetworkPolicyNamespaceLister{listers.NewNamespaced[*networkv1.EgressNetworkPolicy](s.ResourceIndexer, namespace)} } // EgressNetworkPolicyNamespaceLister helps list and get EgressNetworkPolicies. @@ -40,15 +40,15 @@ func (s *egressNetworkPolicyLister) EgressNetworkPolicies(namespace string) Egre type EgressNetworkPolicyNamespaceLister interface { // List lists all EgressNetworkPolicies in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.EgressNetworkPolicy, err error) + List(selector labels.Selector) (ret []*networkv1.EgressNetworkPolicy, err error) // Get retrieves the EgressNetworkPolicy from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.EgressNetworkPolicy, error) + Get(name string) (*networkv1.EgressNetworkPolicy, error) EgressNetworkPolicyNamespaceListerExpansion } // egressNetworkPolicyNamespaceLister implements the EgressNetworkPolicyNamespaceLister // interface. type egressNetworkPolicyNamespaceLister struct { - listers.ResourceIndexer[*v1.EgressNetworkPolicy] + listers.ResourceIndexer[*networkv1.EgressNetworkPolicy] } diff --git a/network/listers/network/v1/hostsubnet.go b/network/listers/network/v1/hostsubnet.go index 65bbdbaa76..991f17e11b 100644 --- a/network/listers/network/v1/hostsubnet.go +++ b/network/listers/network/v1/hostsubnet.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/network/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + networkv1 "github.com/openshift/api/network/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // HostSubnetLister helps list HostSubnets. @@ -14,19 +14,19 @@ import ( type HostSubnetLister interface { // List lists all HostSubnets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.HostSubnet, err error) + List(selector labels.Selector) (ret []*networkv1.HostSubnet, err error) // Get retrieves the HostSubnet from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.HostSubnet, error) + Get(name string) (*networkv1.HostSubnet, error) HostSubnetListerExpansion } // hostSubnetLister implements the HostSubnetLister interface. type hostSubnetLister struct { - listers.ResourceIndexer[*v1.HostSubnet] + listers.ResourceIndexer[*networkv1.HostSubnet] } // NewHostSubnetLister returns a new HostSubnetLister. func NewHostSubnetLister(indexer cache.Indexer) HostSubnetLister { - return &hostSubnetLister{listers.New[*v1.HostSubnet](indexer, v1.Resource("hostsubnet"))} + return &hostSubnetLister{listers.New[*networkv1.HostSubnet](indexer, networkv1.Resource("hostsubnet"))} } diff --git a/network/listers/network/v1/netnamespace.go b/network/listers/network/v1/netnamespace.go index a89480d94a..0836f70450 100644 --- a/network/listers/network/v1/netnamespace.go +++ b/network/listers/network/v1/netnamespace.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/network/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + networkv1 "github.com/openshift/api/network/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NetNamespaceLister helps list NetNamespaces. @@ -14,19 +14,19 @@ import ( type NetNamespaceLister interface { // List lists all NetNamespaces in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.NetNamespace, err error) + List(selector labels.Selector) (ret []*networkv1.NetNamespace, err error) // Get retrieves the NetNamespace from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.NetNamespace, error) + Get(name string) (*networkv1.NetNamespace, error) NetNamespaceListerExpansion } // netNamespaceLister implements the NetNamespaceLister interface. type netNamespaceLister struct { - listers.ResourceIndexer[*v1.NetNamespace] + listers.ResourceIndexer[*networkv1.NetNamespace] } // NewNetNamespaceLister returns a new NetNamespaceLister. func NewNetNamespaceLister(indexer cache.Indexer) NetNamespaceLister { - return &netNamespaceLister{listers.New[*v1.NetNamespace](indexer, v1.Resource("netnamespace"))} + return &netNamespaceLister{listers.New[*networkv1.NetNamespace](indexer, networkv1.Resource("netnamespace"))} } diff --git a/network/listers/network/v1alpha1/dnsnameresolver.go b/network/listers/network/v1alpha1/dnsnameresolver.go index d8373d926a..58bb041735 100644 --- a/network/listers/network/v1alpha1/dnsnameresolver.go +++ b/network/listers/network/v1alpha1/dnsnameresolver.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/network/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + networkv1alpha1 "github.com/openshift/api/network/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DNSNameResolverLister helps list DNSNameResolvers. @@ -14,7 +14,7 @@ import ( type DNSNameResolverLister interface { // List lists all DNSNameResolvers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.DNSNameResolver, err error) + List(selector labels.Selector) (ret []*networkv1alpha1.DNSNameResolver, err error) // DNSNameResolvers returns an object that can list and get DNSNameResolvers. DNSNameResolvers(namespace string) DNSNameResolverNamespaceLister DNSNameResolverListerExpansion @@ -22,17 +22,17 @@ type DNSNameResolverLister interface { // dNSNameResolverLister implements the DNSNameResolverLister interface. type dNSNameResolverLister struct { - listers.ResourceIndexer[*v1alpha1.DNSNameResolver] + listers.ResourceIndexer[*networkv1alpha1.DNSNameResolver] } // NewDNSNameResolverLister returns a new DNSNameResolverLister. func NewDNSNameResolverLister(indexer cache.Indexer) DNSNameResolverLister { - return &dNSNameResolverLister{listers.New[*v1alpha1.DNSNameResolver](indexer, v1alpha1.Resource("dnsnameresolver"))} + return &dNSNameResolverLister{listers.New[*networkv1alpha1.DNSNameResolver](indexer, networkv1alpha1.Resource("dnsnameresolver"))} } // DNSNameResolvers returns an object that can list and get DNSNameResolvers. func (s *dNSNameResolverLister) DNSNameResolvers(namespace string) DNSNameResolverNamespaceLister { - return dNSNameResolverNamespaceLister{listers.NewNamespaced[*v1alpha1.DNSNameResolver](s.ResourceIndexer, namespace)} + return dNSNameResolverNamespaceLister{listers.NewNamespaced[*networkv1alpha1.DNSNameResolver](s.ResourceIndexer, namespace)} } // DNSNameResolverNamespaceLister helps list and get DNSNameResolvers. @@ -40,15 +40,15 @@ func (s *dNSNameResolverLister) DNSNameResolvers(namespace string) DNSNameResolv type DNSNameResolverNamespaceLister interface { // List lists all DNSNameResolvers in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.DNSNameResolver, err error) + List(selector labels.Selector) (ret []*networkv1alpha1.DNSNameResolver, err error) // Get retrieves the DNSNameResolver from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.DNSNameResolver, error) + Get(name string) (*networkv1alpha1.DNSNameResolver, error) DNSNameResolverNamespaceListerExpansion } // dNSNameResolverNamespaceLister implements the DNSNameResolverNamespaceLister // interface. type dNSNameResolverNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.DNSNameResolver] + listers.ResourceIndexer[*networkv1alpha1.DNSNameResolver] } diff --git a/oauth/applyconfigurations/internal/internal.go b/oauth/applyconfigurations/internal/internal.go index eccb23998b..ab048a8595 100644 --- a/oauth/applyconfigurations/internal/internal.go +++ b/oauth/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/oauth/applyconfigurations/oauth/v1/oauthaccesstoken.go b/oauth/applyconfigurations/oauth/v1/oauthaccesstoken.go index 8c29054f99..959f5cd2ab 100644 --- a/oauth/applyconfigurations/oauth/v1/oauthaccesstoken.go +++ b/oauth/applyconfigurations/oauth/v1/oauthaccesstoken.go @@ -5,26 +5,26 @@ package v1 import ( oauthv1 "github.com/openshift/api/oauth/v1" internal "github.com/openshift/client-go/oauth/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OAuthAccessTokenApplyConfiguration represents a declarative configuration of the OAuthAccessToken type for use // with apply. type OAuthAccessTokenApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - ClientName *string `json:"clientName,omitempty"` - ExpiresIn *int64 `json:"expiresIn,omitempty"` - Scopes []string `json:"scopes,omitempty"` - RedirectURI *string `json:"redirectURI,omitempty"` - UserName *string `json:"userName,omitempty"` - UserUID *string `json:"userUID,omitempty"` - AuthorizeToken *string `json:"authorizeToken,omitempty"` - RefreshToken *string `json:"refreshToken,omitempty"` - InactivityTimeoutSeconds *int32 `json:"inactivityTimeoutSeconds,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + ClientName *string `json:"clientName,omitempty"` + ExpiresIn *int64 `json:"expiresIn,omitempty"` + Scopes []string `json:"scopes,omitempty"` + RedirectURI *string `json:"redirectURI,omitempty"` + UserName *string `json:"userName,omitempty"` + UserUID *string `json:"userUID,omitempty"` + AuthorizeToken *string `json:"authorizeToken,omitempty"` + RefreshToken *string `json:"refreshToken,omitempty"` + InactivityTimeoutSeconds *int32 `json:"inactivityTimeoutSeconds,omitempty"` } // OAuthAccessToken constructs a declarative configuration of the OAuthAccessToken type for use with @@ -76,7 +76,7 @@ func extractOAuthAccessToken(oAuthAccessToken *oauthv1.OAuthAccessToken, fieldMa // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithKind(value string) *OAuthAccessTokenApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -84,7 +84,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithKind(value string) *OAuthAccess // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithAPIVersion(value string) *OAuthAccessTokenApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -93,7 +93,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithAPIVersion(value string) *OAuth // If called multiple times, the Name field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithName(value string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -102,7 +102,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithName(value string) *OAuthAccess // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithGenerateName(value string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -111,7 +111,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithGenerateName(value string) *OAu // If called multiple times, the Namespace field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithNamespace(value string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -120,7 +120,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithNamespace(value string) *OAuthA // If called multiple times, the UID field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithUID(value types.UID) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -129,7 +129,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithUID(value types.UID) *OAuthAcce // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithResourceVersion(value string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -138,25 +138,25 @@ func (b *OAuthAccessTokenApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithGeneration(value int64) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OAuthAccessTokenApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OAuthAccessTokenApplyConfiguration { +func (b *OAuthAccessTokenApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OAuthAccessTokenApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OAuthAccessTokenApplyConfiguration { +func (b *OAuthAccessTokenApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -165,7 +165,7 @@ func (b *OAuthAccessTokenApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OAuthAccessTokenApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -175,11 +175,11 @@ func (b *OAuthAccessTokenApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *OAuthAccessTokenApplyConfiguration) WithLabels(entries map[string]string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -190,11 +190,11 @@ func (b *OAuthAccessTokenApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *OAuthAccessTokenApplyConfiguration) WithAnnotations(entries map[string]string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -202,13 +202,13 @@ func (b *OAuthAccessTokenApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OAuthAccessTokenApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OAuthAccessTokenApplyConfiguration { +func (b *OAuthAccessTokenApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -219,14 +219,14 @@ func (b *OAuthAccessTokenApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *OAuthAccessTokenApplyConfiguration) WithFinalizers(values ...string) *OAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OAuthAccessTokenApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -307,5 +307,5 @@ func (b *OAuthAccessTokenApplyConfiguration) WithInactivityTimeoutSeconds(value // GetName retrieves the value of the Name field in the declarative configuration. func (b *OAuthAccessTokenApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/oauth/applyconfigurations/oauth/v1/oauthauthorizetoken.go b/oauth/applyconfigurations/oauth/v1/oauthauthorizetoken.go index 4ae35ca093..3ec75e9a22 100644 --- a/oauth/applyconfigurations/oauth/v1/oauthauthorizetoken.go +++ b/oauth/applyconfigurations/oauth/v1/oauthauthorizetoken.go @@ -5,26 +5,26 @@ package v1 import ( oauthv1 "github.com/openshift/api/oauth/v1" internal "github.com/openshift/client-go/oauth/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OAuthAuthorizeTokenApplyConfiguration represents a declarative configuration of the OAuthAuthorizeToken type for use // with apply. type OAuthAuthorizeTokenApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - ClientName *string `json:"clientName,omitempty"` - ExpiresIn *int64 `json:"expiresIn,omitempty"` - Scopes []string `json:"scopes,omitempty"` - RedirectURI *string `json:"redirectURI,omitempty"` - State *string `json:"state,omitempty"` - UserName *string `json:"userName,omitempty"` - UserUID *string `json:"userUID,omitempty"` - CodeChallenge *string `json:"codeChallenge,omitempty"` - CodeChallengeMethod *string `json:"codeChallengeMethod,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + ClientName *string `json:"clientName,omitempty"` + ExpiresIn *int64 `json:"expiresIn,omitempty"` + Scopes []string `json:"scopes,omitempty"` + RedirectURI *string `json:"redirectURI,omitempty"` + State *string `json:"state,omitempty"` + UserName *string `json:"userName,omitempty"` + UserUID *string `json:"userUID,omitempty"` + CodeChallenge *string `json:"codeChallenge,omitempty"` + CodeChallengeMethod *string `json:"codeChallengeMethod,omitempty"` } // OAuthAuthorizeToken constructs a declarative configuration of the OAuthAuthorizeToken type for use with @@ -76,7 +76,7 @@ func extractOAuthAuthorizeToken(oAuthAuthorizeToken *oauthv1.OAuthAuthorizeToken // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithKind(value string) *OAuthAuthorizeTokenApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -84,7 +84,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithKind(value string) *OAuthAut // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithAPIVersion(value string) *OAuthAuthorizeTokenApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -93,7 +93,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithAPIVersion(value string) *OA // If called multiple times, the Name field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithName(value string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -102,7 +102,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithName(value string) *OAuthAut // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithGenerateName(value string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -111,7 +111,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithGenerateName(value string) * // If called multiple times, the Namespace field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithNamespace(value string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -120,7 +120,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithNamespace(value string) *OAu // If called multiple times, the UID field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithUID(value types.UID) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -129,7 +129,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithUID(value types.UID) *OAuthA // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithResourceVersion(value string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -138,25 +138,25 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithResourceVersion(value string // If called multiple times, the Generation field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithGeneration(value int64) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OAuthAuthorizeTokenApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OAuthAuthorizeTokenApplyConfiguration { +func (b *OAuthAuthorizeTokenApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OAuthAuthorizeTokenApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OAuthAuthorizeTokenApplyConfiguration { +func (b *OAuthAuthorizeTokenApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -165,7 +165,7 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithDeletionTimestamp(value meta // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OAuthAuthorizeTokenApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -175,11 +175,11 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithDeletionGracePeriodSeconds(v // overwriting an existing map entries in Labels field with the same key. func (b *OAuthAuthorizeTokenApplyConfiguration) WithLabels(entries map[string]string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -190,11 +190,11 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithLabels(entries map[string]st // overwriting an existing map entries in Annotations field with the same key. func (b *OAuthAuthorizeTokenApplyConfiguration) WithAnnotations(entries map[string]string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -202,13 +202,13 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithAnnotations(entries map[stri // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OAuthAuthorizeTokenApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OAuthAuthorizeTokenApplyConfiguration { +func (b *OAuthAuthorizeTokenApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -219,14 +219,14 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithOwnerReferences(values ...*v func (b *OAuthAuthorizeTokenApplyConfiguration) WithFinalizers(values ...string) *OAuthAuthorizeTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OAuthAuthorizeTokenApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -307,5 +307,5 @@ func (b *OAuthAuthorizeTokenApplyConfiguration) WithCodeChallengeMethod(value st // GetName retrieves the value of the Name field in the declarative configuration. func (b *OAuthAuthorizeTokenApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/oauth/applyconfigurations/oauth/v1/oauthclient.go b/oauth/applyconfigurations/oauth/v1/oauthclient.go index d62e2e5de8..b1f851543f 100644 --- a/oauth/applyconfigurations/oauth/v1/oauthclient.go +++ b/oauth/applyconfigurations/oauth/v1/oauthclient.go @@ -5,25 +5,25 @@ package v1 import ( oauthv1 "github.com/openshift/api/oauth/v1" internal "github.com/openshift/client-go/oauth/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OAuthClientApplyConfiguration represents a declarative configuration of the OAuthClient type for use // with apply. type OAuthClientApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Secret *string `json:"secret,omitempty"` - AdditionalSecrets []string `json:"additionalSecrets,omitempty"` - RespondWithChallenges *bool `json:"respondWithChallenges,omitempty"` - RedirectURIs []string `json:"redirectURIs,omitempty"` - GrantMethod *oauthv1.GrantHandlerType `json:"grantMethod,omitempty"` - ScopeRestrictions []ScopeRestrictionApplyConfiguration `json:"scopeRestrictions,omitempty"` - AccessTokenMaxAgeSeconds *int32 `json:"accessTokenMaxAgeSeconds,omitempty"` - AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Secret *string `json:"secret,omitempty"` + AdditionalSecrets []string `json:"additionalSecrets,omitempty"` + RespondWithChallenges *bool `json:"respondWithChallenges,omitempty"` + RedirectURIs []string `json:"redirectURIs,omitempty"` + GrantMethod *oauthv1.GrantHandlerType `json:"grantMethod,omitempty"` + ScopeRestrictions []ScopeRestrictionApplyConfiguration `json:"scopeRestrictions,omitempty"` + AccessTokenMaxAgeSeconds *int32 `json:"accessTokenMaxAgeSeconds,omitempty"` + AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` } // OAuthClient constructs a declarative configuration of the OAuthClient type for use with @@ -75,7 +75,7 @@ func extractOAuthClient(oAuthClient *oauthv1.OAuthClient, fieldManager string, s // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithKind(value string) *OAuthClientApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -83,7 +83,7 @@ func (b *OAuthClientApplyConfiguration) WithKind(value string) *OAuthClientApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithAPIVersion(value string) *OAuthClientApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -92,7 +92,7 @@ func (b *OAuthClientApplyConfiguration) WithAPIVersion(value string) *OAuthClien // If called multiple times, the Name field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithName(value string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -101,7 +101,7 @@ func (b *OAuthClientApplyConfiguration) WithName(value string) *OAuthClientApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithGenerateName(value string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -110,7 +110,7 @@ func (b *OAuthClientApplyConfiguration) WithGenerateName(value string) *OAuthCli // If called multiple times, the Namespace field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithNamespace(value string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -119,7 +119,7 @@ func (b *OAuthClientApplyConfiguration) WithNamespace(value string) *OAuthClient // If called multiple times, the UID field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithUID(value types.UID) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -128,7 +128,7 @@ func (b *OAuthClientApplyConfiguration) WithUID(value types.UID) *OAuthClientApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithResourceVersion(value string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -137,25 +137,25 @@ func (b *OAuthClientApplyConfiguration) WithResourceVersion(value string) *OAuth // If called multiple times, the Generation field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithGeneration(value int64) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OAuthClientApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OAuthClientApplyConfiguration { +func (b *OAuthClientApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OAuthClientApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OAuthClientApplyConfiguration { +func (b *OAuthClientApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -164,7 +164,7 @@ func (b *OAuthClientApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OAuthClientApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -174,11 +174,11 @@ func (b *OAuthClientApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *OAuthClientApplyConfiguration) WithLabels(entries map[string]string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -189,11 +189,11 @@ func (b *OAuthClientApplyConfiguration) WithLabels(entries map[string]string) *O // overwriting an existing map entries in Annotations field with the same key. func (b *OAuthClientApplyConfiguration) WithAnnotations(entries map[string]string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,13 +201,13 @@ func (b *OAuthClientApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OAuthClientApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OAuthClientApplyConfiguration { +func (b *OAuthClientApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -218,14 +218,14 @@ func (b *OAuthClientApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *OAuthClientApplyConfiguration) WithFinalizers(values ...string) *OAuthClientApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OAuthClientApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -305,5 +305,5 @@ func (b *OAuthClientApplyConfiguration) WithAccessTokenInactivityTimeoutSeconds( // GetName retrieves the value of the Name field in the declarative configuration. func (b *OAuthClientApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/oauth/applyconfigurations/oauth/v1/oauthclientauthorization.go b/oauth/applyconfigurations/oauth/v1/oauthclientauthorization.go index e5661cd058..838cd4b307 100644 --- a/oauth/applyconfigurations/oauth/v1/oauthclientauthorization.go +++ b/oauth/applyconfigurations/oauth/v1/oauthclientauthorization.go @@ -5,21 +5,21 @@ package v1 import ( oauthv1 "github.com/openshift/api/oauth/v1" internal "github.com/openshift/client-go/oauth/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OAuthClientAuthorizationApplyConfiguration represents a declarative configuration of the OAuthClientAuthorization type for use // with apply. type OAuthClientAuthorizationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - ClientName *string `json:"clientName,omitempty"` - UserName *string `json:"userName,omitempty"` - UserUID *string `json:"userUID,omitempty"` - Scopes []string `json:"scopes,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + ClientName *string `json:"clientName,omitempty"` + UserName *string `json:"userName,omitempty"` + UserUID *string `json:"userUID,omitempty"` + Scopes []string `json:"scopes,omitempty"` } // OAuthClientAuthorization constructs a declarative configuration of the OAuthClientAuthorization type for use with @@ -71,7 +71,7 @@ func extractOAuthClientAuthorization(oAuthClientAuthorization *oauthv1.OAuthClie // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithKind(value string) *OAuthClientAuthorizationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithKind(value string) *OAu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithAPIVersion(value string) *OAuthClientAuthorizationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithAPIVersion(value string // If called multiple times, the Name field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithName(value string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithName(value string) *OAu // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithGenerateName(value string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithGenerateName(value stri // If called multiple times, the Namespace field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithNamespace(value string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithNamespace(value string) // If called multiple times, the UID field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithUID(value types.UID) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithUID(value types.UID) *O // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithResourceVersion(value string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithResourceVersion(value s // If called multiple times, the Generation field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithGeneration(value int64) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OAuthClientAuthorizationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OAuthClientAuthorizationApplyConfiguration { +func (b *OAuthClientAuthorizationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OAuthClientAuthorizationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OAuthClientAuthorizationApplyConfiguration { +func (b *OAuthClientAuthorizationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithDeletionTimestamp(value // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OAuthClientAuthorizationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithDeletionGracePeriodSeco // overwriting an existing map entries in Labels field with the same key. func (b *OAuthClientAuthorizationApplyConfiguration) WithLabels(entries map[string]string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithLabels(entries map[stri // overwriting an existing map entries in Annotations field with the same key. func (b *OAuthClientAuthorizationApplyConfiguration) WithAnnotations(entries map[string]string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithAnnotations(entries map // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OAuthClientAuthorizationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OAuthClientAuthorizationApplyConfiguration { +func (b *OAuthClientAuthorizationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithOwnerReferences(values func (b *OAuthClientAuthorizationApplyConfiguration) WithFinalizers(values ...string) *OAuthClientAuthorizationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OAuthClientAuthorizationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -262,5 +262,5 @@ func (b *OAuthClientAuthorizationApplyConfiguration) WithScopes(values ...string // GetName retrieves the value of the Name field in the declarative configuration. func (b *OAuthClientAuthorizationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/oauth/applyconfigurations/oauth/v1/useroauthaccesstoken.go b/oauth/applyconfigurations/oauth/v1/useroauthaccesstoken.go index 1392a42ba0..d689856efc 100644 --- a/oauth/applyconfigurations/oauth/v1/useroauthaccesstoken.go +++ b/oauth/applyconfigurations/oauth/v1/useroauthaccesstoken.go @@ -5,26 +5,26 @@ package v1 import ( oauthv1 "github.com/openshift/api/oauth/v1" internal "github.com/openshift/client-go/oauth/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // UserOAuthAccessTokenApplyConfiguration represents a declarative configuration of the UserOAuthAccessToken type for use // with apply. type UserOAuthAccessTokenApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - ClientName *string `json:"clientName,omitempty"` - ExpiresIn *int64 `json:"expiresIn,omitempty"` - Scopes []string `json:"scopes,omitempty"` - RedirectURI *string `json:"redirectURI,omitempty"` - UserName *string `json:"userName,omitempty"` - UserUID *string `json:"userUID,omitempty"` - AuthorizeToken *string `json:"authorizeToken,omitempty"` - RefreshToken *string `json:"refreshToken,omitempty"` - InactivityTimeoutSeconds *int32 `json:"inactivityTimeoutSeconds,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + ClientName *string `json:"clientName,omitempty"` + ExpiresIn *int64 `json:"expiresIn,omitempty"` + Scopes []string `json:"scopes,omitempty"` + RedirectURI *string `json:"redirectURI,omitempty"` + UserName *string `json:"userName,omitempty"` + UserUID *string `json:"userUID,omitempty"` + AuthorizeToken *string `json:"authorizeToken,omitempty"` + RefreshToken *string `json:"refreshToken,omitempty"` + InactivityTimeoutSeconds *int32 `json:"inactivityTimeoutSeconds,omitempty"` } // UserOAuthAccessToken constructs a declarative configuration of the UserOAuthAccessToken type for use with @@ -76,7 +76,7 @@ func extractUserOAuthAccessToken(userOAuthAccessToken *oauthv1.UserOAuthAccessTo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithKind(value string) *UserOAuthAccessTokenApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -84,7 +84,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithKind(value string) *UserOAu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithAPIVersion(value string) *UserOAuthAccessTokenApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -93,7 +93,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithAPIVersion(value string) *U // If called multiple times, the Name field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithName(value string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -102,7 +102,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithName(value string) *UserOAu // If called multiple times, the GenerateName field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithGenerateName(value string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -111,7 +111,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithNamespace(value string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -120,7 +120,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithNamespace(value string) *Us // If called multiple times, the UID field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithUID(value types.UID) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -129,7 +129,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithUID(value types.UID) *UserO // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithResourceVersion(value string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -138,25 +138,25 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithResourceVersion(value strin // If called multiple times, the Generation field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithGeneration(value int64) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *UserOAuthAccessTokenApplyConfiguration) WithCreationTimestamp(value metav1.Time) *UserOAuthAccessTokenApplyConfiguration { +func (b *UserOAuthAccessTokenApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *UserOAuthAccessTokenApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *UserOAuthAccessTokenApplyConfiguration { +func (b *UserOAuthAccessTokenApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -165,7 +165,7 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithDeletionTimestamp(value met // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *UserOAuthAccessTokenApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -175,11 +175,11 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithDeletionGracePeriodSeconds( // overwriting an existing map entries in Labels field with the same key. func (b *UserOAuthAccessTokenApplyConfiguration) WithLabels(entries map[string]string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -190,11 +190,11 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithLabels(entries map[string]s // overwriting an existing map entries in Annotations field with the same key. func (b *UserOAuthAccessTokenApplyConfiguration) WithAnnotations(entries map[string]string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -202,13 +202,13 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithAnnotations(entries map[str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *UserOAuthAccessTokenApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *UserOAuthAccessTokenApplyConfiguration { +func (b *UserOAuthAccessTokenApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -219,14 +219,14 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithOwnerReferences(values ...* func (b *UserOAuthAccessTokenApplyConfiguration) WithFinalizers(values ...string) *UserOAuthAccessTokenApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *UserOAuthAccessTokenApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -307,5 +307,5 @@ func (b *UserOAuthAccessTokenApplyConfiguration) WithInactivityTimeoutSeconds(va // GetName retrieves the value of the Name field in the declarative configuration. func (b *UserOAuthAccessTokenApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/oauth/clientset/versioned/clientset.go b/oauth/clientset/versioned/clientset.go index 74493bdc22..e89fa3fc0d 100644 --- a/oauth/clientset/versioned/clientset.go +++ b/oauth/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" oauthv1 "github.com/openshift/client-go/oauth/clientset/versioned/typed/oauth/v1" discovery "k8s.io/client-go/discovery" diff --git a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauth_client.go b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauth_client.go index 2ed716d162..33c186dca8 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauth_client.go +++ b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauth_client.go @@ -13,23 +13,23 @@ type FakeOauthV1 struct { } func (c *FakeOauthV1) OAuthAccessTokens() v1.OAuthAccessTokenInterface { - return &FakeOAuthAccessTokens{c} + return newFakeOAuthAccessTokens(c) } func (c *FakeOauthV1) OAuthAuthorizeTokens() v1.OAuthAuthorizeTokenInterface { - return &FakeOAuthAuthorizeTokens{c} + return newFakeOAuthAuthorizeTokens(c) } func (c *FakeOauthV1) OAuthClients() v1.OAuthClientInterface { - return &FakeOAuthClients{c} + return newFakeOAuthClients(c) } func (c *FakeOauthV1) OAuthClientAuthorizations() v1.OAuthClientAuthorizationInterface { - return &FakeOAuthClientAuthorizations{c} + return newFakeOAuthClientAuthorizations(c) } func (c *FakeOauthV1) UserOAuthAccessTokens() v1.UserOAuthAccessTokenInterface { - return &FakeUserOAuthAccessTokens{c} + return newFakeUserOAuthAccessTokens(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthaccesstoken.go b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthaccesstoken.go index 7a57e31274..96fbf3d966 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthaccesstoken.go +++ b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthaccesstoken.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/oauth/v1" oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoauthv1 "github.com/openshift/client-go/oauth/clientset/versioned/typed/oauth/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOAuthAccessTokens implements OAuthAccessTokenInterface -type FakeOAuthAccessTokens struct { +// fakeOAuthAccessTokens implements OAuthAccessTokenInterface +type fakeOAuthAccessTokens struct { + *gentype.FakeClientWithListAndApply[*v1.OAuthAccessToken, *v1.OAuthAccessTokenList, *oauthv1.OAuthAccessTokenApplyConfiguration] Fake *FakeOauthV1 } -var oauthaccesstokensResource = v1.SchemeGroupVersion.WithResource("oauthaccesstokens") - -var oauthaccesstokensKind = v1.SchemeGroupVersion.WithKind("OAuthAccessToken") - -// Get takes name of the oAuthAccessToken, and returns the corresponding oAuthAccessToken object, and an error if there is any. -func (c *FakeOAuthAccessTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OAuthAccessToken, err error) { - emptyResult := &v1.OAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(oauthaccesstokensResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAccessToken), err -} - -// List takes label and field selectors, and returns the list of OAuthAccessTokens that match those selectors. -func (c *FakeOAuthAccessTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OAuthAccessTokenList, err error) { - emptyResult := &v1.OAuthAccessTokenList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(oauthaccesstokensResource, oauthaccesstokensKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OAuthAccessTokenList{ListMeta: obj.(*v1.OAuthAccessTokenList).ListMeta} - for _, item := range obj.(*v1.OAuthAccessTokenList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oAuthAccessTokens. -func (c *FakeOAuthAccessTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(oauthaccesstokensResource, opts)) -} - -// Create takes the representation of a oAuthAccessToken and creates it. Returns the server's representation of the oAuthAccessToken, and an error, if there is any. -func (c *FakeOAuthAccessTokens) Create(ctx context.Context, oAuthAccessToken *v1.OAuthAccessToken, opts metav1.CreateOptions) (result *v1.OAuthAccessToken, err error) { - emptyResult := &v1.OAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(oauthaccesstokensResource, oAuthAccessToken, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAccessToken), err -} - -// Update takes the representation of a oAuthAccessToken and updates it. Returns the server's representation of the oAuthAccessToken, and an error, if there is any. -func (c *FakeOAuthAccessTokens) Update(ctx context.Context, oAuthAccessToken *v1.OAuthAccessToken, opts metav1.UpdateOptions) (result *v1.OAuthAccessToken, err error) { - emptyResult := &v1.OAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(oauthaccesstokensResource, oAuthAccessToken, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAccessToken), err -} - -// Delete takes name of the oAuthAccessToken and deletes it. Returns an error if one occurs. -func (c *FakeOAuthAccessTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(oauthaccesstokensResource, name, opts), &v1.OAuthAccessToken{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOAuthAccessTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(oauthaccesstokensResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OAuthAccessTokenList{}) - return err -} - -// Patch applies the patch and returns the patched oAuthAccessToken. -func (c *FakeOAuthAccessTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthAccessToken, err error) { - emptyResult := &v1.OAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthaccesstokensResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAccessToken), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oAuthAccessToken. -func (c *FakeOAuthAccessTokens) Apply(ctx context.Context, oAuthAccessToken *oauthv1.OAuthAccessTokenApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthAccessToken, err error) { - if oAuthAccessToken == nil { - return nil, fmt.Errorf("oAuthAccessToken provided to Apply must not be nil") - } - data, err := json.Marshal(oAuthAccessToken) - if err != nil { - return nil, err - } - name := oAuthAccessToken.Name - if name == nil { - return nil, fmt.Errorf("oAuthAccessToken.Name must be provided to Apply") - } - emptyResult := &v1.OAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthaccesstokensResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOAuthAccessTokens(fake *FakeOauthV1) typedoauthv1.OAuthAccessTokenInterface { + return &fakeOAuthAccessTokens{ + gentype.NewFakeClientWithListAndApply[*v1.OAuthAccessToken, *v1.OAuthAccessTokenList, *oauthv1.OAuthAccessTokenApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("oauthaccesstokens"), + v1.SchemeGroupVersion.WithKind("OAuthAccessToken"), + func() *v1.OAuthAccessToken { return &v1.OAuthAccessToken{} }, + func() *v1.OAuthAccessTokenList { return &v1.OAuthAccessTokenList{} }, + func(dst, src *v1.OAuthAccessTokenList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OAuthAccessTokenList) []*v1.OAuthAccessToken { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.OAuthAccessTokenList, items []*v1.OAuthAccessToken) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.OAuthAccessToken), err } diff --git a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthauthorizetoken.go b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthauthorizetoken.go index 47756e46c7..03f169c61f 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthauthorizetoken.go +++ b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthauthorizetoken.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/oauth/v1" oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoauthv1 "github.com/openshift/client-go/oauth/clientset/versioned/typed/oauth/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOAuthAuthorizeTokens implements OAuthAuthorizeTokenInterface -type FakeOAuthAuthorizeTokens struct { +// fakeOAuthAuthorizeTokens implements OAuthAuthorizeTokenInterface +type fakeOAuthAuthorizeTokens struct { + *gentype.FakeClientWithListAndApply[*v1.OAuthAuthorizeToken, *v1.OAuthAuthorizeTokenList, *oauthv1.OAuthAuthorizeTokenApplyConfiguration] Fake *FakeOauthV1 } -var oauthauthorizetokensResource = v1.SchemeGroupVersion.WithResource("oauthauthorizetokens") - -var oauthauthorizetokensKind = v1.SchemeGroupVersion.WithKind("OAuthAuthorizeToken") - -// Get takes name of the oAuthAuthorizeToken, and returns the corresponding oAuthAuthorizeToken object, and an error if there is any. -func (c *FakeOAuthAuthorizeTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OAuthAuthorizeToken, err error) { - emptyResult := &v1.OAuthAuthorizeToken{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(oauthauthorizetokensResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAuthorizeToken), err -} - -// List takes label and field selectors, and returns the list of OAuthAuthorizeTokens that match those selectors. -func (c *FakeOAuthAuthorizeTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OAuthAuthorizeTokenList, err error) { - emptyResult := &v1.OAuthAuthorizeTokenList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(oauthauthorizetokensResource, oauthauthorizetokensKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OAuthAuthorizeTokenList{ListMeta: obj.(*v1.OAuthAuthorizeTokenList).ListMeta} - for _, item := range obj.(*v1.OAuthAuthorizeTokenList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oAuthAuthorizeTokens. -func (c *FakeOAuthAuthorizeTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(oauthauthorizetokensResource, opts)) -} - -// Create takes the representation of a oAuthAuthorizeToken and creates it. Returns the server's representation of the oAuthAuthorizeToken, and an error, if there is any. -func (c *FakeOAuthAuthorizeTokens) Create(ctx context.Context, oAuthAuthorizeToken *v1.OAuthAuthorizeToken, opts metav1.CreateOptions) (result *v1.OAuthAuthorizeToken, err error) { - emptyResult := &v1.OAuthAuthorizeToken{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(oauthauthorizetokensResource, oAuthAuthorizeToken, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAuthorizeToken), err -} - -// Update takes the representation of a oAuthAuthorizeToken and updates it. Returns the server's representation of the oAuthAuthorizeToken, and an error, if there is any. -func (c *FakeOAuthAuthorizeTokens) Update(ctx context.Context, oAuthAuthorizeToken *v1.OAuthAuthorizeToken, opts metav1.UpdateOptions) (result *v1.OAuthAuthorizeToken, err error) { - emptyResult := &v1.OAuthAuthorizeToken{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(oauthauthorizetokensResource, oAuthAuthorizeToken, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAuthorizeToken), err -} - -// Delete takes name of the oAuthAuthorizeToken and deletes it. Returns an error if one occurs. -func (c *FakeOAuthAuthorizeTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(oauthauthorizetokensResource, name, opts), &v1.OAuthAuthorizeToken{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOAuthAuthorizeTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(oauthauthorizetokensResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OAuthAuthorizeTokenList{}) - return err -} - -// Patch applies the patch and returns the patched oAuthAuthorizeToken. -func (c *FakeOAuthAuthorizeTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthAuthorizeToken, err error) { - emptyResult := &v1.OAuthAuthorizeToken{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthauthorizetokensResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthAuthorizeToken), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oAuthAuthorizeToken. -func (c *FakeOAuthAuthorizeTokens) Apply(ctx context.Context, oAuthAuthorizeToken *oauthv1.OAuthAuthorizeTokenApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthAuthorizeToken, err error) { - if oAuthAuthorizeToken == nil { - return nil, fmt.Errorf("oAuthAuthorizeToken provided to Apply must not be nil") - } - data, err := json.Marshal(oAuthAuthorizeToken) - if err != nil { - return nil, err - } - name := oAuthAuthorizeToken.Name - if name == nil { - return nil, fmt.Errorf("oAuthAuthorizeToken.Name must be provided to Apply") - } - emptyResult := &v1.OAuthAuthorizeToken{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthauthorizetokensResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOAuthAuthorizeTokens(fake *FakeOauthV1) typedoauthv1.OAuthAuthorizeTokenInterface { + return &fakeOAuthAuthorizeTokens{ + gentype.NewFakeClientWithListAndApply[*v1.OAuthAuthorizeToken, *v1.OAuthAuthorizeTokenList, *oauthv1.OAuthAuthorizeTokenApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("oauthauthorizetokens"), + v1.SchemeGroupVersion.WithKind("OAuthAuthorizeToken"), + func() *v1.OAuthAuthorizeToken { return &v1.OAuthAuthorizeToken{} }, + func() *v1.OAuthAuthorizeTokenList { return &v1.OAuthAuthorizeTokenList{} }, + func(dst, src *v1.OAuthAuthorizeTokenList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OAuthAuthorizeTokenList) []*v1.OAuthAuthorizeToken { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.OAuthAuthorizeTokenList, items []*v1.OAuthAuthorizeToken) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.OAuthAuthorizeToken), err } diff --git a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclient.go b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclient.go index e6b7e8d2eb..215106e026 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclient.go +++ b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclient.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/oauth/v1" oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoauthv1 "github.com/openshift/client-go/oauth/clientset/versioned/typed/oauth/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOAuthClients implements OAuthClientInterface -type FakeOAuthClients struct { +// fakeOAuthClients implements OAuthClientInterface +type fakeOAuthClients struct { + *gentype.FakeClientWithListAndApply[*v1.OAuthClient, *v1.OAuthClientList, *oauthv1.OAuthClientApplyConfiguration] Fake *FakeOauthV1 } -var oauthclientsResource = v1.SchemeGroupVersion.WithResource("oauthclients") - -var oauthclientsKind = v1.SchemeGroupVersion.WithKind("OAuthClient") - -// Get takes name of the oAuthClient, and returns the corresponding oAuthClient object, and an error if there is any. -func (c *FakeOAuthClients) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OAuthClient, err error) { - emptyResult := &v1.OAuthClient{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(oauthclientsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClient), err -} - -// List takes label and field selectors, and returns the list of OAuthClients that match those selectors. -func (c *FakeOAuthClients) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OAuthClientList, err error) { - emptyResult := &v1.OAuthClientList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(oauthclientsResource, oauthclientsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OAuthClientList{ListMeta: obj.(*v1.OAuthClientList).ListMeta} - for _, item := range obj.(*v1.OAuthClientList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oAuthClients. -func (c *FakeOAuthClients) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(oauthclientsResource, opts)) -} - -// Create takes the representation of a oAuthClient and creates it. Returns the server's representation of the oAuthClient, and an error, if there is any. -func (c *FakeOAuthClients) Create(ctx context.Context, oAuthClient *v1.OAuthClient, opts metav1.CreateOptions) (result *v1.OAuthClient, err error) { - emptyResult := &v1.OAuthClient{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(oauthclientsResource, oAuthClient, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClient), err -} - -// Update takes the representation of a oAuthClient and updates it. Returns the server's representation of the oAuthClient, and an error, if there is any. -func (c *FakeOAuthClients) Update(ctx context.Context, oAuthClient *v1.OAuthClient, opts metav1.UpdateOptions) (result *v1.OAuthClient, err error) { - emptyResult := &v1.OAuthClient{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(oauthclientsResource, oAuthClient, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClient), err -} - -// Delete takes name of the oAuthClient and deletes it. Returns an error if one occurs. -func (c *FakeOAuthClients) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(oauthclientsResource, name, opts), &v1.OAuthClient{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOAuthClients) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(oauthclientsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OAuthClientList{}) - return err -} - -// Patch applies the patch and returns the patched oAuthClient. -func (c *FakeOAuthClients) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthClient, err error) { - emptyResult := &v1.OAuthClient{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthclientsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClient), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oAuthClient. -func (c *FakeOAuthClients) Apply(ctx context.Context, oAuthClient *oauthv1.OAuthClientApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthClient, err error) { - if oAuthClient == nil { - return nil, fmt.Errorf("oAuthClient provided to Apply must not be nil") - } - data, err := json.Marshal(oAuthClient) - if err != nil { - return nil, err - } - name := oAuthClient.Name - if name == nil { - return nil, fmt.Errorf("oAuthClient.Name must be provided to Apply") - } - emptyResult := &v1.OAuthClient{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthclientsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOAuthClients(fake *FakeOauthV1) typedoauthv1.OAuthClientInterface { + return &fakeOAuthClients{ + gentype.NewFakeClientWithListAndApply[*v1.OAuthClient, *v1.OAuthClientList, *oauthv1.OAuthClientApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("oauthclients"), + v1.SchemeGroupVersion.WithKind("OAuthClient"), + func() *v1.OAuthClient { return &v1.OAuthClient{} }, + func() *v1.OAuthClientList { return &v1.OAuthClientList{} }, + func(dst, src *v1.OAuthClientList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OAuthClientList) []*v1.OAuthClient { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.OAuthClientList, items []*v1.OAuthClient) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.OAuthClient), err } diff --git a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclientauthorization.go b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclientauthorization.go index 1d059fbd91..8c8f0c6f76 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclientauthorization.go +++ b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_oauthclientauthorization.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/oauth/v1" oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoauthv1 "github.com/openshift/client-go/oauth/clientset/versioned/typed/oauth/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOAuthClientAuthorizations implements OAuthClientAuthorizationInterface -type FakeOAuthClientAuthorizations struct { +// fakeOAuthClientAuthorizations implements OAuthClientAuthorizationInterface +type fakeOAuthClientAuthorizations struct { + *gentype.FakeClientWithListAndApply[*v1.OAuthClientAuthorization, *v1.OAuthClientAuthorizationList, *oauthv1.OAuthClientAuthorizationApplyConfiguration] Fake *FakeOauthV1 } -var oauthclientauthorizationsResource = v1.SchemeGroupVersion.WithResource("oauthclientauthorizations") - -var oauthclientauthorizationsKind = v1.SchemeGroupVersion.WithKind("OAuthClientAuthorization") - -// Get takes name of the oAuthClientAuthorization, and returns the corresponding oAuthClientAuthorization object, and an error if there is any. -func (c *FakeOAuthClientAuthorizations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OAuthClientAuthorization, err error) { - emptyResult := &v1.OAuthClientAuthorization{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(oauthclientauthorizationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClientAuthorization), err -} - -// List takes label and field selectors, and returns the list of OAuthClientAuthorizations that match those selectors. -func (c *FakeOAuthClientAuthorizations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OAuthClientAuthorizationList, err error) { - emptyResult := &v1.OAuthClientAuthorizationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(oauthclientauthorizationsResource, oauthclientauthorizationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OAuthClientAuthorizationList{ListMeta: obj.(*v1.OAuthClientAuthorizationList).ListMeta} - for _, item := range obj.(*v1.OAuthClientAuthorizationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oAuthClientAuthorizations. -func (c *FakeOAuthClientAuthorizations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(oauthclientauthorizationsResource, opts)) -} - -// Create takes the representation of a oAuthClientAuthorization and creates it. Returns the server's representation of the oAuthClientAuthorization, and an error, if there is any. -func (c *FakeOAuthClientAuthorizations) Create(ctx context.Context, oAuthClientAuthorization *v1.OAuthClientAuthorization, opts metav1.CreateOptions) (result *v1.OAuthClientAuthorization, err error) { - emptyResult := &v1.OAuthClientAuthorization{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(oauthclientauthorizationsResource, oAuthClientAuthorization, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClientAuthorization), err -} - -// Update takes the representation of a oAuthClientAuthorization and updates it. Returns the server's representation of the oAuthClientAuthorization, and an error, if there is any. -func (c *FakeOAuthClientAuthorizations) Update(ctx context.Context, oAuthClientAuthorization *v1.OAuthClientAuthorization, opts metav1.UpdateOptions) (result *v1.OAuthClientAuthorization, err error) { - emptyResult := &v1.OAuthClientAuthorization{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(oauthclientauthorizationsResource, oAuthClientAuthorization, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClientAuthorization), err -} - -// Delete takes name of the oAuthClientAuthorization and deletes it. Returns an error if one occurs. -func (c *FakeOAuthClientAuthorizations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(oauthclientauthorizationsResource, name, opts), &v1.OAuthClientAuthorization{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOAuthClientAuthorizations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(oauthclientauthorizationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OAuthClientAuthorizationList{}) - return err -} - -// Patch applies the patch and returns the patched oAuthClientAuthorization. -func (c *FakeOAuthClientAuthorizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthClientAuthorization, err error) { - emptyResult := &v1.OAuthClientAuthorization{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthclientauthorizationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OAuthClientAuthorization), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oAuthClientAuthorization. -func (c *FakeOAuthClientAuthorizations) Apply(ctx context.Context, oAuthClientAuthorization *oauthv1.OAuthClientAuthorizationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthClientAuthorization, err error) { - if oAuthClientAuthorization == nil { - return nil, fmt.Errorf("oAuthClientAuthorization provided to Apply must not be nil") - } - data, err := json.Marshal(oAuthClientAuthorization) - if err != nil { - return nil, err - } - name := oAuthClientAuthorization.Name - if name == nil { - return nil, fmt.Errorf("oAuthClientAuthorization.Name must be provided to Apply") - } - emptyResult := &v1.OAuthClientAuthorization{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(oauthclientauthorizationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOAuthClientAuthorizations(fake *FakeOauthV1) typedoauthv1.OAuthClientAuthorizationInterface { + return &fakeOAuthClientAuthorizations{ + gentype.NewFakeClientWithListAndApply[*v1.OAuthClientAuthorization, *v1.OAuthClientAuthorizationList, *oauthv1.OAuthClientAuthorizationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("oauthclientauthorizations"), + v1.SchemeGroupVersion.WithKind("OAuthClientAuthorization"), + func() *v1.OAuthClientAuthorization { return &v1.OAuthClientAuthorization{} }, + func() *v1.OAuthClientAuthorizationList { return &v1.OAuthClientAuthorizationList{} }, + func(dst, src *v1.OAuthClientAuthorizationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OAuthClientAuthorizationList) []*v1.OAuthClientAuthorization { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.OAuthClientAuthorizationList, items []*v1.OAuthClientAuthorization) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.OAuthClientAuthorization), err } diff --git a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_useroauthaccesstoken.go b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_useroauthaccesstoken.go index 8252e60412..f7cfe5318e 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/fake/fake_useroauthaccesstoken.go +++ b/oauth/clientset/versioned/typed/oauth/v1/fake/fake_useroauthaccesstoken.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/oauth/v1" oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoauthv1 "github.com/openshift/client-go/oauth/clientset/versioned/typed/oauth/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeUserOAuthAccessTokens implements UserOAuthAccessTokenInterface -type FakeUserOAuthAccessTokens struct { +// fakeUserOAuthAccessTokens implements UserOAuthAccessTokenInterface +type fakeUserOAuthAccessTokens struct { + *gentype.FakeClientWithListAndApply[*v1.UserOAuthAccessToken, *v1.UserOAuthAccessTokenList, *oauthv1.UserOAuthAccessTokenApplyConfiguration] Fake *FakeOauthV1 } -var useroauthaccesstokensResource = v1.SchemeGroupVersion.WithResource("useroauthaccesstokens") - -var useroauthaccesstokensKind = v1.SchemeGroupVersion.WithKind("UserOAuthAccessToken") - -// Get takes name of the userOAuthAccessToken, and returns the corresponding userOAuthAccessToken object, and an error if there is any. -func (c *FakeUserOAuthAccessTokens) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.UserOAuthAccessToken, err error) { - emptyResult := &v1.UserOAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(useroauthaccesstokensResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.UserOAuthAccessToken), err -} - -// List takes label and field selectors, and returns the list of UserOAuthAccessTokens that match those selectors. -func (c *FakeUserOAuthAccessTokens) List(ctx context.Context, opts metav1.ListOptions) (result *v1.UserOAuthAccessTokenList, err error) { - emptyResult := &v1.UserOAuthAccessTokenList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(useroauthaccesstokensResource, useroauthaccesstokensKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.UserOAuthAccessTokenList{ListMeta: obj.(*v1.UserOAuthAccessTokenList).ListMeta} - for _, item := range obj.(*v1.UserOAuthAccessTokenList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested userOAuthAccessTokens. -func (c *FakeUserOAuthAccessTokens) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(useroauthaccesstokensResource, opts)) -} - -// Create takes the representation of a userOAuthAccessToken and creates it. Returns the server's representation of the userOAuthAccessToken, and an error, if there is any. -func (c *FakeUserOAuthAccessTokens) Create(ctx context.Context, userOAuthAccessToken *v1.UserOAuthAccessToken, opts metav1.CreateOptions) (result *v1.UserOAuthAccessToken, err error) { - emptyResult := &v1.UserOAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(useroauthaccesstokensResource, userOAuthAccessToken, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.UserOAuthAccessToken), err -} - -// Update takes the representation of a userOAuthAccessToken and updates it. Returns the server's representation of the userOAuthAccessToken, and an error, if there is any. -func (c *FakeUserOAuthAccessTokens) Update(ctx context.Context, userOAuthAccessToken *v1.UserOAuthAccessToken, opts metav1.UpdateOptions) (result *v1.UserOAuthAccessToken, err error) { - emptyResult := &v1.UserOAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(useroauthaccesstokensResource, userOAuthAccessToken, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.UserOAuthAccessToken), err -} - -// Delete takes name of the userOAuthAccessToken and deletes it. Returns an error if one occurs. -func (c *FakeUserOAuthAccessTokens) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(useroauthaccesstokensResource, name, opts), &v1.UserOAuthAccessToken{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeUserOAuthAccessTokens) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(useroauthaccesstokensResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.UserOAuthAccessTokenList{}) - return err -} - -// Patch applies the patch and returns the patched userOAuthAccessToken. -func (c *FakeUserOAuthAccessTokens) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.UserOAuthAccessToken, err error) { - emptyResult := &v1.UserOAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(useroauthaccesstokensResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.UserOAuthAccessToken), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied userOAuthAccessToken. -func (c *FakeUserOAuthAccessTokens) Apply(ctx context.Context, userOAuthAccessToken *oauthv1.UserOAuthAccessTokenApplyConfiguration, opts metav1.ApplyOptions) (result *v1.UserOAuthAccessToken, err error) { - if userOAuthAccessToken == nil { - return nil, fmt.Errorf("userOAuthAccessToken provided to Apply must not be nil") - } - data, err := json.Marshal(userOAuthAccessToken) - if err != nil { - return nil, err - } - name := userOAuthAccessToken.Name - if name == nil { - return nil, fmt.Errorf("userOAuthAccessToken.Name must be provided to Apply") - } - emptyResult := &v1.UserOAuthAccessToken{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(useroauthaccesstokensResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeUserOAuthAccessTokens(fake *FakeOauthV1) typedoauthv1.UserOAuthAccessTokenInterface { + return &fakeUserOAuthAccessTokens{ + gentype.NewFakeClientWithListAndApply[*v1.UserOAuthAccessToken, *v1.UserOAuthAccessTokenList, *oauthv1.UserOAuthAccessTokenApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("useroauthaccesstokens"), + v1.SchemeGroupVersion.WithKind("UserOAuthAccessToken"), + func() *v1.UserOAuthAccessToken { return &v1.UserOAuthAccessToken{} }, + func() *v1.UserOAuthAccessTokenList { return &v1.UserOAuthAccessTokenList{} }, + func(dst, src *v1.UserOAuthAccessTokenList) { dst.ListMeta = src.ListMeta }, + func(list *v1.UserOAuthAccessTokenList) []*v1.UserOAuthAccessToken { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.UserOAuthAccessTokenList, items []*v1.UserOAuthAccessToken) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.UserOAuthAccessToken), err } diff --git a/oauth/clientset/versioned/typed/oauth/v1/oauth_client.go b/oauth/clientset/versioned/typed/oauth/v1/oauth_client.go index d1cf61f990..d666ada2c1 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/oauth_client.go +++ b/oauth/clientset/versioned/typed/oauth/v1/oauth_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/oauth/v1" - "github.com/openshift/client-go/oauth/clientset/versioned/scheme" + oauthv1 "github.com/openshift/api/oauth/v1" + scheme "github.com/openshift/client-go/oauth/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -89,10 +89,10 @@ func New(c rest.Interface) *OauthV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := oauthv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/oauth/clientset/versioned/typed/oauth/v1/oauthaccesstoken.go b/oauth/clientset/versioned/typed/oauth/v1/oauthaccesstoken.go index a59621de5f..f80b391c2f 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/oauthaccesstoken.go +++ b/oauth/clientset/versioned/typed/oauth/v1/oauthaccesstoken.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/oauth/v1" - oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" + oauthv1 "github.com/openshift/api/oauth/v1" + applyconfigurationsoauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" scheme "github.com/openshift/client-go/oauth/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type OAuthAccessTokensGetter interface { // OAuthAccessTokenInterface has methods to work with OAuthAccessToken resources. type OAuthAccessTokenInterface interface { - Create(ctx context.Context, oAuthAccessToken *v1.OAuthAccessToken, opts metav1.CreateOptions) (*v1.OAuthAccessToken, error) - Update(ctx context.Context, oAuthAccessToken *v1.OAuthAccessToken, opts metav1.UpdateOptions) (*v1.OAuthAccessToken, error) + Create(ctx context.Context, oAuthAccessToken *oauthv1.OAuthAccessToken, opts metav1.CreateOptions) (*oauthv1.OAuthAccessToken, error) + Update(ctx context.Context, oAuthAccessToken *oauthv1.OAuthAccessToken, opts metav1.UpdateOptions) (*oauthv1.OAuthAccessToken, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OAuthAccessToken, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OAuthAccessTokenList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*oauthv1.OAuthAccessToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*oauthv1.OAuthAccessTokenList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthAccessToken, err error) - Apply(ctx context.Context, oAuthAccessToken *oauthv1.OAuthAccessTokenApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthAccessToken, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *oauthv1.OAuthAccessToken, err error) + Apply(ctx context.Context, oAuthAccessToken *applyconfigurationsoauthv1.OAuthAccessTokenApplyConfiguration, opts metav1.ApplyOptions) (result *oauthv1.OAuthAccessToken, err error) OAuthAccessTokenExpansion } // oAuthAccessTokens implements OAuthAccessTokenInterface type oAuthAccessTokens struct { - *gentype.ClientWithListAndApply[*v1.OAuthAccessToken, *v1.OAuthAccessTokenList, *oauthv1.OAuthAccessTokenApplyConfiguration] + *gentype.ClientWithListAndApply[*oauthv1.OAuthAccessToken, *oauthv1.OAuthAccessTokenList, *applyconfigurationsoauthv1.OAuthAccessTokenApplyConfiguration] } // newOAuthAccessTokens returns a OAuthAccessTokens func newOAuthAccessTokens(c *OauthV1Client) *oAuthAccessTokens { return &oAuthAccessTokens{ - gentype.NewClientWithListAndApply[*v1.OAuthAccessToken, *v1.OAuthAccessTokenList, *oauthv1.OAuthAccessTokenApplyConfiguration]( + gentype.NewClientWithListAndApply[*oauthv1.OAuthAccessToken, *oauthv1.OAuthAccessTokenList, *applyconfigurationsoauthv1.OAuthAccessTokenApplyConfiguration]( "oauthaccesstokens", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OAuthAccessToken { return &v1.OAuthAccessToken{} }, - func() *v1.OAuthAccessTokenList { return &v1.OAuthAccessTokenList{} }), + func() *oauthv1.OAuthAccessToken { return &oauthv1.OAuthAccessToken{} }, + func() *oauthv1.OAuthAccessTokenList { return &oauthv1.OAuthAccessTokenList{} }, + ), } } diff --git a/oauth/clientset/versioned/typed/oauth/v1/oauthauthorizetoken.go b/oauth/clientset/versioned/typed/oauth/v1/oauthauthorizetoken.go index 472c13c69e..cf4b67ee3a 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/oauthauthorizetoken.go +++ b/oauth/clientset/versioned/typed/oauth/v1/oauthauthorizetoken.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/oauth/v1" - oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" + oauthv1 "github.com/openshift/api/oauth/v1" + applyconfigurationsoauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" scheme "github.com/openshift/client-go/oauth/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type OAuthAuthorizeTokensGetter interface { // OAuthAuthorizeTokenInterface has methods to work with OAuthAuthorizeToken resources. type OAuthAuthorizeTokenInterface interface { - Create(ctx context.Context, oAuthAuthorizeToken *v1.OAuthAuthorizeToken, opts metav1.CreateOptions) (*v1.OAuthAuthorizeToken, error) - Update(ctx context.Context, oAuthAuthorizeToken *v1.OAuthAuthorizeToken, opts metav1.UpdateOptions) (*v1.OAuthAuthorizeToken, error) + Create(ctx context.Context, oAuthAuthorizeToken *oauthv1.OAuthAuthorizeToken, opts metav1.CreateOptions) (*oauthv1.OAuthAuthorizeToken, error) + Update(ctx context.Context, oAuthAuthorizeToken *oauthv1.OAuthAuthorizeToken, opts metav1.UpdateOptions) (*oauthv1.OAuthAuthorizeToken, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OAuthAuthorizeToken, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OAuthAuthorizeTokenList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*oauthv1.OAuthAuthorizeToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*oauthv1.OAuthAuthorizeTokenList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthAuthorizeToken, err error) - Apply(ctx context.Context, oAuthAuthorizeToken *oauthv1.OAuthAuthorizeTokenApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthAuthorizeToken, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *oauthv1.OAuthAuthorizeToken, err error) + Apply(ctx context.Context, oAuthAuthorizeToken *applyconfigurationsoauthv1.OAuthAuthorizeTokenApplyConfiguration, opts metav1.ApplyOptions) (result *oauthv1.OAuthAuthorizeToken, err error) OAuthAuthorizeTokenExpansion } // oAuthAuthorizeTokens implements OAuthAuthorizeTokenInterface type oAuthAuthorizeTokens struct { - *gentype.ClientWithListAndApply[*v1.OAuthAuthorizeToken, *v1.OAuthAuthorizeTokenList, *oauthv1.OAuthAuthorizeTokenApplyConfiguration] + *gentype.ClientWithListAndApply[*oauthv1.OAuthAuthorizeToken, *oauthv1.OAuthAuthorizeTokenList, *applyconfigurationsoauthv1.OAuthAuthorizeTokenApplyConfiguration] } // newOAuthAuthorizeTokens returns a OAuthAuthorizeTokens func newOAuthAuthorizeTokens(c *OauthV1Client) *oAuthAuthorizeTokens { return &oAuthAuthorizeTokens{ - gentype.NewClientWithListAndApply[*v1.OAuthAuthorizeToken, *v1.OAuthAuthorizeTokenList, *oauthv1.OAuthAuthorizeTokenApplyConfiguration]( + gentype.NewClientWithListAndApply[*oauthv1.OAuthAuthorizeToken, *oauthv1.OAuthAuthorizeTokenList, *applyconfigurationsoauthv1.OAuthAuthorizeTokenApplyConfiguration]( "oauthauthorizetokens", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OAuthAuthorizeToken { return &v1.OAuthAuthorizeToken{} }, - func() *v1.OAuthAuthorizeTokenList { return &v1.OAuthAuthorizeTokenList{} }), + func() *oauthv1.OAuthAuthorizeToken { return &oauthv1.OAuthAuthorizeToken{} }, + func() *oauthv1.OAuthAuthorizeTokenList { return &oauthv1.OAuthAuthorizeTokenList{} }, + ), } } diff --git a/oauth/clientset/versioned/typed/oauth/v1/oauthclient.go b/oauth/clientset/versioned/typed/oauth/v1/oauthclient.go index be48f7e565..c239a63382 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/oauthclient.go +++ b/oauth/clientset/versioned/typed/oauth/v1/oauthclient.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/oauth/v1" - oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" + oauthv1 "github.com/openshift/api/oauth/v1" + applyconfigurationsoauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" scheme "github.com/openshift/client-go/oauth/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type OAuthClientsGetter interface { // OAuthClientInterface has methods to work with OAuthClient resources. type OAuthClientInterface interface { - Create(ctx context.Context, oAuthClient *v1.OAuthClient, opts metav1.CreateOptions) (*v1.OAuthClient, error) - Update(ctx context.Context, oAuthClient *v1.OAuthClient, opts metav1.UpdateOptions) (*v1.OAuthClient, error) + Create(ctx context.Context, oAuthClient *oauthv1.OAuthClient, opts metav1.CreateOptions) (*oauthv1.OAuthClient, error) + Update(ctx context.Context, oAuthClient *oauthv1.OAuthClient, opts metav1.UpdateOptions) (*oauthv1.OAuthClient, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OAuthClient, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OAuthClientList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*oauthv1.OAuthClient, error) + List(ctx context.Context, opts metav1.ListOptions) (*oauthv1.OAuthClientList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthClient, err error) - Apply(ctx context.Context, oAuthClient *oauthv1.OAuthClientApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthClient, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *oauthv1.OAuthClient, err error) + Apply(ctx context.Context, oAuthClient *applyconfigurationsoauthv1.OAuthClientApplyConfiguration, opts metav1.ApplyOptions) (result *oauthv1.OAuthClient, err error) OAuthClientExpansion } // oAuthClients implements OAuthClientInterface type oAuthClients struct { - *gentype.ClientWithListAndApply[*v1.OAuthClient, *v1.OAuthClientList, *oauthv1.OAuthClientApplyConfiguration] + *gentype.ClientWithListAndApply[*oauthv1.OAuthClient, *oauthv1.OAuthClientList, *applyconfigurationsoauthv1.OAuthClientApplyConfiguration] } // newOAuthClients returns a OAuthClients func newOAuthClients(c *OauthV1Client) *oAuthClients { return &oAuthClients{ - gentype.NewClientWithListAndApply[*v1.OAuthClient, *v1.OAuthClientList, *oauthv1.OAuthClientApplyConfiguration]( + gentype.NewClientWithListAndApply[*oauthv1.OAuthClient, *oauthv1.OAuthClientList, *applyconfigurationsoauthv1.OAuthClientApplyConfiguration]( "oauthclients", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OAuthClient { return &v1.OAuthClient{} }, - func() *v1.OAuthClientList { return &v1.OAuthClientList{} }), + func() *oauthv1.OAuthClient { return &oauthv1.OAuthClient{} }, + func() *oauthv1.OAuthClientList { return &oauthv1.OAuthClientList{} }, + ), } } diff --git a/oauth/clientset/versioned/typed/oauth/v1/oauthclientauthorization.go b/oauth/clientset/versioned/typed/oauth/v1/oauthclientauthorization.go index 63e09a3e3a..d140bc8d9e 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/oauthclientauthorization.go +++ b/oauth/clientset/versioned/typed/oauth/v1/oauthclientauthorization.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/oauth/v1" - oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" + oauthv1 "github.com/openshift/api/oauth/v1" + applyconfigurationsoauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" scheme "github.com/openshift/client-go/oauth/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type OAuthClientAuthorizationsGetter interface { // OAuthClientAuthorizationInterface has methods to work with OAuthClientAuthorization resources. type OAuthClientAuthorizationInterface interface { - Create(ctx context.Context, oAuthClientAuthorization *v1.OAuthClientAuthorization, opts metav1.CreateOptions) (*v1.OAuthClientAuthorization, error) - Update(ctx context.Context, oAuthClientAuthorization *v1.OAuthClientAuthorization, opts metav1.UpdateOptions) (*v1.OAuthClientAuthorization, error) + Create(ctx context.Context, oAuthClientAuthorization *oauthv1.OAuthClientAuthorization, opts metav1.CreateOptions) (*oauthv1.OAuthClientAuthorization, error) + Update(ctx context.Context, oAuthClientAuthorization *oauthv1.OAuthClientAuthorization, opts metav1.UpdateOptions) (*oauthv1.OAuthClientAuthorization, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OAuthClientAuthorization, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OAuthClientAuthorizationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*oauthv1.OAuthClientAuthorization, error) + List(ctx context.Context, opts metav1.ListOptions) (*oauthv1.OAuthClientAuthorizationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OAuthClientAuthorization, err error) - Apply(ctx context.Context, oAuthClientAuthorization *oauthv1.OAuthClientAuthorizationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OAuthClientAuthorization, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *oauthv1.OAuthClientAuthorization, err error) + Apply(ctx context.Context, oAuthClientAuthorization *applyconfigurationsoauthv1.OAuthClientAuthorizationApplyConfiguration, opts metav1.ApplyOptions) (result *oauthv1.OAuthClientAuthorization, err error) OAuthClientAuthorizationExpansion } // oAuthClientAuthorizations implements OAuthClientAuthorizationInterface type oAuthClientAuthorizations struct { - *gentype.ClientWithListAndApply[*v1.OAuthClientAuthorization, *v1.OAuthClientAuthorizationList, *oauthv1.OAuthClientAuthorizationApplyConfiguration] + *gentype.ClientWithListAndApply[*oauthv1.OAuthClientAuthorization, *oauthv1.OAuthClientAuthorizationList, *applyconfigurationsoauthv1.OAuthClientAuthorizationApplyConfiguration] } // newOAuthClientAuthorizations returns a OAuthClientAuthorizations func newOAuthClientAuthorizations(c *OauthV1Client) *oAuthClientAuthorizations { return &oAuthClientAuthorizations{ - gentype.NewClientWithListAndApply[*v1.OAuthClientAuthorization, *v1.OAuthClientAuthorizationList, *oauthv1.OAuthClientAuthorizationApplyConfiguration]( + gentype.NewClientWithListAndApply[*oauthv1.OAuthClientAuthorization, *oauthv1.OAuthClientAuthorizationList, *applyconfigurationsoauthv1.OAuthClientAuthorizationApplyConfiguration]( "oauthclientauthorizations", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OAuthClientAuthorization { return &v1.OAuthClientAuthorization{} }, - func() *v1.OAuthClientAuthorizationList { return &v1.OAuthClientAuthorizationList{} }), + func() *oauthv1.OAuthClientAuthorization { return &oauthv1.OAuthClientAuthorization{} }, + func() *oauthv1.OAuthClientAuthorizationList { return &oauthv1.OAuthClientAuthorizationList{} }, + ), } } diff --git a/oauth/clientset/versioned/typed/oauth/v1/useroauthaccesstoken.go b/oauth/clientset/versioned/typed/oauth/v1/useroauthaccesstoken.go index 1dc34c939b..6e632afb59 100644 --- a/oauth/clientset/versioned/typed/oauth/v1/useroauthaccesstoken.go +++ b/oauth/clientset/versioned/typed/oauth/v1/useroauthaccesstoken.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/oauth/v1" - oauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" + oauthv1 "github.com/openshift/api/oauth/v1" + applyconfigurationsoauthv1 "github.com/openshift/client-go/oauth/applyconfigurations/oauth/v1" scheme "github.com/openshift/client-go/oauth/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type UserOAuthAccessTokensGetter interface { // UserOAuthAccessTokenInterface has methods to work with UserOAuthAccessToken resources. type UserOAuthAccessTokenInterface interface { - Create(ctx context.Context, userOAuthAccessToken *v1.UserOAuthAccessToken, opts metav1.CreateOptions) (*v1.UserOAuthAccessToken, error) - Update(ctx context.Context, userOAuthAccessToken *v1.UserOAuthAccessToken, opts metav1.UpdateOptions) (*v1.UserOAuthAccessToken, error) + Create(ctx context.Context, userOAuthAccessToken *oauthv1.UserOAuthAccessToken, opts metav1.CreateOptions) (*oauthv1.UserOAuthAccessToken, error) + Update(ctx context.Context, userOAuthAccessToken *oauthv1.UserOAuthAccessToken, opts metav1.UpdateOptions) (*oauthv1.UserOAuthAccessToken, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.UserOAuthAccessToken, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.UserOAuthAccessTokenList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*oauthv1.UserOAuthAccessToken, error) + List(ctx context.Context, opts metav1.ListOptions) (*oauthv1.UserOAuthAccessTokenList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.UserOAuthAccessToken, err error) - Apply(ctx context.Context, userOAuthAccessToken *oauthv1.UserOAuthAccessTokenApplyConfiguration, opts metav1.ApplyOptions) (result *v1.UserOAuthAccessToken, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *oauthv1.UserOAuthAccessToken, err error) + Apply(ctx context.Context, userOAuthAccessToken *applyconfigurationsoauthv1.UserOAuthAccessTokenApplyConfiguration, opts metav1.ApplyOptions) (result *oauthv1.UserOAuthAccessToken, err error) UserOAuthAccessTokenExpansion } // userOAuthAccessTokens implements UserOAuthAccessTokenInterface type userOAuthAccessTokens struct { - *gentype.ClientWithListAndApply[*v1.UserOAuthAccessToken, *v1.UserOAuthAccessTokenList, *oauthv1.UserOAuthAccessTokenApplyConfiguration] + *gentype.ClientWithListAndApply[*oauthv1.UserOAuthAccessToken, *oauthv1.UserOAuthAccessTokenList, *applyconfigurationsoauthv1.UserOAuthAccessTokenApplyConfiguration] } // newUserOAuthAccessTokens returns a UserOAuthAccessTokens func newUserOAuthAccessTokens(c *OauthV1Client) *userOAuthAccessTokens { return &userOAuthAccessTokens{ - gentype.NewClientWithListAndApply[*v1.UserOAuthAccessToken, *v1.UserOAuthAccessTokenList, *oauthv1.UserOAuthAccessTokenApplyConfiguration]( + gentype.NewClientWithListAndApply[*oauthv1.UserOAuthAccessToken, *oauthv1.UserOAuthAccessTokenList, *applyconfigurationsoauthv1.UserOAuthAccessTokenApplyConfiguration]( "useroauthaccesstokens", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.UserOAuthAccessToken { return &v1.UserOAuthAccessToken{} }, - func() *v1.UserOAuthAccessTokenList { return &v1.UserOAuthAccessTokenList{} }), + func() *oauthv1.UserOAuthAccessToken { return &oauthv1.UserOAuthAccessToken{} }, + func() *oauthv1.UserOAuthAccessTokenList { return &oauthv1.UserOAuthAccessTokenList{} }, + ), } } diff --git a/oauth/informers/externalversions/generic.go b/oauth/informers/externalversions/generic.go index 1b9fc07806..f8a351c430 100644 --- a/oauth/informers/externalversions/generic.go +++ b/oauth/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/oauth/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/oauth/informers/externalversions/oauth/v1/oauthaccesstoken.go b/oauth/informers/externalversions/oauth/v1/oauthaccesstoken.go index 35c1b59b26..d2bfda827c 100644 --- a/oauth/informers/externalversions/oauth/v1/oauthaccesstoken.go +++ b/oauth/informers/externalversions/oauth/v1/oauthaccesstoken.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - oauthv1 "github.com/openshift/api/oauth/v1" + apioauthv1 "github.com/openshift/api/oauth/v1" versioned "github.com/openshift/client-go/oauth/clientset/versioned" internalinterfaces "github.com/openshift/client-go/oauth/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/oauth/listers/oauth/v1" + oauthv1 "github.com/openshift/client-go/oauth/listers/oauth/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OAuthAccessTokens. type OAuthAccessTokenInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OAuthAccessTokenLister + Lister() oauthv1.OAuthAccessTokenLister } type oAuthAccessTokenInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOAuthAccessTokenInformer(client versioned.Interface, resyncPerio return client.OauthV1().OAuthAccessTokens().Watch(context.TODO(), options) }, }, - &oauthv1.OAuthAccessToken{}, + &apioauthv1.OAuthAccessToken{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oAuthAccessTokenInformer) defaultInformer(client versioned.Interface, r } func (f *oAuthAccessTokenInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1.OAuthAccessToken{}, f.defaultInformer) + return f.factory.InformerFor(&apioauthv1.OAuthAccessToken{}, f.defaultInformer) } -func (f *oAuthAccessTokenInformer) Lister() v1.OAuthAccessTokenLister { - return v1.NewOAuthAccessTokenLister(f.Informer().GetIndexer()) +func (f *oAuthAccessTokenInformer) Lister() oauthv1.OAuthAccessTokenLister { + return oauthv1.NewOAuthAccessTokenLister(f.Informer().GetIndexer()) } diff --git a/oauth/informers/externalversions/oauth/v1/oauthauthorizetoken.go b/oauth/informers/externalversions/oauth/v1/oauthauthorizetoken.go index 1c9ff0946a..f555a541e7 100644 --- a/oauth/informers/externalversions/oauth/v1/oauthauthorizetoken.go +++ b/oauth/informers/externalversions/oauth/v1/oauthauthorizetoken.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - oauthv1 "github.com/openshift/api/oauth/v1" + apioauthv1 "github.com/openshift/api/oauth/v1" versioned "github.com/openshift/client-go/oauth/clientset/versioned" internalinterfaces "github.com/openshift/client-go/oauth/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/oauth/listers/oauth/v1" + oauthv1 "github.com/openshift/client-go/oauth/listers/oauth/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OAuthAuthorizeTokens. type OAuthAuthorizeTokenInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OAuthAuthorizeTokenLister + Lister() oauthv1.OAuthAuthorizeTokenLister } type oAuthAuthorizeTokenInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOAuthAuthorizeTokenInformer(client versioned.Interface, resyncPe return client.OauthV1().OAuthAuthorizeTokens().Watch(context.TODO(), options) }, }, - &oauthv1.OAuthAuthorizeToken{}, + &apioauthv1.OAuthAuthorizeToken{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oAuthAuthorizeTokenInformer) defaultInformer(client versioned.Interface } func (f *oAuthAuthorizeTokenInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1.OAuthAuthorizeToken{}, f.defaultInformer) + return f.factory.InformerFor(&apioauthv1.OAuthAuthorizeToken{}, f.defaultInformer) } -func (f *oAuthAuthorizeTokenInformer) Lister() v1.OAuthAuthorizeTokenLister { - return v1.NewOAuthAuthorizeTokenLister(f.Informer().GetIndexer()) +func (f *oAuthAuthorizeTokenInformer) Lister() oauthv1.OAuthAuthorizeTokenLister { + return oauthv1.NewOAuthAuthorizeTokenLister(f.Informer().GetIndexer()) } diff --git a/oauth/informers/externalversions/oauth/v1/oauthclient.go b/oauth/informers/externalversions/oauth/v1/oauthclient.go index 58cf1f786b..488fa28b90 100644 --- a/oauth/informers/externalversions/oauth/v1/oauthclient.go +++ b/oauth/informers/externalversions/oauth/v1/oauthclient.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - oauthv1 "github.com/openshift/api/oauth/v1" + apioauthv1 "github.com/openshift/api/oauth/v1" versioned "github.com/openshift/client-go/oauth/clientset/versioned" internalinterfaces "github.com/openshift/client-go/oauth/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/oauth/listers/oauth/v1" + oauthv1 "github.com/openshift/client-go/oauth/listers/oauth/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OAuthClients. type OAuthClientInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OAuthClientLister + Lister() oauthv1.OAuthClientLister } type oAuthClientInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOAuthClientInformer(client versioned.Interface, resyncPeriod tim return client.OauthV1().OAuthClients().Watch(context.TODO(), options) }, }, - &oauthv1.OAuthClient{}, + &apioauthv1.OAuthClient{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oAuthClientInformer) defaultInformer(client versioned.Interface, resync } func (f *oAuthClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1.OAuthClient{}, f.defaultInformer) + return f.factory.InformerFor(&apioauthv1.OAuthClient{}, f.defaultInformer) } -func (f *oAuthClientInformer) Lister() v1.OAuthClientLister { - return v1.NewOAuthClientLister(f.Informer().GetIndexer()) +func (f *oAuthClientInformer) Lister() oauthv1.OAuthClientLister { + return oauthv1.NewOAuthClientLister(f.Informer().GetIndexer()) } diff --git a/oauth/informers/externalversions/oauth/v1/oauthclientauthorization.go b/oauth/informers/externalversions/oauth/v1/oauthclientauthorization.go index df8f93d4f1..810b909f69 100644 --- a/oauth/informers/externalversions/oauth/v1/oauthclientauthorization.go +++ b/oauth/informers/externalversions/oauth/v1/oauthclientauthorization.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - oauthv1 "github.com/openshift/api/oauth/v1" + apioauthv1 "github.com/openshift/api/oauth/v1" versioned "github.com/openshift/client-go/oauth/clientset/versioned" internalinterfaces "github.com/openshift/client-go/oauth/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/oauth/listers/oauth/v1" + oauthv1 "github.com/openshift/client-go/oauth/listers/oauth/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OAuthClientAuthorizations. type OAuthClientAuthorizationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OAuthClientAuthorizationLister + Lister() oauthv1.OAuthClientAuthorizationLister } type oAuthClientAuthorizationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOAuthClientAuthorizationInformer(client versioned.Interface, res return client.OauthV1().OAuthClientAuthorizations().Watch(context.TODO(), options) }, }, - &oauthv1.OAuthClientAuthorization{}, + &apioauthv1.OAuthClientAuthorization{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oAuthClientAuthorizationInformer) defaultInformer(client versioned.Inte } func (f *oAuthClientAuthorizationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1.OAuthClientAuthorization{}, f.defaultInformer) + return f.factory.InformerFor(&apioauthv1.OAuthClientAuthorization{}, f.defaultInformer) } -func (f *oAuthClientAuthorizationInformer) Lister() v1.OAuthClientAuthorizationLister { - return v1.NewOAuthClientAuthorizationLister(f.Informer().GetIndexer()) +func (f *oAuthClientAuthorizationInformer) Lister() oauthv1.OAuthClientAuthorizationLister { + return oauthv1.NewOAuthClientAuthorizationLister(f.Informer().GetIndexer()) } diff --git a/oauth/informers/externalversions/oauth/v1/useroauthaccesstoken.go b/oauth/informers/externalversions/oauth/v1/useroauthaccesstoken.go index e146fb4728..3190f199a1 100644 --- a/oauth/informers/externalversions/oauth/v1/useroauthaccesstoken.go +++ b/oauth/informers/externalversions/oauth/v1/useroauthaccesstoken.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - oauthv1 "github.com/openshift/api/oauth/v1" + apioauthv1 "github.com/openshift/api/oauth/v1" versioned "github.com/openshift/client-go/oauth/clientset/versioned" internalinterfaces "github.com/openshift/client-go/oauth/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/oauth/listers/oauth/v1" + oauthv1 "github.com/openshift/client-go/oauth/listers/oauth/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // UserOAuthAccessTokens. type UserOAuthAccessTokenInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.UserOAuthAccessTokenLister + Lister() oauthv1.UserOAuthAccessTokenLister } type userOAuthAccessTokenInformer struct { @@ -54,7 +54,7 @@ func NewFilteredUserOAuthAccessTokenInformer(client versioned.Interface, resyncP return client.OauthV1().UserOAuthAccessTokens().Watch(context.TODO(), options) }, }, - &oauthv1.UserOAuthAccessToken{}, + &apioauthv1.UserOAuthAccessToken{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *userOAuthAccessTokenInformer) defaultInformer(client versioned.Interfac } func (f *userOAuthAccessTokenInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1.UserOAuthAccessToken{}, f.defaultInformer) + return f.factory.InformerFor(&apioauthv1.UserOAuthAccessToken{}, f.defaultInformer) } -func (f *userOAuthAccessTokenInformer) Lister() v1.UserOAuthAccessTokenLister { - return v1.NewUserOAuthAccessTokenLister(f.Informer().GetIndexer()) +func (f *userOAuthAccessTokenInformer) Lister() oauthv1.UserOAuthAccessTokenLister { + return oauthv1.NewUserOAuthAccessTokenLister(f.Informer().GetIndexer()) } diff --git a/oauth/listers/oauth/v1/oauthaccesstoken.go b/oauth/listers/oauth/v1/oauthaccesstoken.go index 079f5edd8a..b829fd68fe 100644 --- a/oauth/listers/oauth/v1/oauthaccesstoken.go +++ b/oauth/listers/oauth/v1/oauthaccesstoken.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/oauth/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + oauthv1 "github.com/openshift/api/oauth/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OAuthAccessTokenLister helps list OAuthAccessTokens. @@ -14,19 +14,19 @@ import ( type OAuthAccessTokenLister interface { // List lists all OAuthAccessTokens in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OAuthAccessToken, err error) + List(selector labels.Selector) (ret []*oauthv1.OAuthAccessToken, err error) // Get retrieves the OAuthAccessToken from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OAuthAccessToken, error) + Get(name string) (*oauthv1.OAuthAccessToken, error) OAuthAccessTokenListerExpansion } // oAuthAccessTokenLister implements the OAuthAccessTokenLister interface. type oAuthAccessTokenLister struct { - listers.ResourceIndexer[*v1.OAuthAccessToken] + listers.ResourceIndexer[*oauthv1.OAuthAccessToken] } // NewOAuthAccessTokenLister returns a new OAuthAccessTokenLister. func NewOAuthAccessTokenLister(indexer cache.Indexer) OAuthAccessTokenLister { - return &oAuthAccessTokenLister{listers.New[*v1.OAuthAccessToken](indexer, v1.Resource("oauthaccesstoken"))} + return &oAuthAccessTokenLister{listers.New[*oauthv1.OAuthAccessToken](indexer, oauthv1.Resource("oauthaccesstoken"))} } diff --git a/oauth/listers/oauth/v1/oauthauthorizetoken.go b/oauth/listers/oauth/v1/oauthauthorizetoken.go index 3110c1f65a..157a7a3b37 100644 --- a/oauth/listers/oauth/v1/oauthauthorizetoken.go +++ b/oauth/listers/oauth/v1/oauthauthorizetoken.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/oauth/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + oauthv1 "github.com/openshift/api/oauth/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OAuthAuthorizeTokenLister helps list OAuthAuthorizeTokens. @@ -14,19 +14,19 @@ import ( type OAuthAuthorizeTokenLister interface { // List lists all OAuthAuthorizeTokens in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OAuthAuthorizeToken, err error) + List(selector labels.Selector) (ret []*oauthv1.OAuthAuthorizeToken, err error) // Get retrieves the OAuthAuthorizeToken from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OAuthAuthorizeToken, error) + Get(name string) (*oauthv1.OAuthAuthorizeToken, error) OAuthAuthorizeTokenListerExpansion } // oAuthAuthorizeTokenLister implements the OAuthAuthorizeTokenLister interface. type oAuthAuthorizeTokenLister struct { - listers.ResourceIndexer[*v1.OAuthAuthorizeToken] + listers.ResourceIndexer[*oauthv1.OAuthAuthorizeToken] } // NewOAuthAuthorizeTokenLister returns a new OAuthAuthorizeTokenLister. func NewOAuthAuthorizeTokenLister(indexer cache.Indexer) OAuthAuthorizeTokenLister { - return &oAuthAuthorizeTokenLister{listers.New[*v1.OAuthAuthorizeToken](indexer, v1.Resource("oauthauthorizetoken"))} + return &oAuthAuthorizeTokenLister{listers.New[*oauthv1.OAuthAuthorizeToken](indexer, oauthv1.Resource("oauthauthorizetoken"))} } diff --git a/oauth/listers/oauth/v1/oauthclient.go b/oauth/listers/oauth/v1/oauthclient.go index dfe25b0f74..7d1e1d0b65 100644 --- a/oauth/listers/oauth/v1/oauthclient.go +++ b/oauth/listers/oauth/v1/oauthclient.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/oauth/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + oauthv1 "github.com/openshift/api/oauth/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OAuthClientLister helps list OAuthClients. @@ -14,19 +14,19 @@ import ( type OAuthClientLister interface { // List lists all OAuthClients in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OAuthClient, err error) + List(selector labels.Selector) (ret []*oauthv1.OAuthClient, err error) // Get retrieves the OAuthClient from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OAuthClient, error) + Get(name string) (*oauthv1.OAuthClient, error) OAuthClientListerExpansion } // oAuthClientLister implements the OAuthClientLister interface. type oAuthClientLister struct { - listers.ResourceIndexer[*v1.OAuthClient] + listers.ResourceIndexer[*oauthv1.OAuthClient] } // NewOAuthClientLister returns a new OAuthClientLister. func NewOAuthClientLister(indexer cache.Indexer) OAuthClientLister { - return &oAuthClientLister{listers.New[*v1.OAuthClient](indexer, v1.Resource("oauthclient"))} + return &oAuthClientLister{listers.New[*oauthv1.OAuthClient](indexer, oauthv1.Resource("oauthclient"))} } diff --git a/oauth/listers/oauth/v1/oauthclientauthorization.go b/oauth/listers/oauth/v1/oauthclientauthorization.go index 44b970c607..1237edb9e6 100644 --- a/oauth/listers/oauth/v1/oauthclientauthorization.go +++ b/oauth/listers/oauth/v1/oauthclientauthorization.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/oauth/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + oauthv1 "github.com/openshift/api/oauth/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OAuthClientAuthorizationLister helps list OAuthClientAuthorizations. @@ -14,19 +14,19 @@ import ( type OAuthClientAuthorizationLister interface { // List lists all OAuthClientAuthorizations in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OAuthClientAuthorization, err error) + List(selector labels.Selector) (ret []*oauthv1.OAuthClientAuthorization, err error) // Get retrieves the OAuthClientAuthorization from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OAuthClientAuthorization, error) + Get(name string) (*oauthv1.OAuthClientAuthorization, error) OAuthClientAuthorizationListerExpansion } // oAuthClientAuthorizationLister implements the OAuthClientAuthorizationLister interface. type oAuthClientAuthorizationLister struct { - listers.ResourceIndexer[*v1.OAuthClientAuthorization] + listers.ResourceIndexer[*oauthv1.OAuthClientAuthorization] } // NewOAuthClientAuthorizationLister returns a new OAuthClientAuthorizationLister. func NewOAuthClientAuthorizationLister(indexer cache.Indexer) OAuthClientAuthorizationLister { - return &oAuthClientAuthorizationLister{listers.New[*v1.OAuthClientAuthorization](indexer, v1.Resource("oauthclientauthorization"))} + return &oAuthClientAuthorizationLister{listers.New[*oauthv1.OAuthClientAuthorization](indexer, oauthv1.Resource("oauthclientauthorization"))} } diff --git a/oauth/listers/oauth/v1/useroauthaccesstoken.go b/oauth/listers/oauth/v1/useroauthaccesstoken.go index 9130c56a3d..f45ab65581 100644 --- a/oauth/listers/oauth/v1/useroauthaccesstoken.go +++ b/oauth/listers/oauth/v1/useroauthaccesstoken.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/oauth/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + oauthv1 "github.com/openshift/api/oauth/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // UserOAuthAccessTokenLister helps list UserOAuthAccessTokens. @@ -14,19 +14,19 @@ import ( type UserOAuthAccessTokenLister interface { // List lists all UserOAuthAccessTokens in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.UserOAuthAccessToken, err error) + List(selector labels.Selector) (ret []*oauthv1.UserOAuthAccessToken, err error) // Get retrieves the UserOAuthAccessToken from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.UserOAuthAccessToken, error) + Get(name string) (*oauthv1.UserOAuthAccessToken, error) UserOAuthAccessTokenListerExpansion } // userOAuthAccessTokenLister implements the UserOAuthAccessTokenLister interface. type userOAuthAccessTokenLister struct { - listers.ResourceIndexer[*v1.UserOAuthAccessToken] + listers.ResourceIndexer[*oauthv1.UserOAuthAccessToken] } // NewUserOAuthAccessTokenLister returns a new UserOAuthAccessTokenLister. func NewUserOAuthAccessTokenLister(indexer cache.Indexer) UserOAuthAccessTokenLister { - return &userOAuthAccessTokenLister{listers.New[*v1.UserOAuthAccessToken](indexer, v1.Resource("useroauthaccesstoken"))} + return &userOAuthAccessTokenLister{listers.New[*oauthv1.UserOAuthAccessToken](indexer, oauthv1.Resource("useroauthaccesstoken"))} } diff --git a/operator/applyconfigurations/internal/internal.go b/operator/applyconfigurations/internal/internal.go index 2a11bffc77..3c20d5d06a 100644 --- a/operator/applyconfigurations/internal/internal.go +++ b/operator/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go b/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go index 24508e9161..a43b86656a 100644 --- a/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go +++ b/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // AdditionalNetworkDefinitionApplyConfiguration represents a declarative configuration of the AdditionalNetworkDefinition type for use // with apply. type AdditionalNetworkDefinitionApplyConfiguration struct { - Type *v1.NetworkType `json:"type,omitempty"` + Type *operatorv1.NetworkType `json:"type,omitempty"` Name *string `json:"name,omitempty"` Namespace *string `json:"namespace,omitempty"` RawCNIConfig *string `json:"rawCNIConfig,omitempty"` @@ -25,7 +25,7 @@ func AdditionalNetworkDefinition() *AdditionalNetworkDefinitionApplyConfiguratio // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AdditionalNetworkDefinitionApplyConfiguration) WithType(value v1.NetworkType) *AdditionalNetworkDefinitionApplyConfiguration { +func (b *AdditionalNetworkDefinitionApplyConfiguration) WithType(value operatorv1.NetworkType) *AdditionalNetworkDefinitionApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go b/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go index 9707fc73be..95a77d1165 100644 --- a/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go +++ b/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // AdditionalRoutingCapabilitiesApplyConfiguration represents a declarative configuration of the AdditionalRoutingCapabilities type for use // with apply. type AdditionalRoutingCapabilitiesApplyConfiguration struct { - Providers []v1.RoutingCapabilitiesProvider `json:"providers,omitempty"` + Providers []operatorv1.RoutingCapabilitiesProvider `json:"providers,omitempty"` } // AdditionalRoutingCapabilitiesApplyConfiguration constructs a declarative configuration of the AdditionalRoutingCapabilities type for use with @@ -21,7 +21,7 @@ func AdditionalRoutingCapabilities() *AdditionalRoutingCapabilitiesApplyConfigur // WithProviders adds the given value to the Providers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Providers field. -func (b *AdditionalRoutingCapabilitiesApplyConfiguration) WithProviders(values ...v1.RoutingCapabilitiesProvider) *AdditionalRoutingCapabilitiesApplyConfiguration { +func (b *AdditionalRoutingCapabilitiesApplyConfiguration) WithProviders(values ...operatorv1.RoutingCapabilitiesProvider) *AdditionalRoutingCapabilitiesApplyConfiguration { for i := range values { b.Providers = append(b.Providers, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/authentication.go b/operator/applyconfigurations/operator/v1/authentication.go index c9ac2464b6..ec839a2ff7 100644 --- a/operator/applyconfigurations/operator/v1/authentication.go +++ b/operator/applyconfigurations/operator/v1/authentication.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // AuthenticationApplyConfiguration represents a declarative configuration of the Authentication type for use // with apply. type AuthenticationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *AuthenticationSpecApplyConfiguration `json:"spec,omitempty"` - Status *AuthenticationStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *AuthenticationSpecApplyConfiguration `json:"spec,omitempty"` + Status *AuthenticationStatusApplyConfiguration `json:"status,omitempty"` } // Authentication constructs a declarative configuration of the Authentication type for use with @@ -41,18 +41,18 @@ func Authentication(name string) *AuthenticationApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractAuthentication(authentication *apioperatorv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { +func ExtractAuthentication(authentication *operatorv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { return extractAuthentication(authentication, fieldManager, "") } // ExtractAuthenticationStatus is the same as ExtractAuthentication except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractAuthenticationStatus(authentication *apioperatorv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { +func ExtractAuthenticationStatus(authentication *operatorv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { return extractAuthentication(authentication, fieldManager, "status") } -func extractAuthentication(authentication *apioperatorv1.Authentication, fieldManager string, subresource string) (*AuthenticationApplyConfiguration, error) { +func extractAuthentication(authentication *operatorv1.Authentication, fieldManager string, subresource string) (*AuthenticationApplyConfiguration, error) { b := &AuthenticationApplyConfiguration{} err := managedfields.ExtractInto(authentication, internal.Parser().Type("com.github.openshift.api.operator.v1.Authentication"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractAuthentication(authentication *apioperatorv1.Authentication, fieldMa // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithKind(value string) *AuthenticationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *AuthenticationApplyConfiguration) WithKind(value string) *Authenticatio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithAPIVersion(value string) *AuthenticationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *AuthenticationApplyConfiguration) WithAPIVersion(value string) *Authent // If called multiple times, the Name field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithName(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *AuthenticationApplyConfiguration) WithName(value string) *Authenticatio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithGenerateName(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *AuthenticationApplyConfiguration) WithGenerateName(value string) *Authe // If called multiple times, the Namespace field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithNamespace(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *AuthenticationApplyConfiguration) WithNamespace(value string) *Authenti // If called multiple times, the UID field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithUID(value types.UID) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *AuthenticationApplyConfiguration) WithUID(value types.UID) *Authenticat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithResourceVersion(value string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *AuthenticationApplyConfiguration) WithResourceVersion(value string) *Au // If called multiple times, the Generation field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithGeneration(value int64) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *AuthenticationApplyConfiguration { +func (b *AuthenticationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *AuthenticationApplyConfiguration { +func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *AuthenticationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *AuthenticationApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *AuthenticationApplyConfiguration) WithLabels(entries map[string]string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *AuthenticationApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *AuthenticationApplyConfiguration) WithAnnotations(entries map[string]string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *AuthenticationApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *AuthenticationApplyConfiguration { +func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *AuthenticationApplyConfiguration) WithFinalizers(values ...string) *AuthenticationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *AuthenticationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *AuthenticationApplyConfiguration) WithStatus(value *AuthenticationStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *AuthenticationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/authenticationspec.go b/operator/applyconfigurations/operator/v1/authenticationspec.go index 572a5332a0..ac90816bce 100644 --- a/operator/applyconfigurations/operator/v1/authenticationspec.go +++ b/operator/applyconfigurations/operator/v1/authenticationspec.go @@ -23,7 +23,7 @@ func AuthenticationSpec() *AuthenticationSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *AuthenticationSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *AuthenticationSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *AuthenticationSpecApplyConfiguration) WithManagementState(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *AuthenticationSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *AuthenticationSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *AuthenticationSpecApplyConfiguration) WithLogLevel(value operatorv1.Log // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *AuthenticationSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *AuthenticationSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *AuthenticationSpecApplyConfiguration) WithOperatorLogLevel(value operat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *AuthenticationSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *AuthenticationSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *AuthenticationSpecApplyConfiguration) WithUnsupportedConfigOverrides(va // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *AuthenticationSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *AuthenticationSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/authenticationstatus.go b/operator/applyconfigurations/operator/v1/authenticationstatus.go index 4f64c5ad3e..ee84050a40 100644 --- a/operator/applyconfigurations/operator/v1/authenticationstatus.go +++ b/operator/applyconfigurations/operator/v1/authenticationstatus.go @@ -27,7 +27,7 @@ func (b *AuthenticationStatusApplyConfiguration) WithOAuthAPIServer(value *OAuth // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *AuthenticationStatusApplyConfiguration) WithObservedGeneration(value int64) *AuthenticationStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -39,7 +39,7 @@ func (b *AuthenticationStatusApplyConfiguration) WithConditions(values ...*Opera if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -48,7 +48,7 @@ func (b *AuthenticationStatusApplyConfiguration) WithConditions(values ...*Opera // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *AuthenticationStatusApplyConfiguration) WithVersion(value string) *AuthenticationStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -56,7 +56,7 @@ func (b *AuthenticationStatusApplyConfiguration) WithVersion(value string) *Auth // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *AuthenticationStatusApplyConfiguration) WithReadyReplicas(value int32) *AuthenticationStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -64,7 +64,7 @@ func (b *AuthenticationStatusApplyConfiguration) WithReadyReplicas(value int32) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *AuthenticationStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *AuthenticationStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -76,7 +76,7 @@ func (b *AuthenticationStatusApplyConfiguration) WithGenerations(values ...*Gene if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go b/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go index c0b3f0d09c..b490ac0e5b 100644 --- a/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go +++ b/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // AWSClassicLoadBalancerParametersApplyConfiguration represents a declarative configuration of the AWSClassicLoadBalancerParameters type for use // with apply. type AWSClassicLoadBalancerParametersApplyConfiguration struct { - ConnectionIdleTimeout *v1.Duration `json:"connectionIdleTimeout,omitempty"` + ConnectionIdleTimeout *metav1.Duration `json:"connectionIdleTimeout,omitempty"` Subnets *AWSSubnetsApplyConfiguration `json:"subnets,omitempty"` } @@ -22,7 +22,7 @@ func AWSClassicLoadBalancerParameters() *AWSClassicLoadBalancerParametersApplyCo // WithConnectionIdleTimeout sets the ConnectionIdleTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ConnectionIdleTimeout field is set to the value of the last call. -func (b *AWSClassicLoadBalancerParametersApplyConfiguration) WithConnectionIdleTimeout(value v1.Duration) *AWSClassicLoadBalancerParametersApplyConfiguration { +func (b *AWSClassicLoadBalancerParametersApplyConfiguration) WithConnectionIdleTimeout(value metav1.Duration) *AWSClassicLoadBalancerParametersApplyConfiguration { b.ConnectionIdleTimeout = &value return b } diff --git a/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go b/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go index 16891541f2..011bbeaffc 100644 --- a/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go +++ b/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // AWSEFSVolumeMetricsApplyConfiguration represents a declarative configuration of the AWSEFSVolumeMetrics type for use // with apply. type AWSEFSVolumeMetricsApplyConfiguration struct { - State *v1.AWSEFSVolumeMetricsState `json:"state,omitempty"` + State *operatorv1.AWSEFSVolumeMetricsState `json:"state,omitempty"` RecursiveWalk *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration `json:"recursiveWalk,omitempty"` } @@ -22,7 +22,7 @@ func AWSEFSVolumeMetrics() *AWSEFSVolumeMetricsApplyConfiguration { // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *AWSEFSVolumeMetricsApplyConfiguration) WithState(value v1.AWSEFSVolumeMetricsState) *AWSEFSVolumeMetricsApplyConfiguration { +func (b *AWSEFSVolumeMetricsApplyConfiguration) WithState(value operatorv1.AWSEFSVolumeMetricsState) *AWSEFSVolumeMetricsApplyConfiguration { b.State = &value return b } diff --git a/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go b/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go index 39599f59ae..8805b7eece 100644 --- a/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go +++ b/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // AWSLoadBalancerParametersApplyConfiguration represents a declarative configuration of the AWSLoadBalancerParameters type for use // with apply. type AWSLoadBalancerParametersApplyConfiguration struct { - Type *v1.AWSLoadBalancerType `json:"type,omitempty"` + Type *operatorv1.AWSLoadBalancerType `json:"type,omitempty"` ClassicLoadBalancerParameters *AWSClassicLoadBalancerParametersApplyConfiguration `json:"classicLoadBalancer,omitempty"` NetworkLoadBalancerParameters *AWSNetworkLoadBalancerParametersApplyConfiguration `json:"networkLoadBalancer,omitempty"` } @@ -23,7 +23,7 @@ func AWSLoadBalancerParameters() *AWSLoadBalancerParametersApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AWSLoadBalancerParametersApplyConfiguration) WithType(value v1.AWSLoadBalancerType) *AWSLoadBalancerParametersApplyConfiguration { +func (b *AWSLoadBalancerParametersApplyConfiguration) WithType(value operatorv1.AWSLoadBalancerType) *AWSLoadBalancerParametersApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/awssubnets.go b/operator/applyconfigurations/operator/v1/awssubnets.go index 8dbc4f6881..f127ac4ca4 100644 --- a/operator/applyconfigurations/operator/v1/awssubnets.go +++ b/operator/applyconfigurations/operator/v1/awssubnets.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // AWSSubnetsApplyConfiguration represents a declarative configuration of the AWSSubnets type for use // with apply. type AWSSubnetsApplyConfiguration struct { - IDs []v1.AWSSubnetID `json:"ids,omitempty"` - Names []v1.AWSSubnetName `json:"names,omitempty"` + IDs []operatorv1.AWSSubnetID `json:"ids,omitempty"` + Names []operatorv1.AWSSubnetName `json:"names,omitempty"` } // AWSSubnetsApplyConfiguration constructs a declarative configuration of the AWSSubnets type for use with @@ -22,7 +22,7 @@ func AWSSubnets() *AWSSubnetsApplyConfiguration { // WithIDs adds the given value to the IDs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the IDs field. -func (b *AWSSubnetsApplyConfiguration) WithIDs(values ...v1.AWSSubnetID) *AWSSubnetsApplyConfiguration { +func (b *AWSSubnetsApplyConfiguration) WithIDs(values ...operatorv1.AWSSubnetID) *AWSSubnetsApplyConfiguration { for i := range values { b.IDs = append(b.IDs, values[i]) } @@ -32,7 +32,7 @@ func (b *AWSSubnetsApplyConfiguration) WithIDs(values ...v1.AWSSubnetID) *AWSSub // WithNames adds the given value to the Names field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Names field. -func (b *AWSSubnetsApplyConfiguration) WithNames(values ...v1.AWSSubnetName) *AWSSubnetsApplyConfiguration { +func (b *AWSSubnetsApplyConfiguration) WithNames(values ...operatorv1.AWSSubnetName) *AWSSubnetsApplyConfiguration { for i := range values { b.Names = append(b.Names, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/capability.go b/operator/applyconfigurations/operator/v1/capability.go index 01d8544b81..ce7ca886fe 100644 --- a/operator/applyconfigurations/operator/v1/capability.go +++ b/operator/applyconfigurations/operator/v1/capability.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // CapabilityApplyConfiguration represents a declarative configuration of the Capability type for use // with apply. type CapabilityApplyConfiguration struct { - Name *v1.ConsoleCapabilityName `json:"name,omitempty"` + Name *operatorv1.ConsoleCapabilityName `json:"name,omitempty"` Visibility *CapabilityVisibilityApplyConfiguration `json:"visibility,omitempty"` } @@ -22,7 +22,7 @@ func Capability() *CapabilityApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *CapabilityApplyConfiguration) WithName(value v1.ConsoleCapabilityName) *CapabilityApplyConfiguration { +func (b *CapabilityApplyConfiguration) WithName(value operatorv1.ConsoleCapabilityName) *CapabilityApplyConfiguration { b.Name = &value return b } diff --git a/operator/applyconfigurations/operator/v1/capabilityvisibility.go b/operator/applyconfigurations/operator/v1/capabilityvisibility.go index a5779ead32..9e86b3d387 100644 --- a/operator/applyconfigurations/operator/v1/capabilityvisibility.go +++ b/operator/applyconfigurations/operator/v1/capabilityvisibility.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // CapabilityVisibilityApplyConfiguration represents a declarative configuration of the CapabilityVisibility type for use // with apply. type CapabilityVisibilityApplyConfiguration struct { - State *v1.CapabilityState `json:"state,omitempty"` + State *operatorv1.CapabilityState `json:"state,omitempty"` } // CapabilityVisibilityApplyConfiguration constructs a declarative configuration of the CapabilityVisibility type for use with @@ -21,7 +21,7 @@ func CapabilityVisibility() *CapabilityVisibilityApplyConfiguration { // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *CapabilityVisibilityApplyConfiguration) WithState(value v1.CapabilityState) *CapabilityVisibilityApplyConfiguration { +func (b *CapabilityVisibilityApplyConfiguration) WithState(value operatorv1.CapabilityState) *CapabilityVisibilityApplyConfiguration { b.State = &value return b } diff --git a/operator/applyconfigurations/operator/v1/clienttls.go b/operator/applyconfigurations/operator/v1/clienttls.go index 5617c1b0bf..4b6d559977 100644 --- a/operator/applyconfigurations/operator/v1/clienttls.go +++ b/operator/applyconfigurations/operator/v1/clienttls.go @@ -4,15 +4,15 @@ package v1 import ( configv1 "github.com/openshift/api/config/v1" - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // ClientTLSApplyConfiguration represents a declarative configuration of the ClientTLS type for use // with apply. type ClientTLSApplyConfiguration struct { - ClientCertificatePolicy *v1.ClientCertificatePolicy `json:"clientCertificatePolicy,omitempty"` - ClientCA *configv1.ConfigMapNameReference `json:"clientCA,omitempty"` - AllowedSubjectPatterns []string `json:"allowedSubjectPatterns,omitempty"` + ClientCertificatePolicy *operatorv1.ClientCertificatePolicy `json:"clientCertificatePolicy,omitempty"` + ClientCA *configv1.ConfigMapNameReference `json:"clientCA,omitempty"` + AllowedSubjectPatterns []string `json:"allowedSubjectPatterns,omitempty"` } // ClientTLSApplyConfiguration constructs a declarative configuration of the ClientTLS type for use with @@ -24,7 +24,7 @@ func ClientTLS() *ClientTLSApplyConfiguration { // WithClientCertificatePolicy sets the ClientCertificatePolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClientCertificatePolicy field is set to the value of the last call. -func (b *ClientTLSApplyConfiguration) WithClientCertificatePolicy(value v1.ClientCertificatePolicy) *ClientTLSApplyConfiguration { +func (b *ClientTLSApplyConfiguration) WithClientCertificatePolicy(value operatorv1.ClientCertificatePolicy) *ClientTLSApplyConfiguration { b.ClientCertificatePolicy = &value return b } diff --git a/operator/applyconfigurations/operator/v1/cloudcredential.go b/operator/applyconfigurations/operator/v1/cloudcredential.go index 80824b5393..148c6a440e 100644 --- a/operator/applyconfigurations/operator/v1/cloudcredential.go +++ b/operator/applyconfigurations/operator/v1/cloudcredential.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CloudCredentialApplyConfiguration represents a declarative configuration of the CloudCredential type for use // with apply. type CloudCredentialApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CloudCredentialSpecApplyConfiguration `json:"spec,omitempty"` - Status *CloudCredentialStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CloudCredentialSpecApplyConfiguration `json:"spec,omitempty"` + Status *CloudCredentialStatusApplyConfiguration `json:"status,omitempty"` } // CloudCredential constructs a declarative configuration of the CloudCredential type for use with @@ -41,18 +41,18 @@ func CloudCredential(name string) *CloudCredentialApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractCloudCredential(cloudCredential *apioperatorv1.CloudCredential, fieldManager string) (*CloudCredentialApplyConfiguration, error) { +func ExtractCloudCredential(cloudCredential *operatorv1.CloudCredential, fieldManager string) (*CloudCredentialApplyConfiguration, error) { return extractCloudCredential(cloudCredential, fieldManager, "") } // ExtractCloudCredentialStatus is the same as ExtractCloudCredential except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractCloudCredentialStatus(cloudCredential *apioperatorv1.CloudCredential, fieldManager string) (*CloudCredentialApplyConfiguration, error) { +func ExtractCloudCredentialStatus(cloudCredential *operatorv1.CloudCredential, fieldManager string) (*CloudCredentialApplyConfiguration, error) { return extractCloudCredential(cloudCredential, fieldManager, "status") } -func extractCloudCredential(cloudCredential *apioperatorv1.CloudCredential, fieldManager string, subresource string) (*CloudCredentialApplyConfiguration, error) { +func extractCloudCredential(cloudCredential *operatorv1.CloudCredential, fieldManager string, subresource string) (*CloudCredentialApplyConfiguration, error) { b := &CloudCredentialApplyConfiguration{} err := managedfields.ExtractInto(cloudCredential, internal.Parser().Type("com.github.openshift.api.operator.v1.CloudCredential"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractCloudCredential(cloudCredential *apioperatorv1.CloudCredential, fiel // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithKind(value string) *CloudCredentialApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *CloudCredentialApplyConfiguration) WithKind(value string) *CloudCredent // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithAPIVersion(value string) *CloudCredentialApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *CloudCredentialApplyConfiguration) WithAPIVersion(value string) *CloudC // If called multiple times, the Name field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithName(value string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *CloudCredentialApplyConfiguration) WithName(value string) *CloudCredent // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithGenerateName(value string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *CloudCredentialApplyConfiguration) WithGenerateName(value string) *Clou // If called multiple times, the Namespace field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithNamespace(value string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *CloudCredentialApplyConfiguration) WithNamespace(value string) *CloudCr // If called multiple times, the UID field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithUID(value types.UID) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *CloudCredentialApplyConfiguration) WithUID(value types.UID) *CloudCrede // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithResourceVersion(value string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *CloudCredentialApplyConfiguration) WithResourceVersion(value string) *C // If called multiple times, the Generation field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithGeneration(value int64) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CloudCredentialApplyConfiguration { +func (b *CloudCredentialApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CloudCredentialApplyConfiguration { +func (b *CloudCredentialApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *CloudCredentialApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CloudCredentialApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *CloudCredentialApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *CloudCredentialApplyConfiguration) WithLabels(entries map[string]string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *CloudCredentialApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *CloudCredentialApplyConfiguration) WithAnnotations(entries map[string]string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *CloudCredentialApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CloudCredentialApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CloudCredentialApplyConfiguration { +func (b *CloudCredentialApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *CloudCredentialApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *CloudCredentialApplyConfiguration) WithFinalizers(values ...string) *CloudCredentialApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CloudCredentialApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *CloudCredentialApplyConfiguration) WithStatus(value *CloudCredentialSta // GetName retrieves the value of the Name field in the declarative configuration. func (b *CloudCredentialApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/cloudcredentialspec.go b/operator/applyconfigurations/operator/v1/cloudcredentialspec.go index 98f36a12b9..60712afa28 100644 --- a/operator/applyconfigurations/operator/v1/cloudcredentialspec.go +++ b/operator/applyconfigurations/operator/v1/cloudcredentialspec.go @@ -24,7 +24,7 @@ func CloudCredentialSpec() *CloudCredentialSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *CloudCredentialSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *CloudCredentialSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -32,7 +32,7 @@ func (b *CloudCredentialSpecApplyConfiguration) WithManagementState(value operat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *CloudCredentialSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *CloudCredentialSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -40,7 +40,7 @@ func (b *CloudCredentialSpecApplyConfiguration) WithLogLevel(value operatorv1.Lo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *CloudCredentialSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *CloudCredentialSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -48,7 +48,7 @@ func (b *CloudCredentialSpecApplyConfiguration) WithOperatorLogLevel(value opera // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *CloudCredentialSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *CloudCredentialSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -56,7 +56,7 @@ func (b *CloudCredentialSpecApplyConfiguration) WithUnsupportedConfigOverrides(v // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *CloudCredentialSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *CloudCredentialSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go b/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go index f02c542c4b..fa6a6f0f68 100644 --- a/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go +++ b/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go @@ -18,7 +18,7 @@ func CloudCredentialStatus() *CloudCredentialStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *CloudCredentialStatusApplyConfiguration) WithObservedGeneration(value int64) *CloudCredentialStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *CloudCredentialStatusApplyConfiguration) WithConditions(values ...*Oper if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *CloudCredentialStatusApplyConfiguration) WithConditions(values ...*Oper // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *CloudCredentialStatusApplyConfiguration) WithVersion(value string) *CloudCredentialStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *CloudCredentialStatusApplyConfiguration) WithVersion(value string) *Clo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *CloudCredentialStatusApplyConfiguration) WithReadyReplicas(value int32) *CloudCredentialStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *CloudCredentialStatusApplyConfiguration) WithReadyReplicas(value int32) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *CloudCredentialStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *CloudCredentialStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *CloudCredentialStatusApplyConfiguration) WithGenerations(values ...*Gen if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/clustercsidriver.go b/operator/applyconfigurations/operator/v1/clustercsidriver.go index 3df2ac8f6f..ed2dbb9c1a 100644 --- a/operator/applyconfigurations/operator/v1/clustercsidriver.go +++ b/operator/applyconfigurations/operator/v1/clustercsidriver.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterCSIDriverApplyConfiguration represents a declarative configuration of the ClusterCSIDriver type for use // with apply. type ClusterCSIDriverApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterCSIDriverSpecApplyConfiguration `json:"spec,omitempty"` - Status *ClusterCSIDriverStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ClusterCSIDriverSpecApplyConfiguration `json:"spec,omitempty"` + Status *ClusterCSIDriverStatusApplyConfiguration `json:"status,omitempty"` } // ClusterCSIDriver constructs a declarative configuration of the ClusterCSIDriver type for use with @@ -41,18 +41,18 @@ func ClusterCSIDriver(name string) *ClusterCSIDriverApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractClusterCSIDriver(clusterCSIDriver *apioperatorv1.ClusterCSIDriver, fieldManager string) (*ClusterCSIDriverApplyConfiguration, error) { +func ExtractClusterCSIDriver(clusterCSIDriver *operatorv1.ClusterCSIDriver, fieldManager string) (*ClusterCSIDriverApplyConfiguration, error) { return extractClusterCSIDriver(clusterCSIDriver, fieldManager, "") } // ExtractClusterCSIDriverStatus is the same as ExtractClusterCSIDriver except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractClusterCSIDriverStatus(clusterCSIDriver *apioperatorv1.ClusterCSIDriver, fieldManager string) (*ClusterCSIDriverApplyConfiguration, error) { +func ExtractClusterCSIDriverStatus(clusterCSIDriver *operatorv1.ClusterCSIDriver, fieldManager string) (*ClusterCSIDriverApplyConfiguration, error) { return extractClusterCSIDriver(clusterCSIDriver, fieldManager, "status") } -func extractClusterCSIDriver(clusterCSIDriver *apioperatorv1.ClusterCSIDriver, fieldManager string, subresource string) (*ClusterCSIDriverApplyConfiguration, error) { +func extractClusterCSIDriver(clusterCSIDriver *operatorv1.ClusterCSIDriver, fieldManager string, subresource string) (*ClusterCSIDriverApplyConfiguration, error) { b := &ClusterCSIDriverApplyConfiguration{} err := managedfields.ExtractInto(clusterCSIDriver, internal.Parser().Type("com.github.openshift.api.operator.v1.ClusterCSIDriver"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractClusterCSIDriver(clusterCSIDriver *apioperatorv1.ClusterCSIDriver, f // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithKind(value string) *ClusterCSIDriverApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithKind(value string) *ClusterCSID // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithAPIVersion(value string) *ClusterCSIDriverApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithAPIVersion(value string) *Clust // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithName(value string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithName(value string) *ClusterCSID // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithGenerateName(value string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithGenerateName(value string) *Clu // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithNamespace(value string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithNamespace(value string) *Cluste // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithUID(value types.UID) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithUID(value types.UID) *ClusterCS // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithResourceVersion(value string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ClusterCSIDriverApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithGeneration(value int64) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterCSIDriverApplyConfiguration { +func (b *ClusterCSIDriverApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterCSIDriverApplyConfiguration { +func (b *ClusterCSIDriverApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ClusterCSIDriverApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterCSIDriverApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ClusterCSIDriverApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *ClusterCSIDriverApplyConfiguration) WithLabels(entries map[string]string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ClusterCSIDriverApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterCSIDriverApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ClusterCSIDriverApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterCSIDriverApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterCSIDriverApplyConfiguration { +func (b *ClusterCSIDriverApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ClusterCSIDriverApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *ClusterCSIDriverApplyConfiguration) WithFinalizers(values ...string) *ClusterCSIDriverApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterCSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ClusterCSIDriverApplyConfiguration) WithStatus(value *ClusterCSIDriverS // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterCSIDriverApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/clustercsidriverspec.go b/operator/applyconfigurations/operator/v1/clustercsidriverspec.go index a5837a95c2..a008180f41 100644 --- a/operator/applyconfigurations/operator/v1/clustercsidriverspec.go +++ b/operator/applyconfigurations/operator/v1/clustercsidriverspec.go @@ -25,7 +25,7 @@ func ClusterCSIDriverSpec() *ClusterCSIDriverSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ClusterCSIDriverSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ClusterCSIDriverSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -33,7 +33,7 @@ func (b *ClusterCSIDriverSpecApplyConfiguration) WithManagementState(value opera // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ClusterCSIDriverSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ClusterCSIDriverSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -41,7 +41,7 @@ func (b *ClusterCSIDriverSpecApplyConfiguration) WithLogLevel(value operatorv1.L // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ClusterCSIDriverSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ClusterCSIDriverSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -49,7 +49,7 @@ func (b *ClusterCSIDriverSpecApplyConfiguration) WithOperatorLogLevel(value oper // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ClusterCSIDriverSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ClusterCSIDriverSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -57,7 +57,7 @@ func (b *ClusterCSIDriverSpecApplyConfiguration) WithUnsupportedConfigOverrides( // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ClusterCSIDriverSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ClusterCSIDriverSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go b/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go index ba2c1ee9d4..f5e2221b87 100644 --- a/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go +++ b/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go @@ -18,7 +18,7 @@ func ClusterCSIDriverStatus() *ClusterCSIDriverStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ClusterCSIDriverStatusApplyConfiguration) WithObservedGeneration(value int64) *ClusterCSIDriverStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *ClusterCSIDriverStatusApplyConfiguration) WithConditions(values ...*Ope if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *ClusterCSIDriverStatusApplyConfiguration) WithConditions(values ...*Ope // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ClusterCSIDriverStatusApplyConfiguration) WithVersion(value string) *ClusterCSIDriverStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *ClusterCSIDriverStatusApplyConfiguration) WithVersion(value string) *Cl // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ClusterCSIDriverStatusApplyConfiguration) WithReadyReplicas(value int32) *ClusterCSIDriverStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *ClusterCSIDriverStatusApplyConfiguration) WithReadyReplicas(value int32 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ClusterCSIDriverStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ClusterCSIDriverStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *ClusterCSIDriverStatusApplyConfiguration) WithGenerations(values ...*Ge if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/config.go b/operator/applyconfigurations/operator/v1/config.go index 7dd7d64d5e..b884322ae6 100644 --- a/operator/applyconfigurations/operator/v1/config.go +++ b/operator/applyconfigurations/operator/v1/config.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConfigApplyConfiguration represents a declarative configuration of the Config type for use // with apply. type ConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *ConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ConfigStatusApplyConfiguration `json:"status,omitempty"` } // Config constructs a declarative configuration of the Config type for use with @@ -41,18 +41,18 @@ func Config(name string) *ConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConfig(config *apioperatorv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { +func ExtractConfig(config *operatorv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { return extractConfig(config, fieldManager, "") } // ExtractConfigStatus is the same as ExtractConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConfigStatus(config *apioperatorv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { +func ExtractConfigStatus(config *operatorv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { return extractConfig(config, fieldManager, "status") } -func extractConfig(config *apioperatorv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { +func extractConfig(config *operatorv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { b := &ConfigApplyConfiguration{} err := managedfields.ExtractInto(config, internal.Parser().Type("com.github.openshift.api.operator.v1.Config"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractConfig(config *apioperatorv1.Config, fieldManager string, subresourc // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConf // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfigurat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyCo // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfi // If called multiple times, the UID field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfigur // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigAppl // If called multiple times, the Generation field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithGeneration(value int64) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Con // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) * // overwriting an existing map entries in Labels field with the same key. func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *Config // overwriting an existing map entries in Annotations field with the same key. func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *C // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefere func (b *ConfigApplyConfiguration) WithFinalizers(values ...string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ConfigApplyConfiguration) WithStatus(value *ConfigStatusApplyConfigurat // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/configspec.go b/operator/applyconfigurations/operator/v1/configspec.go index b5c044dce9..c7d3e93c30 100644 --- a/operator/applyconfigurations/operator/v1/configspec.go +++ b/operator/applyconfigurations/operator/v1/configspec.go @@ -23,7 +23,7 @@ func ConfigSpec() *ConfigSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ConfigSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ConfigSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *ConfigSpecApplyConfiguration) WithManagementState(value operatorv1.Mana // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ConfigSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ConfigSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *ConfigSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ConfigSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ConfigSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *ConfigSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.Log // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ConfigSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ConfigSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *ConfigSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runt // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ConfigSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ConfigSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/configstatus.go b/operator/applyconfigurations/operator/v1/configstatus.go index b151b4e8a1..38e52420c2 100644 --- a/operator/applyconfigurations/operator/v1/configstatus.go +++ b/operator/applyconfigurations/operator/v1/configstatus.go @@ -18,7 +18,7 @@ func ConfigStatus() *ConfigStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *ConfigStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *ConfigStatusApplyConfiguration) WithConditions(values ...*OperatorCondi if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *ConfigStatusApplyConfiguration) WithConditions(values ...*OperatorCondi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ConfigStatusApplyConfiguration) WithVersion(value string) *ConfigStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *ConfigStatusApplyConfiguration) WithVersion(value string) *ConfigStatus // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ConfigStatusApplyConfiguration) WithReadyReplicas(value int32) *ConfigStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *ConfigStatusApplyConfiguration) WithReadyReplicas(value int32) *ConfigS // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ConfigStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ConfigStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *ConfigStatusApplyConfiguration) WithGenerations(values ...*GenerationSt if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/console.go b/operator/applyconfigurations/operator/v1/console.go index dd7bf4a3d8..aaa69f64c0 100644 --- a/operator/applyconfigurations/operator/v1/console.go +++ b/operator/applyconfigurations/operator/v1/console.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConsoleApplyConfiguration represents a declarative configuration of the Console type for use // with apply. type ConsoleApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleSpecApplyConfiguration `json:"spec,omitempty"` - Status *ConsoleStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleSpecApplyConfiguration `json:"spec,omitempty"` + Status *ConsoleStatusApplyConfiguration `json:"status,omitempty"` } // Console constructs a declarative configuration of the Console type for use with @@ -41,18 +41,18 @@ func Console(name string) *ConsoleApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConsole(console *apioperatorv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { +func ExtractConsole(console *operatorv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { return extractConsole(console, fieldManager, "") } // ExtractConsoleStatus is the same as ExtractConsole except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConsoleStatus(console *apioperatorv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { +func ExtractConsoleStatus(console *operatorv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { return extractConsole(console, fieldManager, "status") } -func extractConsole(console *apioperatorv1.Console, fieldManager string, subresource string) (*ConsoleApplyConfiguration, error) { +func extractConsole(console *operatorv1.Console, fieldManager string, subresource string) (*ConsoleApplyConfiguration, error) { b := &ConsoleApplyConfiguration{} err := managedfields.ExtractInto(console, internal.Parser().Type("com.github.openshift.api.operator.v1.Console"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractConsole(console *apioperatorv1.Console, fieldManager string, subreso // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithKind(value string) *ConsoleApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ConsoleApplyConfiguration) WithKind(value string) *ConsoleApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithAPIVersion(value string) *ConsoleApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ConsoleApplyConfiguration) WithAPIVersion(value string) *ConsoleApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithName(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ConsoleApplyConfiguration) WithName(value string) *ConsoleApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithGenerateName(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ConsoleApplyConfiguration) WithGenerateName(value string) *ConsoleApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithNamespace(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ConsoleApplyConfiguration) WithNamespace(value string) *ConsoleApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithUID(value types.UID) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ConsoleApplyConfiguration) WithUID(value types.UID) *ConsoleApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithResourceVersion(value string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ConsoleApplyConfiguration) WithResourceVersion(value string) *ConsoleAp // If called multiple times, the Generation field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithGeneration(value int64) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConsoleApplyConfiguration { +func (b *ConsoleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConsoleApplyConfiguration { +func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Co // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConsoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ConsoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *ConsoleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ConsoleApplyConfiguration) WithLabels(entries map[string]string) *Conso // overwriting an existing map entries in Annotations field with the same key. func (b *ConsoleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ConsoleApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConsoleApplyConfiguration { +func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *ConsoleApplyConfiguration) WithFinalizers(values ...string) *ConsoleApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConsoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ConsoleApplyConfiguration) WithStatus(value *ConsoleStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConsoleApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/consoleconfigroute.go b/operator/applyconfigurations/operator/v1/consoleconfigroute.go index d8a9310f6a..b71ac9f3ab 100644 --- a/operator/applyconfigurations/operator/v1/consoleconfigroute.go +++ b/operator/applyconfigurations/operator/v1/consoleconfigroute.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // ConsoleConfigRouteApplyConfiguration represents a declarative configuration of the ConsoleConfigRoute type for use // with apply. type ConsoleConfigRouteApplyConfiguration struct { - Hostname *string `json:"hostname,omitempty"` - Secret *v1.SecretNameReference `json:"secret,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Secret *configv1.SecretNameReference `json:"secret,omitempty"` } // ConsoleConfigRouteApplyConfiguration constructs a declarative configuration of the ConsoleConfigRoute type for use with @@ -30,7 +30,7 @@ func (b *ConsoleConfigRouteApplyConfiguration) WithHostname(value string) *Conso // WithSecret sets the Secret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Secret field is set to the value of the last call. -func (b *ConsoleConfigRouteApplyConfiguration) WithSecret(value v1.SecretNameReference) *ConsoleConfigRouteApplyConfiguration { +func (b *ConsoleConfigRouteApplyConfiguration) WithSecret(value configv1.SecretNameReference) *ConsoleConfigRouteApplyConfiguration { b.Secret = &value return b } diff --git a/operator/applyconfigurations/operator/v1/consolespec.go b/operator/applyconfigurations/operator/v1/consolespec.go index 421ff84e2b..0155ffef34 100644 --- a/operator/applyconfigurations/operator/v1/consolespec.go +++ b/operator/applyconfigurations/operator/v1/consolespec.go @@ -28,7 +28,7 @@ func ConsoleSpec() *ConsoleSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ConsoleSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ConsoleSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -36,7 +36,7 @@ func (b *ConsoleSpecApplyConfiguration) WithManagementState(value operatorv1.Man // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ConsoleSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ConsoleSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -44,7 +44,7 @@ func (b *ConsoleSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ConsoleSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ConsoleSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -52,7 +52,7 @@ func (b *ConsoleSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.Lo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ConsoleSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ConsoleSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -60,7 +60,7 @@ func (b *ConsoleSpecApplyConfiguration) WithUnsupportedConfigOverrides(value run // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ConsoleSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ConsoleSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/consolestatus.go b/operator/applyconfigurations/operator/v1/consolestatus.go index c6330be35d..ad34934776 100644 --- a/operator/applyconfigurations/operator/v1/consolestatus.go +++ b/operator/applyconfigurations/operator/v1/consolestatus.go @@ -18,7 +18,7 @@ func ConsoleStatus() *ConsoleStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ConsoleStatusApplyConfiguration) WithObservedGeneration(value int64) *ConsoleStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *ConsoleStatusApplyConfiguration) WithConditions(values ...*OperatorCond if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *ConsoleStatusApplyConfiguration) WithConditions(values ...*OperatorCond // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ConsoleStatusApplyConfiguration) WithVersion(value string) *ConsoleStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *ConsoleStatusApplyConfiguration) WithVersion(value string) *ConsoleStat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ConsoleStatusApplyConfiguration) WithReadyReplicas(value int32) *ConsoleStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *ConsoleStatusApplyConfiguration) WithReadyReplicas(value int32) *Consol // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ConsoleStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ConsoleStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *ConsoleStatusApplyConfiguration) WithGenerations(values ...*GenerationS if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/csidriverconfigspec.go b/operator/applyconfigurations/operator/v1/csidriverconfigspec.go index 887cf604e8..15b793452a 100644 --- a/operator/applyconfigurations/operator/v1/csidriverconfigspec.go +++ b/operator/applyconfigurations/operator/v1/csidriverconfigspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // CSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the CSIDriverConfigSpec type for use // with apply. type CSIDriverConfigSpecApplyConfiguration struct { - DriverType *v1.CSIDriverType `json:"driverType,omitempty"` + DriverType *operatorv1.CSIDriverType `json:"driverType,omitempty"` AWS *AWSCSIDriverConfigSpecApplyConfiguration `json:"aws,omitempty"` Azure *AzureCSIDriverConfigSpecApplyConfiguration `json:"azure,omitempty"` GCP *GCPCSIDriverConfigSpecApplyConfiguration `json:"gcp,omitempty"` @@ -26,7 +26,7 @@ func CSIDriverConfigSpec() *CSIDriverConfigSpecApplyConfiguration { // WithDriverType sets the DriverType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DriverType field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithDriverType(value v1.CSIDriverType) *CSIDriverConfigSpecApplyConfiguration { +func (b *CSIDriverConfigSpecApplyConfiguration) WithDriverType(value operatorv1.CSIDriverType) *CSIDriverConfigSpecApplyConfiguration { b.DriverType = &value return b } diff --git a/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go b/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go index 035aee886e..d9b93f6206 100644 --- a/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go +++ b/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // CSISnapshotControllerApplyConfiguration represents a declarative configuration of the CSISnapshotController type for use // with apply. type CSISnapshotControllerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CSISnapshotControllerSpecApplyConfiguration `json:"spec,omitempty"` - Status *CSISnapshotControllerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CSISnapshotControllerSpecApplyConfiguration `json:"spec,omitempty"` + Status *CSISnapshotControllerStatusApplyConfiguration `json:"status,omitempty"` } // CSISnapshotController constructs a declarative configuration of the CSISnapshotController type for use with @@ -41,18 +41,18 @@ func CSISnapshotController(name string) *CSISnapshotControllerApplyConfiguration // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractCSISnapshotController(cSISnapshotController *apioperatorv1.CSISnapshotController, fieldManager string) (*CSISnapshotControllerApplyConfiguration, error) { +func ExtractCSISnapshotController(cSISnapshotController *operatorv1.CSISnapshotController, fieldManager string) (*CSISnapshotControllerApplyConfiguration, error) { return extractCSISnapshotController(cSISnapshotController, fieldManager, "") } // ExtractCSISnapshotControllerStatus is the same as ExtractCSISnapshotController except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractCSISnapshotControllerStatus(cSISnapshotController *apioperatorv1.CSISnapshotController, fieldManager string) (*CSISnapshotControllerApplyConfiguration, error) { +func ExtractCSISnapshotControllerStatus(cSISnapshotController *operatorv1.CSISnapshotController, fieldManager string) (*CSISnapshotControllerApplyConfiguration, error) { return extractCSISnapshotController(cSISnapshotController, fieldManager, "status") } -func extractCSISnapshotController(cSISnapshotController *apioperatorv1.CSISnapshotController, fieldManager string, subresource string) (*CSISnapshotControllerApplyConfiguration, error) { +func extractCSISnapshotController(cSISnapshotController *operatorv1.CSISnapshotController, fieldManager string, subresource string) (*CSISnapshotControllerApplyConfiguration, error) { b := &CSISnapshotControllerApplyConfiguration{} err := managedfields.ExtractInto(cSISnapshotController, internal.Parser().Type("com.github.openshift.api.operator.v1.CSISnapshotController"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractCSISnapshotController(cSISnapshotController *apioperatorv1.CSISnapsh // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithKind(value string) *CSISnapshotControllerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithKind(value string) *CSISna // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithAPIVersion(value string) *CSISnapshotControllerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithAPIVersion(value string) * // If called multiple times, the Name field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithName(value string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithName(value string) *CSISna // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithGenerateName(value string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithNamespace(value string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithNamespace(value string) *C // If called multiple times, the UID field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithUID(value types.UID) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithUID(value types.UID) *CSIS // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithResourceVersion(value string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *CSISnapshotControllerApplyConfiguration) WithResourceVersion(value stri // If called multiple times, the Generation field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithGeneration(value int64) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CSISnapshotControllerApplyConfiguration { +func (b *CSISnapshotControllerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CSISnapshotControllerApplyConfiguration { +func (b *CSISnapshotControllerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *CSISnapshotControllerApplyConfiguration) WithDeletionTimestamp(value me // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CSISnapshotControllerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *CSISnapshotControllerApplyConfiguration) WithDeletionGracePeriodSeconds // overwriting an existing map entries in Labels field with the same key. func (b *CSISnapshotControllerApplyConfiguration) WithLabels(entries map[string]string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *CSISnapshotControllerApplyConfiguration) WithLabels(entries map[string] // overwriting an existing map entries in Annotations field with the same key. func (b *CSISnapshotControllerApplyConfiguration) WithAnnotations(entries map[string]string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *CSISnapshotControllerApplyConfiguration) WithAnnotations(entries map[st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CSISnapshotControllerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CSISnapshotControllerApplyConfiguration { +func (b *CSISnapshotControllerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *CSISnapshotControllerApplyConfiguration) WithOwnerReferences(values ... func (b *CSISnapshotControllerApplyConfiguration) WithFinalizers(values ...string) *CSISnapshotControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *CSISnapshotControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *CSISnapshotControllerApplyConfiguration) WithStatus(value *CSISnapshotC // GetName retrieves the value of the Name field in the declarative configuration. func (b *CSISnapshotControllerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go b/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go index e614041cbd..fd90faa2de 100644 --- a/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go +++ b/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go @@ -23,7 +23,7 @@ func CSISnapshotControllerSpec() *CSISnapshotControllerSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *CSISnapshotControllerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *CSISnapshotControllerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *CSISnapshotControllerSpecApplyConfiguration) WithManagementState(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *CSISnapshotControllerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *CSISnapshotControllerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *CSISnapshotControllerSpecApplyConfiguration) WithLogLevel(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *CSISnapshotControllerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *CSISnapshotControllerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *CSISnapshotControllerSpecApplyConfiguration) WithOperatorLogLevel(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *CSISnapshotControllerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *CSISnapshotControllerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *CSISnapshotControllerSpecApplyConfiguration) WithUnsupportedConfigOverr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *CSISnapshotControllerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *CSISnapshotControllerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go b/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go index d3fa5d05c1..5b6d30d8d5 100644 --- a/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go +++ b/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go @@ -18,7 +18,7 @@ func CSISnapshotControllerStatus() *CSISnapshotControllerStatusApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *CSISnapshotControllerStatusApplyConfiguration) WithObservedGeneration(value int64) *CSISnapshotControllerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *CSISnapshotControllerStatusApplyConfiguration) WithConditions(values .. if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *CSISnapshotControllerStatusApplyConfiguration) WithConditions(values .. // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *CSISnapshotControllerStatusApplyConfiguration) WithVersion(value string) *CSISnapshotControllerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *CSISnapshotControllerStatusApplyConfiguration) WithVersion(value string // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *CSISnapshotControllerStatusApplyConfiguration) WithReadyReplicas(value int32) *CSISnapshotControllerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *CSISnapshotControllerStatusApplyConfiguration) WithReadyReplicas(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *CSISnapshotControllerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *CSISnapshotControllerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *CSISnapshotControllerStatusApplyConfiguration) WithGenerations(values . if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go b/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go index c8689ee187..b62419ac4a 100644 --- a/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go +++ b/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // DefaultNetworkDefinitionApplyConfiguration represents a declarative configuration of the DefaultNetworkDefinition type for use // with apply. type DefaultNetworkDefinitionApplyConfiguration struct { - Type *v1.NetworkType `json:"type,omitempty"` + Type *operatorv1.NetworkType `json:"type,omitempty"` OpenShiftSDNConfig *OpenShiftSDNConfigApplyConfiguration `json:"openshiftSDNConfig,omitempty"` OVNKubernetesConfig *OVNKubernetesConfigApplyConfiguration `json:"ovnKubernetesConfig,omitempty"` } @@ -23,7 +23,7 @@ func DefaultNetworkDefinition() *DefaultNetworkDefinitionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *DefaultNetworkDefinitionApplyConfiguration) WithType(value v1.NetworkType) *DefaultNetworkDefinitionApplyConfiguration { +func (b *DefaultNetworkDefinitionApplyConfiguration) WithType(value operatorv1.NetworkType) *DefaultNetworkDefinitionApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go b/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go index 3aa286ff1b..2a296d7312 100644 --- a/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go +++ b/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go @@ -19,7 +19,7 @@ func DeveloperConsoleCatalogCategory() *DeveloperConsoleCatalogCategoryApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ID field is set to the value of the last call. func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithID(value string) *DeveloperConsoleCatalogCategoryApplyConfiguration { - b.ID = &value + b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.ID = &value return b } @@ -27,7 +27,7 @@ func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithID(value string) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Label field is set to the value of the last call. func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithLabel(value string) *DeveloperConsoleCatalogCategoryApplyConfiguration { - b.Label = &value + b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.Label = &value return b } @@ -36,7 +36,7 @@ func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithLabel(value stri // If called multiple times, values provided by each call will be appended to the Tags field. func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithTags(values ...string) *DeveloperConsoleCatalogCategoryApplyConfiguration { for i := range values { - b.Tags = append(b.Tags, values[i]) + b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.Tags = append(b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.Tags, values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go b/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go index 439dafbf45..d847d2065b 100644 --- a/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go +++ b/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // DeveloperConsoleCatalogTypesApplyConfiguration represents a declarative configuration of the DeveloperConsoleCatalogTypes type for use // with apply. type DeveloperConsoleCatalogTypesApplyConfiguration struct { - State *v1.CatalogTypesState `json:"state,omitempty"` - Enabled *[]string `json:"enabled,omitempty"` - Disabled *[]string `json:"disabled,omitempty"` + State *operatorv1.CatalogTypesState `json:"state,omitempty"` + Enabled *[]string `json:"enabled,omitempty"` + Disabled *[]string `json:"disabled,omitempty"` } // DeveloperConsoleCatalogTypesApplyConfiguration constructs a declarative configuration of the DeveloperConsoleCatalogTypes type for use with @@ -23,7 +23,7 @@ func DeveloperConsoleCatalogTypes() *DeveloperConsoleCatalogTypesApplyConfigurat // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *DeveloperConsoleCatalogTypesApplyConfiguration) WithState(value v1.CatalogTypesState) *DeveloperConsoleCatalogTypesApplyConfiguration { +func (b *DeveloperConsoleCatalogTypesApplyConfiguration) WithState(value operatorv1.CatalogTypesState) *DeveloperConsoleCatalogTypesApplyConfiguration { b.State = &value return b } diff --git a/operator/applyconfigurations/operator/v1/dns.go b/operator/applyconfigurations/operator/v1/dns.go index 0e31c5af93..7b2cb3d364 100644 --- a/operator/applyconfigurations/operator/v1/dns.go +++ b/operator/applyconfigurations/operator/v1/dns.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // DNSApplyConfiguration represents a declarative configuration of the DNS type for use // with apply. type DNSApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *DNSSpecApplyConfiguration `json:"spec,omitempty"` - Status *DNSStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *DNSSpecApplyConfiguration `json:"spec,omitempty"` + Status *DNSStatusApplyConfiguration `json:"status,omitempty"` } // DNS constructs a declarative configuration of the DNS type for use with @@ -41,18 +41,18 @@ func DNS(name string) *DNSApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractDNS(dNS *apioperatorv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { +func ExtractDNS(dNS *operatorv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { return extractDNS(dNS, fieldManager, "") } // ExtractDNSStatus is the same as ExtractDNS except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractDNSStatus(dNS *apioperatorv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { +func ExtractDNSStatus(dNS *operatorv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { return extractDNS(dNS, fieldManager, "status") } -func extractDNS(dNS *apioperatorv1.DNS, fieldManager string, subresource string) (*DNSApplyConfiguration, error) { +func extractDNS(dNS *operatorv1.DNS, fieldManager string, subresource string) (*DNSApplyConfiguration, error) { b := &DNSApplyConfiguration{} err := managedfields.ExtractInto(dNS, internal.Parser().Type("com.github.openshift.api.operator.v1.DNS"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractDNS(dNS *apioperatorv1.DNS, fieldManager string, subresource string) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *DNSApplyConfiguration) WithKind(value string) *DNSApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *DNSApplyConfiguration) WithKind(value string) *DNSApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *DNSApplyConfiguration) WithAPIVersion(value string) *DNSApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *DNSApplyConfiguration) WithAPIVersion(value string) *DNSApplyConfigurat // If called multiple times, the Name field is set to the value of the last call. func (b *DNSApplyConfiguration) WithName(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *DNSApplyConfiguration) WithName(value string) *DNSApplyConfiguration { // If called multiple times, the GenerateName field is set to the value of the last call. func (b *DNSApplyConfiguration) WithGenerateName(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *DNSApplyConfiguration) WithGenerateName(value string) *DNSApplyConfigur // If called multiple times, the Namespace field is set to the value of the last call. func (b *DNSApplyConfiguration) WithNamespace(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *DNSApplyConfiguration) WithNamespace(value string) *DNSApplyConfigurati // If called multiple times, the UID field is set to the value of the last call. func (b *DNSApplyConfiguration) WithUID(value types.UID) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *DNSApplyConfiguration) WithUID(value types.UID) *DNSApplyConfiguration // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *DNSApplyConfiguration) WithResourceVersion(value string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *DNSApplyConfiguration) WithResourceVersion(value string) *DNSApplyConfi // If called multiple times, the Generation field is set to the value of the last call. func (b *DNSApplyConfiguration) WithGeneration(value int64) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *DNSApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DNSApp // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *DNSApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *DNSApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNS // overwriting an existing map entries in Labels field with the same key. func (b *DNSApplyConfiguration) WithLabels(entries map[string]string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *DNSApplyConfiguration) WithLabels(entries map[string]string) *DNSApplyC // overwriting an existing map entries in Annotations field with the same key. func (b *DNSApplyConfiguration) WithAnnotations(entries map[string]string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *DNSApplyConfiguration) WithAnnotations(entries map[string]string) *DNSA // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DNSApplyConfiguration { +func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference func (b *DNSApplyConfiguration) WithFinalizers(values ...string) *DNSApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *DNSApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *DNSApplyConfiguration) WithStatus(value *DNSStatusApplyConfiguration) * // GetName retrieves the value of the Name field in the declarative configuration. func (b *DNSApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/dnscache.go b/operator/applyconfigurations/operator/v1/dnscache.go index 4a387f634a..09244ed903 100644 --- a/operator/applyconfigurations/operator/v1/dnscache.go +++ b/operator/applyconfigurations/operator/v1/dnscache.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // DNSCacheApplyConfiguration represents a declarative configuration of the DNSCache type for use // with apply. type DNSCacheApplyConfiguration struct { - PositiveTTL *v1.Duration `json:"positiveTTL,omitempty"` - NegativeTTL *v1.Duration `json:"negativeTTL,omitempty"` + PositiveTTL *metav1.Duration `json:"positiveTTL,omitempty"` + NegativeTTL *metav1.Duration `json:"negativeTTL,omitempty"` } // DNSCacheApplyConfiguration constructs a declarative configuration of the DNSCache type for use with @@ -22,7 +22,7 @@ func DNSCache() *DNSCacheApplyConfiguration { // WithPositiveTTL sets the PositiveTTL field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PositiveTTL field is set to the value of the last call. -func (b *DNSCacheApplyConfiguration) WithPositiveTTL(value v1.Duration) *DNSCacheApplyConfiguration { +func (b *DNSCacheApplyConfiguration) WithPositiveTTL(value metav1.Duration) *DNSCacheApplyConfiguration { b.PositiveTTL = &value return b } @@ -30,7 +30,7 @@ func (b *DNSCacheApplyConfiguration) WithPositiveTTL(value v1.Duration) *DNSCach // WithNegativeTTL sets the NegativeTTL field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NegativeTTL field is set to the value of the last call. -func (b *DNSCacheApplyConfiguration) WithNegativeTTL(value v1.Duration) *DNSCacheApplyConfiguration { +func (b *DNSCacheApplyConfiguration) WithNegativeTTL(value metav1.Duration) *DNSCacheApplyConfiguration { b.NegativeTTL = &value return b } diff --git a/operator/applyconfigurations/operator/v1/dnsnodeplacement.go b/operator/applyconfigurations/operator/v1/dnsnodeplacement.go index 1c941d66e3..b82c86dd35 100644 --- a/operator/applyconfigurations/operator/v1/dnsnodeplacement.go +++ b/operator/applyconfigurations/operator/v1/dnsnodeplacement.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // DNSNodePlacementApplyConfiguration represents a declarative configuration of the DNSNodePlacement type for use // with apply. type DNSNodePlacementApplyConfiguration struct { - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []v1.Toleration `json:"tolerations,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } // DNSNodePlacementApplyConfiguration constructs a declarative configuration of the DNSNodePlacement type for use with @@ -36,7 +36,7 @@ func (b *DNSNodePlacementApplyConfiguration) WithNodeSelector(entries map[string // WithTolerations adds the given value to the Tolerations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *DNSNodePlacementApplyConfiguration) WithTolerations(values ...v1.Toleration) *DNSNodePlacementApplyConfiguration { +func (b *DNSNodePlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *DNSNodePlacementApplyConfiguration { for i := range values { b.Tolerations = append(b.Tolerations, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go b/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go index 7e6ff33d64..7267bca62b 100644 --- a/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go +++ b/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" + configv1 "github.com/openshift/api/config/v1" ) // DNSOverTLSConfigApplyConfiguration represents a declarative configuration of the DNSOverTLSConfig type for use // with apply. type DNSOverTLSConfigApplyConfiguration struct { - ServerName *string `json:"serverName,omitempty"` - CABundle *v1.ConfigMapNameReference `json:"caBundle,omitempty"` + ServerName *string `json:"serverName,omitempty"` + CABundle *configv1.ConfigMapNameReference `json:"caBundle,omitempty"` } // DNSOverTLSConfigApplyConfiguration constructs a declarative configuration of the DNSOverTLSConfig type for use with @@ -30,7 +30,7 @@ func (b *DNSOverTLSConfigApplyConfiguration) WithServerName(value string) *DNSOv // WithCABundle sets the CABundle field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CABundle field is set to the value of the last call. -func (b *DNSOverTLSConfigApplyConfiguration) WithCABundle(value v1.ConfigMapNameReference) *DNSOverTLSConfigApplyConfiguration { +func (b *DNSOverTLSConfigApplyConfiguration) WithCABundle(value configv1.ConfigMapNameReference) *DNSOverTLSConfigApplyConfiguration { b.CABundle = &value return b } diff --git a/operator/applyconfigurations/operator/v1/dnstransportconfig.go b/operator/applyconfigurations/operator/v1/dnstransportconfig.go index 52bc39563b..1b689670cf 100644 --- a/operator/applyconfigurations/operator/v1/dnstransportconfig.go +++ b/operator/applyconfigurations/operator/v1/dnstransportconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // DNSTransportConfigApplyConfiguration represents a declarative configuration of the DNSTransportConfig type for use // with apply. type DNSTransportConfigApplyConfiguration struct { - Transport *v1.DNSTransport `json:"transport,omitempty"` + Transport *operatorv1.DNSTransport `json:"transport,omitempty"` TLS *DNSOverTLSConfigApplyConfiguration `json:"tls,omitempty"` } @@ -22,7 +22,7 @@ func DNSTransportConfig() *DNSTransportConfigApplyConfiguration { // WithTransport sets the Transport field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Transport field is set to the value of the last call. -func (b *DNSTransportConfigApplyConfiguration) WithTransport(value v1.DNSTransport) *DNSTransportConfigApplyConfiguration { +func (b *DNSTransportConfigApplyConfiguration) WithTransport(value operatorv1.DNSTransport) *DNSTransportConfigApplyConfiguration { b.Transport = &value return b } diff --git a/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go b/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go index 876f91e975..f4006d50c0 100644 --- a/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go +++ b/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // EndpointPublishingStrategyApplyConfiguration represents a declarative configuration of the EndpointPublishingStrategy type for use // with apply. type EndpointPublishingStrategyApplyConfiguration struct { - Type *v1.EndpointPublishingStrategyType `json:"type,omitempty"` - LoadBalancer *LoadBalancerStrategyApplyConfiguration `json:"loadBalancer,omitempty"` - HostNetwork *HostNetworkStrategyApplyConfiguration `json:"hostNetwork,omitempty"` - Private *PrivateStrategyApplyConfiguration `json:"private,omitempty"` - NodePort *NodePortStrategyApplyConfiguration `json:"nodePort,omitempty"` + Type *operatorv1.EndpointPublishingStrategyType `json:"type,omitempty"` + LoadBalancer *LoadBalancerStrategyApplyConfiguration `json:"loadBalancer,omitempty"` + HostNetwork *HostNetworkStrategyApplyConfiguration `json:"hostNetwork,omitempty"` + Private *PrivateStrategyApplyConfiguration `json:"private,omitempty"` + NodePort *NodePortStrategyApplyConfiguration `json:"nodePort,omitempty"` } // EndpointPublishingStrategyApplyConfiguration constructs a declarative configuration of the EndpointPublishingStrategy type for use with @@ -25,7 +25,7 @@ func EndpointPublishingStrategy() *EndpointPublishingStrategyApplyConfiguration // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *EndpointPublishingStrategyApplyConfiguration) WithType(value v1.EndpointPublishingStrategyType) *EndpointPublishingStrategyApplyConfiguration { +func (b *EndpointPublishingStrategyApplyConfiguration) WithType(value operatorv1.EndpointPublishingStrategyType) *EndpointPublishingStrategyApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/etcd.go b/operator/applyconfigurations/operator/v1/etcd.go index bf091f4e64..de118401e2 100644 --- a/operator/applyconfigurations/operator/v1/etcd.go +++ b/operator/applyconfigurations/operator/v1/etcd.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // EtcdApplyConfiguration represents a declarative configuration of the Etcd type for use // with apply. type EtcdApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *EtcdSpecApplyConfiguration `json:"spec,omitempty"` - Status *EtcdStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *EtcdSpecApplyConfiguration `json:"spec,omitempty"` + Status *EtcdStatusApplyConfiguration `json:"status,omitempty"` } // Etcd constructs a declarative configuration of the Etcd type for use with @@ -41,18 +41,18 @@ func Etcd(name string) *EtcdApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractEtcd(etcd *apioperatorv1.Etcd, fieldManager string) (*EtcdApplyConfiguration, error) { +func ExtractEtcd(etcd *operatorv1.Etcd, fieldManager string) (*EtcdApplyConfiguration, error) { return extractEtcd(etcd, fieldManager, "") } // ExtractEtcdStatus is the same as ExtractEtcd except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractEtcdStatus(etcd *apioperatorv1.Etcd, fieldManager string) (*EtcdApplyConfiguration, error) { +func ExtractEtcdStatus(etcd *operatorv1.Etcd, fieldManager string) (*EtcdApplyConfiguration, error) { return extractEtcd(etcd, fieldManager, "status") } -func extractEtcd(etcd *apioperatorv1.Etcd, fieldManager string, subresource string) (*EtcdApplyConfiguration, error) { +func extractEtcd(etcd *operatorv1.Etcd, fieldManager string, subresource string) (*EtcdApplyConfiguration, error) { b := &EtcdApplyConfiguration{} err := managedfields.ExtractInto(etcd, internal.Parser().Type("com.github.openshift.api.operator.v1.Etcd"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractEtcd(etcd *apioperatorv1.Etcd, fieldManager string, subresource stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithKind(value string) *EtcdApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *EtcdApplyConfiguration) WithKind(value string) *EtcdApplyConfiguration // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithAPIVersion(value string) *EtcdApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *EtcdApplyConfiguration) WithAPIVersion(value string) *EtcdApplyConfigur // If called multiple times, the Name field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithName(value string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *EtcdApplyConfiguration) WithName(value string) *EtcdApplyConfiguration // If called multiple times, the GenerateName field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithGenerateName(value string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *EtcdApplyConfiguration) WithGenerateName(value string) *EtcdApplyConfig // If called multiple times, the Namespace field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithNamespace(value string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *EtcdApplyConfiguration) WithNamespace(value string) *EtcdApplyConfigura // If called multiple times, the UID field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithUID(value types.UID) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *EtcdApplyConfiguration) WithUID(value types.UID) *EtcdApplyConfiguratio // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithResourceVersion(value string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *EtcdApplyConfiguration) WithResourceVersion(value string) *EtcdApplyCon // If called multiple times, the Generation field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithGeneration(value int64) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EtcdApplyConfiguration { +func (b *EtcdApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EtcdApplyConfiguration { +func (b *EtcdApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *EtcdApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EtcdA // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EtcdApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *EtcdApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *Et // overwriting an existing map entries in Labels field with the same key. func (b *EtcdApplyConfiguration) WithLabels(entries map[string]string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *EtcdApplyConfiguration) WithLabels(entries map[string]string) *EtcdAppl // overwriting an existing map entries in Annotations field with the same key. func (b *EtcdApplyConfiguration) WithAnnotations(entries map[string]string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *EtcdApplyConfiguration) WithAnnotations(entries map[string]string) *Etc // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *EtcdApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EtcdApplyConfiguration { +func (b *EtcdApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *EtcdApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenc func (b *EtcdApplyConfiguration) WithFinalizers(values ...string) *EtcdApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *EtcdApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *EtcdApplyConfiguration) WithStatus(value *EtcdStatusApplyConfiguration) // GetName retrieves the value of the Name field in the declarative configuration. func (b *EtcdApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/etcdspec.go b/operator/applyconfigurations/operator/v1/etcdspec.go index 49a3055c2b..6588c09224 100644 --- a/operator/applyconfigurations/operator/v1/etcdspec.go +++ b/operator/applyconfigurations/operator/v1/etcdspec.go @@ -25,7 +25,7 @@ func EtcdSpec() *EtcdSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *EtcdSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -33,7 +33,7 @@ func (b *EtcdSpecApplyConfiguration) WithManagementState(value operatorv1.Manage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *EtcdSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -41,7 +41,7 @@ func (b *EtcdSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *Et // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *EtcdSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -49,7 +49,7 @@ func (b *EtcdSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLe // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *EtcdSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -57,7 +57,7 @@ func (b *EtcdSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtim // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *EtcdSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } @@ -65,7 +65,7 @@ func (b *EtcdSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtensi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithForceRedeploymentReason(value string) *EtcdSpecApplyConfiguration { - b.ForceRedeploymentReason = &value + b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value return b } @@ -73,7 +73,7 @@ func (b *EtcdSpecApplyConfiguration) WithForceRedeploymentReason(value string) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailedRevisionLimit field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *EtcdSpecApplyConfiguration { - b.FailedRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value return b } @@ -81,7 +81,7 @@ func (b *EtcdSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *EtcdS // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. func (b *EtcdSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *EtcdSpecApplyConfiguration { - b.SucceededRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value return b } diff --git a/operator/applyconfigurations/operator/v1/etcdstatus.go b/operator/applyconfigurations/operator/v1/etcdstatus.go index 7d545a9009..a6fa6f07d2 100644 --- a/operator/applyconfigurations/operator/v1/etcdstatus.go +++ b/operator/applyconfigurations/operator/v1/etcdstatus.go @@ -23,7 +23,7 @@ func EtcdStatus() *EtcdStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *EtcdStatusApplyConfiguration) WithObservedGeneration(value int64) *EtcdStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -35,7 +35,7 @@ func (b *EtcdStatusApplyConfiguration) WithConditions(values ...*OperatorConditi if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -44,7 +44,7 @@ func (b *EtcdStatusApplyConfiguration) WithConditions(values ...*OperatorConditi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *EtcdStatusApplyConfiguration) WithVersion(value string) *EtcdStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -52,7 +52,7 @@ func (b *EtcdStatusApplyConfiguration) WithVersion(value string) *EtcdStatusAppl // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *EtcdStatusApplyConfiguration) WithReadyReplicas(value int32) *EtcdStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -60,7 +60,7 @@ func (b *EtcdStatusApplyConfiguration) WithReadyReplicas(value int32) *EtcdStatu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *EtcdStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *EtcdStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -72,7 +72,7 @@ func (b *EtcdStatusApplyConfiguration) WithGenerations(values ...*GenerationStat if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } @@ -81,7 +81,7 @@ func (b *EtcdStatusApplyConfiguration) WithGenerations(values ...*GenerationStat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. func (b *EtcdStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *EtcdStatusApplyConfiguration { - b.LatestAvailableRevisionReason = &value + b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value return b } @@ -93,7 +93,7 @@ func (b *EtcdStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApp if values[i] == nil { panic("nil value passed to WithNodeStatuses") } - b.NodeStatuses = append(b.NodeStatuses, *values[i]) + b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/forwardplugin.go b/operator/applyconfigurations/operator/v1/forwardplugin.go index d6c8d3bbc3..5d0112b460 100644 --- a/operator/applyconfigurations/operator/v1/forwardplugin.go +++ b/operator/applyconfigurations/operator/v1/forwardplugin.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // ForwardPluginApplyConfiguration represents a declarative configuration of the ForwardPlugin type for use // with apply. type ForwardPluginApplyConfiguration struct { Upstreams []string `json:"upstreams,omitempty"` - Policy *v1.ForwardingPolicy `json:"policy,omitempty"` + Policy *operatorv1.ForwardingPolicy `json:"policy,omitempty"` TransportConfig *DNSTransportConfigApplyConfiguration `json:"transportConfig,omitempty"` - ProtocolStrategy *v1.ProtocolStrategy `json:"protocolStrategy,omitempty"` + ProtocolStrategy *operatorv1.ProtocolStrategy `json:"protocolStrategy,omitempty"` } // ForwardPluginApplyConfiguration constructs a declarative configuration of the ForwardPlugin type for use with @@ -34,7 +34,7 @@ func (b *ForwardPluginApplyConfiguration) WithUpstreams(values ...string) *Forwa // WithPolicy sets the Policy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Policy field is set to the value of the last call. -func (b *ForwardPluginApplyConfiguration) WithPolicy(value v1.ForwardingPolicy) *ForwardPluginApplyConfiguration { +func (b *ForwardPluginApplyConfiguration) WithPolicy(value operatorv1.ForwardingPolicy) *ForwardPluginApplyConfiguration { b.Policy = &value return b } @@ -50,7 +50,7 @@ func (b *ForwardPluginApplyConfiguration) WithTransportConfig(value *DNSTranspor // WithProtocolStrategy sets the ProtocolStrategy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ProtocolStrategy field is set to the value of the last call. -func (b *ForwardPluginApplyConfiguration) WithProtocolStrategy(value v1.ProtocolStrategy) *ForwardPluginApplyConfiguration { +func (b *ForwardPluginApplyConfiguration) WithProtocolStrategy(value operatorv1.ProtocolStrategy) *ForwardPluginApplyConfiguration { b.ProtocolStrategy = &value return b } diff --git a/operator/applyconfigurations/operator/v1/gatewayconfig.go b/operator/applyconfigurations/operator/v1/gatewayconfig.go index 54fe274317..a18f0400c5 100644 --- a/operator/applyconfigurations/operator/v1/gatewayconfig.go +++ b/operator/applyconfigurations/operator/v1/gatewayconfig.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // GatewayConfigApplyConfiguration represents a declarative configuration of the GatewayConfig type for use // with apply. type GatewayConfigApplyConfiguration struct { RoutingViaHost *bool `json:"routingViaHost,omitempty"` - IPForwarding *v1.IPForwardingMode `json:"ipForwarding,omitempty"` + IPForwarding *operatorv1.IPForwardingMode `json:"ipForwarding,omitempty"` IPv4 *IPv4GatewayConfigApplyConfiguration `json:"ipv4,omitempty"` IPv6 *IPv6GatewayConfigApplyConfiguration `json:"ipv6,omitempty"` } @@ -32,7 +32,7 @@ func (b *GatewayConfigApplyConfiguration) WithRoutingViaHost(value bool) *Gatewa // WithIPForwarding sets the IPForwarding field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IPForwarding field is set to the value of the last call. -func (b *GatewayConfigApplyConfiguration) WithIPForwarding(value v1.IPForwardingMode) *GatewayConfigApplyConfiguration { +func (b *GatewayConfigApplyConfiguration) WithIPForwarding(value operatorv1.IPForwardingMode) *GatewayConfigApplyConfiguration { b.IPForwarding = &value return b } diff --git a/operator/applyconfigurations/operator/v1/gathererstatus.go b/operator/applyconfigurations/operator/v1/gathererstatus.go index a0d62445e9..b2fd36c264 100644 --- a/operator/applyconfigurations/operator/v1/gathererstatus.go +++ b/operator/applyconfigurations/operator/v1/gathererstatus.go @@ -3,16 +3,16 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // GathererStatusApplyConfiguration represents a declarative configuration of the GathererStatus type for use // with apply. type GathererStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - Name *string `json:"name,omitempty"` - LastGatherDuration *metav1.Duration `json:"lastGatherDuration,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Name *string `json:"name,omitempty"` + LastGatherDuration *apismetav1.Duration `json:"lastGatherDuration,omitempty"` } // GathererStatusApplyConfiguration constructs a declarative configuration of the GathererStatus type for use with @@ -24,7 +24,7 @@ func GathererStatus() *GathererStatusApplyConfiguration { // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *GathererStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *GathererStatusApplyConfiguration { +func (b *GathererStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *GathererStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") @@ -45,7 +45,7 @@ func (b *GathererStatusApplyConfiguration) WithName(value string) *GathererStatu // WithLastGatherDuration sets the LastGatherDuration field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastGatherDuration field is set to the value of the last call. -func (b *GathererStatusApplyConfiguration) WithLastGatherDuration(value metav1.Duration) *GathererStatusApplyConfiguration { +func (b *GathererStatusApplyConfiguration) WithLastGatherDuration(value apismetav1.Duration) *GathererStatusApplyConfiguration { b.LastGatherDuration = &value return b } diff --git a/operator/applyconfigurations/operator/v1/gatherstatus.go b/operator/applyconfigurations/operator/v1/gatherstatus.go index 4139675467..e2601419af 100644 --- a/operator/applyconfigurations/operator/v1/gatherstatus.go +++ b/operator/applyconfigurations/operator/v1/gatherstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // GatherStatusApplyConfiguration represents a declarative configuration of the GatherStatus type for use // with apply. type GatherStatusApplyConfiguration struct { - LastGatherTime *v1.Time `json:"lastGatherTime,omitempty"` - LastGatherDuration *v1.Duration `json:"lastGatherDuration,omitempty"` + LastGatherTime *metav1.Time `json:"lastGatherTime,omitempty"` + LastGatherDuration *metav1.Duration `json:"lastGatherDuration,omitempty"` Gatherers []GathererStatusApplyConfiguration `json:"gatherers,omitempty"` } @@ -23,7 +23,7 @@ func GatherStatus() *GatherStatusApplyConfiguration { // WithLastGatherTime sets the LastGatherTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastGatherTime field is set to the value of the last call. -func (b *GatherStatusApplyConfiguration) WithLastGatherTime(value v1.Time) *GatherStatusApplyConfiguration { +func (b *GatherStatusApplyConfiguration) WithLastGatherTime(value metav1.Time) *GatherStatusApplyConfiguration { b.LastGatherTime = &value return b } @@ -31,7 +31,7 @@ func (b *GatherStatusApplyConfiguration) WithLastGatherTime(value v1.Time) *Gath // WithLastGatherDuration sets the LastGatherDuration field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastGatherDuration field is set to the value of the last call. -func (b *GatherStatusApplyConfiguration) WithLastGatherDuration(value v1.Duration) *GatherStatusApplyConfiguration { +func (b *GatherStatusApplyConfiguration) WithLastGatherDuration(value metav1.Duration) *GatherStatusApplyConfiguration { b.LastGatherDuration = &value return b } diff --git a/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go b/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go index a5e0306c44..dbb6217201 100644 --- a/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go +++ b/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // GCPLoadBalancerParametersApplyConfiguration represents a declarative configuration of the GCPLoadBalancerParameters type for use // with apply. type GCPLoadBalancerParametersApplyConfiguration struct { - ClientAccess *v1.GCPClientAccess `json:"clientAccess,omitempty"` + ClientAccess *operatorv1.GCPClientAccess `json:"clientAccess,omitempty"` } // GCPLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the GCPLoadBalancerParameters type for use with @@ -21,7 +21,7 @@ func GCPLoadBalancerParameters() *GCPLoadBalancerParametersApplyConfiguration { // WithClientAccess sets the ClientAccess field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClientAccess field is set to the value of the last call. -func (b *GCPLoadBalancerParametersApplyConfiguration) WithClientAccess(value v1.GCPClientAccess) *GCPLoadBalancerParametersApplyConfiguration { +func (b *GCPLoadBalancerParametersApplyConfiguration) WithClientAccess(value operatorv1.GCPClientAccess) *GCPLoadBalancerParametersApplyConfiguration { b.ClientAccess = &value return b } diff --git a/operator/applyconfigurations/operator/v1/healthcheck.go b/operator/applyconfigurations/operator/v1/healthcheck.go index 4b8d600ba0..0f4cfac5a6 100644 --- a/operator/applyconfigurations/operator/v1/healthcheck.go +++ b/operator/applyconfigurations/operator/v1/healthcheck.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // HealthCheckApplyConfiguration represents a declarative configuration of the HealthCheck type for use // with apply. type HealthCheckApplyConfiguration struct { - Description *string `json:"description,omitempty"` - TotalRisk *int32 `json:"totalRisk,omitempty"` - AdvisorURI *string `json:"advisorURI,omitempty"` - State *v1.HealthCheckState `json:"state,omitempty"` + Description *string `json:"description,omitempty"` + TotalRisk *int32 `json:"totalRisk,omitempty"` + AdvisorURI *string `json:"advisorURI,omitempty"` + State *operatorv1.HealthCheckState `json:"state,omitempty"` } // HealthCheckApplyConfiguration constructs a declarative configuration of the HealthCheck type for use with @@ -48,7 +48,7 @@ func (b *HealthCheckApplyConfiguration) WithAdvisorURI(value string) *HealthChec // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *HealthCheckApplyConfiguration) WithState(value v1.HealthCheckState) *HealthCheckApplyConfiguration { +func (b *HealthCheckApplyConfiguration) WithState(value operatorv1.HealthCheckState) *HealthCheckApplyConfiguration { b.State = &value return b } diff --git a/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go b/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go index 2b7e1aadb7..a667c16f39 100644 --- a/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go +++ b/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // HostNetworkStrategyApplyConfiguration represents a declarative configuration of the HostNetworkStrategy type for use // with apply. type HostNetworkStrategyApplyConfiguration struct { - Protocol *v1.IngressControllerProtocol `json:"protocol,omitempty"` - HTTPPort *int32 `json:"httpPort,omitempty"` - HTTPSPort *int32 `json:"httpsPort,omitempty"` - StatsPort *int32 `json:"statsPort,omitempty"` + Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` + HTTPPort *int32 `json:"httpPort,omitempty"` + HTTPSPort *int32 `json:"httpsPort,omitempty"` + StatsPort *int32 `json:"statsPort,omitempty"` } // HostNetworkStrategyApplyConfiguration constructs a declarative configuration of the HostNetworkStrategy type for use with @@ -24,7 +24,7 @@ func HostNetworkStrategy() *HostNetworkStrategyApplyConfiguration { // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *HostNetworkStrategyApplyConfiguration) WithProtocol(value v1.IngressControllerProtocol) *HostNetworkStrategyApplyConfiguration { +func (b *HostNetworkStrategyApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *HostNetworkStrategyApplyConfiguration { b.Protocol = &value return b } diff --git a/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go b/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go index 2a1b2022a0..cd83a0461c 100644 --- a/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go +++ b/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // HTTPCompressionPolicyApplyConfiguration represents a declarative configuration of the HTTPCompressionPolicy type for use // with apply. type HTTPCompressionPolicyApplyConfiguration struct { - MimeTypes []v1.CompressionMIMEType `json:"mimeTypes,omitempty"` + MimeTypes []operatorv1.CompressionMIMEType `json:"mimeTypes,omitempty"` } // HTTPCompressionPolicyApplyConfiguration constructs a declarative configuration of the HTTPCompressionPolicy type for use with @@ -21,7 +21,7 @@ func HTTPCompressionPolicy() *HTTPCompressionPolicyApplyConfiguration { // WithMimeTypes adds the given value to the MimeTypes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the MimeTypes field. -func (b *HTTPCompressionPolicyApplyConfiguration) WithMimeTypes(values ...v1.CompressionMIMEType) *HTTPCompressionPolicyApplyConfiguration { +func (b *HTTPCompressionPolicyApplyConfiguration) WithMimeTypes(values ...operatorv1.CompressionMIMEType) *HTTPCompressionPolicyApplyConfiguration { for i := range values { b.MimeTypes = append(b.MimeTypes, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go b/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go index e60ab354eb..065c61554d 100644 --- a/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go +++ b/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IBMLoadBalancerParametersApplyConfiguration represents a declarative configuration of the IBMLoadBalancerParameters type for use // with apply. type IBMLoadBalancerParametersApplyConfiguration struct { - Protocol *v1.IngressControllerProtocol `json:"protocol,omitempty"` + Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` } // IBMLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the IBMLoadBalancerParameters type for use with @@ -21,7 +21,7 @@ func IBMLoadBalancerParameters() *IBMLoadBalancerParametersApplyConfiguration { // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *IBMLoadBalancerParametersApplyConfiguration) WithProtocol(value v1.IngressControllerProtocol) *IBMLoadBalancerParametersApplyConfiguration { +func (b *IBMLoadBalancerParametersApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *IBMLoadBalancerParametersApplyConfiguration { b.Protocol = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ingresscontroller.go b/operator/applyconfigurations/operator/v1/ingresscontroller.go index a37177b676..e231390144 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontroller.go +++ b/operator/applyconfigurations/operator/v1/ingresscontroller.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // IngressControllerApplyConfiguration represents a declarative configuration of the IngressController type for use // with apply. type IngressControllerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *IngressControllerSpecApplyConfiguration `json:"spec,omitempty"` - Status *IngressControllerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *IngressControllerSpecApplyConfiguration `json:"spec,omitempty"` + Status *IngressControllerStatusApplyConfiguration `json:"status,omitempty"` } // IngressController constructs a declarative configuration of the IngressController type for use with @@ -42,18 +42,18 @@ func IngressController(name, namespace string) *IngressControllerApplyConfigurat // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractIngressController(ingressController *apioperatorv1.IngressController, fieldManager string) (*IngressControllerApplyConfiguration, error) { +func ExtractIngressController(ingressController *operatorv1.IngressController, fieldManager string) (*IngressControllerApplyConfiguration, error) { return extractIngressController(ingressController, fieldManager, "") } // ExtractIngressControllerStatus is the same as ExtractIngressController except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractIngressControllerStatus(ingressController *apioperatorv1.IngressController, fieldManager string) (*IngressControllerApplyConfiguration, error) { +func ExtractIngressControllerStatus(ingressController *operatorv1.IngressController, fieldManager string) (*IngressControllerApplyConfiguration, error) { return extractIngressController(ingressController, fieldManager, "status") } -func extractIngressController(ingressController *apioperatorv1.IngressController, fieldManager string, subresource string) (*IngressControllerApplyConfiguration, error) { +func extractIngressController(ingressController *operatorv1.IngressController, fieldManager string, subresource string) (*IngressControllerApplyConfiguration, error) { b := &IngressControllerApplyConfiguration{} err := managedfields.ExtractInto(ingressController, internal.Parser().Type("com.github.openshift.api.operator.v1.IngressController"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractIngressController(ingressController *apioperatorv1.IngressController // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithKind(value string) *IngressControllerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *IngressControllerApplyConfiguration) WithKind(value string) *IngressCon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithAPIVersion(value string) *IngressControllerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *IngressControllerApplyConfiguration) WithAPIVersion(value string) *Ingr // If called multiple times, the Name field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithName(value string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *IngressControllerApplyConfiguration) WithName(value string) *IngressCon // If called multiple times, the GenerateName field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithGenerateName(value string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *IngressControllerApplyConfiguration) WithGenerateName(value string) *In // If called multiple times, the Namespace field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithNamespace(value string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *IngressControllerApplyConfiguration) WithNamespace(value string) *Ingre // If called multiple times, the UID field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithUID(value types.UID) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *IngressControllerApplyConfiguration) WithUID(value types.UID) *IngressC // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithResourceVersion(value string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *IngressControllerApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithGeneration(value int64) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *IngressControllerApplyConfiguration { +func (b *IngressControllerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *IngressControllerApplyConfiguration { +func (b *IngressControllerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *IngressControllerApplyConfiguration) WithDeletionTimestamp(value metav1 // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *IngressControllerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *IngressControllerApplyConfiguration) WithDeletionGracePeriodSeconds(val // overwriting an existing map entries in Labels field with the same key. func (b *IngressControllerApplyConfiguration) WithLabels(entries map[string]string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *IngressControllerApplyConfiguration) WithLabels(entries map[string]stri // overwriting an existing map entries in Annotations field with the same key. func (b *IngressControllerApplyConfiguration) WithAnnotations(entries map[string]string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *IngressControllerApplyConfiguration) WithAnnotations(entries map[string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *IngressControllerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *IngressControllerApplyConfiguration { +func (b *IngressControllerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *IngressControllerApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *IngressControllerApplyConfiguration) WithFinalizers(values ...string) *IngressControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *IngressControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *IngressControllerApplyConfiguration) WithStatus(value *IngressControlle // GetName retrieves the value of the Name field in the declarative configuration. func (b *IngressControllerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go b/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go index fd345b6430..dbcd3d9e56 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go +++ b/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go @@ -23,7 +23,7 @@ func IngressControllerCaptureHTTPCookie() *IngressControllerCaptureHTTPCookieApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MatchType field is set to the value of the last call. func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithMatchType(value operatorv1.CookieMatchType) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.MatchType = &value + b.IngressControllerCaptureHTTPCookieUnionApplyConfiguration.MatchType = &value return b } @@ -31,7 +31,7 @@ func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithMatchType(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithName(value string) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.Name = &value + b.IngressControllerCaptureHTTPCookieUnionApplyConfiguration.Name = &value return b } @@ -39,7 +39,7 @@ func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithName(value st // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NamePrefix field is set to the value of the last call. func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithNamePrefix(value string) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.NamePrefix = &value + b.IngressControllerCaptureHTTPCookieUnionApplyConfiguration.NamePrefix = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go b/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go index 57f9fb590e..374621a87f 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go +++ b/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IngressControllerCaptureHTTPCookieUnionApplyConfiguration represents a declarative configuration of the IngressControllerCaptureHTTPCookieUnion type for use // with apply. type IngressControllerCaptureHTTPCookieUnionApplyConfiguration struct { - MatchType *v1.CookieMatchType `json:"matchType,omitempty"` - Name *string `json:"name,omitempty"` - NamePrefix *string `json:"namePrefix,omitempty"` + MatchType *operatorv1.CookieMatchType `json:"matchType,omitempty"` + Name *string `json:"name,omitempty"` + NamePrefix *string `json:"namePrefix,omitempty"` } // IngressControllerCaptureHTTPCookieUnionApplyConfiguration constructs a declarative configuration of the IngressControllerCaptureHTTPCookieUnion type for use with @@ -23,7 +23,7 @@ func IngressControllerCaptureHTTPCookieUnion() *IngressControllerCaptureHTTPCook // WithMatchType sets the MatchType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MatchType field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieUnionApplyConfiguration) WithMatchType(value v1.CookieMatchType) *IngressControllerCaptureHTTPCookieUnionApplyConfiguration { +func (b *IngressControllerCaptureHTTPCookieUnionApplyConfiguration) WithMatchType(value operatorv1.CookieMatchType) *IngressControllerCaptureHTTPCookieUnionApplyConfiguration { b.MatchType = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go b/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go index 2c5a51ffec..f6b1461062 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go +++ b/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IngressControllerHTTPHeaderActionUnionApplyConfiguration represents a declarative configuration of the IngressControllerHTTPHeaderActionUnion type for use // with apply. type IngressControllerHTTPHeaderActionUnionApplyConfiguration struct { - Type *v1.IngressControllerHTTPHeaderActionType `json:"type,omitempty"` + Type *operatorv1.IngressControllerHTTPHeaderActionType `json:"type,omitempty"` Set *IngressControllerSetHTTPHeaderApplyConfiguration `json:"set,omitempty"` } @@ -22,7 +22,7 @@ func IngressControllerHTTPHeaderActionUnion() *IngressControllerHTTPHeaderAction // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *IngressControllerHTTPHeaderActionUnionApplyConfiguration) WithType(value v1.IngressControllerHTTPHeaderActionType) *IngressControllerHTTPHeaderActionUnionApplyConfiguration { +func (b *IngressControllerHTTPHeaderActionUnionApplyConfiguration) WithType(value operatorv1.IngressControllerHTTPHeaderActionType) *IngressControllerHTTPHeaderActionUnionApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go b/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go index f1381d7a79..a972c1fcb2 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go +++ b/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IngressControllerHTTPHeadersApplyConfiguration represents a declarative configuration of the IngressControllerHTTPHeaders type for use // with apply. type IngressControllerHTTPHeadersApplyConfiguration struct { - ForwardedHeaderPolicy *v1.IngressControllerHTTPHeaderPolicy `json:"forwardedHeaderPolicy,omitempty"` + ForwardedHeaderPolicy *operatorv1.IngressControllerHTTPHeaderPolicy `json:"forwardedHeaderPolicy,omitempty"` UniqueId *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration `json:"uniqueId,omitempty"` - HeaderNameCaseAdjustments []v1.IngressControllerHTTPHeaderNameCaseAdjustment `json:"headerNameCaseAdjustments,omitempty"` + HeaderNameCaseAdjustments []operatorv1.IngressControllerHTTPHeaderNameCaseAdjustment `json:"headerNameCaseAdjustments,omitempty"` Actions *IngressControllerHTTPHeaderActionsApplyConfiguration `json:"actions,omitempty"` } @@ -24,7 +24,7 @@ func IngressControllerHTTPHeaders() *IngressControllerHTTPHeadersApplyConfigurat // WithForwardedHeaderPolicy sets the ForwardedHeaderPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ForwardedHeaderPolicy field is set to the value of the last call. -func (b *IngressControllerHTTPHeadersApplyConfiguration) WithForwardedHeaderPolicy(value v1.IngressControllerHTTPHeaderPolicy) *IngressControllerHTTPHeadersApplyConfiguration { +func (b *IngressControllerHTTPHeadersApplyConfiguration) WithForwardedHeaderPolicy(value operatorv1.IngressControllerHTTPHeaderPolicy) *IngressControllerHTTPHeadersApplyConfiguration { b.ForwardedHeaderPolicy = &value return b } @@ -40,7 +40,7 @@ func (b *IngressControllerHTTPHeadersApplyConfiguration) WithUniqueId(value *Ing // WithHeaderNameCaseAdjustments adds the given value to the HeaderNameCaseAdjustments field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the HeaderNameCaseAdjustments field. -func (b *IngressControllerHTTPHeadersApplyConfiguration) WithHeaderNameCaseAdjustments(values ...v1.IngressControllerHTTPHeaderNameCaseAdjustment) *IngressControllerHTTPHeadersApplyConfiguration { +func (b *IngressControllerHTTPHeadersApplyConfiguration) WithHeaderNameCaseAdjustments(values ...operatorv1.IngressControllerHTTPHeaderNameCaseAdjustment) *IngressControllerHTTPHeadersApplyConfiguration { for i := range values { b.HeaderNameCaseAdjustments = append(b.HeaderNameCaseAdjustments, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go b/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go index fc57030c73..54bb8d17f3 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go +++ b/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go @@ -3,8 +3,8 @@ package v1 import ( - v1 "github.com/openshift/api/config/v1" - apioperatorv1 "github.com/openshift/api/operator/v1" + configv1 "github.com/openshift/api/config/v1" + operatorv1 "github.com/openshift/api/operator/v1" corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" @@ -14,19 +14,19 @@ import ( // with apply. type IngressControllerSpecApplyConfiguration struct { Domain *string `json:"domain,omitempty"` - HttpErrorCodePages *v1.ConfigMapNameReference `json:"httpErrorCodePages,omitempty"` + HttpErrorCodePages *configv1.ConfigMapNameReference `json:"httpErrorCodePages,omitempty"` Replicas *int32 `json:"replicas,omitempty"` EndpointPublishingStrategy *EndpointPublishingStrategyApplyConfiguration `json:"endpointPublishingStrategy,omitempty"` DefaultCertificate *corev1.LocalObjectReference `json:"defaultCertificate,omitempty"` NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` RouteSelector *metav1.LabelSelectorApplyConfiguration `json:"routeSelector,omitempty"` NodePlacement *NodePlacementApplyConfiguration `json:"nodePlacement,omitempty"` - TLSSecurityProfile *v1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` + TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` ClientTLS *ClientTLSApplyConfiguration `json:"clientTLS,omitempty"` RouteAdmission *RouteAdmissionPolicyApplyConfiguration `json:"routeAdmission,omitempty"` Logging *IngressControllerLoggingApplyConfiguration `json:"logging,omitempty"` HTTPHeaders *IngressControllerHTTPHeadersApplyConfiguration `json:"httpHeaders,omitempty"` - HTTPEmptyRequestsPolicy *apioperatorv1.HTTPEmptyRequestsPolicy `json:"httpEmptyRequestsPolicy,omitempty"` + HTTPEmptyRequestsPolicy *operatorv1.HTTPEmptyRequestsPolicy `json:"httpEmptyRequestsPolicy,omitempty"` TuningOptions *IngressControllerTuningOptionsApplyConfiguration `json:"tuningOptions,omitempty"` UnsupportedConfigOverrides *runtime.RawExtension `json:"unsupportedConfigOverrides,omitempty"` HTTPCompression *HTTPCompressionPolicyApplyConfiguration `json:"httpCompression,omitempty"` @@ -49,7 +49,7 @@ func (b *IngressControllerSpecApplyConfiguration) WithDomain(value string) *Ingr // WithHttpErrorCodePages sets the HttpErrorCodePages field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HttpErrorCodePages field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHttpErrorCodePages(value v1.ConfigMapNameReference) *IngressControllerSpecApplyConfiguration { +func (b *IngressControllerSpecApplyConfiguration) WithHttpErrorCodePages(value configv1.ConfigMapNameReference) *IngressControllerSpecApplyConfiguration { b.HttpErrorCodePages = &value return b } @@ -105,7 +105,7 @@ func (b *IngressControllerSpecApplyConfiguration) WithNodePlacement(value *NodeP // WithTLSSecurityProfile sets the TLSSecurityProfile field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLSSecurityProfile field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithTLSSecurityProfile(value v1.TLSSecurityProfile) *IngressControllerSpecApplyConfiguration { +func (b *IngressControllerSpecApplyConfiguration) WithTLSSecurityProfile(value configv1.TLSSecurityProfile) *IngressControllerSpecApplyConfiguration { b.TLSSecurityProfile = &value return b } @@ -145,7 +145,7 @@ func (b *IngressControllerSpecApplyConfiguration) WithHTTPHeaders(value *Ingress // WithHTTPEmptyRequestsPolicy sets the HTTPEmptyRequestsPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HTTPEmptyRequestsPolicy field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHTTPEmptyRequestsPolicy(value apioperatorv1.HTTPEmptyRequestsPolicy) *IngressControllerSpecApplyConfiguration { +func (b *IngressControllerSpecApplyConfiguration) WithHTTPEmptyRequestsPolicy(value operatorv1.HTTPEmptyRequestsPolicy) *IngressControllerSpecApplyConfiguration { b.HTTPEmptyRequestsPolicy = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go b/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go index 39a4ef113c..122801cf10 100644 --- a/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go +++ b/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go @@ -3,25 +3,25 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // IngressControllerTuningOptionsApplyConfiguration represents a declarative configuration of the IngressControllerTuningOptions type for use // with apply. type IngressControllerTuningOptionsApplyConfiguration struct { - HeaderBufferBytes *int32 `json:"headerBufferBytes,omitempty"` - HeaderBufferMaxRewriteBytes *int32 `json:"headerBufferMaxRewriteBytes,omitempty"` - ThreadCount *int32 `json:"threadCount,omitempty"` - ClientTimeout *v1.Duration `json:"clientTimeout,omitempty"` - ClientFinTimeout *v1.Duration `json:"clientFinTimeout,omitempty"` - ServerTimeout *v1.Duration `json:"serverTimeout,omitempty"` - ServerFinTimeout *v1.Duration `json:"serverFinTimeout,omitempty"` - TunnelTimeout *v1.Duration `json:"tunnelTimeout,omitempty"` - ConnectTimeout *v1.Duration `json:"connectTimeout,omitempty"` - TLSInspectDelay *v1.Duration `json:"tlsInspectDelay,omitempty"` - HealthCheckInterval *v1.Duration `json:"healthCheckInterval,omitempty"` - MaxConnections *int32 `json:"maxConnections,omitempty"` - ReloadInterval *v1.Duration `json:"reloadInterval,omitempty"` + HeaderBufferBytes *int32 `json:"headerBufferBytes,omitempty"` + HeaderBufferMaxRewriteBytes *int32 `json:"headerBufferMaxRewriteBytes,omitempty"` + ThreadCount *int32 `json:"threadCount,omitempty"` + ClientTimeout *metav1.Duration `json:"clientTimeout,omitempty"` + ClientFinTimeout *metav1.Duration `json:"clientFinTimeout,omitempty"` + ServerTimeout *metav1.Duration `json:"serverTimeout,omitempty"` + ServerFinTimeout *metav1.Duration `json:"serverFinTimeout,omitempty"` + TunnelTimeout *metav1.Duration `json:"tunnelTimeout,omitempty"` + ConnectTimeout *metav1.Duration `json:"connectTimeout,omitempty"` + TLSInspectDelay *metav1.Duration `json:"tlsInspectDelay,omitempty"` + HealthCheckInterval *metav1.Duration `json:"healthCheckInterval,omitempty"` + MaxConnections *int32 `json:"maxConnections,omitempty"` + ReloadInterval *metav1.Duration `json:"reloadInterval,omitempty"` } // IngressControllerTuningOptionsApplyConfiguration constructs a declarative configuration of the IngressControllerTuningOptions type for use with @@ -57,7 +57,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithThreadCount(value // WithClientTimeout sets the ClientTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClientTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientTimeout(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.ClientTimeout = &value return b } @@ -65,7 +65,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientTimeout(val // WithClientFinTimeout sets the ClientFinTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClientFinTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientFinTimeout(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientFinTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.ClientFinTimeout = &value return b } @@ -73,7 +73,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientFinTimeout( // WithServerTimeout sets the ServerTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServerTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerTimeout(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.ServerTimeout = &value return b } @@ -81,7 +81,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerTimeout(val // WithServerFinTimeout sets the ServerFinTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServerFinTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerFinTimeout(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerFinTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.ServerFinTimeout = &value return b } @@ -89,7 +89,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerFinTimeout( // WithTunnelTimeout sets the TunnelTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TunnelTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithTunnelTimeout(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithTunnelTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.TunnelTimeout = &value return b } @@ -97,7 +97,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithTunnelTimeout(val // WithConnectTimeout sets the ConnectTimeout field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ConnectTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithConnectTimeout(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithConnectTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.ConnectTimeout = &value return b } @@ -105,7 +105,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithConnectTimeout(va // WithTLSInspectDelay sets the TLSInspectDelay field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TLSInspectDelay field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithTLSInspectDelay(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithTLSInspectDelay(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.TLSInspectDelay = &value return b } @@ -113,7 +113,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithTLSInspectDelay(v // WithHealthCheckInterval sets the HealthCheckInterval field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HealthCheckInterval field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithHealthCheckInterval(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithHealthCheckInterval(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.HealthCheckInterval = &value return b } @@ -129,7 +129,7 @@ func (b *IngressControllerTuningOptionsApplyConfiguration) WithMaxConnections(va // WithReloadInterval sets the ReloadInterval field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReloadInterval field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithReloadInterval(value v1.Duration) *IngressControllerTuningOptionsApplyConfiguration { +func (b *IngressControllerTuningOptionsApplyConfiguration) WithReloadInterval(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { b.ReloadInterval = &value return b } diff --git a/operator/applyconfigurations/operator/v1/insightsoperator.go b/operator/applyconfigurations/operator/v1/insightsoperator.go index 1b3d80040d..b694f1ca34 100644 --- a/operator/applyconfigurations/operator/v1/insightsoperator.go +++ b/operator/applyconfigurations/operator/v1/insightsoperator.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // InsightsOperatorApplyConfiguration represents a declarative configuration of the InsightsOperator type for use // with apply. type InsightsOperatorApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *InsightsOperatorSpecApplyConfiguration `json:"spec,omitempty"` - Status *InsightsOperatorStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *InsightsOperatorSpecApplyConfiguration `json:"spec,omitempty"` + Status *InsightsOperatorStatusApplyConfiguration `json:"status,omitempty"` } // InsightsOperator constructs a declarative configuration of the InsightsOperator type for use with @@ -41,18 +41,18 @@ func InsightsOperator(name string) *InsightsOperatorApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractInsightsOperator(insightsOperator *apioperatorv1.InsightsOperator, fieldManager string) (*InsightsOperatorApplyConfiguration, error) { +func ExtractInsightsOperator(insightsOperator *operatorv1.InsightsOperator, fieldManager string) (*InsightsOperatorApplyConfiguration, error) { return extractInsightsOperator(insightsOperator, fieldManager, "") } // ExtractInsightsOperatorStatus is the same as ExtractInsightsOperator except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractInsightsOperatorStatus(insightsOperator *apioperatorv1.InsightsOperator, fieldManager string) (*InsightsOperatorApplyConfiguration, error) { +func ExtractInsightsOperatorStatus(insightsOperator *operatorv1.InsightsOperator, fieldManager string) (*InsightsOperatorApplyConfiguration, error) { return extractInsightsOperator(insightsOperator, fieldManager, "status") } -func extractInsightsOperator(insightsOperator *apioperatorv1.InsightsOperator, fieldManager string, subresource string) (*InsightsOperatorApplyConfiguration, error) { +func extractInsightsOperator(insightsOperator *operatorv1.InsightsOperator, fieldManager string, subresource string) (*InsightsOperatorApplyConfiguration, error) { b := &InsightsOperatorApplyConfiguration{} err := managedfields.ExtractInto(insightsOperator, internal.Parser().Type("com.github.openshift.api.operator.v1.InsightsOperator"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractInsightsOperator(insightsOperator *apioperatorv1.InsightsOperator, f // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithKind(value string) *InsightsOperatorApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *InsightsOperatorApplyConfiguration) WithKind(value string) *InsightsOpe // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithAPIVersion(value string) *InsightsOperatorApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *InsightsOperatorApplyConfiguration) WithAPIVersion(value string) *Insig // If called multiple times, the Name field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithName(value string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *InsightsOperatorApplyConfiguration) WithName(value string) *InsightsOpe // If called multiple times, the GenerateName field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithGenerateName(value string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *InsightsOperatorApplyConfiguration) WithGenerateName(value string) *Ins // If called multiple times, the Namespace field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithNamespace(value string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *InsightsOperatorApplyConfiguration) WithNamespace(value string) *Insigh // If called multiple times, the UID field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithUID(value types.UID) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *InsightsOperatorApplyConfiguration) WithUID(value types.UID) *InsightsO // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithResourceVersion(value string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *InsightsOperatorApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithGeneration(value int64) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithCreationTimestamp(value metav1.Time) *InsightsOperatorApplyConfiguration { +func (b *InsightsOperatorApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *InsightsOperatorApplyConfiguration { +func (b *InsightsOperatorApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *InsightsOperatorApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *InsightsOperatorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *InsightsOperatorApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *InsightsOperatorApplyConfiguration) WithLabels(entries map[string]string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *InsightsOperatorApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *InsightsOperatorApplyConfiguration) WithAnnotations(entries map[string]string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *InsightsOperatorApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InsightsOperatorApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *InsightsOperatorApplyConfiguration { +func (b *InsightsOperatorApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *InsightsOperatorApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *InsightsOperatorApplyConfiguration) WithFinalizers(values ...string) *InsightsOperatorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *InsightsOperatorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *InsightsOperatorApplyConfiguration) WithStatus(value *InsightsOperatorS // GetName retrieves the value of the Name field in the declarative configuration. func (b *InsightsOperatorApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/insightsoperatorspec.go b/operator/applyconfigurations/operator/v1/insightsoperatorspec.go index 4f9b356a9d..c6085db4a2 100644 --- a/operator/applyconfigurations/operator/v1/insightsoperatorspec.go +++ b/operator/applyconfigurations/operator/v1/insightsoperatorspec.go @@ -23,7 +23,7 @@ func InsightsOperatorSpec() *InsightsOperatorSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *InsightsOperatorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *InsightsOperatorSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *InsightsOperatorSpecApplyConfiguration) WithManagementState(value opera // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *InsightsOperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *InsightsOperatorSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *InsightsOperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.L // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *InsightsOperatorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *InsightsOperatorSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *InsightsOperatorSpecApplyConfiguration) WithOperatorLogLevel(value oper // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *InsightsOperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *InsightsOperatorSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *InsightsOperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides( // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *InsightsOperatorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *InsightsOperatorSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go b/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go index 2cb67f8daf..2c679168d2 100644 --- a/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go +++ b/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go @@ -20,7 +20,7 @@ func InsightsOperatorStatus() *InsightsOperatorStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *InsightsOperatorStatusApplyConfiguration) WithObservedGeneration(value int64) *InsightsOperatorStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -32,7 +32,7 @@ func (b *InsightsOperatorStatusApplyConfiguration) WithConditions(values ...*Ope if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -41,7 +41,7 @@ func (b *InsightsOperatorStatusApplyConfiguration) WithConditions(values ...*Ope // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *InsightsOperatorStatusApplyConfiguration) WithVersion(value string) *InsightsOperatorStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -49,7 +49,7 @@ func (b *InsightsOperatorStatusApplyConfiguration) WithVersion(value string) *In // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *InsightsOperatorStatusApplyConfiguration) WithReadyReplicas(value int32) *InsightsOperatorStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -57,7 +57,7 @@ func (b *InsightsOperatorStatusApplyConfiguration) WithReadyReplicas(value int32 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *InsightsOperatorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *InsightsOperatorStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -69,7 +69,7 @@ func (b *InsightsOperatorStatusApplyConfiguration) WithGenerations(values ...*Ge if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/insightsreport.go b/operator/applyconfigurations/operator/v1/insightsreport.go index 63de379da6..ce89fca0fd 100644 --- a/operator/applyconfigurations/operator/v1/insightsreport.go +++ b/operator/applyconfigurations/operator/v1/insightsreport.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // InsightsReportApplyConfiguration represents a declarative configuration of the InsightsReport type for use // with apply. type InsightsReportApplyConfiguration struct { - DownloadedAt *v1.Time `json:"downloadedAt,omitempty"` + DownloadedAt *metav1.Time `json:"downloadedAt,omitempty"` HealthChecks []HealthCheckApplyConfiguration `json:"healthChecks,omitempty"` } @@ -22,7 +22,7 @@ func InsightsReport() *InsightsReportApplyConfiguration { // WithDownloadedAt sets the DownloadedAt field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DownloadedAt field is set to the value of the last call. -func (b *InsightsReportApplyConfiguration) WithDownloadedAt(value v1.Time) *InsightsReportApplyConfiguration { +func (b *InsightsReportApplyConfiguration) WithDownloadedAt(value metav1.Time) *InsightsReportApplyConfiguration { b.DownloadedAt = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ipamconfig.go b/operator/applyconfigurations/operator/v1/ipamconfig.go index ad8f7bfc96..c2cbc3069f 100644 --- a/operator/applyconfigurations/operator/v1/ipamconfig.go +++ b/operator/applyconfigurations/operator/v1/ipamconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IPAMConfigApplyConfiguration represents a declarative configuration of the IPAMConfig type for use // with apply. type IPAMConfigApplyConfiguration struct { - Type *v1.IPAMType `json:"type,omitempty"` + Type *operatorv1.IPAMType `json:"type,omitempty"` StaticIPAMConfig *StaticIPAMConfigApplyConfiguration `json:"staticIPAMConfig,omitempty"` } @@ -22,7 +22,7 @@ func IPAMConfig() *IPAMConfigApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *IPAMConfigApplyConfiguration) WithType(value v1.IPAMType) *IPAMConfigApplyConfiguration { +func (b *IPAMConfigApplyConfiguration) WithType(value operatorv1.IPAMType) *IPAMConfigApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/ipfixconfig.go b/operator/applyconfigurations/operator/v1/ipfixconfig.go index 52334e2ac4..c9bee3327f 100644 --- a/operator/applyconfigurations/operator/v1/ipfixconfig.go +++ b/operator/applyconfigurations/operator/v1/ipfixconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IPFIXConfigApplyConfiguration represents a declarative configuration of the IPFIXConfig type for use // with apply. type IPFIXConfigApplyConfiguration struct { - Collectors []v1.IPPort `json:"collectors,omitempty"` + Collectors []operatorv1.IPPort `json:"collectors,omitempty"` } // IPFIXConfigApplyConfiguration constructs a declarative configuration of the IPFIXConfig type for use with @@ -21,7 +21,7 @@ func IPFIXConfig() *IPFIXConfigApplyConfiguration { // WithCollectors adds the given value to the Collectors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Collectors field. -func (b *IPFIXConfigApplyConfiguration) WithCollectors(values ...v1.IPPort) *IPFIXConfigApplyConfiguration { +func (b *IPFIXConfigApplyConfiguration) WithCollectors(values ...operatorv1.IPPort) *IPFIXConfigApplyConfiguration { for i := range values { b.Collectors = append(b.Collectors, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/ipsecconfig.go b/operator/applyconfigurations/operator/v1/ipsecconfig.go index ebe738b9f9..4ee55c3417 100644 --- a/operator/applyconfigurations/operator/v1/ipsecconfig.go +++ b/operator/applyconfigurations/operator/v1/ipsecconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // IPsecConfigApplyConfiguration represents a declarative configuration of the IPsecConfig type for use // with apply. type IPsecConfigApplyConfiguration struct { - Mode *v1.IPsecMode `json:"mode,omitempty"` + Mode *operatorv1.IPsecMode `json:"mode,omitempty"` } // IPsecConfigApplyConfiguration constructs a declarative configuration of the IPsecConfig type for use with @@ -21,7 +21,7 @@ func IPsecConfig() *IPsecConfigApplyConfiguration { // WithMode sets the Mode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Mode field is set to the value of the last call. -func (b *IPsecConfigApplyConfiguration) WithMode(value v1.IPsecMode) *IPsecConfigApplyConfiguration { +func (b *IPsecConfigApplyConfiguration) WithMode(value operatorv1.IPsecMode) *IPsecConfigApplyConfiguration { b.Mode = &value return b } diff --git a/operator/applyconfigurations/operator/v1/kubeapiserver.go b/operator/applyconfigurations/operator/v1/kubeapiserver.go index d4ee463df5..8ff4292bc2 100644 --- a/operator/applyconfigurations/operator/v1/kubeapiserver.go +++ b/operator/applyconfigurations/operator/v1/kubeapiserver.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // KubeAPIServerApplyConfiguration represents a declarative configuration of the KubeAPIServer type for use // with apply. type KubeAPIServerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *KubeAPIServerSpecApplyConfiguration `json:"spec,omitempty"` - Status *KubeAPIServerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *KubeAPIServerSpecApplyConfiguration `json:"spec,omitempty"` + Status *KubeAPIServerStatusApplyConfiguration `json:"status,omitempty"` } // KubeAPIServer constructs a declarative configuration of the KubeAPIServer type for use with @@ -41,18 +41,18 @@ func KubeAPIServer(name string) *KubeAPIServerApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractKubeAPIServer(kubeAPIServer *apioperatorv1.KubeAPIServer, fieldManager string) (*KubeAPIServerApplyConfiguration, error) { +func ExtractKubeAPIServer(kubeAPIServer *operatorv1.KubeAPIServer, fieldManager string) (*KubeAPIServerApplyConfiguration, error) { return extractKubeAPIServer(kubeAPIServer, fieldManager, "") } // ExtractKubeAPIServerStatus is the same as ExtractKubeAPIServer except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractKubeAPIServerStatus(kubeAPIServer *apioperatorv1.KubeAPIServer, fieldManager string) (*KubeAPIServerApplyConfiguration, error) { +func ExtractKubeAPIServerStatus(kubeAPIServer *operatorv1.KubeAPIServer, fieldManager string) (*KubeAPIServerApplyConfiguration, error) { return extractKubeAPIServer(kubeAPIServer, fieldManager, "status") } -func extractKubeAPIServer(kubeAPIServer *apioperatorv1.KubeAPIServer, fieldManager string, subresource string) (*KubeAPIServerApplyConfiguration, error) { +func extractKubeAPIServer(kubeAPIServer *operatorv1.KubeAPIServer, fieldManager string, subresource string) (*KubeAPIServerApplyConfiguration, error) { b := &KubeAPIServerApplyConfiguration{} err := managedfields.ExtractInto(kubeAPIServer, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeAPIServer"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractKubeAPIServer(kubeAPIServer *apioperatorv1.KubeAPIServer, fieldManag // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithKind(value string) *KubeAPIServerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *KubeAPIServerApplyConfiguration) WithKind(value string) *KubeAPIServerA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithAPIVersion(value string) *KubeAPIServerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *KubeAPIServerApplyConfiguration) WithAPIVersion(value string) *KubeAPIS // If called multiple times, the Name field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithName(value string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *KubeAPIServerApplyConfiguration) WithName(value string) *KubeAPIServerA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithGenerateName(value string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *KubeAPIServerApplyConfiguration) WithGenerateName(value string) *KubeAP // If called multiple times, the Namespace field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithNamespace(value string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *KubeAPIServerApplyConfiguration) WithNamespace(value string) *KubeAPISe // If called multiple times, the UID field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithUID(value types.UID) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *KubeAPIServerApplyConfiguration) WithUID(value types.UID) *KubeAPIServe // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithResourceVersion(value string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *KubeAPIServerApplyConfiguration) WithResourceVersion(value string) *Kub // If called multiple times, the Generation field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithGeneration(value int64) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeAPIServerApplyConfiguration { +func (b *KubeAPIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeAPIServerApplyConfiguration { +func (b *KubeAPIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *KubeAPIServerApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *KubeAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *KubeAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *KubeAPIServerApplyConfiguration) WithLabels(entries map[string]string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *KubeAPIServerApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *KubeAPIServerApplyConfiguration) WithAnnotations(entries map[string]string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *KubeAPIServerApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeAPIServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubeAPIServerApplyConfiguration { +func (b *KubeAPIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *KubeAPIServerApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *KubeAPIServerApplyConfiguration) WithFinalizers(values ...string) *KubeAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *KubeAPIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *KubeAPIServerApplyConfiguration) WithStatus(value *KubeAPIServerStatusA // GetName retrieves the value of the Name field in the declarative configuration. func (b *KubeAPIServerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/kubeapiserverspec.go b/operator/applyconfigurations/operator/v1/kubeapiserverspec.go index dba25a5cd4..71b60a95b1 100644 --- a/operator/applyconfigurations/operator/v1/kubeapiserverspec.go +++ b/operator/applyconfigurations/operator/v1/kubeapiserverspec.go @@ -23,7 +23,7 @@ func KubeAPIServerSpec() *KubeAPIServerSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeAPIServerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithManagementState(value operator // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeAPIServerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogL // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeAPIServerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeAPIServerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,7 +55,7 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeAPIServerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } @@ -63,7 +63,7 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.R // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithForceRedeploymentReason(value string) *KubeAPIServerSpecApplyConfiguration { - b.ForceRedeploymentReason = &value + b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value return b } @@ -71,7 +71,7 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithForceRedeploymentReason(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailedRevisionLimit field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *KubeAPIServerSpecApplyConfiguration { - b.FailedRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value return b } @@ -79,6 +79,6 @@ func (b *KubeAPIServerSpecApplyConfiguration) WithFailedRevisionLimit(value int3 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. func (b *KubeAPIServerSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *KubeAPIServerSpecApplyConfiguration { - b.SucceededRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value return b } diff --git a/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go b/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go index 033be6dbae..ff65c51136 100644 --- a/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go +++ b/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go @@ -19,7 +19,7 @@ func KubeAPIServerStatus() *KubeAPIServerStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *KubeAPIServerStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeAPIServerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -31,7 +31,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithConditions(values ...*Operat if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -40,7 +40,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithConditions(values ...*Operat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *KubeAPIServerStatusApplyConfiguration) WithVersion(value string) *KubeAPIServerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -48,7 +48,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithVersion(value string) *KubeA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *KubeAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeAPIServerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -56,7 +56,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *KubeAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeAPIServerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -68,7 +68,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithGenerations(values ...*Gener if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } @@ -77,7 +77,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithGenerations(values ...*Gener // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. func (b *KubeAPIServerStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *KubeAPIServerStatusApplyConfiguration { - b.LatestAvailableRevisionReason = &value + b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value return b } @@ -89,7 +89,7 @@ func (b *KubeAPIServerStatusApplyConfiguration) WithNodeStatuses(values ...*Node if values[i] == nil { panic("nil value passed to WithNodeStatuses") } - b.NodeStatuses = append(b.NodeStatuses, *values[i]) + b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/kubecontrollermanager.go b/operator/applyconfigurations/operator/v1/kubecontrollermanager.go index d67f73dff9..731b6793ab 100644 --- a/operator/applyconfigurations/operator/v1/kubecontrollermanager.go +++ b/operator/applyconfigurations/operator/v1/kubecontrollermanager.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // KubeControllerManagerApplyConfiguration represents a declarative configuration of the KubeControllerManager type for use // with apply. type KubeControllerManagerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *KubeControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` - Status *KubeControllerManagerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *KubeControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` + Status *KubeControllerManagerStatusApplyConfiguration `json:"status,omitempty"` } // KubeControllerManager constructs a declarative configuration of the KubeControllerManager type for use with @@ -41,18 +41,18 @@ func KubeControllerManager(name string) *KubeControllerManagerApplyConfiguration // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractKubeControllerManager(kubeControllerManager *apioperatorv1.KubeControllerManager, fieldManager string) (*KubeControllerManagerApplyConfiguration, error) { +func ExtractKubeControllerManager(kubeControllerManager *operatorv1.KubeControllerManager, fieldManager string) (*KubeControllerManagerApplyConfiguration, error) { return extractKubeControllerManager(kubeControllerManager, fieldManager, "") } // ExtractKubeControllerManagerStatus is the same as ExtractKubeControllerManager except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractKubeControllerManagerStatus(kubeControllerManager *apioperatorv1.KubeControllerManager, fieldManager string) (*KubeControllerManagerApplyConfiguration, error) { +func ExtractKubeControllerManagerStatus(kubeControllerManager *operatorv1.KubeControllerManager, fieldManager string) (*KubeControllerManagerApplyConfiguration, error) { return extractKubeControllerManager(kubeControllerManager, fieldManager, "status") } -func extractKubeControllerManager(kubeControllerManager *apioperatorv1.KubeControllerManager, fieldManager string, subresource string) (*KubeControllerManagerApplyConfiguration, error) { +func extractKubeControllerManager(kubeControllerManager *operatorv1.KubeControllerManager, fieldManager string, subresource string) (*KubeControllerManagerApplyConfiguration, error) { b := &KubeControllerManagerApplyConfiguration{} err := managedfields.ExtractInto(kubeControllerManager, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeControllerManager"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractKubeControllerManager(kubeControllerManager *apioperatorv1.KubeContr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithKind(value string) *KubeControllerManagerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithKind(value string) *KubeCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithAPIVersion(value string) *KubeControllerManagerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithAPIVersion(value string) * // If called multiple times, the Name field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithName(value string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithName(value string) *KubeCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithGenerateName(value string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithNamespace(value string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithNamespace(value string) *K // If called multiple times, the UID field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithUID(value types.UID) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithUID(value types.UID) *Kube // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithResourceVersion(value string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *KubeControllerManagerApplyConfiguration) WithResourceVersion(value stri // If called multiple times, the Generation field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithGeneration(value int64) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeControllerManagerApplyConfiguration { +func (b *KubeControllerManagerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeControllerManagerApplyConfiguration { +func (b *KubeControllerManagerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *KubeControllerManagerApplyConfiguration) WithDeletionTimestamp(value me // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *KubeControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *KubeControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds // overwriting an existing map entries in Labels field with the same key. func (b *KubeControllerManagerApplyConfiguration) WithLabels(entries map[string]string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *KubeControllerManagerApplyConfiguration) WithLabels(entries map[string] // overwriting an existing map entries in Annotations field with the same key. func (b *KubeControllerManagerApplyConfiguration) WithAnnotations(entries map[string]string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *KubeControllerManagerApplyConfiguration) WithAnnotations(entries map[st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeControllerManagerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubeControllerManagerApplyConfiguration { +func (b *KubeControllerManagerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *KubeControllerManagerApplyConfiguration) WithOwnerReferences(values ... func (b *KubeControllerManagerApplyConfiguration) WithFinalizers(values ...string) *KubeControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *KubeControllerManagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *KubeControllerManagerApplyConfiguration) WithStatus(value *KubeControll // GetName retrieves the value of the Name field in the declarative configuration. func (b *KubeControllerManagerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go b/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go index 2e2923af0e..8a51815784 100644 --- a/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go +++ b/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go @@ -24,7 +24,7 @@ func KubeControllerManagerSpec() *KubeControllerManagerSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeControllerManagerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -32,7 +32,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithManagementState(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeControllerManagerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -40,7 +40,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithLogLevel(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeControllerManagerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -48,7 +48,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeControllerManagerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -56,7 +56,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeControllerManagerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } @@ -64,7 +64,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithObservedConfig(value r // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithForceRedeploymentReason(value string) *KubeControllerManagerSpecApplyConfiguration { - b.ForceRedeploymentReason = &value + b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value return b } @@ -72,7 +72,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithForceRedeploymentReaso // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailedRevisionLimit field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *KubeControllerManagerSpecApplyConfiguration { - b.FailedRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value return b } @@ -80,7 +80,7 @@ func (b *KubeControllerManagerSpecApplyConfiguration) WithFailedRevisionLimit(va // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. func (b *KubeControllerManagerSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *KubeControllerManagerSpecApplyConfiguration { - b.SucceededRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value return b } diff --git a/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go b/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go index 5c11f66226..1c72dff266 100644 --- a/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go +++ b/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go @@ -18,7 +18,7 @@ func KubeControllerManagerStatus() *KubeControllerManagerStatusApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *KubeControllerManagerStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeControllerManagerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithConditions(values .. if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithConditions(values .. // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *KubeControllerManagerStatusApplyConfiguration) WithVersion(value string) *KubeControllerManagerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithVersion(value string // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *KubeControllerManagerStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeControllerManagerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithReadyReplicas(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *KubeControllerManagerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeControllerManagerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithGenerations(values . if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } @@ -76,7 +76,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithGenerations(values . // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. func (b *KubeControllerManagerStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *KubeControllerManagerStatusApplyConfiguration { - b.LatestAvailableRevisionReason = &value + b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value return b } @@ -88,7 +88,7 @@ func (b *KubeControllerManagerStatusApplyConfiguration) WithNodeStatuses(values if values[i] == nil { panic("nil value passed to WithNodeStatuses") } - b.NodeStatuses = append(b.NodeStatuses, *values[i]) + b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/kubescheduler.go b/operator/applyconfigurations/operator/v1/kubescheduler.go index 27f969980a..77e6ca3432 100644 --- a/operator/applyconfigurations/operator/v1/kubescheduler.go +++ b/operator/applyconfigurations/operator/v1/kubescheduler.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // KubeSchedulerApplyConfiguration represents a declarative configuration of the KubeScheduler type for use // with apply. type KubeSchedulerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *KubeSchedulerSpecApplyConfiguration `json:"spec,omitempty"` - Status *KubeSchedulerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *KubeSchedulerSpecApplyConfiguration `json:"spec,omitempty"` + Status *KubeSchedulerStatusApplyConfiguration `json:"status,omitempty"` } // KubeScheduler constructs a declarative configuration of the KubeScheduler type for use with @@ -41,18 +41,18 @@ func KubeScheduler(name string) *KubeSchedulerApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractKubeScheduler(kubeScheduler *apioperatorv1.KubeScheduler, fieldManager string) (*KubeSchedulerApplyConfiguration, error) { +func ExtractKubeScheduler(kubeScheduler *operatorv1.KubeScheduler, fieldManager string) (*KubeSchedulerApplyConfiguration, error) { return extractKubeScheduler(kubeScheduler, fieldManager, "") } // ExtractKubeSchedulerStatus is the same as ExtractKubeScheduler except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractKubeSchedulerStatus(kubeScheduler *apioperatorv1.KubeScheduler, fieldManager string) (*KubeSchedulerApplyConfiguration, error) { +func ExtractKubeSchedulerStatus(kubeScheduler *operatorv1.KubeScheduler, fieldManager string) (*KubeSchedulerApplyConfiguration, error) { return extractKubeScheduler(kubeScheduler, fieldManager, "status") } -func extractKubeScheduler(kubeScheduler *apioperatorv1.KubeScheduler, fieldManager string, subresource string) (*KubeSchedulerApplyConfiguration, error) { +func extractKubeScheduler(kubeScheduler *operatorv1.KubeScheduler, fieldManager string, subresource string) (*KubeSchedulerApplyConfiguration, error) { b := &KubeSchedulerApplyConfiguration{} err := managedfields.ExtractInto(kubeScheduler, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeScheduler"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractKubeScheduler(kubeScheduler *apioperatorv1.KubeScheduler, fieldManag // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithKind(value string) *KubeSchedulerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *KubeSchedulerApplyConfiguration) WithKind(value string) *KubeSchedulerA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithAPIVersion(value string) *KubeSchedulerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *KubeSchedulerApplyConfiguration) WithAPIVersion(value string) *KubeSche // If called multiple times, the Name field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithName(value string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *KubeSchedulerApplyConfiguration) WithName(value string) *KubeSchedulerA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithGenerateName(value string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *KubeSchedulerApplyConfiguration) WithGenerateName(value string) *KubeSc // If called multiple times, the Namespace field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithNamespace(value string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *KubeSchedulerApplyConfiguration) WithNamespace(value string) *KubeSched // If called multiple times, the UID field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithUID(value types.UID) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *KubeSchedulerApplyConfiguration) WithUID(value types.UID) *KubeSchedule // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithResourceVersion(value string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *KubeSchedulerApplyConfiguration) WithResourceVersion(value string) *Kub // If called multiple times, the Generation field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithGeneration(value int64) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeSchedulerApplyConfiguration { +func (b *KubeSchedulerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeSchedulerApplyConfiguration { +func (b *KubeSchedulerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *KubeSchedulerApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *KubeSchedulerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *KubeSchedulerApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *KubeSchedulerApplyConfiguration) WithLabels(entries map[string]string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *KubeSchedulerApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *KubeSchedulerApplyConfiguration) WithAnnotations(entries map[string]string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *KubeSchedulerApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeSchedulerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubeSchedulerApplyConfiguration { +func (b *KubeSchedulerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *KubeSchedulerApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *KubeSchedulerApplyConfiguration) WithFinalizers(values ...string) *KubeSchedulerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *KubeSchedulerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *KubeSchedulerApplyConfiguration) WithStatus(value *KubeSchedulerStatusA // GetName retrieves the value of the Name field in the declarative configuration. func (b *KubeSchedulerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/kubeschedulerspec.go b/operator/applyconfigurations/operator/v1/kubeschedulerspec.go index 44d8eeab22..94bd1d61fd 100644 --- a/operator/applyconfigurations/operator/v1/kubeschedulerspec.go +++ b/operator/applyconfigurations/operator/v1/kubeschedulerspec.go @@ -23,7 +23,7 @@ func KubeSchedulerSpec() *KubeSchedulerSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeSchedulerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithManagementState(value operator // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeSchedulerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogL // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeSchedulerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithOperatorLogLevel(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeSchedulerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,7 +55,7 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithUnsupportedConfigOverrides(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeSchedulerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } @@ -63,7 +63,7 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithObservedConfig(value runtime.R // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithForceRedeploymentReason(value string) *KubeSchedulerSpecApplyConfiguration { - b.ForceRedeploymentReason = &value + b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value return b } @@ -71,7 +71,7 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithForceRedeploymentReason(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailedRevisionLimit field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *KubeSchedulerSpecApplyConfiguration { - b.FailedRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value return b } @@ -79,6 +79,6 @@ func (b *KubeSchedulerSpecApplyConfiguration) WithFailedRevisionLimit(value int3 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. func (b *KubeSchedulerSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *KubeSchedulerSpecApplyConfiguration { - b.SucceededRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value return b } diff --git a/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go b/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go index e6784996f4..821b4c3f94 100644 --- a/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go +++ b/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go @@ -18,7 +18,7 @@ func KubeSchedulerStatus() *KubeSchedulerStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *KubeSchedulerStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeSchedulerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithConditions(values ...*Operat if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithConditions(values ...*Operat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *KubeSchedulerStatusApplyConfiguration) WithVersion(value string) *KubeSchedulerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithVersion(value string) *KubeS // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *KubeSchedulerStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeSchedulerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithReadyReplicas(value int32) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *KubeSchedulerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeSchedulerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithGenerations(values ...*Gener if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } @@ -76,7 +76,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithGenerations(values ...*Gener // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. func (b *KubeSchedulerStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *KubeSchedulerStatusApplyConfiguration { - b.LatestAvailableRevisionReason = &value + b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value return b } @@ -88,7 +88,7 @@ func (b *KubeSchedulerStatusApplyConfiguration) WithNodeStatuses(values ...*Node if values[i] == nil { panic("nil value passed to WithNodeStatuses") } - b.NodeStatuses = append(b.NodeStatuses, *values[i]) + b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go b/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go index d0f693f9d0..5c84a133f3 100644 --- a/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go +++ b/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // KubeStorageVersionMigratorApplyConfiguration represents a declarative configuration of the KubeStorageVersionMigrator type for use // with apply. type KubeStorageVersionMigratorApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *KubeStorageVersionMigratorSpecApplyConfiguration `json:"spec,omitempty"` - Status *KubeStorageVersionMigratorStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *KubeStorageVersionMigratorSpecApplyConfiguration `json:"spec,omitempty"` + Status *KubeStorageVersionMigratorStatusApplyConfiguration `json:"status,omitempty"` } // KubeStorageVersionMigrator constructs a declarative configuration of the KubeStorageVersionMigrator type for use with @@ -41,18 +41,18 @@ func KubeStorageVersionMigrator(name string) *KubeStorageVersionMigratorApplyCon // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractKubeStorageVersionMigrator(kubeStorageVersionMigrator *apioperatorv1.KubeStorageVersionMigrator, fieldManager string) (*KubeStorageVersionMigratorApplyConfiguration, error) { +func ExtractKubeStorageVersionMigrator(kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, fieldManager string) (*KubeStorageVersionMigratorApplyConfiguration, error) { return extractKubeStorageVersionMigrator(kubeStorageVersionMigrator, fieldManager, "") } // ExtractKubeStorageVersionMigratorStatus is the same as ExtractKubeStorageVersionMigrator except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractKubeStorageVersionMigratorStatus(kubeStorageVersionMigrator *apioperatorv1.KubeStorageVersionMigrator, fieldManager string) (*KubeStorageVersionMigratorApplyConfiguration, error) { +func ExtractKubeStorageVersionMigratorStatus(kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, fieldManager string) (*KubeStorageVersionMigratorApplyConfiguration, error) { return extractKubeStorageVersionMigrator(kubeStorageVersionMigrator, fieldManager, "status") } -func extractKubeStorageVersionMigrator(kubeStorageVersionMigrator *apioperatorv1.KubeStorageVersionMigrator, fieldManager string, subresource string) (*KubeStorageVersionMigratorApplyConfiguration, error) { +func extractKubeStorageVersionMigrator(kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, fieldManager string, subresource string) (*KubeStorageVersionMigratorApplyConfiguration, error) { b := &KubeStorageVersionMigratorApplyConfiguration{} err := managedfields.ExtractInto(kubeStorageVersionMigrator, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeStorageVersionMigrator"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractKubeStorageVersionMigrator(kubeStorageVersionMigrator *apioperatorv1 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithKind(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithKind(value string) *K // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithAPIVersion(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithAPIVersion(value stri // If called multiple times, the Name field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithName(value string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithName(value string) *K // If called multiple times, the GenerateName field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithGenerateName(value string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithGenerateName(value st // If called multiple times, the Namespace field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithNamespace(value string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithNamespace(value strin // If called multiple times, the UID field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithUID(value types.UID) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithUID(value types.UID) // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithResourceVersion(value string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithResourceVersion(value // If called multiple times, the Generation field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithGeneration(value int64) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeStorageVersionMigratorApplyConfiguration { +func (b *KubeStorageVersionMigratorApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeStorageVersionMigratorApplyConfiguration { +func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionTimestamp(val // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionGracePeriodSe // overwriting an existing map entries in Labels field with the same key. func (b *KubeStorageVersionMigratorApplyConfiguration) WithLabels(entries map[string]string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithLabels(entries map[st // overwriting an existing map entries in Annotations field with the same key. func (b *KubeStorageVersionMigratorApplyConfiguration) WithAnnotations(entries map[string]string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithAnnotations(entries m // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubeStorageVersionMigratorApplyConfiguration { +func (b *KubeStorageVersionMigratorApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithOwnerReferences(value func (b *KubeStorageVersionMigratorApplyConfiguration) WithFinalizers(values ...string) *KubeStorageVersionMigratorApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *KubeStorageVersionMigratorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *KubeStorageVersionMigratorApplyConfiguration) WithStatus(value *KubeSto // GetName retrieves the value of the Name field in the declarative configuration. func (b *KubeStorageVersionMigratorApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go b/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go index 94e5576594..6acfcb82b3 100644 --- a/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go +++ b/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go @@ -23,7 +23,7 @@ func KubeStorageVersionMigratorSpec() *KubeStorageVersionMigratorSpecApplyConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithManagementState(v // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithLogLevel(value op // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithOperatorLogLevel( // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithUnsupportedConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go b/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go index 438067c251..cad8e2f76d 100644 --- a/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go +++ b/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go @@ -18,7 +18,7 @@ func KubeStorageVersionMigratorStatus() *KubeStorageVersionMigratorStatusApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithConditions(valu if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithConditions(valu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithVersion(value string) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithVersion(value s // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithReadyReplicas(v // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithGenerations(val if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go b/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go index 46941714c0..b8e83a02cf 100644 --- a/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go +++ b/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // LoadBalancerStrategyApplyConfiguration represents a declarative configuration of the LoadBalancerStrategy type for use // with apply. type LoadBalancerStrategyApplyConfiguration struct { - Scope *v1.LoadBalancerScope `json:"scope,omitempty"` - AllowedSourceRanges []v1.CIDR `json:"allowedSourceRanges,omitempty"` + Scope *operatorv1.LoadBalancerScope `json:"scope,omitempty"` + AllowedSourceRanges []operatorv1.CIDR `json:"allowedSourceRanges,omitempty"` ProviderParameters *ProviderLoadBalancerParametersApplyConfiguration `json:"providerParameters,omitempty"` - DNSManagementPolicy *v1.LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"` + DNSManagementPolicy *operatorv1.LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"` } // LoadBalancerStrategyApplyConfiguration constructs a declarative configuration of the LoadBalancerStrategy type for use with @@ -24,7 +24,7 @@ func LoadBalancerStrategy() *LoadBalancerStrategyApplyConfiguration { // WithScope sets the Scope field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scope field is set to the value of the last call. -func (b *LoadBalancerStrategyApplyConfiguration) WithScope(value v1.LoadBalancerScope) *LoadBalancerStrategyApplyConfiguration { +func (b *LoadBalancerStrategyApplyConfiguration) WithScope(value operatorv1.LoadBalancerScope) *LoadBalancerStrategyApplyConfiguration { b.Scope = &value return b } @@ -32,7 +32,7 @@ func (b *LoadBalancerStrategyApplyConfiguration) WithScope(value v1.LoadBalancer // WithAllowedSourceRanges adds the given value to the AllowedSourceRanges field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AllowedSourceRanges field. -func (b *LoadBalancerStrategyApplyConfiguration) WithAllowedSourceRanges(values ...v1.CIDR) *LoadBalancerStrategyApplyConfiguration { +func (b *LoadBalancerStrategyApplyConfiguration) WithAllowedSourceRanges(values ...operatorv1.CIDR) *LoadBalancerStrategyApplyConfiguration { for i := range values { b.AllowedSourceRanges = append(b.AllowedSourceRanges, values[i]) } @@ -50,7 +50,7 @@ func (b *LoadBalancerStrategyApplyConfiguration) WithProviderParameters(value *P // WithDNSManagementPolicy sets the DNSManagementPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DNSManagementPolicy field is set to the value of the last call. -func (b *LoadBalancerStrategyApplyConfiguration) WithDNSManagementPolicy(value v1.LoadBalancerDNSManagementPolicy) *LoadBalancerStrategyApplyConfiguration { +func (b *LoadBalancerStrategyApplyConfiguration) WithDNSManagementPolicy(value operatorv1.LoadBalancerDNSManagementPolicy) *LoadBalancerStrategyApplyConfiguration { b.DNSManagementPolicy = &value return b } diff --git a/operator/applyconfigurations/operator/v1/loggingdestination.go b/operator/applyconfigurations/operator/v1/loggingdestination.go index de06e9cc4c..36a7bd5c58 100644 --- a/operator/applyconfigurations/operator/v1/loggingdestination.go +++ b/operator/applyconfigurations/operator/v1/loggingdestination.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // LoggingDestinationApplyConfiguration represents a declarative configuration of the LoggingDestination type for use // with apply. type LoggingDestinationApplyConfiguration struct { - Type *v1.LoggingDestinationType `json:"type,omitempty"` + Type *operatorv1.LoggingDestinationType `json:"type,omitempty"` Syslog *SyslogLoggingDestinationParametersApplyConfiguration `json:"syslog,omitempty"` Container *ContainerLoggingDestinationParametersApplyConfiguration `json:"container,omitempty"` } @@ -23,7 +23,7 @@ func LoggingDestination() *LoggingDestinationApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *LoggingDestinationApplyConfiguration) WithType(value v1.LoggingDestinationType) *LoggingDestinationApplyConfiguration { +func (b *LoggingDestinationApplyConfiguration) WithType(value operatorv1.LoggingDestinationType) *LoggingDestinationApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/machineconfiguration.go b/operator/applyconfigurations/operator/v1/machineconfiguration.go index 36b1d6d237..35d2b867eb 100644 --- a/operator/applyconfigurations/operator/v1/machineconfiguration.go +++ b/operator/applyconfigurations/operator/v1/machineconfiguration.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // MachineConfigurationApplyConfiguration represents a declarative configuration of the MachineConfiguration type for use // with apply. type MachineConfigurationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *MachineConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - Status *MachineConfigurationStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *MachineConfigurationSpecApplyConfiguration `json:"spec,omitempty"` + Status *MachineConfigurationStatusApplyConfiguration `json:"status,omitempty"` } // MachineConfiguration constructs a declarative configuration of the MachineConfiguration type for use with @@ -41,18 +41,18 @@ func MachineConfiguration(name string) *MachineConfigurationApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractMachineConfiguration(machineConfiguration *apioperatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { +func ExtractMachineConfiguration(machineConfiguration *operatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { return extractMachineConfiguration(machineConfiguration, fieldManager, "") } // ExtractMachineConfigurationStatus is the same as ExtractMachineConfiguration except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractMachineConfigurationStatus(machineConfiguration *apioperatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { +func ExtractMachineConfigurationStatus(machineConfiguration *operatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { return extractMachineConfiguration(machineConfiguration, fieldManager, "status") } -func extractMachineConfiguration(machineConfiguration *apioperatorv1.MachineConfiguration, fieldManager string, subresource string) (*MachineConfigurationApplyConfiguration, error) { +func extractMachineConfiguration(machineConfiguration *operatorv1.MachineConfiguration, fieldManager string, subresource string) (*MachineConfigurationApplyConfiguration, error) { b := &MachineConfigurationApplyConfiguration{} err := managedfields.ExtractInto(machineConfiguration, internal.Parser().Type("com.github.openshift.api.operator.v1.MachineConfiguration"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractMachineConfiguration(machineConfiguration *apioperatorv1.MachineConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithKind(value string) *MachineConfigurationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *MachineConfigurationApplyConfiguration) WithKind(value string) *Machine // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithAPIVersion(value string) *MachineConfigurationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *MachineConfigurationApplyConfiguration) WithAPIVersion(value string) *M // If called multiple times, the Name field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithName(value string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *MachineConfigurationApplyConfiguration) WithName(value string) *Machine // If called multiple times, the GenerateName field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithGenerateName(value string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *MachineConfigurationApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithNamespace(value string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *MachineConfigurationApplyConfiguration) WithNamespace(value string) *Ma // If called multiple times, the UID field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithUID(value types.UID) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *MachineConfigurationApplyConfiguration) WithUID(value types.UID) *Machi // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithResourceVersion(value string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *MachineConfigurationApplyConfiguration) WithResourceVersion(value strin // If called multiple times, the Generation field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithGeneration(value int64) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MachineConfigurationApplyConfiguration { +func (b *MachineConfigurationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MachineConfigurationApplyConfiguration { +func (b *MachineConfigurationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *MachineConfigurationApplyConfiguration) WithDeletionTimestamp(value met // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *MachineConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *MachineConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds( // overwriting an existing map entries in Labels field with the same key. func (b *MachineConfigurationApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *MachineConfigurationApplyConfiguration) WithLabels(entries map[string]s // overwriting an existing map entries in Annotations field with the same key. func (b *MachineConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *MachineConfigurationApplyConfiguration) WithAnnotations(entries map[str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *MachineConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MachineConfigurationApplyConfiguration { +func (b *MachineConfigurationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *MachineConfigurationApplyConfiguration) WithOwnerReferences(values ...* func (b *MachineConfigurationApplyConfiguration) WithFinalizers(values ...string) *MachineConfigurationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *MachineConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *MachineConfigurationApplyConfiguration) WithStatus(value *MachineConfig // GetName retrieves the value of the Name field in the declarative configuration. func (b *MachineConfigurationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/machineconfigurationspec.go b/operator/applyconfigurations/operator/v1/machineconfigurationspec.go index 416406329b..cee3c69fc0 100644 --- a/operator/applyconfigurations/operator/v1/machineconfigurationspec.go +++ b/operator/applyconfigurations/operator/v1/machineconfigurationspec.go @@ -25,7 +25,7 @@ func MachineConfigurationSpec() *MachineConfigurationSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *MachineConfigurationSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -33,7 +33,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithManagementState(value o // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *MachineConfigurationSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -41,7 +41,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithLogLevel(value operator // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *MachineConfigurationSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -49,7 +49,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithOperatorLogLevel(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *MachineConfigurationSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -57,7 +57,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithUnsupportedConfigOverri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *MachineConfigurationSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } @@ -65,7 +65,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithObservedConfig(value ru // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithForceRedeploymentReason(value string) *MachineConfigurationSpecApplyConfiguration { - b.ForceRedeploymentReason = &value + b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value return b } @@ -73,7 +73,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithForceRedeploymentReason // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailedRevisionLimit field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *MachineConfigurationSpecApplyConfiguration { - b.FailedRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value return b } @@ -81,7 +81,7 @@ func (b *MachineConfigurationSpecApplyConfiguration) WithFailedRevisionLimit(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. func (b *MachineConfigurationSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *MachineConfigurationSpecApplyConfiguration { - b.SucceededRevisionLimit = &value + b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value return b } diff --git a/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go b/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go index 95956ac09d..ad38847882 100644 --- a/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go +++ b/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // MachineConfigurationStatusApplyConfiguration represents a declarative configuration of the MachineConfigurationStatus type for use // with apply. type MachineConfigurationStatusApplyConfiguration struct { ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` NodeDisruptionPolicyStatus *NodeDisruptionPolicyStatusApplyConfiguration `json:"nodeDisruptionPolicyStatus,omitempty"` } @@ -31,7 +31,7 @@ func (b *MachineConfigurationStatusApplyConfiguration) WithObservedGeneration(va // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *MachineConfigurationStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { +func (b *MachineConfigurationStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithConditions") diff --git a/operator/applyconfigurations/operator/v1/machinemanager.go b/operator/applyconfigurations/operator/v1/machinemanager.go index 2764cecdc7..d4a9f3c2cb 100644 --- a/operator/applyconfigurations/operator/v1/machinemanager.go +++ b/operator/applyconfigurations/operator/v1/machinemanager.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // MachineManagerApplyConfiguration represents a declarative configuration of the MachineManager type for use // with apply. type MachineManagerApplyConfiguration struct { - Resource *v1.MachineManagerMachineSetsResourceType `json:"resource,omitempty"` - APIGroup *v1.MachineManagerMachineSetsAPIGroupType `json:"apiGroup,omitempty"` - Selection *MachineManagerSelectorApplyConfiguration `json:"selection,omitempty"` + Resource *operatorv1.MachineManagerMachineSetsResourceType `json:"resource,omitempty"` + APIGroup *operatorv1.MachineManagerMachineSetsAPIGroupType `json:"apiGroup,omitempty"` + Selection *MachineManagerSelectorApplyConfiguration `json:"selection,omitempty"` } // MachineManagerApplyConfiguration constructs a declarative configuration of the MachineManager type for use with @@ -23,7 +23,7 @@ func MachineManager() *MachineManagerApplyConfiguration { // WithResource sets the Resource field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resource field is set to the value of the last call. -func (b *MachineManagerApplyConfiguration) WithResource(value v1.MachineManagerMachineSetsResourceType) *MachineManagerApplyConfiguration { +func (b *MachineManagerApplyConfiguration) WithResource(value operatorv1.MachineManagerMachineSetsResourceType) *MachineManagerApplyConfiguration { b.Resource = &value return b } @@ -31,7 +31,7 @@ func (b *MachineManagerApplyConfiguration) WithResource(value v1.MachineManagerM // WithAPIGroup sets the APIGroup field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIGroup field is set to the value of the last call. -func (b *MachineManagerApplyConfiguration) WithAPIGroup(value v1.MachineManagerMachineSetsAPIGroupType) *MachineManagerApplyConfiguration { +func (b *MachineManagerApplyConfiguration) WithAPIGroup(value operatorv1.MachineManagerMachineSetsAPIGroupType) *MachineManagerApplyConfiguration { b.APIGroup = &value return b } diff --git a/operator/applyconfigurations/operator/v1/machinemanagerselector.go b/operator/applyconfigurations/operator/v1/machinemanagerselector.go index ef88c772f9..3bb44f21c3 100644 --- a/operator/applyconfigurations/operator/v1/machinemanagerselector.go +++ b/operator/applyconfigurations/operator/v1/machinemanagerselector.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // MachineManagerSelectorApplyConfiguration represents a declarative configuration of the MachineManagerSelector type for use // with apply. type MachineManagerSelectorApplyConfiguration struct { - Mode *v1.MachineManagerSelectorMode `json:"mode,omitempty"` - Partial *PartialSelectorApplyConfiguration `json:"partial,omitempty"` + Mode *operatorv1.MachineManagerSelectorMode `json:"mode,omitempty"` + Partial *PartialSelectorApplyConfiguration `json:"partial,omitempty"` } // MachineManagerSelectorApplyConfiguration constructs a declarative configuration of the MachineManagerSelector type for use with @@ -22,7 +22,7 @@ func MachineManagerSelector() *MachineManagerSelectorApplyConfiguration { // WithMode sets the Mode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Mode field is set to the value of the last call. -func (b *MachineManagerSelectorApplyConfiguration) WithMode(value v1.MachineManagerSelectorMode) *MachineManagerSelectorApplyConfiguration { +func (b *MachineManagerSelectorApplyConfiguration) WithMode(value operatorv1.MachineManagerSelectorMode) *MachineManagerSelectorApplyConfiguration { b.Mode = &value return b } diff --git a/operator/applyconfigurations/operator/v1/netflowconfig.go b/operator/applyconfigurations/operator/v1/netflowconfig.go index 34d2bb365a..868906043b 100644 --- a/operator/applyconfigurations/operator/v1/netflowconfig.go +++ b/operator/applyconfigurations/operator/v1/netflowconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // NetFlowConfigApplyConfiguration represents a declarative configuration of the NetFlowConfig type for use // with apply. type NetFlowConfigApplyConfiguration struct { - Collectors []v1.IPPort `json:"collectors,omitempty"` + Collectors []operatorv1.IPPort `json:"collectors,omitempty"` } // NetFlowConfigApplyConfiguration constructs a declarative configuration of the NetFlowConfig type for use with @@ -21,7 +21,7 @@ func NetFlowConfig() *NetFlowConfigApplyConfiguration { // WithCollectors adds the given value to the Collectors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Collectors field. -func (b *NetFlowConfigApplyConfiguration) WithCollectors(values ...v1.IPPort) *NetFlowConfigApplyConfiguration { +func (b *NetFlowConfigApplyConfiguration) WithCollectors(values ...operatorv1.IPPort) *NetFlowConfigApplyConfiguration { for i := range values { b.Collectors = append(b.Collectors, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/network.go b/operator/applyconfigurations/operator/v1/network.go index fd66e0065f..0bdf453af7 100644 --- a/operator/applyconfigurations/operator/v1/network.go +++ b/operator/applyconfigurations/operator/v1/network.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NetworkApplyConfiguration represents a declarative configuration of the Network type for use // with apply. type NetworkApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkSpecApplyConfiguration `json:"spec,omitempty"` - Status *NetworkStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *NetworkSpecApplyConfiguration `json:"spec,omitempty"` + Status *NetworkStatusApplyConfiguration `json:"status,omitempty"` } // Network constructs a declarative configuration of the Network type for use with @@ -41,18 +41,18 @@ func Network(name string) *NetworkApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractNetwork(network *apioperatorv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { +func ExtractNetwork(network *operatorv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { return extractNetwork(network, fieldManager, "") } // ExtractNetworkStatus is the same as ExtractNetwork except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractNetworkStatus(network *apioperatorv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { +func ExtractNetworkStatus(network *operatorv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { return extractNetwork(network, fieldManager, "status") } -func extractNetwork(network *apioperatorv1.Network, fieldManager string, subresource string) (*NetworkApplyConfiguration, error) { +func extractNetwork(network *operatorv1.Network, fieldManager string, subresource string) (*NetworkApplyConfiguration, error) { b := &NetworkApplyConfiguration{} err := managedfields.ExtractInto(network, internal.Parser().Type("com.github.openshift.api.operator.v1.Network"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractNetwork(network *apioperatorv1.Network, fieldManager string, subreso // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithKind(value string) *NetworkApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *NetworkApplyConfiguration) WithKind(value string) *NetworkApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithAPIVersion(value string) *NetworkApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *NetworkApplyConfiguration) WithAPIVersion(value string) *NetworkApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithName(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *NetworkApplyConfiguration) WithName(value string) *NetworkApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithGenerateName(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *NetworkApplyConfiguration) WithGenerateName(value string) *NetworkApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithNamespace(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *NetworkApplyConfiguration) WithNamespace(value string) *NetworkApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithUID(value types.UID) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *NetworkApplyConfiguration) WithUID(value types.UID) *NetworkApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithResourceVersion(value string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *NetworkApplyConfiguration) WithResourceVersion(value string) *NetworkAp // If called multiple times, the Generation field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithGeneration(value int64) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NetworkApplyConfiguration { +func (b *NetworkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NetworkApplyConfiguration { +func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Ne // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *NetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *NetworkApplyConfiguration) WithLabels(entries map[string]string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *NetworkApplyConfiguration) WithLabels(entries map[string]string) *Netwo // overwriting an existing map entries in Annotations field with the same key. func (b *NetworkApplyConfiguration) WithAnnotations(entries map[string]string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *NetworkApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NetworkApplyConfiguration { +func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *NetworkApplyConfiguration) WithFinalizers(values ...string) *NetworkApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *NetworkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *NetworkApplyConfiguration) WithStatus(value *NetworkStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *NetworkApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/networkspec.go b/operator/applyconfigurations/operator/v1/networkspec.go index a134395427..66803aa952 100644 --- a/operator/applyconfigurations/operator/v1/networkspec.go +++ b/operator/applyconfigurations/operator/v1/networkspec.go @@ -35,7 +35,7 @@ func NetworkSpec() *NetworkSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *NetworkSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *NetworkSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -43,7 +43,7 @@ func (b *NetworkSpecApplyConfiguration) WithManagementState(value operatorv1.Man // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *NetworkSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *NetworkSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -51,7 +51,7 @@ func (b *NetworkSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *NetworkSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *NetworkSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -59,7 +59,7 @@ func (b *NetworkSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.Lo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *NetworkSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *NetworkSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -67,7 +67,7 @@ func (b *NetworkSpecApplyConfiguration) WithUnsupportedConfigOverrides(value run // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *NetworkSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *NetworkSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/networkstatus.go b/operator/applyconfigurations/operator/v1/networkstatus.go index 85d74e0dba..9753b2161b 100644 --- a/operator/applyconfigurations/operator/v1/networkstatus.go +++ b/operator/applyconfigurations/operator/v1/networkstatus.go @@ -18,7 +18,7 @@ func NetworkStatus() *NetworkStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *NetworkStatusApplyConfiguration) WithObservedGeneration(value int64) *NetworkStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *NetworkStatusApplyConfiguration) WithConditions(values ...*OperatorCond if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *NetworkStatusApplyConfiguration) WithConditions(values ...*OperatorCond // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *NetworkStatusApplyConfiguration) WithVersion(value string) *NetworkStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *NetworkStatusApplyConfiguration) WithVersion(value string) *NetworkStat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *NetworkStatusApplyConfiguration) WithReadyReplicas(value int32) *NetworkStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *NetworkStatusApplyConfiguration) WithReadyReplicas(value int32) *Networ // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *NetworkStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *NetworkStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *NetworkStatusApplyConfiguration) WithGenerations(values ...*GenerationS if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go b/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go index fb5fb5443b..2421469d84 100644 --- a/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go +++ b/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // NodeDisruptionPolicySpecActionApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicySpecAction type for use // with apply. type NodeDisruptionPolicySpecActionApplyConfiguration struct { - Type *v1.NodeDisruptionPolicySpecActionType `json:"type,omitempty"` - Reload *ReloadServiceApplyConfiguration `json:"reload,omitempty"` - Restart *RestartServiceApplyConfiguration `json:"restart,omitempty"` + Type *operatorv1.NodeDisruptionPolicySpecActionType `json:"type,omitempty"` + Reload *ReloadServiceApplyConfiguration `json:"reload,omitempty"` + Restart *RestartServiceApplyConfiguration `json:"restart,omitempty"` } // NodeDisruptionPolicySpecActionApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicySpecAction type for use with @@ -23,7 +23,7 @@ func NodeDisruptionPolicySpecAction() *NodeDisruptionPolicySpecActionApplyConfig // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecActionApplyConfiguration) WithType(value v1.NodeDisruptionPolicySpecActionType) *NodeDisruptionPolicySpecActionApplyConfiguration { +func (b *NodeDisruptionPolicySpecActionApplyConfiguration) WithType(value operatorv1.NodeDisruptionPolicySpecActionType) *NodeDisruptionPolicySpecActionApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go b/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go index 6f62f343ab..d368f1c0c1 100644 --- a/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go +++ b/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // NodeDisruptionPolicySpecUnitApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicySpecUnit type for use // with apply. type NodeDisruptionPolicySpecUnitApplyConfiguration struct { - Name *v1.NodeDisruptionPolicyServiceName `json:"name,omitempty"` + Name *operatorv1.NodeDisruptionPolicyServiceName `json:"name,omitempty"` Actions []NodeDisruptionPolicySpecActionApplyConfiguration `json:"actions,omitempty"` } @@ -22,7 +22,7 @@ func NodeDisruptionPolicySpecUnit() *NodeDisruptionPolicySpecUnitApplyConfigurat // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecUnitApplyConfiguration) WithName(value v1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicySpecUnitApplyConfiguration { +func (b *NodeDisruptionPolicySpecUnitApplyConfiguration) WithName(value operatorv1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicySpecUnitApplyConfiguration { b.Name = &value return b } diff --git a/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go b/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go index ec621575cb..05afe97a6c 100644 --- a/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go +++ b/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // NodeDisruptionPolicyStatusActionApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusAction type for use // with apply. type NodeDisruptionPolicyStatusActionApplyConfiguration struct { - Type *v1.NodeDisruptionPolicyStatusActionType `json:"type,omitempty"` - Reload *ReloadServiceApplyConfiguration `json:"reload,omitempty"` - Restart *RestartServiceApplyConfiguration `json:"restart,omitempty"` + Type *operatorv1.NodeDisruptionPolicyStatusActionType `json:"type,omitempty"` + Reload *ReloadServiceApplyConfiguration `json:"reload,omitempty"` + Restart *RestartServiceApplyConfiguration `json:"restart,omitempty"` } // NodeDisruptionPolicyStatusActionApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyStatusAction type for use with @@ -23,7 +23,7 @@ func NodeDisruptionPolicyStatusAction() *NodeDisruptionPolicyStatusActionApplyCo // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusActionApplyConfiguration) WithType(value v1.NodeDisruptionPolicyStatusActionType) *NodeDisruptionPolicyStatusActionApplyConfiguration { +func (b *NodeDisruptionPolicyStatusActionApplyConfiguration) WithType(value operatorv1.NodeDisruptionPolicyStatusActionType) *NodeDisruptionPolicyStatusActionApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go b/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go index f4dd5fac7d..5d97a26615 100644 --- a/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go +++ b/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // NodeDisruptionPolicyStatusUnitApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusUnit type for use // with apply. type NodeDisruptionPolicyStatusUnitApplyConfiguration struct { - Name *v1.NodeDisruptionPolicyServiceName `json:"name,omitempty"` + Name *operatorv1.NodeDisruptionPolicyServiceName `json:"name,omitempty"` Actions []NodeDisruptionPolicyStatusActionApplyConfiguration `json:"actions,omitempty"` } @@ -22,7 +22,7 @@ func NodeDisruptionPolicyStatusUnit() *NodeDisruptionPolicyStatusUnitApplyConfig // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusUnitApplyConfiguration) WithName(value v1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicyStatusUnitApplyConfiguration { +func (b *NodeDisruptionPolicyStatusUnitApplyConfiguration) WithName(value operatorv1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicyStatusUnitApplyConfiguration { b.Name = &value return b } diff --git a/operator/applyconfigurations/operator/v1/nodeplacement.go b/operator/applyconfigurations/operator/v1/nodeplacement.go index 5f387ac712..a9fca29635 100644 --- a/operator/applyconfigurations/operator/v1/nodeplacement.go +++ b/operator/applyconfigurations/operator/v1/nodeplacement.go @@ -4,14 +4,14 @@ package v1 import ( corev1 "k8s.io/api/core/v1" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NodePlacementApplyConfiguration represents a declarative configuration of the NodePlacement type for use // with apply. type NodePlacementApplyConfiguration struct { - NodeSelector *v1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"` - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + NodeSelector *metav1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` } // NodePlacementApplyConfiguration constructs a declarative configuration of the NodePlacement type for use with @@ -23,7 +23,7 @@ func NodePlacement() *NodePlacementApplyConfiguration { // WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeSelector field is set to the value of the last call. -func (b *NodePlacementApplyConfiguration) WithNodeSelector(value *v1.LabelSelectorApplyConfiguration) *NodePlacementApplyConfiguration { +func (b *NodePlacementApplyConfiguration) WithNodeSelector(value *metav1.LabelSelectorApplyConfiguration) *NodePlacementApplyConfiguration { b.NodeSelector = value return b } diff --git a/operator/applyconfigurations/operator/v1/nodeportstrategy.go b/operator/applyconfigurations/operator/v1/nodeportstrategy.go index 01167311f6..cb3f65687e 100644 --- a/operator/applyconfigurations/operator/v1/nodeportstrategy.go +++ b/operator/applyconfigurations/operator/v1/nodeportstrategy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // NodePortStrategyApplyConfiguration represents a declarative configuration of the NodePortStrategy type for use // with apply. type NodePortStrategyApplyConfiguration struct { - Protocol *v1.IngressControllerProtocol `json:"protocol,omitempty"` + Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` } // NodePortStrategyApplyConfiguration constructs a declarative configuration of the NodePortStrategy type for use with @@ -21,7 +21,7 @@ func NodePortStrategy() *NodePortStrategyApplyConfiguration { // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *NodePortStrategyApplyConfiguration) WithProtocol(value v1.IngressControllerProtocol) *NodePortStrategyApplyConfiguration { +func (b *NodePortStrategyApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *NodePortStrategyApplyConfiguration { b.Protocol = &value return b } diff --git a/operator/applyconfigurations/operator/v1/nodestatus.go b/operator/applyconfigurations/operator/v1/nodestatus.go index b5a3cac334..3c53a88f0e 100644 --- a/operator/applyconfigurations/operator/v1/nodestatus.go +++ b/operator/applyconfigurations/operator/v1/nodestatus.go @@ -3,21 +3,21 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use // with apply. type NodeStatusApplyConfiguration struct { - NodeName *string `json:"nodeName,omitempty"` - CurrentRevision *int32 `json:"currentRevision,omitempty"` - TargetRevision *int32 `json:"targetRevision,omitempty"` - LastFailedRevision *int32 `json:"lastFailedRevision,omitempty"` - LastFailedTime *v1.Time `json:"lastFailedTime,omitempty"` - LastFailedReason *string `json:"lastFailedReason,omitempty"` - LastFailedCount *int `json:"lastFailedCount,omitempty"` - LastFallbackCount *int `json:"lastFallbackCount,omitempty"` - LastFailedRevisionErrors []string `json:"lastFailedRevisionErrors,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + CurrentRevision *int32 `json:"currentRevision,omitempty"` + TargetRevision *int32 `json:"targetRevision,omitempty"` + LastFailedRevision *int32 `json:"lastFailedRevision,omitempty"` + LastFailedTime *metav1.Time `json:"lastFailedTime,omitempty"` + LastFailedReason *string `json:"lastFailedReason,omitempty"` + LastFailedCount *int `json:"lastFailedCount,omitempty"` + LastFallbackCount *int `json:"lastFallbackCount,omitempty"` + LastFailedRevisionErrors []string `json:"lastFailedRevisionErrors,omitempty"` } // NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with @@ -61,7 +61,7 @@ func (b *NodeStatusApplyConfiguration) WithLastFailedRevision(value int32) *Node // WithLastFailedTime sets the LastFailedTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastFailedTime field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithLastFailedTime(value v1.Time) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithLastFailedTime(value metav1.Time) *NodeStatusApplyConfiguration { b.LastFailedTime = &value return b } diff --git a/operator/applyconfigurations/operator/v1/olm.go b/operator/applyconfigurations/operator/v1/olm.go index d1fb739538..93b3c4e79a 100644 --- a/operator/applyconfigurations/operator/v1/olm.go +++ b/operator/applyconfigurations/operator/v1/olm.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OLMApplyConfiguration represents a declarative configuration of the OLM type for use // with apply. type OLMApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OLMSpecApplyConfiguration `json:"spec,omitempty"` - Status *OLMStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OLMSpecApplyConfiguration `json:"spec,omitempty"` + Status *OLMStatusApplyConfiguration `json:"status,omitempty"` } // OLM constructs a declarative configuration of the OLM type for use with @@ -41,18 +41,18 @@ func OLM(name string) *OLMApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractOLM(oLM *apioperatorv1.OLM, fieldManager string) (*OLMApplyConfiguration, error) { +func ExtractOLM(oLM *operatorv1.OLM, fieldManager string) (*OLMApplyConfiguration, error) { return extractOLM(oLM, fieldManager, "") } // ExtractOLMStatus is the same as ExtractOLM except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractOLMStatus(oLM *apioperatorv1.OLM, fieldManager string) (*OLMApplyConfiguration, error) { +func ExtractOLMStatus(oLM *operatorv1.OLM, fieldManager string) (*OLMApplyConfiguration, error) { return extractOLM(oLM, fieldManager, "status") } -func extractOLM(oLM *apioperatorv1.OLM, fieldManager string, subresource string) (*OLMApplyConfiguration, error) { +func extractOLM(oLM *operatorv1.OLM, fieldManager string, subresource string) (*OLMApplyConfiguration, error) { b := &OLMApplyConfiguration{} err := managedfields.ExtractInto(oLM, internal.Parser().Type("com.github.openshift.api.operator.v1.OLM"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractOLM(oLM *apioperatorv1.OLM, fieldManager string, subresource string) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OLMApplyConfiguration) WithKind(value string) *OLMApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *OLMApplyConfiguration) WithKind(value string) *OLMApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OLMApplyConfiguration) WithAPIVersion(value string) *OLMApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *OLMApplyConfiguration) WithAPIVersion(value string) *OLMApplyConfigurat // If called multiple times, the Name field is set to the value of the last call. func (b *OLMApplyConfiguration) WithName(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *OLMApplyConfiguration) WithName(value string) *OLMApplyConfiguration { // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OLMApplyConfiguration) WithGenerateName(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *OLMApplyConfiguration) WithGenerateName(value string) *OLMApplyConfigur // If called multiple times, the Namespace field is set to the value of the last call. func (b *OLMApplyConfiguration) WithNamespace(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *OLMApplyConfiguration) WithNamespace(value string) *OLMApplyConfigurati // If called multiple times, the UID field is set to the value of the last call. func (b *OLMApplyConfiguration) WithUID(value types.UID) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *OLMApplyConfiguration) WithUID(value types.UID) *OLMApplyConfiguration // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OLMApplyConfiguration) WithResourceVersion(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *OLMApplyConfiguration) WithResourceVersion(value string) *OLMApplyConfi // If called multiple times, the Generation field is set to the value of the last call. func (b *OLMApplyConfiguration) WithGeneration(value int64) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OLMApplyConfiguration { +func (b *OLMApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OLMApplyConfiguration { +func (b *OLMApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *OLMApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OLMApp // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OLMApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *OLMApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OLM // overwriting an existing map entries in Labels field with the same key. func (b *OLMApplyConfiguration) WithLabels(entries map[string]string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *OLMApplyConfiguration) WithLabels(entries map[string]string) *OLMApplyC // overwriting an existing map entries in Annotations field with the same key. func (b *OLMApplyConfiguration) WithAnnotations(entries map[string]string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *OLMApplyConfiguration) WithAnnotations(entries map[string]string) *OLMA // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OLMApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OLMApplyConfiguration { +func (b *OLMApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *OLMApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference func (b *OLMApplyConfiguration) WithFinalizers(values ...string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OLMApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *OLMApplyConfiguration) WithStatus(value *OLMStatusApplyConfiguration) * // GetName retrieves the value of the Name field in the declarative configuration. func (b *OLMApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/olmspec.go b/operator/applyconfigurations/operator/v1/olmspec.go index 6639c0c46c..69309aa491 100644 --- a/operator/applyconfigurations/operator/v1/olmspec.go +++ b/operator/applyconfigurations/operator/v1/olmspec.go @@ -23,7 +23,7 @@ func OLMSpec() *OLMSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OLMSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *OLMSpecApplyConfiguration) WithManagementState(value operatorv1.Managem // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OLMSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *OLMSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OLM // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OLMSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *OLMSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLev // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OLMSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *OLMSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OLMSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/olmstatus.go b/operator/applyconfigurations/operator/v1/olmstatus.go index be8e647f3a..3c2d4a184c 100644 --- a/operator/applyconfigurations/operator/v1/olmstatus.go +++ b/operator/applyconfigurations/operator/v1/olmstatus.go @@ -18,7 +18,7 @@ func OLMStatus() *OLMStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithObservedGeneration(value int64) *OLMStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *OLMStatusApplyConfiguration) WithConditions(values ...*OperatorConditio if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *OLMStatusApplyConfiguration) WithConditions(values ...*OperatorConditio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithVersion(value string) *OLMStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *OLMStatusApplyConfiguration) WithVersion(value string) *OLMStatusApplyC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithReadyReplicas(value int32) *OLMStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *OLMStatusApplyConfiguration) WithReadyReplicas(value int32) *OLMStatusA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OLMStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *OLMStatusApplyConfiguration) WithGenerations(values ...*GenerationStatu if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/openshiftapiserver.go b/operator/applyconfigurations/operator/v1/openshiftapiserver.go index 34bc2a1b11..f78286043a 100644 --- a/operator/applyconfigurations/operator/v1/openshiftapiserver.go +++ b/operator/applyconfigurations/operator/v1/openshiftapiserver.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OpenShiftAPIServerApplyConfiguration represents a declarative configuration of the OpenShiftAPIServer type for use // with apply. type OpenShiftAPIServerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OpenShiftAPIServerSpecApplyConfiguration `json:"spec,omitempty"` - Status *OpenShiftAPIServerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OpenShiftAPIServerSpecApplyConfiguration `json:"spec,omitempty"` + Status *OpenShiftAPIServerStatusApplyConfiguration `json:"status,omitempty"` } // OpenShiftAPIServer constructs a declarative configuration of the OpenShiftAPIServer type for use with @@ -41,18 +41,18 @@ func OpenShiftAPIServer(name string) *OpenShiftAPIServerApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractOpenShiftAPIServer(openShiftAPIServer *apioperatorv1.OpenShiftAPIServer, fieldManager string) (*OpenShiftAPIServerApplyConfiguration, error) { +func ExtractOpenShiftAPIServer(openShiftAPIServer *operatorv1.OpenShiftAPIServer, fieldManager string) (*OpenShiftAPIServerApplyConfiguration, error) { return extractOpenShiftAPIServer(openShiftAPIServer, fieldManager, "") } // ExtractOpenShiftAPIServerStatus is the same as ExtractOpenShiftAPIServer except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractOpenShiftAPIServerStatus(openShiftAPIServer *apioperatorv1.OpenShiftAPIServer, fieldManager string) (*OpenShiftAPIServerApplyConfiguration, error) { +func ExtractOpenShiftAPIServerStatus(openShiftAPIServer *operatorv1.OpenShiftAPIServer, fieldManager string) (*OpenShiftAPIServerApplyConfiguration, error) { return extractOpenShiftAPIServer(openShiftAPIServer, fieldManager, "status") } -func extractOpenShiftAPIServer(openShiftAPIServer *apioperatorv1.OpenShiftAPIServer, fieldManager string, subresource string) (*OpenShiftAPIServerApplyConfiguration, error) { +func extractOpenShiftAPIServer(openShiftAPIServer *operatorv1.OpenShiftAPIServer, fieldManager string, subresource string) (*OpenShiftAPIServerApplyConfiguration, error) { b := &OpenShiftAPIServerApplyConfiguration{} err := managedfields.ExtractInto(openShiftAPIServer, internal.Parser().Type("com.github.openshift.api.operator.v1.OpenShiftAPIServer"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractOpenShiftAPIServer(openShiftAPIServer *apioperatorv1.OpenShiftAPISer // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithKind(value string) *OpenShiftAPIServerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithKind(value string) *OpenShift // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithAPIVersion(value string) *OpenShiftAPIServerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithAPIVersion(value string) *Ope // If called multiple times, the Name field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithName(value string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithName(value string) *OpenShift // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithGenerateName(value string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithGenerateName(value string) *O // If called multiple times, the Namespace field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithNamespace(value string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithNamespace(value string) *Open // If called multiple times, the UID field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithUID(value types.UID) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithUID(value types.UID) *OpenShi // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithResourceVersion(value string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithResourceVersion(value string) // If called multiple times, the Generation field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithGeneration(value int64) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OpenShiftAPIServerApplyConfiguration { +func (b *OpenShiftAPIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OpenShiftAPIServerApplyConfiguration { +func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionTimestamp(value metav // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(va // overwriting an existing map entries in Labels field with the same key. func (b *OpenShiftAPIServerApplyConfiguration) WithLabels(entries map[string]string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithLabels(entries map[string]str // overwriting an existing map entries in Annotations field with the same key. func (b *OpenShiftAPIServerApplyConfiguration) WithAnnotations(entries map[string]string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithAnnotations(entries map[strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OpenShiftAPIServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OpenShiftAPIServerApplyConfiguration { +func (b *OpenShiftAPIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithOwnerReferences(values ...*v1 func (b *OpenShiftAPIServerApplyConfiguration) WithFinalizers(values ...string) *OpenShiftAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OpenShiftAPIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *OpenShiftAPIServerApplyConfiguration) WithStatus(value *OpenShiftAPISer // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenShiftAPIServerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go b/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go index 1e5545164e..562b43032d 100644 --- a/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go +++ b/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go @@ -23,7 +23,7 @@ func OpenShiftAPIServerSpec() *OpenShiftAPIServerSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *OpenShiftAPIServerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OpenShiftAPIServerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *OpenShiftAPIServerSpecApplyConfiguration) WithManagementState(value ope // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *OpenShiftAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OpenShiftAPIServerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *OpenShiftAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *OpenShiftAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OpenShiftAPIServerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *OpenShiftAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value op // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *OpenShiftAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OpenShiftAPIServerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *OpenShiftAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverride // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *OpenShiftAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OpenShiftAPIServerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go b/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go index 8abe09c0a2..776701d546 100644 --- a/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go +++ b/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go @@ -18,7 +18,7 @@ func OpenShiftAPIServerStatus() *OpenShiftAPIServerStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *OpenShiftAPIServerStatusApplyConfiguration) WithObservedGeneration(value int64) *OpenShiftAPIServerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *OpenShiftAPIServerStatusApplyConfiguration) WithConditions(values ...*O if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *OpenShiftAPIServerStatusApplyConfiguration) WithConditions(values ...*O // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *OpenShiftAPIServerStatusApplyConfiguration) WithVersion(value string) *OpenShiftAPIServerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *OpenShiftAPIServerStatusApplyConfiguration) WithVersion(value string) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *OpenShiftAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) *OpenShiftAPIServerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *OpenShiftAPIServerStatusApplyConfiguration) WithReadyReplicas(value int // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *OpenShiftAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OpenShiftAPIServerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *OpenShiftAPIServerStatusApplyConfiguration) WithGenerations(values ...* if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go b/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go index d72eb42c7e..d8dbb4848f 100644 --- a/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go +++ b/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // OpenShiftControllerManagerApplyConfiguration represents a declarative configuration of the OpenShiftControllerManager type for use // with apply. type OpenShiftControllerManagerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OpenShiftControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` - Status *OpenShiftControllerManagerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *OpenShiftControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` + Status *OpenShiftControllerManagerStatusApplyConfiguration `json:"status,omitempty"` } // OpenShiftControllerManager constructs a declarative configuration of the OpenShiftControllerManager type for use with @@ -41,18 +41,18 @@ func OpenShiftControllerManager(name string) *OpenShiftControllerManagerApplyCon // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractOpenShiftControllerManager(openShiftControllerManager *apioperatorv1.OpenShiftControllerManager, fieldManager string) (*OpenShiftControllerManagerApplyConfiguration, error) { +func ExtractOpenShiftControllerManager(openShiftControllerManager *operatorv1.OpenShiftControllerManager, fieldManager string) (*OpenShiftControllerManagerApplyConfiguration, error) { return extractOpenShiftControllerManager(openShiftControllerManager, fieldManager, "") } // ExtractOpenShiftControllerManagerStatus is the same as ExtractOpenShiftControllerManager except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractOpenShiftControllerManagerStatus(openShiftControllerManager *apioperatorv1.OpenShiftControllerManager, fieldManager string) (*OpenShiftControllerManagerApplyConfiguration, error) { +func ExtractOpenShiftControllerManagerStatus(openShiftControllerManager *operatorv1.OpenShiftControllerManager, fieldManager string) (*OpenShiftControllerManagerApplyConfiguration, error) { return extractOpenShiftControllerManager(openShiftControllerManager, fieldManager, "status") } -func extractOpenShiftControllerManager(openShiftControllerManager *apioperatorv1.OpenShiftControllerManager, fieldManager string, subresource string) (*OpenShiftControllerManagerApplyConfiguration, error) { +func extractOpenShiftControllerManager(openShiftControllerManager *operatorv1.OpenShiftControllerManager, fieldManager string, subresource string) (*OpenShiftControllerManagerApplyConfiguration, error) { b := &OpenShiftControllerManagerApplyConfiguration{} err := managedfields.ExtractInto(openShiftControllerManager, internal.Parser().Type("com.github.openshift.api.operator.v1.OpenShiftControllerManager"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractOpenShiftControllerManager(openShiftControllerManager *apioperatorv1 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithKind(value string) *OpenShiftControllerManagerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithKind(value string) *O // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithAPIVersion(value string) *OpenShiftControllerManagerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithAPIVersion(value stri // If called multiple times, the Name field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithName(value string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithName(value string) *O // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithGenerateName(value string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithGenerateName(value st // If called multiple times, the Namespace field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithNamespace(value string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithNamespace(value strin // If called multiple times, the UID field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithUID(value types.UID) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithUID(value types.UID) // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithResourceVersion(value string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithResourceVersion(value // If called multiple times, the Generation field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithGeneration(value int64) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OpenShiftControllerManagerApplyConfiguration { +func (b *OpenShiftControllerManagerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OpenShiftControllerManagerApplyConfiguration { +func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionTimestamp(val // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionGracePeriodSe // overwriting an existing map entries in Labels field with the same key. func (b *OpenShiftControllerManagerApplyConfiguration) WithLabels(entries map[string]string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithLabels(entries map[st // overwriting an existing map entries in Annotations field with the same key. func (b *OpenShiftControllerManagerApplyConfiguration) WithAnnotations(entries map[string]string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithAnnotations(entries m // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OpenShiftControllerManagerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *OpenShiftControllerManagerApplyConfiguration { +func (b *OpenShiftControllerManagerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithOwnerReferences(value func (b *OpenShiftControllerManagerApplyConfiguration) WithFinalizers(values ...string) *OpenShiftControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *OpenShiftControllerManagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *OpenShiftControllerManagerApplyConfiguration) WithStatus(value *OpenShi // GetName retrieves the value of the Name field in the declarative configuration. func (b *OpenShiftControllerManagerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go b/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go index feea2556f0..5c6a0ff506 100644 --- a/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go +++ b/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go @@ -23,7 +23,7 @@ func OpenShiftControllerManagerSpec() *OpenShiftControllerManagerSpecApplyConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OpenShiftControllerManagerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithManagementState(v // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OpenShiftControllerManagerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithLogLevel(value op // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OpenShiftControllerManagerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithOperatorLogLevel( // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OpenShiftControllerManagerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithUnsupportedConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OpenShiftControllerManagerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go b/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go index 77cffb09f5..c5b960e234 100644 --- a/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go +++ b/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go @@ -18,7 +18,7 @@ func OpenShiftControllerManagerStatus() *OpenShiftControllerManagerStatusApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithObservedGeneration(value int64) *OpenShiftControllerManagerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithConditions(valu if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithConditions(valu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithVersion(value string) *OpenShiftControllerManagerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithVersion(value s // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithReadyReplicas(value int32) *OpenShiftControllerManagerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithReadyReplicas(v // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OpenShiftControllerManagerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithGenerations(val if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go b/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go index 416f9099c3..b1dd640f69 100644 --- a/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go +++ b/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go @@ -3,17 +3,17 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // OpenShiftSDNConfigApplyConfiguration represents a declarative configuration of the OpenShiftSDNConfig type for use // with apply. type OpenShiftSDNConfigApplyConfiguration struct { - Mode *v1.SDNMode `json:"mode,omitempty"` - VXLANPort *uint32 `json:"vxlanPort,omitempty"` - MTU *uint32 `json:"mtu,omitempty"` - UseExternalOpenvswitch *bool `json:"useExternalOpenvswitch,omitempty"` - EnableUnidling *bool `json:"enableUnidling,omitempty"` + Mode *operatorv1.SDNMode `json:"mode,omitempty"` + VXLANPort *uint32 `json:"vxlanPort,omitempty"` + MTU *uint32 `json:"mtu,omitempty"` + UseExternalOpenvswitch *bool `json:"useExternalOpenvswitch,omitempty"` + EnableUnidling *bool `json:"enableUnidling,omitempty"` } // OpenShiftSDNConfigApplyConfiguration constructs a declarative configuration of the OpenShiftSDNConfig type for use with @@ -25,7 +25,7 @@ func OpenShiftSDNConfig() *OpenShiftSDNConfigApplyConfiguration { // WithMode sets the Mode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Mode field is set to the value of the last call. -func (b *OpenShiftSDNConfigApplyConfiguration) WithMode(value v1.SDNMode) *OpenShiftSDNConfigApplyConfiguration { +func (b *OpenShiftSDNConfigApplyConfiguration) WithMode(value operatorv1.SDNMode) *OpenShiftSDNConfigApplyConfiguration { b.Mode = &value return b } diff --git a/operator/applyconfigurations/operator/v1/operatorcondition.go b/operator/applyconfigurations/operator/v1/operatorcondition.go index 974f12d165..57bffabd26 100644 --- a/operator/applyconfigurations/operator/v1/operatorcondition.go +++ b/operator/applyconfigurations/operator/v1/operatorcondition.go @@ -3,18 +3,18 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // OperatorConditionApplyConfiguration represents a declarative configuration of the OperatorCondition type for use // with apply. type OperatorConditionApplyConfiguration struct { - Type *string `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *string `json:"type,omitempty"` + Status *operatorv1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // OperatorConditionApplyConfiguration constructs a declarative configuration of the OperatorCondition type for use with @@ -34,7 +34,7 @@ func (b *OperatorConditionApplyConfiguration) WithType(value string) *OperatorCo // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *OperatorConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *OperatorConditionApplyConfiguration { +func (b *OperatorConditionApplyConfiguration) WithStatus(value operatorv1.ConditionStatus) *OperatorConditionApplyConfiguration { b.Status = &value return b } diff --git a/operator/applyconfigurations/operator/v1/operatorspec.go b/operator/applyconfigurations/operator/v1/operatorspec.go index acbba63c5f..6be07d4173 100644 --- a/operator/applyconfigurations/operator/v1/operatorspec.go +++ b/operator/applyconfigurations/operator/v1/operatorspec.go @@ -3,18 +3,18 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // OperatorSpecApplyConfiguration represents a declarative configuration of the OperatorSpec type for use // with apply. type OperatorSpecApplyConfiguration struct { - ManagementState *v1.ManagementState `json:"managementState,omitempty"` - LogLevel *v1.LogLevel `json:"logLevel,omitempty"` - OperatorLogLevel *v1.LogLevel `json:"operatorLogLevel,omitempty"` - UnsupportedConfigOverrides *runtime.RawExtension `json:"unsupportedConfigOverrides,omitempty"` - ObservedConfig *runtime.RawExtension `json:"observedConfig,omitempty"` + ManagementState *operatorv1.ManagementState `json:"managementState,omitempty"` + LogLevel *operatorv1.LogLevel `json:"logLevel,omitempty"` + OperatorLogLevel *operatorv1.LogLevel `json:"operatorLogLevel,omitempty"` + UnsupportedConfigOverrides *runtime.RawExtension `json:"unsupportedConfigOverrides,omitempty"` + ObservedConfig *runtime.RawExtension `json:"observedConfig,omitempty"` } // OperatorSpecApplyConfiguration constructs a declarative configuration of the OperatorSpec type for use with @@ -26,7 +26,7 @@ func OperatorSpec() *OperatorSpecApplyConfiguration { // WithManagementState sets the ManagementState field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithManagementState(value v1.ManagementState) *OperatorSpecApplyConfiguration { +func (b *OperatorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OperatorSpecApplyConfiguration { b.ManagementState = &value return b } @@ -34,7 +34,7 @@ func (b *OperatorSpecApplyConfiguration) WithManagementState(value v1.Management // WithLogLevel sets the LogLevel field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithLogLevel(value v1.LogLevel) *OperatorSpecApplyConfiguration { +func (b *OperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OperatorSpecApplyConfiguration { b.LogLevel = &value return b } @@ -42,7 +42,7 @@ func (b *OperatorSpecApplyConfiguration) WithLogLevel(value v1.LogLevel) *Operat // WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithOperatorLogLevel(value v1.LogLevel) *OperatorSpecApplyConfiguration { +func (b *OperatorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OperatorSpecApplyConfiguration { b.OperatorLogLevel = &value return b } diff --git a/operator/applyconfigurations/operator/v1/partialselector.go b/operator/applyconfigurations/operator/v1/partialselector.go index 0403575977..885c402797 100644 --- a/operator/applyconfigurations/operator/v1/partialselector.go +++ b/operator/applyconfigurations/operator/v1/partialselector.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PartialSelectorApplyConfiguration represents a declarative configuration of the PartialSelector type for use // with apply. type PartialSelectorApplyConfiguration struct { - MachineResourceSelector *v1.LabelSelectorApplyConfiguration `json:"machineResourceSelector,omitempty"` + MachineResourceSelector *metav1.LabelSelectorApplyConfiguration `json:"machineResourceSelector,omitempty"` } // PartialSelectorApplyConfiguration constructs a declarative configuration of the PartialSelector type for use with @@ -21,7 +21,7 @@ func PartialSelector() *PartialSelectorApplyConfiguration { // WithMachineResourceSelector sets the MachineResourceSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MachineResourceSelector field is set to the value of the last call. -func (b *PartialSelectorApplyConfiguration) WithMachineResourceSelector(value *v1.LabelSelectorApplyConfiguration) *PartialSelectorApplyConfiguration { +func (b *PartialSelectorApplyConfiguration) WithMachineResourceSelector(value *metav1.LabelSelectorApplyConfiguration) *PartialSelectorApplyConfiguration { b.MachineResourceSelector = value return b } diff --git a/operator/applyconfigurations/operator/v1/perspectivevisibility.go b/operator/applyconfigurations/operator/v1/perspectivevisibility.go index 1dd11f8000..2225574191 100644 --- a/operator/applyconfigurations/operator/v1/perspectivevisibility.go +++ b/operator/applyconfigurations/operator/v1/perspectivevisibility.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // PerspectiveVisibilityApplyConfiguration represents a declarative configuration of the PerspectiveVisibility type for use // with apply. type PerspectiveVisibilityApplyConfiguration struct { - State *v1.PerspectiveState `json:"state,omitempty"` + State *operatorv1.PerspectiveState `json:"state,omitempty"` AccessReview *ResourceAttributesAccessReviewApplyConfiguration `json:"accessReview,omitempty"` } @@ -22,7 +22,7 @@ func PerspectiveVisibility() *PerspectiveVisibilityApplyConfiguration { // WithState sets the State field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the State field is set to the value of the last call. -func (b *PerspectiveVisibilityApplyConfiguration) WithState(value v1.PerspectiveState) *PerspectiveVisibilityApplyConfiguration { +func (b *PerspectiveVisibilityApplyConfiguration) WithState(value operatorv1.PerspectiveState) *PerspectiveVisibilityApplyConfiguration { b.State = &value return b } diff --git a/operator/applyconfigurations/operator/v1/privatestrategy.go b/operator/applyconfigurations/operator/v1/privatestrategy.go index 4154e999d7..4115713802 100644 --- a/operator/applyconfigurations/operator/v1/privatestrategy.go +++ b/operator/applyconfigurations/operator/v1/privatestrategy.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // PrivateStrategyApplyConfiguration represents a declarative configuration of the PrivateStrategy type for use // with apply. type PrivateStrategyApplyConfiguration struct { - Protocol *v1.IngressControllerProtocol `json:"protocol,omitempty"` + Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` } // PrivateStrategyApplyConfiguration constructs a declarative configuration of the PrivateStrategy type for use with @@ -21,7 +21,7 @@ func PrivateStrategy() *PrivateStrategyApplyConfiguration { // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *PrivateStrategyApplyConfiguration) WithProtocol(value v1.IngressControllerProtocol) *PrivateStrategyApplyConfiguration { +func (b *PrivateStrategyApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *PrivateStrategyApplyConfiguration { b.Protocol = &value return b } diff --git a/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go b/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go index 6f86757642..0812e69747 100644 --- a/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go +++ b/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // ProviderLoadBalancerParametersApplyConfiguration represents a declarative configuration of the ProviderLoadBalancerParameters type for use // with apply. type ProviderLoadBalancerParametersApplyConfiguration struct { - Type *v1.LoadBalancerProviderType `json:"type,omitempty"` + Type *operatorv1.LoadBalancerProviderType `json:"type,omitempty"` AWS *AWSLoadBalancerParametersApplyConfiguration `json:"aws,omitempty"` GCP *GCPLoadBalancerParametersApplyConfiguration `json:"gcp,omitempty"` IBM *IBMLoadBalancerParametersApplyConfiguration `json:"ibm,omitempty"` @@ -25,7 +25,7 @@ func ProviderLoadBalancerParameters() *ProviderLoadBalancerParametersApplyConfig // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ProviderLoadBalancerParametersApplyConfiguration) WithType(value v1.LoadBalancerProviderType) *ProviderLoadBalancerParametersApplyConfiguration { +func (b *ProviderLoadBalancerParametersApplyConfiguration) WithType(value operatorv1.LoadBalancerProviderType) *ProviderLoadBalancerParametersApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1/proxyconfig.go b/operator/applyconfigurations/operator/v1/proxyconfig.go index 334264d970..2565e38764 100644 --- a/operator/applyconfigurations/operator/v1/proxyconfig.go +++ b/operator/applyconfigurations/operator/v1/proxyconfig.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // ProxyConfigApplyConfiguration represents a declarative configuration of the ProxyConfig type for use // with apply. type ProxyConfigApplyConfiguration struct { - IptablesSyncPeriod *string `json:"iptablesSyncPeriod,omitempty"` - BindAddress *string `json:"bindAddress,omitempty"` - ProxyArguments map[string]v1.ProxyArgumentList `json:"proxyArguments,omitempty"` + IptablesSyncPeriod *string `json:"iptablesSyncPeriod,omitempty"` + BindAddress *string `json:"bindAddress,omitempty"` + ProxyArguments map[string]operatorv1.ProxyArgumentList `json:"proxyArguments,omitempty"` } // ProxyConfigApplyConfiguration constructs a declarative configuration of the ProxyConfig type for use with @@ -40,9 +40,9 @@ func (b *ProxyConfigApplyConfiguration) WithBindAddress(value string) *ProxyConf // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the ProxyArguments field, // overwriting an existing map entries in ProxyArguments field with the same key. -func (b *ProxyConfigApplyConfiguration) WithProxyArguments(entries map[string]v1.ProxyArgumentList) *ProxyConfigApplyConfiguration { +func (b *ProxyConfigApplyConfiguration) WithProxyArguments(entries map[string]operatorv1.ProxyArgumentList) *ProxyConfigApplyConfiguration { if b.ProxyArguments == nil && len(entries) > 0 { - b.ProxyArguments = make(map[string]v1.ProxyArgumentList, len(entries)) + b.ProxyArguments = make(map[string]operatorv1.ProxyArgumentList, len(entries)) } for k, v := range entries { b.ProxyArguments[k] = v diff --git a/operator/applyconfigurations/operator/v1/reloadservice.go b/operator/applyconfigurations/operator/v1/reloadservice.go index 5eb52c9f09..aef55a1b18 100644 --- a/operator/applyconfigurations/operator/v1/reloadservice.go +++ b/operator/applyconfigurations/operator/v1/reloadservice.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // ReloadServiceApplyConfiguration represents a declarative configuration of the ReloadService type for use // with apply. type ReloadServiceApplyConfiguration struct { - ServiceName *v1.NodeDisruptionPolicyServiceName `json:"serviceName,omitempty"` + ServiceName *operatorv1.NodeDisruptionPolicyServiceName `json:"serviceName,omitempty"` } // ReloadServiceApplyConfiguration constructs a declarative configuration of the ReloadService type for use with @@ -21,7 +21,7 @@ func ReloadService() *ReloadServiceApplyConfiguration { // WithServiceName sets the ServiceName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServiceName field is set to the value of the last call. -func (b *ReloadServiceApplyConfiguration) WithServiceName(value v1.NodeDisruptionPolicyServiceName) *ReloadServiceApplyConfiguration { +func (b *ReloadServiceApplyConfiguration) WithServiceName(value operatorv1.NodeDisruptionPolicyServiceName) *ReloadServiceApplyConfiguration { b.ServiceName = &value return b } diff --git a/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go b/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go index 8e4b249663..96e749c5f8 100644 --- a/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go +++ b/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/authorization/v1" + authorizationv1 "k8s.io/api/authorization/v1" ) // ResourceAttributesAccessReviewApplyConfiguration represents a declarative configuration of the ResourceAttributesAccessReview type for use // with apply. type ResourceAttributesAccessReviewApplyConfiguration struct { - Required []v1.ResourceAttributes `json:"required,omitempty"` - Missing []v1.ResourceAttributes `json:"missing,omitempty"` + Required []authorizationv1.ResourceAttributes `json:"required,omitempty"` + Missing []authorizationv1.ResourceAttributes `json:"missing,omitempty"` } // ResourceAttributesAccessReviewApplyConfiguration constructs a declarative configuration of the ResourceAttributesAccessReview type for use with @@ -22,7 +22,7 @@ func ResourceAttributesAccessReview() *ResourceAttributesAccessReviewApplyConfig // WithRequired adds the given value to the Required field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Required field. -func (b *ResourceAttributesAccessReviewApplyConfiguration) WithRequired(values ...v1.ResourceAttributes) *ResourceAttributesAccessReviewApplyConfiguration { +func (b *ResourceAttributesAccessReviewApplyConfiguration) WithRequired(values ...authorizationv1.ResourceAttributes) *ResourceAttributesAccessReviewApplyConfiguration { for i := range values { b.Required = append(b.Required, values[i]) } @@ -32,7 +32,7 @@ func (b *ResourceAttributesAccessReviewApplyConfiguration) WithRequired(values . // WithMissing adds the given value to the Missing field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Missing field. -func (b *ResourceAttributesAccessReviewApplyConfiguration) WithMissing(values ...v1.ResourceAttributes) *ResourceAttributesAccessReviewApplyConfiguration { +func (b *ResourceAttributesAccessReviewApplyConfiguration) WithMissing(values ...authorizationv1.ResourceAttributes) *ResourceAttributesAccessReviewApplyConfiguration { for i := range values { b.Missing = append(b.Missing, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/restartservice.go b/operator/applyconfigurations/operator/v1/restartservice.go index 54b9051a30..36c43a116f 100644 --- a/operator/applyconfigurations/operator/v1/restartservice.go +++ b/operator/applyconfigurations/operator/v1/restartservice.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // RestartServiceApplyConfiguration represents a declarative configuration of the RestartService type for use // with apply. type RestartServiceApplyConfiguration struct { - ServiceName *v1.NodeDisruptionPolicyServiceName `json:"serviceName,omitempty"` + ServiceName *operatorv1.NodeDisruptionPolicyServiceName `json:"serviceName,omitempty"` } // RestartServiceApplyConfiguration constructs a declarative configuration of the RestartService type for use with @@ -21,7 +21,7 @@ func RestartService() *RestartServiceApplyConfiguration { // WithServiceName sets the ServiceName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServiceName field is set to the value of the last call. -func (b *RestartServiceApplyConfiguration) WithServiceName(value v1.NodeDisruptionPolicyServiceName) *RestartServiceApplyConfiguration { +func (b *RestartServiceApplyConfiguration) WithServiceName(value operatorv1.NodeDisruptionPolicyServiceName) *RestartServiceApplyConfiguration { b.ServiceName = &value return b } diff --git a/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go b/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go index d513551232..5faa3c56b4 100644 --- a/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go +++ b/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // RouteAdmissionPolicyApplyConfiguration represents a declarative configuration of the RouteAdmissionPolicy type for use // with apply. type RouteAdmissionPolicyApplyConfiguration struct { - NamespaceOwnership *v1.NamespaceOwnershipCheck `json:"namespaceOwnership,omitempty"` - WildcardPolicy *v1.WildcardPolicy `json:"wildcardPolicy,omitempty"` + NamespaceOwnership *operatorv1.NamespaceOwnershipCheck `json:"namespaceOwnership,omitempty"` + WildcardPolicy *operatorv1.WildcardPolicy `json:"wildcardPolicy,omitempty"` } // RouteAdmissionPolicyApplyConfiguration constructs a declarative configuration of the RouteAdmissionPolicy type for use with @@ -22,7 +22,7 @@ func RouteAdmissionPolicy() *RouteAdmissionPolicyApplyConfiguration { // WithNamespaceOwnership sets the NamespaceOwnership field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NamespaceOwnership field is set to the value of the last call. -func (b *RouteAdmissionPolicyApplyConfiguration) WithNamespaceOwnership(value v1.NamespaceOwnershipCheck) *RouteAdmissionPolicyApplyConfiguration { +func (b *RouteAdmissionPolicyApplyConfiguration) WithNamespaceOwnership(value operatorv1.NamespaceOwnershipCheck) *RouteAdmissionPolicyApplyConfiguration { b.NamespaceOwnership = &value return b } @@ -30,7 +30,7 @@ func (b *RouteAdmissionPolicyApplyConfiguration) WithNamespaceOwnership(value v1 // WithWildcardPolicy sets the WildcardPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the WildcardPolicy field is set to the value of the last call. -func (b *RouteAdmissionPolicyApplyConfiguration) WithWildcardPolicy(value v1.WildcardPolicy) *RouteAdmissionPolicyApplyConfiguration { +func (b *RouteAdmissionPolicyApplyConfiguration) WithWildcardPolicy(value operatorv1.WildcardPolicy) *RouteAdmissionPolicyApplyConfiguration { b.WildcardPolicy = &value return b } diff --git a/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go b/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go index b8962296ff..f4a6de0b61 100644 --- a/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go +++ b/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ServiceAccountIssuerStatusApplyConfiguration represents a declarative configuration of the ServiceAccountIssuerStatus type for use // with apply. type ServiceAccountIssuerStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ExpirationTime *v1.Time `json:"expirationTime,omitempty"` + Name *string `json:"name,omitempty"` + ExpirationTime *metav1.Time `json:"expirationTime,omitempty"` } // ServiceAccountIssuerStatusApplyConfiguration constructs a declarative configuration of the ServiceAccountIssuerStatus type for use with @@ -30,7 +30,7 @@ func (b *ServiceAccountIssuerStatusApplyConfiguration) WithName(value string) *S // WithExpirationTime sets the ExpirationTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExpirationTime field is set to the value of the last call. -func (b *ServiceAccountIssuerStatusApplyConfiguration) WithExpirationTime(value v1.Time) *ServiceAccountIssuerStatusApplyConfiguration { +func (b *ServiceAccountIssuerStatusApplyConfiguration) WithExpirationTime(value metav1.Time) *ServiceAccountIssuerStatusApplyConfiguration { b.ExpirationTime = &value return b } diff --git a/operator/applyconfigurations/operator/v1/serviceca.go b/operator/applyconfigurations/operator/v1/serviceca.go index cceba5d9d8..bb07573817 100644 --- a/operator/applyconfigurations/operator/v1/serviceca.go +++ b/operator/applyconfigurations/operator/v1/serviceca.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ServiceCAApplyConfiguration represents a declarative configuration of the ServiceCA type for use // with apply. type ServiceCAApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCASpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCAStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ServiceCASpecApplyConfiguration `json:"spec,omitempty"` + Status *ServiceCAStatusApplyConfiguration `json:"status,omitempty"` } // ServiceCA constructs a declarative configuration of the ServiceCA type for use with @@ -41,18 +41,18 @@ func ServiceCA(name string) *ServiceCAApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractServiceCA(serviceCA *apioperatorv1.ServiceCA, fieldManager string) (*ServiceCAApplyConfiguration, error) { +func ExtractServiceCA(serviceCA *operatorv1.ServiceCA, fieldManager string) (*ServiceCAApplyConfiguration, error) { return extractServiceCA(serviceCA, fieldManager, "") } // ExtractServiceCAStatus is the same as ExtractServiceCA except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractServiceCAStatus(serviceCA *apioperatorv1.ServiceCA, fieldManager string) (*ServiceCAApplyConfiguration, error) { +func ExtractServiceCAStatus(serviceCA *operatorv1.ServiceCA, fieldManager string) (*ServiceCAApplyConfiguration, error) { return extractServiceCA(serviceCA, fieldManager, "status") } -func extractServiceCA(serviceCA *apioperatorv1.ServiceCA, fieldManager string, subresource string) (*ServiceCAApplyConfiguration, error) { +func extractServiceCA(serviceCA *operatorv1.ServiceCA, fieldManager string, subresource string) (*ServiceCAApplyConfiguration, error) { b := &ServiceCAApplyConfiguration{} err := managedfields.ExtractInto(serviceCA, internal.Parser().Type("com.github.openshift.api.operator.v1.ServiceCA"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractServiceCA(serviceCA *apioperatorv1.ServiceCA, fieldManager string, s // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithKind(value string) *ServiceCAApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ServiceCAApplyConfiguration) WithKind(value string) *ServiceCAApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithAPIVersion(value string) *ServiceCAApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ServiceCAApplyConfiguration) WithAPIVersion(value string) *ServiceCAApp // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithName(value string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ServiceCAApplyConfiguration) WithName(value string) *ServiceCAApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithGenerateName(value string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ServiceCAApplyConfiguration) WithGenerateName(value string) *ServiceCAA // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithNamespace(value string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ServiceCAApplyConfiguration) WithNamespace(value string) *ServiceCAAppl // If called multiple times, the UID field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithUID(value types.UID) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ServiceCAApplyConfiguration) WithUID(value types.UID) *ServiceCAApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithResourceVersion(value string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ServiceCAApplyConfiguration) WithResourceVersion(value string) *Service // If called multiple times, the Generation field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithGeneration(value int64) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceCAApplyConfiguration { +func (b *ServiceCAApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceCAApplyConfiguration { +func (b *ServiceCAApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ServiceCAApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ServiceCAApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ServiceCAApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *ServiceCAApplyConfiguration) WithLabels(entries map[string]string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ServiceCAApplyConfiguration) WithLabels(entries map[string]string) *Ser // overwriting an existing map entries in Annotations field with the same key. func (b *ServiceCAApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ServiceCAApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceCAApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceCAApplyConfiguration { +func (b *ServiceCAApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ServiceCAApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *ServiceCAApplyConfiguration) WithFinalizers(values ...string) *ServiceCAApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ServiceCAApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ServiceCAApplyConfiguration) WithStatus(value *ServiceCAStatusApplyConf // GetName retrieves the value of the Name field in the declarative configuration. func (b *ServiceCAApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/servicecaspec.go b/operator/applyconfigurations/operator/v1/servicecaspec.go index c083e932e9..844041ef34 100644 --- a/operator/applyconfigurations/operator/v1/servicecaspec.go +++ b/operator/applyconfigurations/operator/v1/servicecaspec.go @@ -23,7 +23,7 @@ func ServiceCASpec() *ServiceCASpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ServiceCASpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCASpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *ServiceCASpecApplyConfiguration) WithManagementState(value operatorv1.M // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ServiceCASpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCASpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *ServiceCASpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ServiceCASpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCASpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *ServiceCASpecApplyConfiguration) WithOperatorLogLevel(value operatorv1. // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ServiceCASpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCASpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *ServiceCASpecApplyConfiguration) WithUnsupportedConfigOverrides(value r // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ServiceCASpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCASpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/servicecastatus.go b/operator/applyconfigurations/operator/v1/servicecastatus.go index 91fdbaf2d5..957190e8bb 100644 --- a/operator/applyconfigurations/operator/v1/servicecastatus.go +++ b/operator/applyconfigurations/operator/v1/servicecastatus.go @@ -18,7 +18,7 @@ func ServiceCAStatus() *ServiceCAStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ServiceCAStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCAStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *ServiceCAStatusApplyConfiguration) WithConditions(values ...*OperatorCo if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *ServiceCAStatusApplyConfiguration) WithConditions(values ...*OperatorCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ServiceCAStatusApplyConfiguration) WithVersion(value string) *ServiceCAStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *ServiceCAStatusApplyConfiguration) WithVersion(value string) *ServiceCA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ServiceCAStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCAStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *ServiceCAStatusApplyConfiguration) WithReadyReplicas(value int32) *Serv // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ServiceCAStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCAStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *ServiceCAStatusApplyConfiguration) WithGenerations(values ...*Generatio if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go b/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go index 62bbc16377..52981ca867 100644 --- a/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go +++ b/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ServiceCatalogAPIServerApplyConfiguration represents a declarative configuration of the ServiceCatalogAPIServer type for use // with apply. type ServiceCatalogAPIServerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCatalogAPIServerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCatalogAPIServerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ServiceCatalogAPIServerSpecApplyConfiguration `json:"spec,omitempty"` + Status *ServiceCatalogAPIServerStatusApplyConfiguration `json:"status,omitempty"` } // ServiceCatalogAPIServer constructs a declarative configuration of the ServiceCatalogAPIServer type for use with @@ -41,18 +41,18 @@ func ServiceCatalogAPIServer(name string) *ServiceCatalogAPIServerApplyConfigura // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractServiceCatalogAPIServer(serviceCatalogAPIServer *apioperatorv1.ServiceCatalogAPIServer, fieldManager string) (*ServiceCatalogAPIServerApplyConfiguration, error) { +func ExtractServiceCatalogAPIServer(serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, fieldManager string) (*ServiceCatalogAPIServerApplyConfiguration, error) { return extractServiceCatalogAPIServer(serviceCatalogAPIServer, fieldManager, "") } // ExtractServiceCatalogAPIServerStatus is the same as ExtractServiceCatalogAPIServer except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractServiceCatalogAPIServerStatus(serviceCatalogAPIServer *apioperatorv1.ServiceCatalogAPIServer, fieldManager string) (*ServiceCatalogAPIServerApplyConfiguration, error) { +func ExtractServiceCatalogAPIServerStatus(serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, fieldManager string) (*ServiceCatalogAPIServerApplyConfiguration, error) { return extractServiceCatalogAPIServer(serviceCatalogAPIServer, fieldManager, "status") } -func extractServiceCatalogAPIServer(serviceCatalogAPIServer *apioperatorv1.ServiceCatalogAPIServer, fieldManager string, subresource string) (*ServiceCatalogAPIServerApplyConfiguration, error) { +func extractServiceCatalogAPIServer(serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, fieldManager string, subresource string) (*ServiceCatalogAPIServerApplyConfiguration, error) { b := &ServiceCatalogAPIServerApplyConfiguration{} err := managedfields.ExtractInto(serviceCatalogAPIServer, internal.Parser().Type("com.github.openshift.api.operator.v1.ServiceCatalogAPIServer"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractServiceCatalogAPIServer(serviceCatalogAPIServer *apioperatorv1.Servi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithKind(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithKind(value string) *Serv // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithAPIVersion(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithAPIVersion(value string) // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithName(value string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithName(value string) *Serv // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithGenerateName(value string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithGenerateName(value strin // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithNamespace(value string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithNamespace(value string) // If called multiple times, the UID field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithUID(value types.UID) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithUID(value types.UID) *Se // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithResourceVersion(value string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithResourceVersion(value st // If called multiple times, the Generation field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithGeneration(value int64) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceCatalogAPIServerApplyConfiguration { +func (b *ServiceCatalogAPIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceCatalogAPIServerApplyConfiguration { +func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionTimestamp(value // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionGracePeriodSecon // overwriting an existing map entries in Labels field with the same key. func (b *ServiceCatalogAPIServerApplyConfiguration) WithLabels(entries map[string]string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithLabels(entries map[strin // overwriting an existing map entries in Annotations field with the same key. func (b *ServiceCatalogAPIServerApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithAnnotations(entries map[ // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceCatalogAPIServerApplyConfiguration { +func (b *ServiceCatalogAPIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithOwnerReferences(values . func (b *ServiceCatalogAPIServerApplyConfiguration) WithFinalizers(values ...string) *ServiceCatalogAPIServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ServiceCatalogAPIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ServiceCatalogAPIServerApplyConfiguration) WithStatus(value *ServiceCat // GetName retrieves the value of the Name field in the declarative configuration. func (b *ServiceCatalogAPIServerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go b/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go index c43a956eba..b5271a4094 100644 --- a/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go +++ b/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go @@ -23,7 +23,7 @@ func ServiceCatalogAPIServerSpec() *ServiceCatalogAPIServerSpecApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithManagementState(valu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithLogLevel(value opera // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithOperatorLogLevel(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithUnsupportedConfigOve // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go b/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go index e7e16aebd9..a82e4e5f04 100644 --- a/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go +++ b/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go @@ -18,7 +18,7 @@ func ServiceCatalogAPIServerStatus() *ServiceCatalogAPIServerStatusApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithConditions(values if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithConditions(values // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithVersion(value string) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithVersion(value stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithReadyReplicas(valu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithGenerations(values if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go b/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go index 3755bd1c4d..f01957710a 100644 --- a/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go +++ b/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ServiceCatalogControllerManagerApplyConfiguration represents a declarative configuration of the ServiceCatalogControllerManager type for use // with apply. type ServiceCatalogControllerManagerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCatalogControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCatalogControllerManagerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ServiceCatalogControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` + Status *ServiceCatalogControllerManagerStatusApplyConfiguration `json:"status,omitempty"` } // ServiceCatalogControllerManager constructs a declarative configuration of the ServiceCatalogControllerManager type for use with @@ -41,18 +41,18 @@ func ServiceCatalogControllerManager(name string) *ServiceCatalogControllerManag // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractServiceCatalogControllerManager(serviceCatalogControllerManager *apioperatorv1.ServiceCatalogControllerManager, fieldManager string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { +func ExtractServiceCatalogControllerManager(serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, fieldManager string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { return extractServiceCatalogControllerManager(serviceCatalogControllerManager, fieldManager, "") } // ExtractServiceCatalogControllerManagerStatus is the same as ExtractServiceCatalogControllerManager except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractServiceCatalogControllerManagerStatus(serviceCatalogControllerManager *apioperatorv1.ServiceCatalogControllerManager, fieldManager string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { +func ExtractServiceCatalogControllerManagerStatus(serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, fieldManager string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { return extractServiceCatalogControllerManager(serviceCatalogControllerManager, fieldManager, "status") } -func extractServiceCatalogControllerManager(serviceCatalogControllerManager *apioperatorv1.ServiceCatalogControllerManager, fieldManager string, subresource string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { +func extractServiceCatalogControllerManager(serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, fieldManager string, subresource string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { b := &ServiceCatalogControllerManagerApplyConfiguration{} err := managedfields.ExtractInto(serviceCatalogControllerManager, internal.Parser().Type("com.github.openshift.api.operator.v1.ServiceCatalogControllerManager"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractServiceCatalogControllerManager(serviceCatalogControllerManager *api // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithKind(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithKind(value strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithAPIVersion(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithAPIVersion(value // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithName(value string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithName(value strin // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithGenerateName(value string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithGenerateName(val // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithNamespace(value string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithNamespace(value // If called multiple times, the UID field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithUID(value types.UID) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithUID(value types. // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithResourceVersion(value string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithResourceVersion( // If called multiple times, the Generation field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithGeneration(value int64) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceCatalogControllerManagerApplyConfiguration { +func (b *ServiceCatalogControllerManagerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceCatalogControllerManagerApplyConfiguration { +func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionTimestam // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionGracePer // overwriting an existing map entries in Labels field with the same key. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithLabels(entries map[string]string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithLabels(entries m // overwriting an existing map entries in Annotations field with the same key. func (b *ServiceCatalogControllerManagerApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithAnnotations(entr // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceCatalogControllerManagerApplyConfiguration { +func (b *ServiceCatalogControllerManagerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithOwnerReferences( func (b *ServiceCatalogControllerManagerApplyConfiguration) WithFinalizers(values ...string) *ServiceCatalogControllerManagerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ServiceCatalogControllerManagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ServiceCatalogControllerManagerApplyConfiguration) WithStatus(value *Se // GetName retrieves the value of the Name field in the declarative configuration. func (b *ServiceCatalogControllerManagerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go b/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go index 301fd67b58..83df00b3ba 100644 --- a/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go +++ b/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go @@ -23,7 +23,7 @@ func ServiceCatalogControllerManagerSpec() *ServiceCatalogControllerManagerSpecA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -31,7 +31,7 @@ func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithManagementSt // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -39,7 +39,7 @@ func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithLogLevel(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -47,7 +47,7 @@ func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithOperatorLogL // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -55,6 +55,6 @@ func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithUnsupportedC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go b/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go index f01f6f7968..d153702175 100644 --- a/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go +++ b/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go @@ -18,7 +18,7 @@ func ServiceCatalogControllerManagerStatus() *ServiceCatalogControllerManagerSta // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithConditions if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithConditions // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithVersion(value string) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithVersion(va // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithReadyRepli // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithGeneration if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/sflowconfig.go b/operator/applyconfigurations/operator/v1/sflowconfig.go index 3b03dda228..350bfbd98a 100644 --- a/operator/applyconfigurations/operator/v1/sflowconfig.go +++ b/operator/applyconfigurations/operator/v1/sflowconfig.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // SFlowConfigApplyConfiguration represents a declarative configuration of the SFlowConfig type for use // with apply. type SFlowConfigApplyConfiguration struct { - Collectors []v1.IPPort `json:"collectors,omitempty"` + Collectors []operatorv1.IPPort `json:"collectors,omitempty"` } // SFlowConfigApplyConfiguration constructs a declarative configuration of the SFlowConfig type for use with @@ -21,7 +21,7 @@ func SFlowConfig() *SFlowConfigApplyConfiguration { // WithCollectors adds the given value to the Collectors field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Collectors field. -func (b *SFlowConfigApplyConfiguration) WithCollectors(values ...v1.IPPort) *SFlowConfigApplyConfiguration { +func (b *SFlowConfigApplyConfiguration) WithCollectors(values ...operatorv1.IPPort) *SFlowConfigApplyConfiguration { for i := range values { b.Collectors = append(b.Collectors, values[i]) } diff --git a/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go b/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go index b033f0d9a3..b2434f8d72 100644 --- a/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go +++ b/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go @@ -26,7 +26,7 @@ func StaticPodOperatorSpec() *StaticPodOperatorSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *StaticPodOperatorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *StaticPodOperatorSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -34,7 +34,7 @@ func (b *StaticPodOperatorSpecApplyConfiguration) WithManagementState(value oper // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *StaticPodOperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *StaticPodOperatorSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -42,7 +42,7 @@ func (b *StaticPodOperatorSpecApplyConfiguration) WithLogLevel(value operatorv1. // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *StaticPodOperatorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *StaticPodOperatorSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -50,7 +50,7 @@ func (b *StaticPodOperatorSpecApplyConfiguration) WithOperatorLogLevel(value ope // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *StaticPodOperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *StaticPodOperatorSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -58,7 +58,7 @@ func (b *StaticPodOperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *StaticPodOperatorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *StaticPodOperatorSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go b/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go index d805f0a63e..0067b78c73 100644 --- a/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go +++ b/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go @@ -20,7 +20,7 @@ func StaticPodOperatorStatus() *StaticPodOperatorStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *StaticPodOperatorStatusApplyConfiguration) WithObservedGeneration(value int64) *StaticPodOperatorStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -32,7 +32,7 @@ func (b *StaticPodOperatorStatusApplyConfiguration) WithConditions(values ...*Op if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -41,7 +41,7 @@ func (b *StaticPodOperatorStatusApplyConfiguration) WithConditions(values ...*Op // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *StaticPodOperatorStatusApplyConfiguration) WithVersion(value string) *StaticPodOperatorStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -49,7 +49,7 @@ func (b *StaticPodOperatorStatusApplyConfiguration) WithVersion(value string) *S // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *StaticPodOperatorStatusApplyConfiguration) WithReadyReplicas(value int32) *StaticPodOperatorStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -57,7 +57,7 @@ func (b *StaticPodOperatorStatusApplyConfiguration) WithReadyReplicas(value int3 // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *StaticPodOperatorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *StaticPodOperatorStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -69,7 +69,7 @@ func (b *StaticPodOperatorStatusApplyConfiguration) WithGenerations(values ...*G if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/storage.go b/operator/applyconfigurations/operator/v1/storage.go index 418d1dcc28..fe464c41e9 100644 --- a/operator/applyconfigurations/operator/v1/storage.go +++ b/operator/applyconfigurations/operator/v1/storage.go @@ -3,21 +3,21 @@ package v1 import ( - apioperatorv1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // StorageApplyConfiguration represents a declarative configuration of the Storage type for use // with apply. type StorageApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *StorageSpecApplyConfiguration `json:"spec,omitempty"` - Status *StorageStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *StorageSpecApplyConfiguration `json:"spec,omitempty"` + Status *StorageStatusApplyConfiguration `json:"status,omitempty"` } // Storage constructs a declarative configuration of the Storage type for use with @@ -41,18 +41,18 @@ func Storage(name string) *StorageApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractStorage(storage *apioperatorv1.Storage, fieldManager string) (*StorageApplyConfiguration, error) { +func ExtractStorage(storage *operatorv1.Storage, fieldManager string) (*StorageApplyConfiguration, error) { return extractStorage(storage, fieldManager, "") } // ExtractStorageStatus is the same as ExtractStorage except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractStorageStatus(storage *apioperatorv1.Storage, fieldManager string) (*StorageApplyConfiguration, error) { +func ExtractStorageStatus(storage *operatorv1.Storage, fieldManager string) (*StorageApplyConfiguration, error) { return extractStorage(storage, fieldManager, "status") } -func extractStorage(storage *apioperatorv1.Storage, fieldManager string, subresource string) (*StorageApplyConfiguration, error) { +func extractStorage(storage *operatorv1.Storage, fieldManager string, subresource string) (*StorageApplyConfiguration, error) { b := &StorageApplyConfiguration{} err := managedfields.ExtractInto(storage, internal.Parser().Type("com.github.openshift.api.operator.v1.Storage"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractStorage(storage *apioperatorv1.Storage, fieldManager string, subreso // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *StorageApplyConfiguration) WithKind(value string) *StorageApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *StorageApplyConfiguration) WithKind(value string) *StorageApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *StorageApplyConfiguration) WithAPIVersion(value string) *StorageApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *StorageApplyConfiguration) WithAPIVersion(value string) *StorageApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *StorageApplyConfiguration) WithName(value string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *StorageApplyConfiguration) WithName(value string) *StorageApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *StorageApplyConfiguration) WithGenerateName(value string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *StorageApplyConfiguration) WithGenerateName(value string) *StorageApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *StorageApplyConfiguration) WithNamespace(value string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *StorageApplyConfiguration) WithNamespace(value string) *StorageApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *StorageApplyConfiguration) WithUID(value types.UID) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *StorageApplyConfiguration) WithUID(value types.UID) *StorageApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *StorageApplyConfiguration) WithResourceVersion(value string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *StorageApplyConfiguration) WithResourceVersion(value string) *StorageAp // If called multiple times, the Generation field is set to the value of the last call. func (b *StorageApplyConfiguration) WithGeneration(value int64) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithCreationTimestamp(value metav1.Time) *StorageApplyConfiguration { +func (b *StorageApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *StorageApplyConfiguration { +func (b *StorageApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *StorageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *St // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *StorageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *StorageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *StorageApplyConfiguration) WithLabels(entries map[string]string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *StorageApplyConfiguration) WithLabels(entries map[string]string) *Stora // overwriting an existing map entries in Annotations field with the same key. func (b *StorageApplyConfiguration) WithAnnotations(entries map[string]string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *StorageApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *StorageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *StorageApplyConfiguration { +func (b *StorageApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *StorageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *StorageApplyConfiguration) WithFinalizers(values ...string) *StorageApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *StorageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *StorageApplyConfiguration) WithStatus(value *StorageStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *StorageApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1/storagespec.go b/operator/applyconfigurations/operator/v1/storagespec.go index 735723c11e..152ea2fe03 100644 --- a/operator/applyconfigurations/operator/v1/storagespec.go +++ b/operator/applyconfigurations/operator/v1/storagespec.go @@ -24,7 +24,7 @@ func StorageSpec() *StorageSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *StorageSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *StorageSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -32,7 +32,7 @@ func (b *StorageSpecApplyConfiguration) WithManagementState(value operatorv1.Man // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *StorageSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *StorageSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -40,7 +40,7 @@ func (b *StorageSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *StorageSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *StorageSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -48,7 +48,7 @@ func (b *StorageSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.Lo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *StorageSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *StorageSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -56,7 +56,7 @@ func (b *StorageSpecApplyConfiguration) WithUnsupportedConfigOverrides(value run // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *StorageSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *StorageSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1/storagestatus.go b/operator/applyconfigurations/operator/v1/storagestatus.go index 13f796797e..f6a0349061 100644 --- a/operator/applyconfigurations/operator/v1/storagestatus.go +++ b/operator/applyconfigurations/operator/v1/storagestatus.go @@ -18,7 +18,7 @@ func StorageStatus() *StorageStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *StorageStatusApplyConfiguration) WithObservedGeneration(value int64) *StorageStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -30,7 +30,7 @@ func (b *StorageStatusApplyConfiguration) WithConditions(values ...*OperatorCond if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -39,7 +39,7 @@ func (b *StorageStatusApplyConfiguration) WithConditions(values ...*OperatorCond // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *StorageStatusApplyConfiguration) WithVersion(value string) *StorageStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -47,7 +47,7 @@ func (b *StorageStatusApplyConfiguration) WithVersion(value string) *StorageStat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *StorageStatusApplyConfiguration) WithReadyReplicas(value int32) *StorageStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -55,7 +55,7 @@ func (b *StorageStatusApplyConfiguration) WithReadyReplicas(value int32) *Storag // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *StorageStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *StorageStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -67,7 +67,7 @@ func (b *StorageStatusApplyConfiguration) WithGenerations(values ...*GenerationS if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/applyconfigurations/operator/v1/upstream.go b/operator/applyconfigurations/operator/v1/upstream.go index 07eca5ee39..8f666cd18f 100644 --- a/operator/applyconfigurations/operator/v1/upstream.go +++ b/operator/applyconfigurations/operator/v1/upstream.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // UpstreamApplyConfiguration represents a declarative configuration of the Upstream type for use // with apply. type UpstreamApplyConfiguration struct { - Type *v1.UpstreamType `json:"type,omitempty"` - Address *string `json:"address,omitempty"` - Port *uint32 `json:"port,omitempty"` + Type *operatorv1.UpstreamType `json:"type,omitempty"` + Address *string `json:"address,omitempty"` + Port *uint32 `json:"port,omitempty"` } // UpstreamApplyConfiguration constructs a declarative configuration of the Upstream type for use with @@ -23,7 +23,7 @@ func Upstream() *UpstreamApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *UpstreamApplyConfiguration) WithType(value v1.UpstreamType) *UpstreamApplyConfiguration { +func (b *UpstreamApplyConfiguration) WithType(value operatorv1.UpstreamType) *UpstreamApplyConfiguration { b.Type = &value return b } diff --git a/operator/applyconfigurations/operator/v1alpha1/etcdbackup.go b/operator/applyconfigurations/operator/v1alpha1/etcdbackup.go index 8674039661..7f4a38dacf 100644 --- a/operator/applyconfigurations/operator/v1alpha1/etcdbackup.go +++ b/operator/applyconfigurations/operator/v1alpha1/etcdbackup.go @@ -69,7 +69,7 @@ func extractEtcdBackup(etcdBackup *operatorv1alpha1.EtcdBackup, fieldManager str // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithKind(value string) *EtcdBackupApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *EtcdBackupApplyConfiguration) WithKind(value string) *EtcdBackupApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithAPIVersion(value string) *EtcdBackupApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *EtcdBackupApplyConfiguration) WithAPIVersion(value string) *EtcdBackupA // If called multiple times, the Name field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithName(value string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *EtcdBackupApplyConfiguration) WithName(value string) *EtcdBackupApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithGenerateName(value string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *EtcdBackupApplyConfiguration) WithGenerateName(value string) *EtcdBacku // If called multiple times, the Namespace field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithNamespace(value string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *EtcdBackupApplyConfiguration) WithNamespace(value string) *EtcdBackupAp // If called multiple times, the UID field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithUID(value types.UID) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *EtcdBackupApplyConfiguration) WithUID(value types.UID) *EtcdBackupApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithResourceVersion(value string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *EtcdBackupApplyConfiguration) WithResourceVersion(value string) *EtcdBa // If called multiple times, the Generation field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithGeneration(value int64) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *EtcdBackupApplyConfiguration) WithGeneration(value int64) *EtcdBackupAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *EtcdBackupApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *EtcdBackupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EtcdBackupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *EtcdBackupApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *EtcdBackupApplyConfiguration) WithLabels(entries map[string]string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *EtcdBackupApplyConfiguration) WithLabels(entries map[string]string) *Et // overwriting an existing map entries in Annotations field with the same key. func (b *EtcdBackupApplyConfiguration) WithAnnotations(entries map[string]string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *EtcdBackupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *EtcdBackupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *EtcdBackupApplyConfiguration) WithFinalizers(values ...string) *EtcdBackupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *EtcdBackupApplyConfiguration) WithStatus(value *EtcdBackupStatusApplyCo // GetName retrieves the value of the Name field in the declarative configuration. func (b *EtcdBackupApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/applyconfigurations/operator/v1alpha1/imagecontentsourcepolicy.go index dbe09c1a90..91a03771d6 100644 --- a/operator/applyconfigurations/operator/v1alpha1/imagecontentsourcepolicy.go +++ b/operator/applyconfigurations/operator/v1alpha1/imagecontentsourcepolicy.go @@ -68,7 +68,7 @@ func extractImageContentSourcePolicy(imageContentSourcePolicy *operatorv1alpha1. // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithKind(value string) *ImageContentSourcePolicyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithKind(value string) *Ima // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithAPIVersion(value string) *ImageContentSourcePolicyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithAPIVersion(value string // If called multiple times, the Name field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithName(value string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithName(value string) *Ima // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithGenerateName(value string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithGenerateName(value stri // If called multiple times, the Namespace field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithNamespace(value string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithNamespace(value string) // If called multiple times, the UID field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithUID(value types.UID) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithUID(value types.UID) *I // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithResourceVersion(value string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,7 +130,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithResourceVersion(value s // If called multiple times, the Generation field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithGeneration(value int64) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -139,7 +139,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithGeneration(value int64) // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -148,7 +148,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithCreationTimestamp(value // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithDeletionTimestamp(value // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ImageContentSourcePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithDeletionGracePeriodSeco // overwriting an existing map entries in Labels field with the same key. func (b *ImageContentSourcePolicyApplyConfiguration) WithLabels(entries map[string]string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithLabels(entries map[stri // overwriting an existing map entries in Annotations field with the same key. func (b *ImageContentSourcePolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -200,7 +200,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithOwnerReferences(values if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,7 +211,7 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithOwnerReferences(values func (b *ImageContentSourcePolicyApplyConfiguration) WithFinalizers(values ...string) *ImageContentSourcePolicyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -233,5 +233,5 @@ func (b *ImageContentSourcePolicyApplyConfiguration) WithSpec(value *ImageConten // GetName retrieves the value of the Name field in the declarative configuration. func (b *ImageContentSourcePolicyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1alpha1/olm.go b/operator/applyconfigurations/operator/v1alpha1/olm.go index 5eeb8b870a..2d475924ec 100644 --- a/operator/applyconfigurations/operator/v1alpha1/olm.go +++ b/operator/applyconfigurations/operator/v1alpha1/olm.go @@ -69,7 +69,7 @@ func extractOLM(oLM *operatorv1alpha1.OLM, fieldManager string, subresource stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *OLMApplyConfiguration) WithKind(value string) *OLMApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *OLMApplyConfiguration) WithKind(value string) *OLMApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *OLMApplyConfiguration) WithAPIVersion(value string) *OLMApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *OLMApplyConfiguration) WithAPIVersion(value string) *OLMApplyConfigurat // If called multiple times, the Name field is set to the value of the last call. func (b *OLMApplyConfiguration) WithName(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *OLMApplyConfiguration) WithName(value string) *OLMApplyConfiguration { // If called multiple times, the GenerateName field is set to the value of the last call. func (b *OLMApplyConfiguration) WithGenerateName(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *OLMApplyConfiguration) WithGenerateName(value string) *OLMApplyConfigur // If called multiple times, the Namespace field is set to the value of the last call. func (b *OLMApplyConfiguration) WithNamespace(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *OLMApplyConfiguration) WithNamespace(value string) *OLMApplyConfigurati // If called multiple times, the UID field is set to the value of the last call. func (b *OLMApplyConfiguration) WithUID(value types.UID) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *OLMApplyConfiguration) WithUID(value types.UID) *OLMApplyConfiguration // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *OLMApplyConfiguration) WithResourceVersion(value string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *OLMApplyConfiguration) WithResourceVersion(value string) *OLMApplyConfi // If called multiple times, the Generation field is set to the value of the last call. func (b *OLMApplyConfiguration) WithGeneration(value int64) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *OLMApplyConfiguration) WithGeneration(value int64) *OLMApplyConfigurati // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *OLMApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *OLMApplyConfiguration) WithCreationTimestamp(value metav1.Time) *OLMApp // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *OLMApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *OLMApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *OLMApp // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *OLMApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *OLMApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OLM // overwriting an existing map entries in Labels field with the same key. func (b *OLMApplyConfiguration) WithLabels(entries map[string]string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *OLMApplyConfiguration) WithLabels(entries map[string]string) *OLMApplyC // overwriting an existing map entries in Annotations field with the same key. func (b *OLMApplyConfiguration) WithAnnotations(entries map[string]string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *OLMApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *OLMApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference func (b *OLMApplyConfiguration) WithFinalizers(values ...string) *OLMApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *OLMApplyConfiguration) WithStatus(value *OLMStatusApplyConfiguration) * // GetName retrieves the value of the Name field in the declarative configuration. func (b *OLMApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operator/applyconfigurations/operator/v1alpha1/olmspec.go b/operator/applyconfigurations/operator/v1alpha1/olmspec.go index e36556165f..e60f596922 100644 --- a/operator/applyconfigurations/operator/v1alpha1/olmspec.go +++ b/operator/applyconfigurations/operator/v1alpha1/olmspec.go @@ -24,7 +24,7 @@ func OLMSpec() *OLMSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OLMSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -32,7 +32,7 @@ func (b *OLMSpecApplyConfiguration) WithManagementState(value operatorv1.Managem // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OLMSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -40,7 +40,7 @@ func (b *OLMSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OLM // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OLMSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -48,7 +48,7 @@ func (b *OLMSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLev // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OLMSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -56,6 +56,6 @@ func (b *OLMSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *OLMSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OLMSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/operator/applyconfigurations/operator/v1alpha1/olmstatus.go b/operator/applyconfigurations/operator/v1alpha1/olmstatus.go index 94a98202e0..88f44e1600 100644 --- a/operator/applyconfigurations/operator/v1alpha1/olmstatus.go +++ b/operator/applyconfigurations/operator/v1alpha1/olmstatus.go @@ -22,7 +22,7 @@ func OLMStatus() *OLMStatusApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithObservedGeneration(value int64) *OLMStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -34,7 +34,7 @@ func (b *OLMStatusApplyConfiguration) WithConditions(values ...*v1.OperatorCondi if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -43,7 +43,7 @@ func (b *OLMStatusApplyConfiguration) WithConditions(values ...*v1.OperatorCondi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithVersion(value string) *OLMStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -51,7 +51,7 @@ func (b *OLMStatusApplyConfiguration) WithVersion(value string) *OLMStatusApplyC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithReadyReplicas(value int32) *OLMStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -59,7 +59,7 @@ func (b *OLMStatusApplyConfiguration) WithReadyReplicas(value int32) *OLMStatusA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *OLMStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OLMStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -71,7 +71,7 @@ func (b *OLMStatusApplyConfiguration) WithGenerations(values ...*v1.GenerationSt if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/operator/clientset/versioned/clientset.go b/operator/clientset/versioned/clientset.go index 326e04676b..20e2c729ac 100644 --- a/operator/clientset/versioned/clientset.go +++ b/operator/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" operatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" operatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" diff --git a/operator/clientset/versioned/typed/operator/v1/authentication.go b/operator/clientset/versioned/typed/operator/v1/authentication.go index 0cfae027a5..b94b239704 100644 --- a/operator/clientset/versioned/typed/operator/v1/authentication.go +++ b/operator/clientset/versioned/typed/operator/v1/authentication.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type AuthenticationsGetter interface { // AuthenticationInterface has methods to work with Authentication resources. type AuthenticationInterface interface { - Create(ctx context.Context, authentication *v1.Authentication, opts metav1.CreateOptions) (*v1.Authentication, error) - Update(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (*v1.Authentication, error) + Create(ctx context.Context, authentication *operatorv1.Authentication, opts metav1.CreateOptions) (*operatorv1.Authentication, error) + Update(ctx context.Context, authentication *operatorv1.Authentication, opts metav1.UpdateOptions) (*operatorv1.Authentication, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (*v1.Authentication, error) + UpdateStatus(ctx context.Context, authentication *operatorv1.Authentication, opts metav1.UpdateOptions) (*operatorv1.Authentication, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Authentication, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.AuthenticationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.Authentication, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.AuthenticationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Authentication, err error) - Apply(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.Authentication, err error) + Apply(ctx context.Context, authentication *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Authentication, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) + ApplyStatus(ctx context.Context, authentication *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Authentication, err error) AuthenticationExpansion } // authentications implements AuthenticationInterface type authentications struct { - *gentype.ClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *operatorv1.AuthenticationApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.Authentication, *operatorv1.AuthenticationList, *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration] } // newAuthentications returns a Authentications func newAuthentications(c *OperatorV1Client) *authentications { return &authentications{ - gentype.NewClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *operatorv1.AuthenticationApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.Authentication, *operatorv1.AuthenticationList, *applyconfigurationsoperatorv1.AuthenticationApplyConfiguration]( "authentications", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Authentication { return &v1.Authentication{} }, - func() *v1.AuthenticationList { return &v1.AuthenticationList{} }), + func() *operatorv1.Authentication { return &operatorv1.Authentication{} }, + func() *operatorv1.AuthenticationList { return &operatorv1.AuthenticationList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/cloudcredential.go b/operator/clientset/versioned/typed/operator/v1/cloudcredential.go index 252ec2b45a..17f053d459 100644 --- a/operator/clientset/versioned/typed/operator/v1/cloudcredential.go +++ b/operator/clientset/versioned/typed/operator/v1/cloudcredential.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type CloudCredentialsGetter interface { // CloudCredentialInterface has methods to work with CloudCredential resources. type CloudCredentialInterface interface { - Create(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.CreateOptions) (*v1.CloudCredential, error) - Update(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (*v1.CloudCredential, error) + Create(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts metav1.CreateOptions) (*operatorv1.CloudCredential, error) + Update(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts metav1.UpdateOptions) (*operatorv1.CloudCredential, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (*v1.CloudCredential, error) + UpdateStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredential, opts metav1.UpdateOptions) (*operatorv1.CloudCredential, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CloudCredential, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CloudCredentialList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.CloudCredential, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.CloudCredentialList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CloudCredential, err error) - Apply(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.CloudCredential, err error) + Apply(ctx context.Context, cloudCredential *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.CloudCredential, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) + ApplyStatus(ctx context.Context, cloudCredential *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.CloudCredential, err error) CloudCredentialExpansion } // cloudCredentials implements CloudCredentialInterface type cloudCredentials struct { - *gentype.ClientWithListAndApply[*v1.CloudCredential, *v1.CloudCredentialList, *operatorv1.CloudCredentialApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.CloudCredential, *operatorv1.CloudCredentialList, *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration] } // newCloudCredentials returns a CloudCredentials func newCloudCredentials(c *OperatorV1Client) *cloudCredentials { return &cloudCredentials{ - gentype.NewClientWithListAndApply[*v1.CloudCredential, *v1.CloudCredentialList, *operatorv1.CloudCredentialApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.CloudCredential, *operatorv1.CloudCredentialList, *applyconfigurationsoperatorv1.CloudCredentialApplyConfiguration]( "cloudcredentials", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.CloudCredential { return &v1.CloudCredential{} }, - func() *v1.CloudCredentialList { return &v1.CloudCredentialList{} }), + func() *operatorv1.CloudCredential { return &operatorv1.CloudCredential{} }, + func() *operatorv1.CloudCredentialList { return &operatorv1.CloudCredentialList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/clustercsidriver.go b/operator/clientset/versioned/typed/operator/v1/clustercsidriver.go index 8c54ca9b53..19d6aec940 100644 --- a/operator/clientset/versioned/typed/operator/v1/clustercsidriver.go +++ b/operator/clientset/versioned/typed/operator/v1/clustercsidriver.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ClusterCSIDriversGetter interface { // ClusterCSIDriverInterface has methods to work with ClusterCSIDriver resources. type ClusterCSIDriverInterface interface { - Create(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.CreateOptions) (*v1.ClusterCSIDriver, error) - Update(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (*v1.ClusterCSIDriver, error) + Create(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts metav1.CreateOptions) (*operatorv1.ClusterCSIDriver, error) + Update(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts metav1.UpdateOptions) (*operatorv1.ClusterCSIDriver, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (*v1.ClusterCSIDriver, error) + UpdateStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriver, opts metav1.UpdateOptions) (*operatorv1.ClusterCSIDriver, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterCSIDriver, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterCSIDriverList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.ClusterCSIDriver, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.ClusterCSIDriverList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterCSIDriver, err error) - Apply(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.ClusterCSIDriver, err error) + Apply(ctx context.Context, clusterCSIDriver *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ClusterCSIDriver, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) + ApplyStatus(ctx context.Context, clusterCSIDriver *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ClusterCSIDriver, err error) ClusterCSIDriverExpansion } // clusterCSIDrivers implements ClusterCSIDriverInterface type clusterCSIDrivers struct { - *gentype.ClientWithListAndApply[*v1.ClusterCSIDriver, *v1.ClusterCSIDriverList, *operatorv1.ClusterCSIDriverApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.ClusterCSIDriver, *operatorv1.ClusterCSIDriverList, *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration] } // newClusterCSIDrivers returns a ClusterCSIDrivers func newClusterCSIDrivers(c *OperatorV1Client) *clusterCSIDrivers { return &clusterCSIDrivers{ - gentype.NewClientWithListAndApply[*v1.ClusterCSIDriver, *v1.ClusterCSIDriverList, *operatorv1.ClusterCSIDriverApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.ClusterCSIDriver, *operatorv1.ClusterCSIDriverList, *applyconfigurationsoperatorv1.ClusterCSIDriverApplyConfiguration]( "clustercsidrivers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterCSIDriver { return &v1.ClusterCSIDriver{} }, - func() *v1.ClusterCSIDriverList { return &v1.ClusterCSIDriverList{} }), + func() *operatorv1.ClusterCSIDriver { return &operatorv1.ClusterCSIDriver{} }, + func() *operatorv1.ClusterCSIDriverList { return &operatorv1.ClusterCSIDriverList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/config.go b/operator/clientset/versioned/typed/operator/v1/config.go index 378f00557a..71662a63c8 100644 --- a/operator/clientset/versioned/typed/operator/v1/config.go +++ b/operator/clientset/versioned/typed/operator/v1/config.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ConfigsGetter interface { // ConfigInterface has methods to work with Config resources. type ConfigInterface interface { - Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (*v1.Config, error) - Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + Create(ctx context.Context, config *operatorv1.Config, opts metav1.CreateOptions) (*operatorv1.Config, error) + Update(ctx context.Context, config *operatorv1.Config, opts metav1.UpdateOptions) (*operatorv1.Config, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + UpdateStatus(ctx context.Context, config *operatorv1.Config, opts metav1.UpdateOptions) (*operatorv1.Config, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Config, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.Config, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.ConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) - Apply(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.Config, err error) + Apply(ctx context.Context, config *applyconfigurationsoperatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Config, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) + ApplyStatus(ctx context.Context, config *applyconfigurationsoperatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Config, err error) ConfigExpansion } // configs implements ConfigInterface type configs struct { - *gentype.ClientWithListAndApply[*v1.Config, *v1.ConfigList, *operatorv1.ConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.Config, *operatorv1.ConfigList, *applyconfigurationsoperatorv1.ConfigApplyConfiguration] } // newConfigs returns a Configs func newConfigs(c *OperatorV1Client) *configs { return &configs{ - gentype.NewClientWithListAndApply[*v1.Config, *v1.ConfigList, *operatorv1.ConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.Config, *operatorv1.ConfigList, *applyconfigurationsoperatorv1.ConfigApplyConfiguration]( "configs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Config { return &v1.Config{} }, - func() *v1.ConfigList { return &v1.ConfigList{} }), + func() *operatorv1.Config { return &operatorv1.Config{} }, + func() *operatorv1.ConfigList { return &operatorv1.ConfigList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/console.go b/operator/clientset/versioned/typed/operator/v1/console.go index a082ea15de..1e87763caa 100644 --- a/operator/clientset/versioned/typed/operator/v1/console.go +++ b/operator/clientset/versioned/typed/operator/v1/console.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ConsolesGetter interface { // ConsoleInterface has methods to work with Console resources. type ConsoleInterface interface { - Create(ctx context.Context, console *v1.Console, opts metav1.CreateOptions) (*v1.Console, error) - Update(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (*v1.Console, error) + Create(ctx context.Context, console *operatorv1.Console, opts metav1.CreateOptions) (*operatorv1.Console, error) + Update(ctx context.Context, console *operatorv1.Console, opts metav1.UpdateOptions) (*operatorv1.Console, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (*v1.Console, error) + UpdateStatus(ctx context.Context, console *operatorv1.Console, opts metav1.UpdateOptions) (*operatorv1.Console, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Console, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConsoleList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.Console, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.ConsoleList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Console, err error) - Apply(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.Console, err error) + Apply(ctx context.Context, console *applyconfigurationsoperatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Console, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) + ApplyStatus(ctx context.Context, console *applyconfigurationsoperatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Console, err error) ConsoleExpansion } // consoles implements ConsoleInterface type consoles struct { - *gentype.ClientWithListAndApply[*v1.Console, *v1.ConsoleList, *operatorv1.ConsoleApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.Console, *operatorv1.ConsoleList, *applyconfigurationsoperatorv1.ConsoleApplyConfiguration] } // newConsoles returns a Consoles func newConsoles(c *OperatorV1Client) *consoles { return &consoles{ - gentype.NewClientWithListAndApply[*v1.Console, *v1.ConsoleList, *operatorv1.ConsoleApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.Console, *operatorv1.ConsoleList, *applyconfigurationsoperatorv1.ConsoleApplyConfiguration]( "consoles", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Console { return &v1.Console{} }, - func() *v1.ConsoleList { return &v1.ConsoleList{} }), + func() *operatorv1.Console { return &operatorv1.Console{} }, + func() *operatorv1.ConsoleList { return &operatorv1.ConsoleList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/csisnapshotcontroller.go b/operator/clientset/versioned/typed/operator/v1/csisnapshotcontroller.go index 67cb1e58d3..9ce7cf19b3 100644 --- a/operator/clientset/versioned/typed/operator/v1/csisnapshotcontroller.go +++ b/operator/clientset/versioned/typed/operator/v1/csisnapshotcontroller.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type CSISnapshotControllersGetter interface { // CSISnapshotControllerInterface has methods to work with CSISnapshotController resources. type CSISnapshotControllerInterface interface { - Create(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.CreateOptions) (*v1.CSISnapshotController, error) - Update(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (*v1.CSISnapshotController, error) + Create(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts metav1.CreateOptions) (*operatorv1.CSISnapshotController, error) + Update(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts metav1.UpdateOptions) (*operatorv1.CSISnapshotController, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (*v1.CSISnapshotController, error) + UpdateStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotController, opts metav1.UpdateOptions) (*operatorv1.CSISnapshotController, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSISnapshotController, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CSISnapshotControllerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.CSISnapshotController, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.CSISnapshotControllerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSISnapshotController, err error) - Apply(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.CSISnapshotController, err error) + Apply(ctx context.Context, cSISnapshotController *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.CSISnapshotController, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) + ApplyStatus(ctx context.Context, cSISnapshotController *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.CSISnapshotController, err error) CSISnapshotControllerExpansion } // cSISnapshotControllers implements CSISnapshotControllerInterface type cSISnapshotControllers struct { - *gentype.ClientWithListAndApply[*v1.CSISnapshotController, *v1.CSISnapshotControllerList, *operatorv1.CSISnapshotControllerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.CSISnapshotController, *operatorv1.CSISnapshotControllerList, *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration] } // newCSISnapshotControllers returns a CSISnapshotControllers func newCSISnapshotControllers(c *OperatorV1Client) *cSISnapshotControllers { return &cSISnapshotControllers{ - gentype.NewClientWithListAndApply[*v1.CSISnapshotController, *v1.CSISnapshotControllerList, *operatorv1.CSISnapshotControllerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.CSISnapshotController, *operatorv1.CSISnapshotControllerList, *applyconfigurationsoperatorv1.CSISnapshotControllerApplyConfiguration]( "csisnapshotcontrollers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.CSISnapshotController { return &v1.CSISnapshotController{} }, - func() *v1.CSISnapshotControllerList { return &v1.CSISnapshotControllerList{} }), + func() *operatorv1.CSISnapshotController { return &operatorv1.CSISnapshotController{} }, + func() *operatorv1.CSISnapshotControllerList { return &operatorv1.CSISnapshotControllerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/dns.go b/operator/clientset/versioned/typed/operator/v1/dns.go index 9298406b2b..95b89cfbef 100644 --- a/operator/clientset/versioned/typed/operator/v1/dns.go +++ b/operator/clientset/versioned/typed/operator/v1/dns.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type DNSesGetter interface { // DNSInterface has methods to work with DNS resources. type DNSInterface interface { - Create(ctx context.Context, dNS *v1.DNS, opts metav1.CreateOptions) (*v1.DNS, error) - Update(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (*v1.DNS, error) + Create(ctx context.Context, dNS *operatorv1.DNS, opts metav1.CreateOptions) (*operatorv1.DNS, error) + Update(ctx context.Context, dNS *operatorv1.DNS, opts metav1.UpdateOptions) (*operatorv1.DNS, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (*v1.DNS, error) + UpdateStatus(ctx context.Context, dNS *operatorv1.DNS, opts metav1.UpdateOptions) (*operatorv1.DNS, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.DNS, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.DNSList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.DNS, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.DNSList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNS, err error) - Apply(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.DNS, err error) + Apply(ctx context.Context, dNS *applyconfigurationsoperatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.DNS, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) + ApplyStatus(ctx context.Context, dNS *applyconfigurationsoperatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.DNS, err error) DNSExpansion } // dNSes implements DNSInterface type dNSes struct { - *gentype.ClientWithListAndApply[*v1.DNS, *v1.DNSList, *operatorv1.DNSApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.DNS, *operatorv1.DNSList, *applyconfigurationsoperatorv1.DNSApplyConfiguration] } // newDNSes returns a DNSes func newDNSes(c *OperatorV1Client) *dNSes { return &dNSes{ - gentype.NewClientWithListAndApply[*v1.DNS, *v1.DNSList, *operatorv1.DNSApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.DNS, *operatorv1.DNSList, *applyconfigurationsoperatorv1.DNSApplyConfiguration]( "dnses", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.DNS { return &v1.DNS{} }, - func() *v1.DNSList { return &v1.DNSList{} }), + func() *operatorv1.DNS { return &operatorv1.DNS{} }, + func() *operatorv1.DNSList { return &operatorv1.DNSList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/etcd.go b/operator/clientset/versioned/typed/operator/v1/etcd.go index de79cdb615..291445dc82 100644 --- a/operator/clientset/versioned/typed/operator/v1/etcd.go +++ b/operator/clientset/versioned/typed/operator/v1/etcd.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type EtcdsGetter interface { // EtcdInterface has methods to work with Etcd resources. type EtcdInterface interface { - Create(ctx context.Context, etcd *v1.Etcd, opts metav1.CreateOptions) (*v1.Etcd, error) - Update(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (*v1.Etcd, error) + Create(ctx context.Context, etcd *operatorv1.Etcd, opts metav1.CreateOptions) (*operatorv1.Etcd, error) + Update(ctx context.Context, etcd *operatorv1.Etcd, opts metav1.UpdateOptions) (*operatorv1.Etcd, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (*v1.Etcd, error) + UpdateStatus(ctx context.Context, etcd *operatorv1.Etcd, opts metav1.UpdateOptions) (*operatorv1.Etcd, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Etcd, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.EtcdList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.Etcd, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.EtcdList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Etcd, err error) - Apply(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.Etcd, err error) + Apply(ctx context.Context, etcd *applyconfigurationsoperatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Etcd, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) + ApplyStatus(ctx context.Context, etcd *applyconfigurationsoperatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Etcd, err error) EtcdExpansion } // etcds implements EtcdInterface type etcds struct { - *gentype.ClientWithListAndApply[*v1.Etcd, *v1.EtcdList, *operatorv1.EtcdApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.Etcd, *operatorv1.EtcdList, *applyconfigurationsoperatorv1.EtcdApplyConfiguration] } // newEtcds returns a Etcds func newEtcds(c *OperatorV1Client) *etcds { return &etcds{ - gentype.NewClientWithListAndApply[*v1.Etcd, *v1.EtcdList, *operatorv1.EtcdApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.Etcd, *operatorv1.EtcdList, *applyconfigurationsoperatorv1.EtcdApplyConfiguration]( "etcds", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Etcd { return &v1.Etcd{} }, - func() *v1.EtcdList { return &v1.EtcdList{} }), + func() *operatorv1.Etcd { return &operatorv1.Etcd{} }, + func() *operatorv1.EtcdList { return &operatorv1.EtcdList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go index 8679a87a23..924d030e90 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_authentication.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAuthentications implements AuthenticationInterface -type FakeAuthentications struct { +// fakeAuthentications implements AuthenticationInterface +type fakeAuthentications struct { + *gentype.FakeClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *operatorv1.AuthenticationApplyConfiguration] Fake *FakeOperatorV1 } -var authenticationsResource = v1.SchemeGroupVersion.WithResource("authentications") - -var authenticationsKind = v1.SchemeGroupVersion.WithKind("Authentication") - -// Get takes name of the authentication, and returns the corresponding authentication object, and an error if there is any. -func (c *FakeAuthentications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(authenticationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// List takes label and field selectors, and returns the list of Authentications that match those selectors. -func (c *FakeAuthentications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AuthenticationList, err error) { - emptyResult := &v1.AuthenticationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(authenticationsResource, authenticationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.AuthenticationList{ListMeta: obj.(*v1.AuthenticationList).ListMeta} - for _, item := range obj.(*v1.AuthenticationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested authentications. -func (c *FakeAuthentications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(authenticationsResource, opts)) -} - -// Create takes the representation of a authentication and creates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Create(ctx context.Context, authentication *v1.Authentication, opts metav1.CreateOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(authenticationsResource, authentication, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// Update takes the representation of a authentication and updates it. Returns the server's representation of the authentication, and an error, if there is any. -func (c *FakeAuthentications) Update(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(authenticationsResource, authentication, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeAuthentications) UpdateStatus(ctx context.Context, authentication *v1.Authentication, opts metav1.UpdateOptions) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(authenticationsResource, "status", authentication, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// Delete takes name of the authentication and deletes it. Returns an error if one occurs. -func (c *FakeAuthentications) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(authenticationsResource, name, opts), &v1.Authentication{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeAuthentications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(authenticationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.AuthenticationList{}) - return err -} - -// Patch applies the patch and returns the patched authentication. -func (c *FakeAuthentications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Authentication, err error) { - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(authenticationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied authentication. -func (c *FakeAuthentications) Apply(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { - if authentication == nil { - return nil, fmt.Errorf("authentication provided to Apply must not be nil") - } - data, err := json.Marshal(authentication) - if err != nil { - return nil, err - } - name := authentication.Name - if name == nil { - return nil, fmt.Errorf("authentication.Name must be provided to Apply") - } - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(authenticationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Authentication), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeAuthentications) ApplyStatus(ctx context.Context, authentication *operatorv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Authentication, err error) { - if authentication == nil { - return nil, fmt.Errorf("authentication provided to Apply must not be nil") - } - data, err := json.Marshal(authentication) - if err != nil { - return nil, err - } - name := authentication.Name - if name == nil { - return nil, fmt.Errorf("authentication.Name must be provided to Apply") - } - emptyResult := &v1.Authentication{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(authenticationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeAuthentications(fake *FakeOperatorV1) typedoperatorv1.AuthenticationInterface { + return &fakeAuthentications{ + gentype.NewFakeClientWithListAndApply[*v1.Authentication, *v1.AuthenticationList, *operatorv1.AuthenticationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("authentications"), + v1.SchemeGroupVersion.WithKind("Authentication"), + func() *v1.Authentication { return &v1.Authentication{} }, + func() *v1.AuthenticationList { return &v1.AuthenticationList{} }, + func(dst, src *v1.AuthenticationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.AuthenticationList) []*v1.Authentication { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.AuthenticationList, items []*v1.Authentication) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.Authentication), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go index c9f711a1f6..861a2c062b 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_cloudcredential.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeCloudCredentials implements CloudCredentialInterface -type FakeCloudCredentials struct { +// fakeCloudCredentials implements CloudCredentialInterface +type fakeCloudCredentials struct { + *gentype.FakeClientWithListAndApply[*v1.CloudCredential, *v1.CloudCredentialList, *operatorv1.CloudCredentialApplyConfiguration] Fake *FakeOperatorV1 } -var cloudcredentialsResource = v1.SchemeGroupVersion.WithResource("cloudcredentials") - -var cloudcredentialsKind = v1.SchemeGroupVersion.WithKind("CloudCredential") - -// Get takes name of the cloudCredential, and returns the corresponding cloudCredential object, and an error if there is any. -func (c *FakeCloudCredentials) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CloudCredential, err error) { - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(cloudcredentialsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudCredential), err -} - -// List takes label and field selectors, and returns the list of CloudCredentials that match those selectors. -func (c *FakeCloudCredentials) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CloudCredentialList, err error) { - emptyResult := &v1.CloudCredentialList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(cloudcredentialsResource, cloudcredentialsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.CloudCredentialList{ListMeta: obj.(*v1.CloudCredentialList).ListMeta} - for _, item := range obj.(*v1.CloudCredentialList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cloudCredentials. -func (c *FakeCloudCredentials) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(cloudcredentialsResource, opts)) -} - -// Create takes the representation of a cloudCredential and creates it. Returns the server's representation of the cloudCredential, and an error, if there is any. -func (c *FakeCloudCredentials) Create(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.CreateOptions) (result *v1.CloudCredential, err error) { - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(cloudcredentialsResource, cloudCredential, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudCredential), err -} - -// Update takes the representation of a cloudCredential and updates it. Returns the server's representation of the cloudCredential, and an error, if there is any. -func (c *FakeCloudCredentials) Update(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (result *v1.CloudCredential, err error) { - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(cloudcredentialsResource, cloudCredential, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudCredential), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCloudCredentials) UpdateStatus(ctx context.Context, cloudCredential *v1.CloudCredential, opts metav1.UpdateOptions) (result *v1.CloudCredential, err error) { - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(cloudcredentialsResource, "status", cloudCredential, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudCredential), err -} - -// Delete takes name of the cloudCredential and deletes it. Returns an error if one occurs. -func (c *FakeCloudCredentials) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(cloudcredentialsResource, name, opts), &v1.CloudCredential{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCloudCredentials) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(cloudcredentialsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.CloudCredentialList{}) - return err -} - -// Patch applies the patch and returns the patched cloudCredential. -func (c *FakeCloudCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CloudCredential, err error) { - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(cloudcredentialsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudCredential), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied cloudCredential. -func (c *FakeCloudCredentials) Apply(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) { - if cloudCredential == nil { - return nil, fmt.Errorf("cloudCredential provided to Apply must not be nil") - } - data, err := json.Marshal(cloudCredential) - if err != nil { - return nil, err - } - name := cloudCredential.Name - if name == nil { - return nil, fmt.Errorf("cloudCredential.Name must be provided to Apply") - } - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(cloudcredentialsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CloudCredential), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCloudCredentials) ApplyStatus(ctx context.Context, cloudCredential *operatorv1.CloudCredentialApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CloudCredential, err error) { - if cloudCredential == nil { - return nil, fmt.Errorf("cloudCredential provided to Apply must not be nil") - } - data, err := json.Marshal(cloudCredential) - if err != nil { - return nil, err - } - name := cloudCredential.Name - if name == nil { - return nil, fmt.Errorf("cloudCredential.Name must be provided to Apply") - } - emptyResult := &v1.CloudCredential{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(cloudcredentialsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeCloudCredentials(fake *FakeOperatorV1) typedoperatorv1.CloudCredentialInterface { + return &fakeCloudCredentials{ + gentype.NewFakeClientWithListAndApply[*v1.CloudCredential, *v1.CloudCredentialList, *operatorv1.CloudCredentialApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("cloudcredentials"), + v1.SchemeGroupVersion.WithKind("CloudCredential"), + func() *v1.CloudCredential { return &v1.CloudCredential{} }, + func() *v1.CloudCredentialList { return &v1.CloudCredentialList{} }, + func(dst, src *v1.CloudCredentialList) { dst.ListMeta = src.ListMeta }, + func(list *v1.CloudCredentialList) []*v1.CloudCredential { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.CloudCredentialList, items []*v1.CloudCredential) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.CloudCredential), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go index 9ab25093dc..57cff1cf68 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_clustercsidriver.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterCSIDrivers implements ClusterCSIDriverInterface -type FakeClusterCSIDrivers struct { +// fakeClusterCSIDrivers implements ClusterCSIDriverInterface +type fakeClusterCSIDrivers struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterCSIDriver, *v1.ClusterCSIDriverList, *operatorv1.ClusterCSIDriverApplyConfiguration] Fake *FakeOperatorV1 } -var clustercsidriversResource = v1.SchemeGroupVersion.WithResource("clustercsidrivers") - -var clustercsidriversKind = v1.SchemeGroupVersion.WithKind("ClusterCSIDriver") - -// Get takes name of the clusterCSIDriver, and returns the corresponding clusterCSIDriver object, and an error if there is any. -func (c *FakeClusterCSIDrivers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterCSIDriver, err error) { - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clustercsidriversResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterCSIDriver), err -} - -// List takes label and field selectors, and returns the list of ClusterCSIDrivers that match those selectors. -func (c *FakeClusterCSIDrivers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterCSIDriverList, err error) { - emptyResult := &v1.ClusterCSIDriverList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clustercsidriversResource, clustercsidriversKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterCSIDriverList{ListMeta: obj.(*v1.ClusterCSIDriverList).ListMeta} - for _, item := range obj.(*v1.ClusterCSIDriverList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterCSIDrivers. -func (c *FakeClusterCSIDrivers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clustercsidriversResource, opts)) -} - -// Create takes the representation of a clusterCSIDriver and creates it. Returns the server's representation of the clusterCSIDriver, and an error, if there is any. -func (c *FakeClusterCSIDrivers) Create(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.CreateOptions) (result *v1.ClusterCSIDriver, err error) { - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clustercsidriversResource, clusterCSIDriver, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterCSIDriver), err -} - -// Update takes the representation of a clusterCSIDriver and updates it. Returns the server's representation of the clusterCSIDriver, and an error, if there is any. -func (c *FakeClusterCSIDrivers) Update(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (result *v1.ClusterCSIDriver, err error) { - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clustercsidriversResource, clusterCSIDriver, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterCSIDriver), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterCSIDrivers) UpdateStatus(ctx context.Context, clusterCSIDriver *v1.ClusterCSIDriver, opts metav1.UpdateOptions) (result *v1.ClusterCSIDriver, err error) { - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(clustercsidriversResource, "status", clusterCSIDriver, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterCSIDriver), err -} - -// Delete takes name of the clusterCSIDriver and deletes it. Returns an error if one occurs. -func (c *FakeClusterCSIDrivers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clustercsidriversResource, name, opts), &v1.ClusterCSIDriver{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterCSIDrivers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clustercsidriversResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterCSIDriverList{}) - return err -} - -// Patch applies the patch and returns the patched clusterCSIDriver. -func (c *FakeClusterCSIDrivers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterCSIDriver, err error) { - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clustercsidriversResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterCSIDriver), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCSIDriver. -func (c *FakeClusterCSIDrivers) Apply(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) { - if clusterCSIDriver == nil { - return nil, fmt.Errorf("clusterCSIDriver provided to Apply must not be nil") - } - data, err := json.Marshal(clusterCSIDriver) - if err != nil { - return nil, err - } - name := clusterCSIDriver.Name - if name == nil { - return nil, fmt.Errorf("clusterCSIDriver.Name must be provided to Apply") - } - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clustercsidriversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterCSIDriver), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterCSIDrivers) ApplyStatus(ctx context.Context, clusterCSIDriver *operatorv1.ClusterCSIDriverApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterCSIDriver, err error) { - if clusterCSIDriver == nil { - return nil, fmt.Errorf("clusterCSIDriver provided to Apply must not be nil") - } - data, err := json.Marshal(clusterCSIDriver) - if err != nil { - return nil, err - } - name := clusterCSIDriver.Name - if name == nil { - return nil, fmt.Errorf("clusterCSIDriver.Name must be provided to Apply") - } - emptyResult := &v1.ClusterCSIDriver{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clustercsidriversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterCSIDrivers(fake *FakeOperatorV1) typedoperatorv1.ClusterCSIDriverInterface { + return &fakeClusterCSIDrivers{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterCSIDriver, *v1.ClusterCSIDriverList, *operatorv1.ClusterCSIDriverApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clustercsidrivers"), + v1.SchemeGroupVersion.WithKind("ClusterCSIDriver"), + func() *v1.ClusterCSIDriver { return &v1.ClusterCSIDriver{} }, + func() *v1.ClusterCSIDriverList { return &v1.ClusterCSIDriverList{} }, + func(dst, src *v1.ClusterCSIDriverList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterCSIDriverList) []*v1.ClusterCSIDriver { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ClusterCSIDriverList, items []*v1.ClusterCSIDriver) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ClusterCSIDriver), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go index 9d377b2097..2d6dd49762 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_config.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConfigs implements ConfigInterface -type FakeConfigs struct { +// fakeConfigs implements ConfigInterface +type fakeConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.Config, *v1.ConfigList, *operatorv1.ConfigApplyConfiguration] Fake *FakeOperatorV1 } -var configsResource = v1.SchemeGroupVersion.WithResource("configs") - -var configsKind = v1.SchemeGroupVersion.WithKind("Config") - -// Get takes name of the config, and returns the corresponding config object, and an error if there is any. -func (c *FakeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(configsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// List takes label and field selectors, and returns the list of Configs that match those selectors. -func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigList, err error) { - emptyResult := &v1.ConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(configsResource, configsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConfigList{ListMeta: obj.(*v1.ConfigList).ListMeta} - for _, item := range obj.(*v1.ConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested configs. -func (c *FakeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(configsResource, opts)) -} - -// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(configsResource, config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(configsResource, config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(configsResource, "status", config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Delete takes name of the config and deletes it. Returns an error if one occurs. -func (c *FakeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &v1.Config{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(configsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConfigList{}) - return err -} - -// Patch applies the patch and returns the patched config. -func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied config. -func (c *FakeConfigs) Apply(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { - if config == nil { - return nil, fmt.Errorf("config provided to Apply must not be nil") - } - data, err := json.Marshal(config) - if err != nil { - return nil, err - } - name := config.Name - if name == nil { - return nil, fmt.Errorf("config.Name must be provided to Apply") - } - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *operatorv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { - if config == nil { - return nil, fmt.Errorf("config provided to Apply must not be nil") - } - data, err := json.Marshal(config) - if err != nil { - return nil, err - } - name := config.Name - if name == nil { - return nil, fmt.Errorf("config.Name must be provided to Apply") - } - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConfigs(fake *FakeOperatorV1) typedoperatorv1.ConfigInterface { + return &fakeConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.Config, *v1.ConfigList, *operatorv1.ConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("configs"), + v1.SchemeGroupVersion.WithKind("Config"), + func() *v1.Config { return &v1.Config{} }, + func() *v1.ConfigList { return &v1.ConfigList{} }, + func(dst, src *v1.ConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConfigList) []*v1.Config { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConfigList, items []*v1.Config) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Config), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go index ed5b5b54af..e903d0e2cb 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_console.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConsoles implements ConsoleInterface -type FakeConsoles struct { +// fakeConsoles implements ConsoleInterface +type fakeConsoles struct { + *gentype.FakeClientWithListAndApply[*v1.Console, *v1.ConsoleList, *operatorv1.ConsoleApplyConfiguration] Fake *FakeOperatorV1 } -var consolesResource = v1.SchemeGroupVersion.WithResource("consoles") - -var consolesKind = v1.SchemeGroupVersion.WithKind("Console") - -// Get takes name of the console, and returns the corresponding console object, and an error if there is any. -func (c *FakeConsoles) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(consolesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// List takes label and field selectors, and returns the list of Consoles that match those selectors. -func (c *FakeConsoles) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConsoleList, err error) { - emptyResult := &v1.ConsoleList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(consolesResource, consolesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConsoleList{ListMeta: obj.(*v1.ConsoleList).ListMeta} - for _, item := range obj.(*v1.ConsoleList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested consoles. -func (c *FakeConsoles) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(consolesResource, opts)) -} - -// Create takes the representation of a console and creates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Create(ctx context.Context, console *v1.Console, opts metav1.CreateOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(consolesResource, console, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// Update takes the representation of a console and updates it. Returns the server's representation of the console, and an error, if there is any. -func (c *FakeConsoles) Update(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(consolesResource, console, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConsoles) UpdateStatus(ctx context.Context, console *v1.Console, opts metav1.UpdateOptions) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(consolesResource, "status", console, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// Delete takes name of the console and deletes it. Returns an error if one occurs. -func (c *FakeConsoles) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(consolesResource, name, opts), &v1.Console{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConsoles) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(consolesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConsoleList{}) - return err -} - -// Patch applies the patch and returns the patched console. -func (c *FakeConsoles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Console, err error) { - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied console. -func (c *FakeConsoles) Apply(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { - if console == nil { - return nil, fmt.Errorf("console provided to Apply must not be nil") - } - data, err := json.Marshal(console) - if err != nil { - return nil, err - } - name := console.Name - if name == nil { - return nil, fmt.Errorf("console.Name must be provided to Apply") - } - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Console), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConsoles) ApplyStatus(ctx context.Context, console *operatorv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Console, err error) { - if console == nil { - return nil, fmt.Errorf("console provided to Apply must not be nil") - } - data, err := json.Marshal(console) - if err != nil { - return nil, err - } - name := console.Name - if name == nil { - return nil, fmt.Errorf("console.Name must be provided to Apply") - } - emptyResult := &v1.Console{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(consolesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConsoles(fake *FakeOperatorV1) typedoperatorv1.ConsoleInterface { + return &fakeConsoles{ + gentype.NewFakeClientWithListAndApply[*v1.Console, *v1.ConsoleList, *operatorv1.ConsoleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoles"), + v1.SchemeGroupVersion.WithKind("Console"), + func() *v1.Console { return &v1.Console{} }, + func() *v1.ConsoleList { return &v1.ConsoleList{} }, + func(dst, src *v1.ConsoleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleList) []*v1.Console { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsoleList, items []*v1.Console) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Console), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go index 9956d1c6c9..5005b96f13 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_csisnapshotcontroller.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeCSISnapshotControllers implements CSISnapshotControllerInterface -type FakeCSISnapshotControllers struct { +// fakeCSISnapshotControllers implements CSISnapshotControllerInterface +type fakeCSISnapshotControllers struct { + *gentype.FakeClientWithListAndApply[*v1.CSISnapshotController, *v1.CSISnapshotControllerList, *operatorv1.CSISnapshotControllerApplyConfiguration] Fake *FakeOperatorV1 } -var csisnapshotcontrollersResource = v1.SchemeGroupVersion.WithResource("csisnapshotcontrollers") - -var csisnapshotcontrollersKind = v1.SchemeGroupVersion.WithKind("CSISnapshotController") - -// Get takes name of the cSISnapshotController, and returns the corresponding cSISnapshotController object, and an error if there is any. -func (c *FakeCSISnapshotControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSISnapshotController, err error) { - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(csisnapshotcontrollersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CSISnapshotController), err -} - -// List takes label and field selectors, and returns the list of CSISnapshotControllers that match those selectors. -func (c *FakeCSISnapshotControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSISnapshotControllerList, err error) { - emptyResult := &v1.CSISnapshotControllerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(csisnapshotcontrollersResource, csisnapshotcontrollersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.CSISnapshotControllerList{ListMeta: obj.(*v1.CSISnapshotControllerList).ListMeta} - for _, item := range obj.(*v1.CSISnapshotControllerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cSISnapshotControllers. -func (c *FakeCSISnapshotControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(csisnapshotcontrollersResource, opts)) -} - -// Create takes the representation of a cSISnapshotController and creates it. Returns the server's representation of the cSISnapshotController, and an error, if there is any. -func (c *FakeCSISnapshotControllers) Create(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.CreateOptions) (result *v1.CSISnapshotController, err error) { - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(csisnapshotcontrollersResource, cSISnapshotController, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CSISnapshotController), err -} - -// Update takes the representation of a cSISnapshotController and updates it. Returns the server's representation of the cSISnapshotController, and an error, if there is any. -func (c *FakeCSISnapshotControllers) Update(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (result *v1.CSISnapshotController, err error) { - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(csisnapshotcontrollersResource, cSISnapshotController, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CSISnapshotController), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeCSISnapshotControllers) UpdateStatus(ctx context.Context, cSISnapshotController *v1.CSISnapshotController, opts metav1.UpdateOptions) (result *v1.CSISnapshotController, err error) { - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(csisnapshotcontrollersResource, "status", cSISnapshotController, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CSISnapshotController), err -} - -// Delete takes name of the cSISnapshotController and deletes it. Returns an error if one occurs. -func (c *FakeCSISnapshotControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(csisnapshotcontrollersResource, name, opts), &v1.CSISnapshotController{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCSISnapshotControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(csisnapshotcontrollersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.CSISnapshotControllerList{}) - return err -} - -// Patch applies the patch and returns the patched cSISnapshotController. -func (c *FakeCSISnapshotControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSISnapshotController, err error) { - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(csisnapshotcontrollersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CSISnapshotController), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied cSISnapshotController. -func (c *FakeCSISnapshotControllers) Apply(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) { - if cSISnapshotController == nil { - return nil, fmt.Errorf("cSISnapshotController provided to Apply must not be nil") - } - data, err := json.Marshal(cSISnapshotController) - if err != nil { - return nil, err - } - name := cSISnapshotController.Name - if name == nil { - return nil, fmt.Errorf("cSISnapshotController.Name must be provided to Apply") - } - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.CSISnapshotController), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeCSISnapshotControllers) ApplyStatus(ctx context.Context, cSISnapshotController *operatorv1.CSISnapshotControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSISnapshotController, err error) { - if cSISnapshotController == nil { - return nil, fmt.Errorf("cSISnapshotController provided to Apply must not be nil") - } - data, err := json.Marshal(cSISnapshotController) - if err != nil { - return nil, err - } - name := cSISnapshotController.Name - if name == nil { - return nil, fmt.Errorf("cSISnapshotController.Name must be provided to Apply") - } - emptyResult := &v1.CSISnapshotController{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(csisnapshotcontrollersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeCSISnapshotControllers(fake *FakeOperatorV1) typedoperatorv1.CSISnapshotControllerInterface { + return &fakeCSISnapshotControllers{ + gentype.NewFakeClientWithListAndApply[*v1.CSISnapshotController, *v1.CSISnapshotControllerList, *operatorv1.CSISnapshotControllerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("csisnapshotcontrollers"), + v1.SchemeGroupVersion.WithKind("CSISnapshotController"), + func() *v1.CSISnapshotController { return &v1.CSISnapshotController{} }, + func() *v1.CSISnapshotControllerList { return &v1.CSISnapshotControllerList{} }, + func(dst, src *v1.CSISnapshotControllerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.CSISnapshotControllerList) []*v1.CSISnapshotController { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.CSISnapshotControllerList, items []*v1.CSISnapshotController) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.CSISnapshotController), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go index e5fd0a6734..4d1e8fa618 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_dns.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeDNSes implements DNSInterface -type FakeDNSes struct { +// fakeDNSes implements DNSInterface +type fakeDNSes struct { + *gentype.FakeClientWithListAndApply[*v1.DNS, *v1.DNSList, *operatorv1.DNSApplyConfiguration] Fake *FakeOperatorV1 } -var dnsesResource = v1.SchemeGroupVersion.WithResource("dnses") - -var dnsesKind = v1.SchemeGroupVersion.WithKind("DNS") - -// Get takes name of the dNS, and returns the corresponding dNS object, and an error if there is any. -func (c *FakeDNSes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(dnsesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// List takes label and field selectors, and returns the list of DNSes that match those selectors. -func (c *FakeDNSes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DNSList, err error) { - emptyResult := &v1.DNSList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(dnsesResource, dnsesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.DNSList{ListMeta: obj.(*v1.DNSList).ListMeta} - for _, item := range obj.(*v1.DNSList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested dNSes. -func (c *FakeDNSes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(dnsesResource, opts)) -} - -// Create takes the representation of a dNS and creates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Create(ctx context.Context, dNS *v1.DNS, opts metav1.CreateOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(dnsesResource, dNS, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// Update takes the representation of a dNS and updates it. Returns the server's representation of the dNS, and an error, if there is any. -func (c *FakeDNSes) Update(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(dnsesResource, dNS, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDNSes) UpdateStatus(ctx context.Context, dNS *v1.DNS, opts metav1.UpdateOptions) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(dnsesResource, "status", dNS, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// Delete takes name of the dNS and deletes it. Returns an error if one occurs. -func (c *FakeDNSes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(dnsesResource, name, opts), &v1.DNS{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeDNSes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(dnsesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.DNSList{}) - return err -} - -// Patch applies the patch and returns the patched dNS. -func (c *FakeDNSes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DNS, err error) { - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(dnsesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied dNS. -func (c *FakeDNSes) Apply(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { - if dNS == nil { - return nil, fmt.Errorf("dNS provided to Apply must not be nil") - } - data, err := json.Marshal(dNS) - if err != nil { - return nil, err - } - name := dNS.Name - if name == nil { - return nil, fmt.Errorf("dNS.Name must be provided to Apply") - } - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(dnsesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.DNS), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeDNSes) ApplyStatus(ctx context.Context, dNS *operatorv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *v1.DNS, err error) { - if dNS == nil { - return nil, fmt.Errorf("dNS provided to Apply must not be nil") - } - data, err := json.Marshal(dNS) - if err != nil { - return nil, err - } - name := dNS.Name - if name == nil { - return nil, fmt.Errorf("dNS.Name must be provided to Apply") - } - emptyResult := &v1.DNS{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(dnsesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeDNSes(fake *FakeOperatorV1) typedoperatorv1.DNSInterface { + return &fakeDNSes{ + gentype.NewFakeClientWithListAndApply[*v1.DNS, *v1.DNSList, *operatorv1.DNSApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("dnses"), + v1.SchemeGroupVersion.WithKind("DNS"), + func() *v1.DNS { return &v1.DNS{} }, + func() *v1.DNSList { return &v1.DNSList{} }, + func(dst, src *v1.DNSList) { dst.ListMeta = src.ListMeta }, + func(list *v1.DNSList) []*v1.DNS { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.DNSList, items []*v1.DNS) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.DNS), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go index 0952eebd7c..b79b463d19 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_etcd.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeEtcds implements EtcdInterface -type FakeEtcds struct { +// fakeEtcds implements EtcdInterface +type fakeEtcds struct { + *gentype.FakeClientWithListAndApply[*v1.Etcd, *v1.EtcdList, *operatorv1.EtcdApplyConfiguration] Fake *FakeOperatorV1 } -var etcdsResource = v1.SchemeGroupVersion.WithResource("etcds") - -var etcdsKind = v1.SchemeGroupVersion.WithKind("Etcd") - -// Get takes name of the etcd, and returns the corresponding etcd object, and an error if there is any. -func (c *FakeEtcds) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Etcd, err error) { - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(etcdsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Etcd), err -} - -// List takes label and field selectors, and returns the list of Etcds that match those selectors. -func (c *FakeEtcds) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EtcdList, err error) { - emptyResult := &v1.EtcdList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(etcdsResource, etcdsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.EtcdList{ListMeta: obj.(*v1.EtcdList).ListMeta} - for _, item := range obj.(*v1.EtcdList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested etcds. -func (c *FakeEtcds) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(etcdsResource, opts)) -} - -// Create takes the representation of a etcd and creates it. Returns the server's representation of the etcd, and an error, if there is any. -func (c *FakeEtcds) Create(ctx context.Context, etcd *v1.Etcd, opts metav1.CreateOptions) (result *v1.Etcd, err error) { - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(etcdsResource, etcd, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Etcd), err -} - -// Update takes the representation of a etcd and updates it. Returns the server's representation of the etcd, and an error, if there is any. -func (c *FakeEtcds) Update(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (result *v1.Etcd, err error) { - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(etcdsResource, etcd, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Etcd), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeEtcds) UpdateStatus(ctx context.Context, etcd *v1.Etcd, opts metav1.UpdateOptions) (result *v1.Etcd, err error) { - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(etcdsResource, "status", etcd, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Etcd), err -} - -// Delete takes name of the etcd and deletes it. Returns an error if one occurs. -func (c *FakeEtcds) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(etcdsResource, name, opts), &v1.Etcd{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEtcds) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(etcdsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.EtcdList{}) - return err -} - -// Patch applies the patch and returns the patched etcd. -func (c *FakeEtcds) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Etcd, err error) { - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(etcdsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Etcd), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied etcd. -func (c *FakeEtcds) Apply(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) { - if etcd == nil { - return nil, fmt.Errorf("etcd provided to Apply must not be nil") - } - data, err := json.Marshal(etcd) - if err != nil { - return nil, err - } - name := etcd.Name - if name == nil { - return nil, fmt.Errorf("etcd.Name must be provided to Apply") - } - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(etcdsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Etcd), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeEtcds) ApplyStatus(ctx context.Context, etcd *operatorv1.EtcdApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Etcd, err error) { - if etcd == nil { - return nil, fmt.Errorf("etcd provided to Apply must not be nil") - } - data, err := json.Marshal(etcd) - if err != nil { - return nil, err - } - name := etcd.Name - if name == nil { - return nil, fmt.Errorf("etcd.Name must be provided to Apply") - } - emptyResult := &v1.Etcd{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(etcdsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeEtcds(fake *FakeOperatorV1) typedoperatorv1.EtcdInterface { + return &fakeEtcds{ + gentype.NewFakeClientWithListAndApply[*v1.Etcd, *v1.EtcdList, *operatorv1.EtcdApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("etcds"), + v1.SchemeGroupVersion.WithKind("Etcd"), + func() *v1.Etcd { return &v1.Etcd{} }, + func() *v1.EtcdList { return &v1.EtcdList{} }, + func(dst, src *v1.EtcdList) { dst.ListMeta = src.ListMeta }, + func(list *v1.EtcdList) []*v1.Etcd { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.EtcdList, items []*v1.Etcd) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Etcd), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go index 71689cbf41..0e81be7951 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeIngressControllers implements IngressControllerInterface -type FakeIngressControllers struct { +// fakeIngressControllers implements IngressControllerInterface +type fakeIngressControllers struct { + *gentype.FakeClientWithListAndApply[*v1.IngressController, *v1.IngressControllerList, *operatorv1.IngressControllerApplyConfiguration] Fake *FakeOperatorV1 - ns string -} - -var ingresscontrollersResource = v1.SchemeGroupVersion.WithResource("ingresscontrollers") - -var ingresscontrollersKind = v1.SchemeGroupVersion.WithKind("IngressController") - -// Get takes name of the ingressController, and returns the corresponding ingressController object, and an error if there is any. -func (c *FakeIngressControllers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressController, err error) { - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(ingresscontrollersResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.IngressController), err -} - -// List takes label and field selectors, and returns the list of IngressControllers that match those selectors. -func (c *FakeIngressControllers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressControllerList, err error) { - emptyResult := &v1.IngressControllerList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(ingresscontrollersResource, ingresscontrollersKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.IngressControllerList{ListMeta: obj.(*v1.IngressControllerList).ListMeta} - for _, item := range obj.(*v1.IngressControllerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ingressControllers. -func (c *FakeIngressControllers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(ingresscontrollersResource, c.ns, opts)) - -} - -// Create takes the representation of a ingressController and creates it. Returns the server's representation of the ingressController, and an error, if there is any. -func (c *FakeIngressControllers) Create(ctx context.Context, ingressController *v1.IngressController, opts metav1.CreateOptions) (result *v1.IngressController, err error) { - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(ingresscontrollersResource, c.ns, ingressController, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.IngressController), err -} - -// Update takes the representation of a ingressController and updates it. Returns the server's representation of the ingressController, and an error, if there is any. -func (c *FakeIngressControllers) Update(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (result *v1.IngressController, err error) { - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(ingresscontrollersResource, c.ns, ingressController, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.IngressController), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeIngressControllers) UpdateStatus(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (result *v1.IngressController, err error) { - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(ingresscontrollersResource, "status", c.ns, ingressController, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.IngressController), err -} - -// Delete takes name of the ingressController and deletes it. Returns an error if one occurs. -func (c *FakeIngressControllers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(ingresscontrollersResource, c.ns, name, opts), &v1.IngressController{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIngressControllers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(ingresscontrollersResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.IngressControllerList{}) - return err -} - -// Patch applies the patch and returns the patched ingressController. -func (c *FakeIngressControllers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressController, err error) { - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(ingresscontrollersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.IngressController), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied ingressController. -func (c *FakeIngressControllers) Apply(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) { - if ingressController == nil { - return nil, fmt.Errorf("ingressController provided to Apply must not be nil") - } - data, err := json.Marshal(ingressController) - if err != nil { - return nil, err - } - name := ingressController.Name - if name == nil { - return nil, fmt.Errorf("ingressController.Name must be provided to Apply") - } - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.IngressController), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeIngressControllers) ApplyStatus(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) { - if ingressController == nil { - return nil, fmt.Errorf("ingressController provided to Apply must not be nil") - } - data, err := json.Marshal(ingressController) - if err != nil { - return nil, err - } - name := ingressController.Name - if name == nil { - return nil, fmt.Errorf("ingressController.Name must be provided to Apply") - } - emptyResult := &v1.IngressController{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(ingresscontrollersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeIngressControllers(fake *FakeOperatorV1, namespace string) typedoperatorv1.IngressControllerInterface { + return &fakeIngressControllers{ + gentype.NewFakeClientWithListAndApply[*v1.IngressController, *v1.IngressControllerList, *operatorv1.IngressControllerApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("ingresscontrollers"), + v1.SchemeGroupVersion.WithKind("IngressController"), + func() *v1.IngressController { return &v1.IngressController{} }, + func() *v1.IngressControllerList { return &v1.IngressControllerList{} }, + func(dst, src *v1.IngressControllerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.IngressControllerList) []*v1.IngressController { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.IngressControllerList, items []*v1.IngressController) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.IngressController), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go index 0da35b96a2..82e68c5151 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_insightsoperator.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeInsightsOperators implements InsightsOperatorInterface -type FakeInsightsOperators struct { +// fakeInsightsOperators implements InsightsOperatorInterface +type fakeInsightsOperators struct { + *gentype.FakeClientWithListAndApply[*v1.InsightsOperator, *v1.InsightsOperatorList, *operatorv1.InsightsOperatorApplyConfiguration] Fake *FakeOperatorV1 } -var insightsoperatorsResource = v1.SchemeGroupVersion.WithResource("insightsoperators") - -var insightsoperatorsKind = v1.SchemeGroupVersion.WithKind("InsightsOperator") - -// Get takes name of the insightsOperator, and returns the corresponding insightsOperator object, and an error if there is any. -func (c *FakeInsightsOperators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.InsightsOperator, err error) { - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(insightsoperatorsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.InsightsOperator), err -} - -// List takes label and field selectors, and returns the list of InsightsOperators that match those selectors. -func (c *FakeInsightsOperators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.InsightsOperatorList, err error) { - emptyResult := &v1.InsightsOperatorList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(insightsoperatorsResource, insightsoperatorsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.InsightsOperatorList{ListMeta: obj.(*v1.InsightsOperatorList).ListMeta} - for _, item := range obj.(*v1.InsightsOperatorList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested insightsOperators. -func (c *FakeInsightsOperators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(insightsoperatorsResource, opts)) -} - -// Create takes the representation of a insightsOperator and creates it. Returns the server's representation of the insightsOperator, and an error, if there is any. -func (c *FakeInsightsOperators) Create(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.CreateOptions) (result *v1.InsightsOperator, err error) { - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(insightsoperatorsResource, insightsOperator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.InsightsOperator), err -} - -// Update takes the representation of a insightsOperator and updates it. Returns the server's representation of the insightsOperator, and an error, if there is any. -func (c *FakeInsightsOperators) Update(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (result *v1.InsightsOperator, err error) { - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(insightsoperatorsResource, insightsOperator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.InsightsOperator), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeInsightsOperators) UpdateStatus(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (result *v1.InsightsOperator, err error) { - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(insightsoperatorsResource, "status", insightsOperator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.InsightsOperator), err -} - -// Delete takes name of the insightsOperator and deletes it. Returns an error if one occurs. -func (c *FakeInsightsOperators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(insightsoperatorsResource, name, opts), &v1.InsightsOperator{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeInsightsOperators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(insightsoperatorsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.InsightsOperatorList{}) - return err -} - -// Patch applies the patch and returns the patched insightsOperator. -func (c *FakeInsightsOperators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InsightsOperator, err error) { - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(insightsoperatorsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.InsightsOperator), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied insightsOperator. -func (c *FakeInsightsOperators) Apply(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) { - if insightsOperator == nil { - return nil, fmt.Errorf("insightsOperator provided to Apply must not be nil") - } - data, err := json.Marshal(insightsOperator) - if err != nil { - return nil, err - } - name := insightsOperator.Name - if name == nil { - return nil, fmt.Errorf("insightsOperator.Name must be provided to Apply") - } - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(insightsoperatorsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.InsightsOperator), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeInsightsOperators) ApplyStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) { - if insightsOperator == nil { - return nil, fmt.Errorf("insightsOperator provided to Apply must not be nil") - } - data, err := json.Marshal(insightsOperator) - if err != nil { - return nil, err - } - name := insightsOperator.Name - if name == nil { - return nil, fmt.Errorf("insightsOperator.Name must be provided to Apply") - } - emptyResult := &v1.InsightsOperator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(insightsoperatorsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeInsightsOperators(fake *FakeOperatorV1) typedoperatorv1.InsightsOperatorInterface { + return &fakeInsightsOperators{ + gentype.NewFakeClientWithListAndApply[*v1.InsightsOperator, *v1.InsightsOperatorList, *operatorv1.InsightsOperatorApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("insightsoperators"), + v1.SchemeGroupVersion.WithKind("InsightsOperator"), + func() *v1.InsightsOperator { return &v1.InsightsOperator{} }, + func() *v1.InsightsOperatorList { return &v1.InsightsOperatorList{} }, + func(dst, src *v1.InsightsOperatorList) { dst.ListMeta = src.ListMeta }, + func(list *v1.InsightsOperatorList) []*v1.InsightsOperator { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.InsightsOperatorList, items []*v1.InsightsOperator) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.InsightsOperator), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go index 7bbe535812..5f74443a32 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubeapiserver.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeKubeAPIServers implements KubeAPIServerInterface -type FakeKubeAPIServers struct { +// fakeKubeAPIServers implements KubeAPIServerInterface +type fakeKubeAPIServers struct { + *gentype.FakeClientWithListAndApply[*v1.KubeAPIServer, *v1.KubeAPIServerList, *operatorv1.KubeAPIServerApplyConfiguration] Fake *FakeOperatorV1 } -var kubeapiserversResource = v1.SchemeGroupVersion.WithResource("kubeapiservers") - -var kubeapiserversKind = v1.SchemeGroupVersion.WithKind("KubeAPIServer") - -// Get takes name of the kubeAPIServer, and returns the corresponding kubeAPIServer object, and an error if there is any. -func (c *FakeKubeAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeAPIServer, err error) { - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(kubeapiserversResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeAPIServer), err -} - -// List takes label and field selectors, and returns the list of KubeAPIServers that match those selectors. -func (c *FakeKubeAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeAPIServerList, err error) { - emptyResult := &v1.KubeAPIServerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(kubeapiserversResource, kubeapiserversKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.KubeAPIServerList{ListMeta: obj.(*v1.KubeAPIServerList).ListMeta} - for _, item := range obj.(*v1.KubeAPIServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested kubeAPIServers. -func (c *FakeKubeAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(kubeapiserversResource, opts)) -} - -// Create takes the representation of a kubeAPIServer and creates it. Returns the server's representation of the kubeAPIServer, and an error, if there is any. -func (c *FakeKubeAPIServers) Create(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.CreateOptions) (result *v1.KubeAPIServer, err error) { - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(kubeapiserversResource, kubeAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeAPIServer), err -} - -// Update takes the representation of a kubeAPIServer and updates it. Returns the server's representation of the kubeAPIServer, and an error, if there is any. -func (c *FakeKubeAPIServers) Update(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (result *v1.KubeAPIServer, err error) { - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(kubeapiserversResource, kubeAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeAPIServer), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeAPIServers) UpdateStatus(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (result *v1.KubeAPIServer, err error) { - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(kubeapiserversResource, "status", kubeAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeAPIServer), err -} - -// Delete takes name of the kubeAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeKubeAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeapiserversResource, name, opts), &v1.KubeAPIServer{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeKubeAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(kubeapiserversResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.KubeAPIServerList{}) - return err -} - -// Patch applies the patch and returns the patched kubeAPIServer. -func (c *FakeKubeAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeAPIServer, err error) { - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeapiserversResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeAPIServer), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied kubeAPIServer. -func (c *FakeKubeAPIServers) Apply(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) { - if kubeAPIServer == nil { - return nil, fmt.Errorf("kubeAPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(kubeAPIServer) - if err != nil { - return nil, err - } - name := kubeAPIServer.Name - if name == nil { - return nil, fmt.Errorf("kubeAPIServer.Name must be provided to Apply") - } - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeapiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeAPIServer), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeAPIServers) ApplyStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) { - if kubeAPIServer == nil { - return nil, fmt.Errorf("kubeAPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(kubeAPIServer) - if err != nil { - return nil, err - } - name := kubeAPIServer.Name - if name == nil { - return nil, fmt.Errorf("kubeAPIServer.Name must be provided to Apply") - } - emptyResult := &v1.KubeAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeapiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeKubeAPIServers(fake *FakeOperatorV1) typedoperatorv1.KubeAPIServerInterface { + return &fakeKubeAPIServers{ + gentype.NewFakeClientWithListAndApply[*v1.KubeAPIServer, *v1.KubeAPIServerList, *operatorv1.KubeAPIServerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("kubeapiservers"), + v1.SchemeGroupVersion.WithKind("KubeAPIServer"), + func() *v1.KubeAPIServer { return &v1.KubeAPIServer{} }, + func() *v1.KubeAPIServerList { return &v1.KubeAPIServerList{} }, + func(dst, src *v1.KubeAPIServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.KubeAPIServerList) []*v1.KubeAPIServer { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.KubeAPIServerList, items []*v1.KubeAPIServer) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.KubeAPIServer), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go index a45e2520c9..e918a82d76 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubecontrollermanager.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeKubeControllerManagers implements KubeControllerManagerInterface -type FakeKubeControllerManagers struct { +// fakeKubeControllerManagers implements KubeControllerManagerInterface +type fakeKubeControllerManagers struct { + *gentype.FakeClientWithListAndApply[*v1.KubeControllerManager, *v1.KubeControllerManagerList, *operatorv1.KubeControllerManagerApplyConfiguration] Fake *FakeOperatorV1 } -var kubecontrollermanagersResource = v1.SchemeGroupVersion.WithResource("kubecontrollermanagers") - -var kubecontrollermanagersKind = v1.SchemeGroupVersion.WithKind("KubeControllerManager") - -// Get takes name of the kubeControllerManager, and returns the corresponding kubeControllerManager object, and an error if there is any. -func (c *FakeKubeControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeControllerManager, err error) { - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(kubecontrollermanagersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeControllerManager), err -} - -// List takes label and field selectors, and returns the list of KubeControllerManagers that match those selectors. -func (c *FakeKubeControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeControllerManagerList, err error) { - emptyResult := &v1.KubeControllerManagerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(kubecontrollermanagersResource, kubecontrollermanagersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.KubeControllerManagerList{ListMeta: obj.(*v1.KubeControllerManagerList).ListMeta} - for _, item := range obj.(*v1.KubeControllerManagerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested kubeControllerManagers. -func (c *FakeKubeControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(kubecontrollermanagersResource, opts)) -} - -// Create takes the representation of a kubeControllerManager and creates it. Returns the server's representation of the kubeControllerManager, and an error, if there is any. -func (c *FakeKubeControllerManagers) Create(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.CreateOptions) (result *v1.KubeControllerManager, err error) { - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(kubecontrollermanagersResource, kubeControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeControllerManager), err -} - -// Update takes the representation of a kubeControllerManager and updates it. Returns the server's representation of the kubeControllerManager, and an error, if there is any. -func (c *FakeKubeControllerManagers) Update(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (result *v1.KubeControllerManager, err error) { - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(kubecontrollermanagersResource, kubeControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeControllerManager), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeControllerManagers) UpdateStatus(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (result *v1.KubeControllerManager, err error) { - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(kubecontrollermanagersResource, "status", kubeControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeControllerManager), err -} - -// Delete takes name of the kubeControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeKubeControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubecontrollermanagersResource, name, opts), &v1.KubeControllerManager{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeKubeControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(kubecontrollermanagersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.KubeControllerManagerList{}) - return err -} - -// Patch applies the patch and returns the patched kubeControllerManager. -func (c *FakeKubeControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeControllerManager, err error) { - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubecontrollermanagersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeControllerManager), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied kubeControllerManager. -func (c *FakeKubeControllerManagers) Apply(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) { - if kubeControllerManager == nil { - return nil, fmt.Errorf("kubeControllerManager provided to Apply must not be nil") - } - data, err := json.Marshal(kubeControllerManager) - if err != nil { - return nil, err - } - name := kubeControllerManager.Name - if name == nil { - return nil, fmt.Errorf("kubeControllerManager.Name must be provided to Apply") - } - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubecontrollermanagersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeControllerManager), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeControllerManagers) ApplyStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) { - if kubeControllerManager == nil { - return nil, fmt.Errorf("kubeControllerManager provided to Apply must not be nil") - } - data, err := json.Marshal(kubeControllerManager) - if err != nil { - return nil, err - } - name := kubeControllerManager.Name - if name == nil { - return nil, fmt.Errorf("kubeControllerManager.Name must be provided to Apply") - } - emptyResult := &v1.KubeControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubecontrollermanagersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeKubeControllerManagers(fake *FakeOperatorV1) typedoperatorv1.KubeControllerManagerInterface { + return &fakeKubeControllerManagers{ + gentype.NewFakeClientWithListAndApply[*v1.KubeControllerManager, *v1.KubeControllerManagerList, *operatorv1.KubeControllerManagerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("kubecontrollermanagers"), + v1.SchemeGroupVersion.WithKind("KubeControllerManager"), + func() *v1.KubeControllerManager { return &v1.KubeControllerManager{} }, + func() *v1.KubeControllerManagerList { return &v1.KubeControllerManagerList{} }, + func(dst, src *v1.KubeControllerManagerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.KubeControllerManagerList) []*v1.KubeControllerManager { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.KubeControllerManagerList, items []*v1.KubeControllerManager) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.KubeControllerManager), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go index 4a68325fd7..aa213e1400 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubescheduler.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeKubeSchedulers implements KubeSchedulerInterface -type FakeKubeSchedulers struct { +// fakeKubeSchedulers implements KubeSchedulerInterface +type fakeKubeSchedulers struct { + *gentype.FakeClientWithListAndApply[*v1.KubeScheduler, *v1.KubeSchedulerList, *operatorv1.KubeSchedulerApplyConfiguration] Fake *FakeOperatorV1 } -var kubeschedulersResource = v1.SchemeGroupVersion.WithResource("kubeschedulers") - -var kubeschedulersKind = v1.SchemeGroupVersion.WithKind("KubeScheduler") - -// Get takes name of the kubeScheduler, and returns the corresponding kubeScheduler object, and an error if there is any. -func (c *FakeKubeSchedulers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeScheduler, err error) { - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(kubeschedulersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeScheduler), err -} - -// List takes label and field selectors, and returns the list of KubeSchedulers that match those selectors. -func (c *FakeKubeSchedulers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeSchedulerList, err error) { - emptyResult := &v1.KubeSchedulerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(kubeschedulersResource, kubeschedulersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.KubeSchedulerList{ListMeta: obj.(*v1.KubeSchedulerList).ListMeta} - for _, item := range obj.(*v1.KubeSchedulerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested kubeSchedulers. -func (c *FakeKubeSchedulers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(kubeschedulersResource, opts)) -} - -// Create takes the representation of a kubeScheduler and creates it. Returns the server's representation of the kubeScheduler, and an error, if there is any. -func (c *FakeKubeSchedulers) Create(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.CreateOptions) (result *v1.KubeScheduler, err error) { - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(kubeschedulersResource, kubeScheduler, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeScheduler), err -} - -// Update takes the representation of a kubeScheduler and updates it. Returns the server's representation of the kubeScheduler, and an error, if there is any. -func (c *FakeKubeSchedulers) Update(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (result *v1.KubeScheduler, err error) { - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(kubeschedulersResource, kubeScheduler, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeScheduler), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeSchedulers) UpdateStatus(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (result *v1.KubeScheduler, err error) { - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(kubeschedulersResource, "status", kubeScheduler, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeScheduler), err -} - -// Delete takes name of the kubeScheduler and deletes it. Returns an error if one occurs. -func (c *FakeKubeSchedulers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubeschedulersResource, name, opts), &v1.KubeScheduler{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeKubeSchedulers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(kubeschedulersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.KubeSchedulerList{}) - return err -} - -// Patch applies the patch and returns the patched kubeScheduler. -func (c *FakeKubeSchedulers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeScheduler, err error) { - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeschedulersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeScheduler), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied kubeScheduler. -func (c *FakeKubeSchedulers) Apply(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) { - if kubeScheduler == nil { - return nil, fmt.Errorf("kubeScheduler provided to Apply must not be nil") - } - data, err := json.Marshal(kubeScheduler) - if err != nil { - return nil, err - } - name := kubeScheduler.Name - if name == nil { - return nil, fmt.Errorf("kubeScheduler.Name must be provided to Apply") - } - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeschedulersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeScheduler), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeSchedulers) ApplyStatus(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) { - if kubeScheduler == nil { - return nil, fmt.Errorf("kubeScheduler provided to Apply must not be nil") - } - data, err := json.Marshal(kubeScheduler) - if err != nil { - return nil, err - } - name := kubeScheduler.Name - if name == nil { - return nil, fmt.Errorf("kubeScheduler.Name must be provided to Apply") - } - emptyResult := &v1.KubeScheduler{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubeschedulersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeKubeSchedulers(fake *FakeOperatorV1) typedoperatorv1.KubeSchedulerInterface { + return &fakeKubeSchedulers{ + gentype.NewFakeClientWithListAndApply[*v1.KubeScheduler, *v1.KubeSchedulerList, *operatorv1.KubeSchedulerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("kubeschedulers"), + v1.SchemeGroupVersion.WithKind("KubeScheduler"), + func() *v1.KubeScheduler { return &v1.KubeScheduler{} }, + func() *v1.KubeSchedulerList { return &v1.KubeSchedulerList{} }, + func(dst, src *v1.KubeSchedulerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.KubeSchedulerList) []*v1.KubeScheduler { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.KubeSchedulerList, items []*v1.KubeScheduler) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.KubeScheduler), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go index eb916847fa..cbfdc3e0b4 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_kubestorageversionmigrator.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeKubeStorageVersionMigrators implements KubeStorageVersionMigratorInterface -type FakeKubeStorageVersionMigrators struct { +// fakeKubeStorageVersionMigrators implements KubeStorageVersionMigratorInterface +type fakeKubeStorageVersionMigrators struct { + *gentype.FakeClientWithListAndApply[*v1.KubeStorageVersionMigrator, *v1.KubeStorageVersionMigratorList, *operatorv1.KubeStorageVersionMigratorApplyConfiguration] Fake *FakeOperatorV1 } -var kubestorageversionmigratorsResource = v1.SchemeGroupVersion.WithResource("kubestorageversionmigrators") - -var kubestorageversionmigratorsKind = v1.SchemeGroupVersion.WithKind("KubeStorageVersionMigrator") - -// Get takes name of the kubeStorageVersionMigrator, and returns the corresponding kubeStorageVersionMigrator object, and an error if there is any. -func (c *FakeKubeStorageVersionMigrators) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubeStorageVersionMigrator, err error) { - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(kubestorageversionmigratorsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeStorageVersionMigrator), err -} - -// List takes label and field selectors, and returns the list of KubeStorageVersionMigrators that match those selectors. -func (c *FakeKubeStorageVersionMigrators) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubeStorageVersionMigratorList, err error) { - emptyResult := &v1.KubeStorageVersionMigratorList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(kubestorageversionmigratorsResource, kubestorageversionmigratorsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.KubeStorageVersionMigratorList{ListMeta: obj.(*v1.KubeStorageVersionMigratorList).ListMeta} - for _, item := range obj.(*v1.KubeStorageVersionMigratorList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested kubeStorageVersionMigrators. -func (c *FakeKubeStorageVersionMigrators) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(kubestorageversionmigratorsResource, opts)) -} - -// Create takes the representation of a kubeStorageVersionMigrator and creates it. Returns the server's representation of the kubeStorageVersionMigrator, and an error, if there is any. -func (c *FakeKubeStorageVersionMigrators) Create(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.CreateOptions) (result *v1.KubeStorageVersionMigrator, err error) { - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(kubestorageversionmigratorsResource, kubeStorageVersionMigrator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeStorageVersionMigrator), err -} - -// Update takes the representation of a kubeStorageVersionMigrator and updates it. Returns the server's representation of the kubeStorageVersionMigrator, and an error, if there is any. -func (c *FakeKubeStorageVersionMigrators) Update(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (result *v1.KubeStorageVersionMigrator, err error) { - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(kubestorageversionmigratorsResource, kubeStorageVersionMigrator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeStorageVersionMigrator), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeKubeStorageVersionMigrators) UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (result *v1.KubeStorageVersionMigrator, err error) { - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(kubestorageversionmigratorsResource, "status", kubeStorageVersionMigrator, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeStorageVersionMigrator), err -} - -// Delete takes name of the kubeStorageVersionMigrator and deletes it. Returns an error if one occurs. -func (c *FakeKubeStorageVersionMigrators) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(kubestorageversionmigratorsResource, name, opts), &v1.KubeStorageVersionMigrator{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeKubeStorageVersionMigrators) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(kubestorageversionmigratorsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.KubeStorageVersionMigratorList{}) - return err -} - -// Patch applies the patch and returns the patched kubeStorageVersionMigrator. -func (c *FakeKubeStorageVersionMigrators) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeStorageVersionMigrator, err error) { - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubestorageversionmigratorsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeStorageVersionMigrator), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied kubeStorageVersionMigrator. -func (c *FakeKubeStorageVersionMigrators) Apply(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) { - if kubeStorageVersionMigrator == nil { - return nil, fmt.Errorf("kubeStorageVersionMigrator provided to Apply must not be nil") - } - data, err := json.Marshal(kubeStorageVersionMigrator) - if err != nil { - return nil, err - } - name := kubeStorageVersionMigrator.Name - if name == nil { - return nil, fmt.Errorf("kubeStorageVersionMigrator.Name must be provided to Apply") - } - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.KubeStorageVersionMigrator), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeKubeStorageVersionMigrators) ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) { - if kubeStorageVersionMigrator == nil { - return nil, fmt.Errorf("kubeStorageVersionMigrator provided to Apply must not be nil") - } - data, err := json.Marshal(kubeStorageVersionMigrator) - if err != nil { - return nil, err - } - name := kubeStorageVersionMigrator.Name - if name == nil { - return nil, fmt.Errorf("kubeStorageVersionMigrator.Name must be provided to Apply") - } - emptyResult := &v1.KubeStorageVersionMigrator{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(kubestorageversionmigratorsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeKubeStorageVersionMigrators(fake *FakeOperatorV1) typedoperatorv1.KubeStorageVersionMigratorInterface { + return &fakeKubeStorageVersionMigrators{ + gentype.NewFakeClientWithListAndApply[*v1.KubeStorageVersionMigrator, *v1.KubeStorageVersionMigratorList, *operatorv1.KubeStorageVersionMigratorApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("kubestorageversionmigrators"), + v1.SchemeGroupVersion.WithKind("KubeStorageVersionMigrator"), + func() *v1.KubeStorageVersionMigrator { return &v1.KubeStorageVersionMigrator{} }, + func() *v1.KubeStorageVersionMigratorList { return &v1.KubeStorageVersionMigratorList{} }, + func(dst, src *v1.KubeStorageVersionMigratorList) { dst.ListMeta = src.ListMeta }, + func(list *v1.KubeStorageVersionMigratorList) []*v1.KubeStorageVersionMigrator { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.KubeStorageVersionMigratorList, items []*v1.KubeStorageVersionMigrator) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.KubeStorageVersionMigrator), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_machineconfiguration.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_machineconfiguration.go index 53ff482ae1..f29860c55f 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_machineconfiguration.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_machineconfiguration.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeMachineConfigurations implements MachineConfigurationInterface -type FakeMachineConfigurations struct { +// fakeMachineConfigurations implements MachineConfigurationInterface +type fakeMachineConfigurations struct { + *gentype.FakeClientWithListAndApply[*v1.MachineConfiguration, *v1.MachineConfigurationList, *operatorv1.MachineConfigurationApplyConfiguration] Fake *FakeOperatorV1 } -var machineconfigurationsResource = v1.SchemeGroupVersion.WithResource("machineconfigurations") - -var machineconfigurationsKind = v1.SchemeGroupVersion.WithKind("MachineConfiguration") - -// Get takes name of the machineConfiguration, and returns the corresponding machineConfiguration object, and an error if there is any. -func (c *FakeMachineConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MachineConfiguration, err error) { - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(machineconfigurationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfiguration), err -} - -// List takes label and field selectors, and returns the list of MachineConfigurations that match those selectors. -func (c *FakeMachineConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MachineConfigurationList, err error) { - emptyResult := &v1.MachineConfigurationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(machineconfigurationsResource, machineconfigurationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.MachineConfigurationList{ListMeta: obj.(*v1.MachineConfigurationList).ListMeta} - for _, item := range obj.(*v1.MachineConfigurationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested machineConfigurations. -func (c *FakeMachineConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(machineconfigurationsResource, opts)) -} - -// Create takes the representation of a machineConfiguration and creates it. Returns the server's representation of the machineConfiguration, and an error, if there is any. -func (c *FakeMachineConfigurations) Create(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.CreateOptions) (result *v1.MachineConfiguration, err error) { - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(machineconfigurationsResource, machineConfiguration, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfiguration), err -} - -// Update takes the representation of a machineConfiguration and updates it. Returns the server's representation of the machineConfiguration, and an error, if there is any. -func (c *FakeMachineConfigurations) Update(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (result *v1.MachineConfiguration, err error) { - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(machineconfigurationsResource, machineConfiguration, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfiguration), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeMachineConfigurations) UpdateStatus(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (result *v1.MachineConfiguration, err error) { - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(machineconfigurationsResource, "status", machineConfiguration, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfiguration), err -} - -// Delete takes name of the machineConfiguration and deletes it. Returns an error if one occurs. -func (c *FakeMachineConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(machineconfigurationsResource, name, opts), &v1.MachineConfiguration{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeMachineConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(machineconfigurationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.MachineConfigurationList{}) - return err -} - -// Patch applies the patch and returns the patched machineConfiguration. -func (c *FakeMachineConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfiguration, err error) { - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigurationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfiguration), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied machineConfiguration. -func (c *FakeMachineConfigurations) Apply(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) { - if machineConfiguration == nil { - return nil, fmt.Errorf("machineConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfiguration) - if err != nil { - return nil, err - } - name := machineConfiguration.Name - if name == nil { - return nil, fmt.Errorf("machineConfiguration.Name must be provided to Apply") - } - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigurationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.MachineConfiguration), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeMachineConfigurations) ApplyStatus(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) { - if machineConfiguration == nil { - return nil, fmt.Errorf("machineConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(machineConfiguration) - if err != nil { - return nil, err - } - name := machineConfiguration.Name - if name == nil { - return nil, fmt.Errorf("machineConfiguration.Name must be provided to Apply") - } - emptyResult := &v1.MachineConfiguration{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(machineconfigurationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeMachineConfigurations(fake *FakeOperatorV1) typedoperatorv1.MachineConfigurationInterface { + return &fakeMachineConfigurations{ + gentype.NewFakeClientWithListAndApply[*v1.MachineConfiguration, *v1.MachineConfigurationList, *operatorv1.MachineConfigurationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("machineconfigurations"), + v1.SchemeGroupVersion.WithKind("MachineConfiguration"), + func() *v1.MachineConfiguration { return &v1.MachineConfiguration{} }, + func() *v1.MachineConfigurationList { return &v1.MachineConfigurationList{} }, + func(dst, src *v1.MachineConfigurationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.MachineConfigurationList) []*v1.MachineConfiguration { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.MachineConfigurationList, items []*v1.MachineConfiguration) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.MachineConfiguration), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go index 7564ca3cd5..77bdc90edd 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeNetworks implements NetworkInterface -type FakeNetworks struct { +// fakeNetworks implements NetworkInterface +type fakeNetworks struct { + *gentype.FakeClientWithListAndApply[*v1.Network, *v1.NetworkList, *operatorv1.NetworkApplyConfiguration] Fake *FakeOperatorV1 } -var networksResource = v1.SchemeGroupVersion.WithResource("networks") - -var networksKind = v1.SchemeGroupVersion.WithKind("Network") - -// Get takes name of the network, and returns the corresponding network object, and an error if there is any. -func (c *FakeNetworks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(networksResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// List takes label and field selectors, and returns the list of Networks that match those selectors. -func (c *FakeNetworks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.NetworkList, err error) { - emptyResult := &v1.NetworkList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(networksResource, networksKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.NetworkList{ListMeta: obj.(*v1.NetworkList).ListMeta} - for _, item := range obj.(*v1.NetworkList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested networks. -func (c *FakeNetworks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(networksResource, opts)) -} - -// Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Create(ctx context.Context, network *v1.Network, opts metav1.CreateOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(networksResource, network, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. -func (c *FakeNetworks) Update(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(networksResource, network, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNetworks) UpdateStatus(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(networksResource, "status", network, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// Delete takes name of the network and deletes it. Returns an error if one occurs. -func (c *FakeNetworks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(networksResource, name, opts), &v1.Network{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNetworks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(networksResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.NetworkList{}) - return err -} - -// Patch applies the patch and returns the patched network. -func (c *FakeNetworks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Network, err error) { - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(networksResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied network. -func (c *FakeNetworks) Apply(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { - if network == nil { - return nil, fmt.Errorf("network provided to Apply must not be nil") - } - data, err := json.Marshal(network) - if err != nil { - return nil, err - } - name := network.Name - if name == nil { - return nil, fmt.Errorf("network.Name must be provided to Apply") - } - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(networksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Network), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNetworks) ApplyStatus(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) { - if network == nil { - return nil, fmt.Errorf("network provided to Apply must not be nil") - } - data, err := json.Marshal(network) - if err != nil { - return nil, err - } - name := network.Name - if name == nil { - return nil, fmt.Errorf("network.Name must be provided to Apply") - } - emptyResult := &v1.Network{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(networksResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeNetworks(fake *FakeOperatorV1) typedoperatorv1.NetworkInterface { + return &fakeNetworks{ + gentype.NewFakeClientWithListAndApply[*v1.Network, *v1.NetworkList, *operatorv1.NetworkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("networks"), + v1.SchemeGroupVersion.WithKind("Network"), + func() *v1.Network { return &v1.Network{} }, + func() *v1.NetworkList { return &v1.NetworkList{} }, + func(dst, src *v1.NetworkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.NetworkList) []*v1.Network { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.NetworkList, items []*v1.Network) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Network), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_olm.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_olm.go index 2b5f3806cb..bc67b5eee5 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_olm.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_olm.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOLMs implements OLMInterface -type FakeOLMs struct { +// fakeOLMs implements OLMInterface +type fakeOLMs struct { + *gentype.FakeClientWithListAndApply[*v1.OLM, *v1.OLMList, *operatorv1.OLMApplyConfiguration] Fake *FakeOperatorV1 } -var olmsResource = v1.SchemeGroupVersion.WithResource("olms") - -var olmsKind = v1.SchemeGroupVersion.WithKind("OLM") - -// Get takes name of the oLM, and returns the corresponding oLM object, and an error if there is any. -func (c *FakeOLMs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OLM, err error) { - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(olmsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OLM), err -} - -// List takes label and field selectors, and returns the list of OLMs that match those selectors. -func (c *FakeOLMs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OLMList, err error) { - emptyResult := &v1.OLMList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(olmsResource, olmsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OLMList{ListMeta: obj.(*v1.OLMList).ListMeta} - for _, item := range obj.(*v1.OLMList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oLMs. -func (c *FakeOLMs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(olmsResource, opts)) -} - -// Create takes the representation of a oLM and creates it. Returns the server's representation of the oLM, and an error, if there is any. -func (c *FakeOLMs) Create(ctx context.Context, oLM *v1.OLM, opts metav1.CreateOptions) (result *v1.OLM, err error) { - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(olmsResource, oLM, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OLM), err -} - -// Update takes the representation of a oLM and updates it. Returns the server's representation of the oLM, and an error, if there is any. -func (c *FakeOLMs) Update(ctx context.Context, oLM *v1.OLM, opts metav1.UpdateOptions) (result *v1.OLM, err error) { - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(olmsResource, oLM, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OLM), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOLMs) UpdateStatus(ctx context.Context, oLM *v1.OLM, opts metav1.UpdateOptions) (result *v1.OLM, err error) { - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(olmsResource, "status", oLM, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OLM), err -} - -// Delete takes name of the oLM and deletes it. Returns an error if one occurs. -func (c *FakeOLMs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(olmsResource, name, opts), &v1.OLM{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOLMs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(olmsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OLMList{}) - return err -} - -// Patch applies the patch and returns the patched oLM. -func (c *FakeOLMs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OLM, err error) { - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(olmsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OLM), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oLM. -func (c *FakeOLMs) Apply(ctx context.Context, oLM *operatorv1.OLMApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OLM, err error) { - if oLM == nil { - return nil, fmt.Errorf("oLM provided to Apply must not be nil") - } - data, err := json.Marshal(oLM) - if err != nil { - return nil, err - } - name := oLM.Name - if name == nil { - return nil, fmt.Errorf("oLM.Name must be provided to Apply") - } - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(olmsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OLM), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOLMs) ApplyStatus(ctx context.Context, oLM *operatorv1.OLMApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OLM, err error) { - if oLM == nil { - return nil, fmt.Errorf("oLM provided to Apply must not be nil") - } - data, err := json.Marshal(oLM) - if err != nil { - return nil, err - } - name := oLM.Name - if name == nil { - return nil, fmt.Errorf("oLM.Name must be provided to Apply") - } - emptyResult := &v1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(olmsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOLMs(fake *FakeOperatorV1) typedoperatorv1.OLMInterface { + return &fakeOLMs{ + gentype.NewFakeClientWithListAndApply[*v1.OLM, *v1.OLMList, *operatorv1.OLMApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("olms"), + v1.SchemeGroupVersion.WithKind("OLM"), + func() *v1.OLM { return &v1.OLM{} }, + func() *v1.OLMList { return &v1.OLMList{} }, + func(dst, src *v1.OLMList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OLMList) []*v1.OLM { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.OLMList, items []*v1.OLM) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.OLM), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go index 05bb1630e3..a1183304af 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftapiserver.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOpenShiftAPIServers implements OpenShiftAPIServerInterface -type FakeOpenShiftAPIServers struct { +// fakeOpenShiftAPIServers implements OpenShiftAPIServerInterface +type fakeOpenShiftAPIServers struct { + *gentype.FakeClientWithListAndApply[*v1.OpenShiftAPIServer, *v1.OpenShiftAPIServerList, *operatorv1.OpenShiftAPIServerApplyConfiguration] Fake *FakeOperatorV1 } -var openshiftapiserversResource = v1.SchemeGroupVersion.WithResource("openshiftapiservers") - -var openshiftapiserversKind = v1.SchemeGroupVersion.WithKind("OpenShiftAPIServer") - -// Get takes name of the openShiftAPIServer, and returns the corresponding openShiftAPIServer object, and an error if there is any. -func (c *FakeOpenShiftAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OpenShiftAPIServer, err error) { - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(openshiftapiserversResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftAPIServer), err -} - -// List takes label and field selectors, and returns the list of OpenShiftAPIServers that match those selectors. -func (c *FakeOpenShiftAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OpenShiftAPIServerList, err error) { - emptyResult := &v1.OpenShiftAPIServerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(openshiftapiserversResource, openshiftapiserversKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OpenShiftAPIServerList{ListMeta: obj.(*v1.OpenShiftAPIServerList).ListMeta} - for _, item := range obj.(*v1.OpenShiftAPIServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested openShiftAPIServers. -func (c *FakeOpenShiftAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(openshiftapiserversResource, opts)) -} - -// Create takes the representation of a openShiftAPIServer and creates it. Returns the server's representation of the openShiftAPIServer, and an error, if there is any. -func (c *FakeOpenShiftAPIServers) Create(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.CreateOptions) (result *v1.OpenShiftAPIServer, err error) { - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(openshiftapiserversResource, openShiftAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftAPIServer), err -} - -// Update takes the representation of a openShiftAPIServer and updates it. Returns the server's representation of the openShiftAPIServer, and an error, if there is any. -func (c *FakeOpenShiftAPIServers) Update(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (result *v1.OpenShiftAPIServer, err error) { - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(openshiftapiserversResource, openShiftAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftAPIServer), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenShiftAPIServers) UpdateStatus(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (result *v1.OpenShiftAPIServer, err error) { - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(openshiftapiserversResource, "status", openShiftAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftAPIServer), err -} - -// Delete takes name of the openShiftAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeOpenShiftAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(openshiftapiserversResource, name, opts), &v1.OpenShiftAPIServer{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOpenShiftAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(openshiftapiserversResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OpenShiftAPIServerList{}) - return err -} - -// Patch applies the patch and returns the patched openShiftAPIServer. -func (c *FakeOpenShiftAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftAPIServer, err error) { - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(openshiftapiserversResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftAPIServer), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied openShiftAPIServer. -func (c *FakeOpenShiftAPIServers) Apply(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) { - if openShiftAPIServer == nil { - return nil, fmt.Errorf("openShiftAPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(openShiftAPIServer) - if err != nil { - return nil, err - } - name := openShiftAPIServer.Name - if name == nil { - return nil, fmt.Errorf("openShiftAPIServer.Name must be provided to Apply") - } - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(openshiftapiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftAPIServer), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOpenShiftAPIServers) ApplyStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) { - if openShiftAPIServer == nil { - return nil, fmt.Errorf("openShiftAPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(openShiftAPIServer) - if err != nil { - return nil, err - } - name := openShiftAPIServer.Name - if name == nil { - return nil, fmt.Errorf("openShiftAPIServer.Name must be provided to Apply") - } - emptyResult := &v1.OpenShiftAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(openshiftapiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOpenShiftAPIServers(fake *FakeOperatorV1) typedoperatorv1.OpenShiftAPIServerInterface { + return &fakeOpenShiftAPIServers{ + gentype.NewFakeClientWithListAndApply[*v1.OpenShiftAPIServer, *v1.OpenShiftAPIServerList, *operatorv1.OpenShiftAPIServerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("openshiftapiservers"), + v1.SchemeGroupVersion.WithKind("OpenShiftAPIServer"), + func() *v1.OpenShiftAPIServer { return &v1.OpenShiftAPIServer{} }, + func() *v1.OpenShiftAPIServerList { return &v1.OpenShiftAPIServerList{} }, + func(dst, src *v1.OpenShiftAPIServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OpenShiftAPIServerList) []*v1.OpenShiftAPIServer { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.OpenShiftAPIServerList, items []*v1.OpenShiftAPIServer) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.OpenShiftAPIServer), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go index adfeb9a79d..5ba51ae7a4 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_openshiftcontrollermanager.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeOpenShiftControllerManagers implements OpenShiftControllerManagerInterface -type FakeOpenShiftControllerManagers struct { +// fakeOpenShiftControllerManagers implements OpenShiftControllerManagerInterface +type fakeOpenShiftControllerManagers struct { + *gentype.FakeClientWithListAndApply[*v1.OpenShiftControllerManager, *v1.OpenShiftControllerManagerList, *operatorv1.OpenShiftControllerManagerApplyConfiguration] Fake *FakeOperatorV1 } -var openshiftcontrollermanagersResource = v1.SchemeGroupVersion.WithResource("openshiftcontrollermanagers") - -var openshiftcontrollermanagersKind = v1.SchemeGroupVersion.WithKind("OpenShiftControllerManager") - -// Get takes name of the openShiftControllerManager, and returns the corresponding openShiftControllerManager object, and an error if there is any. -func (c *FakeOpenShiftControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.OpenShiftControllerManager, err error) { - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(openshiftcontrollermanagersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftControllerManager), err -} - -// List takes label and field selectors, and returns the list of OpenShiftControllerManagers that match those selectors. -func (c *FakeOpenShiftControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.OpenShiftControllerManagerList, err error) { - emptyResult := &v1.OpenShiftControllerManagerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(openshiftcontrollermanagersResource, openshiftcontrollermanagersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.OpenShiftControllerManagerList{ListMeta: obj.(*v1.OpenShiftControllerManagerList).ListMeta} - for _, item := range obj.(*v1.OpenShiftControllerManagerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested openShiftControllerManagers. -func (c *FakeOpenShiftControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(openshiftcontrollermanagersResource, opts)) -} - -// Create takes the representation of a openShiftControllerManager and creates it. Returns the server's representation of the openShiftControllerManager, and an error, if there is any. -func (c *FakeOpenShiftControllerManagers) Create(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.CreateOptions) (result *v1.OpenShiftControllerManager, err error) { - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(openshiftcontrollermanagersResource, openShiftControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftControllerManager), err -} - -// Update takes the representation of a openShiftControllerManager and updates it. Returns the server's representation of the openShiftControllerManager, and an error, if there is any. -func (c *FakeOpenShiftControllerManagers) Update(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (result *v1.OpenShiftControllerManager, err error) { - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(openshiftcontrollermanagersResource, openShiftControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftControllerManager), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenShiftControllerManagers) UpdateStatus(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (result *v1.OpenShiftControllerManager, err error) { - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(openshiftcontrollermanagersResource, "status", openShiftControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftControllerManager), err -} - -// Delete takes name of the openShiftControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeOpenShiftControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(openshiftcontrollermanagersResource, name, opts), &v1.OpenShiftControllerManager{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOpenShiftControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(openshiftcontrollermanagersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.OpenShiftControllerManagerList{}) - return err -} - -// Patch applies the patch and returns the patched openShiftControllerManager. -func (c *FakeOpenShiftControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftControllerManager, err error) { - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(openshiftcontrollermanagersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftControllerManager), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied openShiftControllerManager. -func (c *FakeOpenShiftControllerManagers) Apply(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) { - if openShiftControllerManager == nil { - return nil, fmt.Errorf("openShiftControllerManager provided to Apply must not be nil") - } - data, err := json.Marshal(openShiftControllerManager) - if err != nil { - return nil, err - } - name := openShiftControllerManager.Name - if name == nil { - return nil, fmt.Errorf("openShiftControllerManager.Name must be provided to Apply") - } - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.OpenShiftControllerManager), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOpenShiftControllerManagers) ApplyStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) { - if openShiftControllerManager == nil { - return nil, fmt.Errorf("openShiftControllerManager provided to Apply must not be nil") - } - data, err := json.Marshal(openShiftControllerManager) - if err != nil { - return nil, err - } - name := openShiftControllerManager.Name - if name == nil { - return nil, fmt.Errorf("openShiftControllerManager.Name must be provided to Apply") - } - emptyResult := &v1.OpenShiftControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(openshiftcontrollermanagersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOpenShiftControllerManagers(fake *FakeOperatorV1) typedoperatorv1.OpenShiftControllerManagerInterface { + return &fakeOpenShiftControllerManagers{ + gentype.NewFakeClientWithListAndApply[*v1.OpenShiftControllerManager, *v1.OpenShiftControllerManagerList, *operatorv1.OpenShiftControllerManagerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("openshiftcontrollermanagers"), + v1.SchemeGroupVersion.WithKind("OpenShiftControllerManager"), + func() *v1.OpenShiftControllerManager { return &v1.OpenShiftControllerManager{} }, + func() *v1.OpenShiftControllerManagerList { return &v1.OpenShiftControllerManagerList{} }, + func(dst, src *v1.OpenShiftControllerManagerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.OpenShiftControllerManagerList) []*v1.OpenShiftControllerManager { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.OpenShiftControllerManagerList, items []*v1.OpenShiftControllerManager) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.OpenShiftControllerManager), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go index c852656105..ef8bbec669 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go @@ -13,95 +13,95 @@ type FakeOperatorV1 struct { } func (c *FakeOperatorV1) Authentications() v1.AuthenticationInterface { - return &FakeAuthentications{c} + return newFakeAuthentications(c) } func (c *FakeOperatorV1) CSISnapshotControllers() v1.CSISnapshotControllerInterface { - return &FakeCSISnapshotControllers{c} + return newFakeCSISnapshotControllers(c) } func (c *FakeOperatorV1) CloudCredentials() v1.CloudCredentialInterface { - return &FakeCloudCredentials{c} + return newFakeCloudCredentials(c) } func (c *FakeOperatorV1) ClusterCSIDrivers() v1.ClusterCSIDriverInterface { - return &FakeClusterCSIDrivers{c} + return newFakeClusterCSIDrivers(c) } func (c *FakeOperatorV1) Configs() v1.ConfigInterface { - return &FakeConfigs{c} + return newFakeConfigs(c) } func (c *FakeOperatorV1) Consoles() v1.ConsoleInterface { - return &FakeConsoles{c} + return newFakeConsoles(c) } func (c *FakeOperatorV1) DNSes() v1.DNSInterface { - return &FakeDNSes{c} + return newFakeDNSes(c) } func (c *FakeOperatorV1) Etcds() v1.EtcdInterface { - return &FakeEtcds{c} + return newFakeEtcds(c) } func (c *FakeOperatorV1) IngressControllers(namespace string) v1.IngressControllerInterface { - return &FakeIngressControllers{c, namespace} + return newFakeIngressControllers(c, namespace) } func (c *FakeOperatorV1) InsightsOperators() v1.InsightsOperatorInterface { - return &FakeInsightsOperators{c} + return newFakeInsightsOperators(c) } func (c *FakeOperatorV1) KubeAPIServers() v1.KubeAPIServerInterface { - return &FakeKubeAPIServers{c} + return newFakeKubeAPIServers(c) } func (c *FakeOperatorV1) KubeControllerManagers() v1.KubeControllerManagerInterface { - return &FakeKubeControllerManagers{c} + return newFakeKubeControllerManagers(c) } func (c *FakeOperatorV1) KubeSchedulers() v1.KubeSchedulerInterface { - return &FakeKubeSchedulers{c} + return newFakeKubeSchedulers(c) } func (c *FakeOperatorV1) KubeStorageVersionMigrators() v1.KubeStorageVersionMigratorInterface { - return &FakeKubeStorageVersionMigrators{c} + return newFakeKubeStorageVersionMigrators(c) } func (c *FakeOperatorV1) MachineConfigurations() v1.MachineConfigurationInterface { - return &FakeMachineConfigurations{c} + return newFakeMachineConfigurations(c) } func (c *FakeOperatorV1) Networks() v1.NetworkInterface { - return &FakeNetworks{c} + return newFakeNetworks(c) } func (c *FakeOperatorV1) OLMs() v1.OLMInterface { - return &FakeOLMs{c} + return newFakeOLMs(c) } func (c *FakeOperatorV1) OpenShiftAPIServers() v1.OpenShiftAPIServerInterface { - return &FakeOpenShiftAPIServers{c} + return newFakeOpenShiftAPIServers(c) } func (c *FakeOperatorV1) OpenShiftControllerManagers() v1.OpenShiftControllerManagerInterface { - return &FakeOpenShiftControllerManagers{c} + return newFakeOpenShiftControllerManagers(c) } func (c *FakeOperatorV1) ServiceCAs() v1.ServiceCAInterface { - return &FakeServiceCAs{c} + return newFakeServiceCAs(c) } func (c *FakeOperatorV1) ServiceCatalogAPIServers() v1.ServiceCatalogAPIServerInterface { - return &FakeServiceCatalogAPIServers{c} + return newFakeServiceCatalogAPIServers(c) } func (c *FakeOperatorV1) ServiceCatalogControllerManagers() v1.ServiceCatalogControllerManagerInterface { - return &FakeServiceCatalogControllerManagers{c} + return newFakeServiceCatalogControllerManagers(c) } func (c *FakeOperatorV1) Storages() v1.StorageInterface { - return &FakeStorages{c} + return newFakeStorages(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go index 8755229daf..649158b6eb 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_serviceca.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeServiceCAs implements ServiceCAInterface -type FakeServiceCAs struct { +// fakeServiceCAs implements ServiceCAInterface +type fakeServiceCAs struct { + *gentype.FakeClientWithListAndApply[*v1.ServiceCA, *v1.ServiceCAList, *operatorv1.ServiceCAApplyConfiguration] Fake *FakeOperatorV1 } -var servicecasResource = v1.SchemeGroupVersion.WithResource("servicecas") - -var servicecasKind = v1.SchemeGroupVersion.WithKind("ServiceCA") - -// Get takes name of the serviceCA, and returns the corresponding serviceCA object, and an error if there is any. -func (c *FakeServiceCAs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCA, err error) { - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(servicecasResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCA), err -} - -// List takes label and field selectors, and returns the list of ServiceCAs that match those selectors. -func (c *FakeServiceCAs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCAList, err error) { - emptyResult := &v1.ServiceCAList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(servicecasResource, servicecasKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ServiceCAList{ListMeta: obj.(*v1.ServiceCAList).ListMeta} - for _, item := range obj.(*v1.ServiceCAList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested serviceCAs. -func (c *FakeServiceCAs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(servicecasResource, opts)) -} - -// Create takes the representation of a serviceCA and creates it. Returns the server's representation of the serviceCA, and an error, if there is any. -func (c *FakeServiceCAs) Create(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.CreateOptions) (result *v1.ServiceCA, err error) { - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(servicecasResource, serviceCA, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCA), err -} - -// Update takes the representation of a serviceCA and updates it. Returns the server's representation of the serviceCA, and an error, if there is any. -func (c *FakeServiceCAs) Update(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (result *v1.ServiceCA, err error) { - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(servicecasResource, serviceCA, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCA), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCAs) UpdateStatus(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (result *v1.ServiceCA, err error) { - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(servicecasResource, "status", serviceCA, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCA), err -} - -// Delete takes name of the serviceCA and deletes it. Returns an error if one occurs. -func (c *FakeServiceCAs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecasResource, name, opts), &v1.ServiceCA{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServiceCAs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(servicecasResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ServiceCAList{}) - return err -} - -// Patch applies the patch and returns the patched serviceCA. -func (c *FakeServiceCAs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCA, err error) { - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecasResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCA), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied serviceCA. -func (c *FakeServiceCAs) Apply(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) { - if serviceCA == nil { - return nil, fmt.Errorf("serviceCA provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCA) - if err != nil { - return nil, err - } - name := serviceCA.Name - if name == nil { - return nil, fmt.Errorf("serviceCA.Name must be provided to Apply") - } - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecasResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCA), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCAs) ApplyStatus(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) { - if serviceCA == nil { - return nil, fmt.Errorf("serviceCA provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCA) - if err != nil { - return nil, err - } - name := serviceCA.Name - if name == nil { - return nil, fmt.Errorf("serviceCA.Name must be provided to Apply") - } - emptyResult := &v1.ServiceCA{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecasResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeServiceCAs(fake *FakeOperatorV1) typedoperatorv1.ServiceCAInterface { + return &fakeServiceCAs{ + gentype.NewFakeClientWithListAndApply[*v1.ServiceCA, *v1.ServiceCAList, *operatorv1.ServiceCAApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("servicecas"), + v1.SchemeGroupVersion.WithKind("ServiceCA"), + func() *v1.ServiceCA { return &v1.ServiceCA{} }, + func() *v1.ServiceCAList { return &v1.ServiceCAList{} }, + func(dst, src *v1.ServiceCAList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ServiceCAList) []*v1.ServiceCA { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ServiceCAList, items []*v1.ServiceCA) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.ServiceCA), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go index 98344e868e..992c32a8a3 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogapiserver.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeServiceCatalogAPIServers implements ServiceCatalogAPIServerInterface -type FakeServiceCatalogAPIServers struct { +// fakeServiceCatalogAPIServers implements ServiceCatalogAPIServerInterface +type fakeServiceCatalogAPIServers struct { + *gentype.FakeClientWithListAndApply[*v1.ServiceCatalogAPIServer, *v1.ServiceCatalogAPIServerList, *operatorv1.ServiceCatalogAPIServerApplyConfiguration] Fake *FakeOperatorV1 } -var servicecatalogapiserversResource = v1.SchemeGroupVersion.WithResource("servicecatalogapiservers") - -var servicecatalogapiserversKind = v1.SchemeGroupVersion.WithKind("ServiceCatalogAPIServer") - -// Get takes name of the serviceCatalogAPIServer, and returns the corresponding serviceCatalogAPIServer object, and an error if there is any. -func (c *FakeServiceCatalogAPIServers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCatalogAPIServer, err error) { - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(servicecatalogapiserversResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogAPIServer), err -} - -// List takes label and field selectors, and returns the list of ServiceCatalogAPIServers that match those selectors. -func (c *FakeServiceCatalogAPIServers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCatalogAPIServerList, err error) { - emptyResult := &v1.ServiceCatalogAPIServerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(servicecatalogapiserversResource, servicecatalogapiserversKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ServiceCatalogAPIServerList{ListMeta: obj.(*v1.ServiceCatalogAPIServerList).ListMeta} - for _, item := range obj.(*v1.ServiceCatalogAPIServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested serviceCatalogAPIServers. -func (c *FakeServiceCatalogAPIServers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(servicecatalogapiserversResource, opts)) -} - -// Create takes the representation of a serviceCatalogAPIServer and creates it. Returns the server's representation of the serviceCatalogAPIServer, and an error, if there is any. -func (c *FakeServiceCatalogAPIServers) Create(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.CreateOptions) (result *v1.ServiceCatalogAPIServer, err error) { - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(servicecatalogapiserversResource, serviceCatalogAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogAPIServer), err -} - -// Update takes the representation of a serviceCatalogAPIServer and updates it. Returns the server's representation of the serviceCatalogAPIServer, and an error, if there is any. -func (c *FakeServiceCatalogAPIServers) Update(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (result *v1.ServiceCatalogAPIServer, err error) { - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(servicecatalogapiserversResource, serviceCatalogAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogAPIServer), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCatalogAPIServers) UpdateStatus(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (result *v1.ServiceCatalogAPIServer, err error) { - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(servicecatalogapiserversResource, "status", serviceCatalogAPIServer, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogAPIServer), err -} - -// Delete takes name of the serviceCatalogAPIServer and deletes it. Returns an error if one occurs. -func (c *FakeServiceCatalogAPIServers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogapiserversResource, name, opts), &v1.ServiceCatalogAPIServer{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServiceCatalogAPIServers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(servicecatalogapiserversResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ServiceCatalogAPIServerList{}) - return err -} - -// Patch applies the patch and returns the patched serviceCatalogAPIServer. -func (c *FakeServiceCatalogAPIServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogAPIServer, err error) { - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecatalogapiserversResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogAPIServer), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied serviceCatalogAPIServer. -func (c *FakeServiceCatalogAPIServers) Apply(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) { - if serviceCatalogAPIServer == nil { - return nil, fmt.Errorf("serviceCatalogAPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCatalogAPIServer) - if err != nil { - return nil, err - } - name := serviceCatalogAPIServer.Name - if name == nil { - return nil, fmt.Errorf("serviceCatalogAPIServer.Name must be provided to Apply") - } - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecatalogapiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogAPIServer), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCatalogAPIServers) ApplyStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) { - if serviceCatalogAPIServer == nil { - return nil, fmt.Errorf("serviceCatalogAPIServer provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCatalogAPIServer) - if err != nil { - return nil, err - } - name := serviceCatalogAPIServer.Name - if name == nil { - return nil, fmt.Errorf("serviceCatalogAPIServer.Name must be provided to Apply") - } - emptyResult := &v1.ServiceCatalogAPIServer{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecatalogapiserversResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeServiceCatalogAPIServers(fake *FakeOperatorV1) typedoperatorv1.ServiceCatalogAPIServerInterface { + return &fakeServiceCatalogAPIServers{ + gentype.NewFakeClientWithListAndApply[*v1.ServiceCatalogAPIServer, *v1.ServiceCatalogAPIServerList, *operatorv1.ServiceCatalogAPIServerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("servicecatalogapiservers"), + v1.SchemeGroupVersion.WithKind("ServiceCatalogAPIServer"), + func() *v1.ServiceCatalogAPIServer { return &v1.ServiceCatalogAPIServer{} }, + func() *v1.ServiceCatalogAPIServerList { return &v1.ServiceCatalogAPIServerList{} }, + func(dst, src *v1.ServiceCatalogAPIServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ServiceCatalogAPIServerList) []*v1.ServiceCatalogAPIServer { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ServiceCatalogAPIServerList, items []*v1.ServiceCatalogAPIServer) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ServiceCatalogAPIServer), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go index e31df36897..4be4be0cfd 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_servicecatalogcontrollermanager.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeServiceCatalogControllerManagers implements ServiceCatalogControllerManagerInterface -type FakeServiceCatalogControllerManagers struct { +// fakeServiceCatalogControllerManagers implements ServiceCatalogControllerManagerInterface +type fakeServiceCatalogControllerManagers struct { + *gentype.FakeClientWithListAndApply[*v1.ServiceCatalogControllerManager, *v1.ServiceCatalogControllerManagerList, *operatorv1.ServiceCatalogControllerManagerApplyConfiguration] Fake *FakeOperatorV1 } -var servicecatalogcontrollermanagersResource = v1.SchemeGroupVersion.WithResource("servicecatalogcontrollermanagers") - -var servicecatalogcontrollermanagersKind = v1.SchemeGroupVersion.WithKind("ServiceCatalogControllerManager") - -// Get takes name of the serviceCatalogControllerManager, and returns the corresponding serviceCatalogControllerManager object, and an error if there is any. -func (c *FakeServiceCatalogControllerManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ServiceCatalogControllerManager, err error) { - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(servicecatalogcontrollermanagersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogControllerManager), err -} - -// List takes label and field selectors, and returns the list of ServiceCatalogControllerManagers that match those selectors. -func (c *FakeServiceCatalogControllerManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ServiceCatalogControllerManagerList, err error) { - emptyResult := &v1.ServiceCatalogControllerManagerList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(servicecatalogcontrollermanagersResource, servicecatalogcontrollermanagersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ServiceCatalogControllerManagerList{ListMeta: obj.(*v1.ServiceCatalogControllerManagerList).ListMeta} - for _, item := range obj.(*v1.ServiceCatalogControllerManagerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested serviceCatalogControllerManagers. -func (c *FakeServiceCatalogControllerManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(servicecatalogcontrollermanagersResource, opts)) -} - -// Create takes the representation of a serviceCatalogControllerManager and creates it. Returns the server's representation of the serviceCatalogControllerManager, and an error, if there is any. -func (c *FakeServiceCatalogControllerManagers) Create(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.CreateOptions) (result *v1.ServiceCatalogControllerManager, err error) { - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogControllerManager), err -} - -// Update takes the representation of a serviceCatalogControllerManager and updates it. Returns the server's representation of the serviceCatalogControllerManager, and an error, if there is any. -func (c *FakeServiceCatalogControllerManagers) Update(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (result *v1.ServiceCatalogControllerManager, err error) { - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(servicecatalogcontrollermanagersResource, serviceCatalogControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogControllerManager), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCatalogControllerManagers) UpdateStatus(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (result *v1.ServiceCatalogControllerManager, err error) { - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(servicecatalogcontrollermanagersResource, "status", serviceCatalogControllerManager, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogControllerManager), err -} - -// Delete takes name of the serviceCatalogControllerManager and deletes it. Returns an error if one occurs. -func (c *FakeServiceCatalogControllerManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecatalogcontrollermanagersResource, name, opts), &v1.ServiceCatalogControllerManager{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServiceCatalogControllerManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(servicecatalogcontrollermanagersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ServiceCatalogControllerManagerList{}) - return err -} - -// Patch applies the patch and returns the patched serviceCatalogControllerManager. -func (c *FakeServiceCatalogControllerManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogControllerManager, err error) { - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecatalogcontrollermanagersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogControllerManager), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied serviceCatalogControllerManager. -func (c *FakeServiceCatalogControllerManagers) Apply(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) { - if serviceCatalogControllerManager == nil { - return nil, fmt.Errorf("serviceCatalogControllerManager provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCatalogControllerManager) - if err != nil { - return nil, err - } - name := serviceCatalogControllerManager.Name - if name == nil { - return nil, fmt.Errorf("serviceCatalogControllerManager.Name must be provided to Apply") - } - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ServiceCatalogControllerManager), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCatalogControllerManagers) ApplyStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) { - if serviceCatalogControllerManager == nil { - return nil, fmt.Errorf("serviceCatalogControllerManager provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCatalogControllerManager) - if err != nil { - return nil, err - } - name := serviceCatalogControllerManager.Name - if name == nil { - return nil, fmt.Errorf("serviceCatalogControllerManager.Name must be provided to Apply") - } - emptyResult := &v1.ServiceCatalogControllerManager{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecatalogcontrollermanagersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeServiceCatalogControllerManagers(fake *FakeOperatorV1) typedoperatorv1.ServiceCatalogControllerManagerInterface { + return &fakeServiceCatalogControllerManagers{ + gentype.NewFakeClientWithListAndApply[*v1.ServiceCatalogControllerManager, *v1.ServiceCatalogControllerManagerList, *operatorv1.ServiceCatalogControllerManagerApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("servicecatalogcontrollermanagers"), + v1.SchemeGroupVersion.WithKind("ServiceCatalogControllerManager"), + func() *v1.ServiceCatalogControllerManager { return &v1.ServiceCatalogControllerManager{} }, + func() *v1.ServiceCatalogControllerManagerList { return &v1.ServiceCatalogControllerManagerList{} }, + func(dst, src *v1.ServiceCatalogControllerManagerList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ServiceCatalogControllerManagerList) []*v1.ServiceCatalogControllerManager { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ServiceCatalogControllerManagerList, items []*v1.ServiceCatalogControllerManager) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ServiceCatalogControllerManager), err } diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go index 6c121fa7c9..def97086f0 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_storage.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/operator/v1" operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeStorages implements StorageInterface -type FakeStorages struct { +// fakeStorages implements StorageInterface +type fakeStorages struct { + *gentype.FakeClientWithListAndApply[*v1.Storage, *v1.StorageList, *operatorv1.StorageApplyConfiguration] Fake *FakeOperatorV1 } -var storagesResource = v1.SchemeGroupVersion.WithResource("storages") - -var storagesKind = v1.SchemeGroupVersion.WithKind("Storage") - -// Get takes name of the storage, and returns the corresponding storage object, and an error if there is any. -func (c *FakeStorages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Storage, err error) { - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(storagesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Storage), err -} - -// List takes label and field selectors, and returns the list of Storages that match those selectors. -func (c *FakeStorages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StorageList, err error) { - emptyResult := &v1.StorageList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(storagesResource, storagesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.StorageList{ListMeta: obj.(*v1.StorageList).ListMeta} - for _, item := range obj.(*v1.StorageList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested storages. -func (c *FakeStorages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(storagesResource, opts)) -} - -// Create takes the representation of a storage and creates it. Returns the server's representation of the storage, and an error, if there is any. -func (c *FakeStorages) Create(ctx context.Context, storage *v1.Storage, opts metav1.CreateOptions) (result *v1.Storage, err error) { - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(storagesResource, storage, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Storage), err -} - -// Update takes the representation of a storage and updates it. Returns the server's representation of the storage, and an error, if there is any. -func (c *FakeStorages) Update(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (result *v1.Storage, err error) { - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(storagesResource, storage, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Storage), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStorages) UpdateStatus(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (result *v1.Storage, err error) { - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(storagesResource, "status", storage, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Storage), err -} - -// Delete takes name of the storage and deletes it. Returns an error if one occurs. -func (c *FakeStorages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(storagesResource, name, opts), &v1.Storage{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeStorages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(storagesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.StorageList{}) - return err -} - -// Patch applies the patch and returns the patched storage. -func (c *FakeStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Storage, err error) { - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(storagesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Storage), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied storage. -func (c *FakeStorages) Apply(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) { - if storage == nil { - return nil, fmt.Errorf("storage provided to Apply must not be nil") - } - data, err := json.Marshal(storage) - if err != nil { - return nil, err - } - name := storage.Name - if name == nil { - return nil, fmt.Errorf("storage.Name must be provided to Apply") - } - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(storagesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Storage), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeStorages) ApplyStatus(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) { - if storage == nil { - return nil, fmt.Errorf("storage provided to Apply must not be nil") - } - data, err := json.Marshal(storage) - if err != nil { - return nil, err - } - name := storage.Name - if name == nil { - return nil, fmt.Errorf("storage.Name must be provided to Apply") - } - emptyResult := &v1.Storage{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(storagesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeStorages(fake *FakeOperatorV1) typedoperatorv1.StorageInterface { + return &fakeStorages{ + gentype.NewFakeClientWithListAndApply[*v1.Storage, *v1.StorageList, *operatorv1.StorageApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("storages"), + v1.SchemeGroupVersion.WithKind("Storage"), + func() *v1.Storage { return &v1.Storage{} }, + func() *v1.StorageList { return &v1.StorageList{} }, + func(dst, src *v1.StorageList) { dst.ListMeta = src.ListMeta }, + func(list *v1.StorageList) []*v1.Storage { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.StorageList, items []*v1.Storage) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Storage), err } diff --git a/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go b/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go index 632b307a7e..601562e1ee 100644 --- a/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go +++ b/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type IngressControllersGetter interface { // IngressControllerInterface has methods to work with IngressController resources. type IngressControllerInterface interface { - Create(ctx context.Context, ingressController *v1.IngressController, opts metav1.CreateOptions) (*v1.IngressController, error) - Update(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (*v1.IngressController, error) + Create(ctx context.Context, ingressController *operatorv1.IngressController, opts metav1.CreateOptions) (*operatorv1.IngressController, error) + Update(ctx context.Context, ingressController *operatorv1.IngressController, opts metav1.UpdateOptions) (*operatorv1.IngressController, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ingressController *v1.IngressController, opts metav1.UpdateOptions) (*v1.IngressController, error) + UpdateStatus(ctx context.Context, ingressController *operatorv1.IngressController, opts metav1.UpdateOptions) (*operatorv1.IngressController, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IngressController, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressControllerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.IngressController, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.IngressControllerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressController, err error) - Apply(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.IngressController, err error) + Apply(ctx context.Context, ingressController *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.IngressController, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, ingressController *operatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.IngressController, err error) + ApplyStatus(ctx context.Context, ingressController *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.IngressController, err error) IngressControllerExpansion } // ingressControllers implements IngressControllerInterface type ingressControllers struct { - *gentype.ClientWithListAndApply[*v1.IngressController, *v1.IngressControllerList, *operatorv1.IngressControllerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.IngressController, *operatorv1.IngressControllerList, *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration] } // newIngressControllers returns a IngressControllers func newIngressControllers(c *OperatorV1Client, namespace string) *ingressControllers { return &ingressControllers{ - gentype.NewClientWithListAndApply[*v1.IngressController, *v1.IngressControllerList, *operatorv1.IngressControllerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.IngressController, *operatorv1.IngressControllerList, *applyconfigurationsoperatorv1.IngressControllerApplyConfiguration]( "ingresscontrollers", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.IngressController { return &v1.IngressController{} }, - func() *v1.IngressControllerList { return &v1.IngressControllerList{} }), + func() *operatorv1.IngressController { return &operatorv1.IngressController{} }, + func() *operatorv1.IngressControllerList { return &operatorv1.IngressControllerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/insightsoperator.go b/operator/clientset/versioned/typed/operator/v1/insightsoperator.go index afe872fb46..6e541dba87 100644 --- a/operator/clientset/versioned/typed/operator/v1/insightsoperator.go +++ b/operator/clientset/versioned/typed/operator/v1/insightsoperator.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type InsightsOperatorsGetter interface { // InsightsOperatorInterface has methods to work with InsightsOperator resources. type InsightsOperatorInterface interface { - Create(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.CreateOptions) (*v1.InsightsOperator, error) - Update(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (*v1.InsightsOperator, error) + Create(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts metav1.CreateOptions) (*operatorv1.InsightsOperator, error) + Update(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts metav1.UpdateOptions) (*operatorv1.InsightsOperator, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, insightsOperator *v1.InsightsOperator, opts metav1.UpdateOptions) (*v1.InsightsOperator, error) + UpdateStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperator, opts metav1.UpdateOptions) (*operatorv1.InsightsOperator, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.InsightsOperator, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.InsightsOperatorList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.InsightsOperator, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.InsightsOperatorList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.InsightsOperator, err error) - Apply(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.InsightsOperator, err error) + Apply(ctx context.Context, insightsOperator *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.InsightsOperator, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, insightsOperator *operatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.InsightsOperator, err error) + ApplyStatus(ctx context.Context, insightsOperator *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.InsightsOperator, err error) InsightsOperatorExpansion } // insightsOperators implements InsightsOperatorInterface type insightsOperators struct { - *gentype.ClientWithListAndApply[*v1.InsightsOperator, *v1.InsightsOperatorList, *operatorv1.InsightsOperatorApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.InsightsOperator, *operatorv1.InsightsOperatorList, *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration] } // newInsightsOperators returns a InsightsOperators func newInsightsOperators(c *OperatorV1Client) *insightsOperators { return &insightsOperators{ - gentype.NewClientWithListAndApply[*v1.InsightsOperator, *v1.InsightsOperatorList, *operatorv1.InsightsOperatorApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.InsightsOperator, *operatorv1.InsightsOperatorList, *applyconfigurationsoperatorv1.InsightsOperatorApplyConfiguration]( "insightsoperators", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.InsightsOperator { return &v1.InsightsOperator{} }, - func() *v1.InsightsOperatorList { return &v1.InsightsOperatorList{} }), + func() *operatorv1.InsightsOperator { return &operatorv1.InsightsOperator{} }, + func() *operatorv1.InsightsOperatorList { return &operatorv1.InsightsOperatorList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/kubeapiserver.go b/operator/clientset/versioned/typed/operator/v1/kubeapiserver.go index 3b965994e0..9bfb6ce749 100644 --- a/operator/clientset/versioned/typed/operator/v1/kubeapiserver.go +++ b/operator/clientset/versioned/typed/operator/v1/kubeapiserver.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type KubeAPIServersGetter interface { // KubeAPIServerInterface has methods to work with KubeAPIServer resources. type KubeAPIServerInterface interface { - Create(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.CreateOptions) (*v1.KubeAPIServer, error) - Update(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (*v1.KubeAPIServer, error) + Create(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts metav1.CreateOptions) (*operatorv1.KubeAPIServer, error) + Update(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts metav1.UpdateOptions) (*operatorv1.KubeAPIServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, kubeAPIServer *v1.KubeAPIServer, opts metav1.UpdateOptions) (*v1.KubeAPIServer, error) + UpdateStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServer, opts metav1.UpdateOptions) (*operatorv1.KubeAPIServer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeAPIServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeAPIServerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.KubeAPIServer, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.KubeAPIServerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeAPIServer, err error) - Apply(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.KubeAPIServer, err error) + Apply(ctx context.Context, kubeAPIServer *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeAPIServer, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, kubeAPIServer *operatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeAPIServer, err error) + ApplyStatus(ctx context.Context, kubeAPIServer *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeAPIServer, err error) KubeAPIServerExpansion } // kubeAPIServers implements KubeAPIServerInterface type kubeAPIServers struct { - *gentype.ClientWithListAndApply[*v1.KubeAPIServer, *v1.KubeAPIServerList, *operatorv1.KubeAPIServerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.KubeAPIServer, *operatorv1.KubeAPIServerList, *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration] } // newKubeAPIServers returns a KubeAPIServers func newKubeAPIServers(c *OperatorV1Client) *kubeAPIServers { return &kubeAPIServers{ - gentype.NewClientWithListAndApply[*v1.KubeAPIServer, *v1.KubeAPIServerList, *operatorv1.KubeAPIServerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.KubeAPIServer, *operatorv1.KubeAPIServerList, *applyconfigurationsoperatorv1.KubeAPIServerApplyConfiguration]( "kubeapiservers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.KubeAPIServer { return &v1.KubeAPIServer{} }, - func() *v1.KubeAPIServerList { return &v1.KubeAPIServerList{} }), + func() *operatorv1.KubeAPIServer { return &operatorv1.KubeAPIServer{} }, + func() *operatorv1.KubeAPIServerList { return &operatorv1.KubeAPIServerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/kubecontrollermanager.go b/operator/clientset/versioned/typed/operator/v1/kubecontrollermanager.go index 9eef998159..4e5bc0181c 100644 --- a/operator/clientset/versioned/typed/operator/v1/kubecontrollermanager.go +++ b/operator/clientset/versioned/typed/operator/v1/kubecontrollermanager.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type KubeControllerManagersGetter interface { // KubeControllerManagerInterface has methods to work with KubeControllerManager resources. type KubeControllerManagerInterface interface { - Create(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.CreateOptions) (*v1.KubeControllerManager, error) - Update(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (*v1.KubeControllerManager, error) + Create(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts metav1.CreateOptions) (*operatorv1.KubeControllerManager, error) + Update(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts metav1.UpdateOptions) (*operatorv1.KubeControllerManager, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, kubeControllerManager *v1.KubeControllerManager, opts metav1.UpdateOptions) (*v1.KubeControllerManager, error) + UpdateStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManager, opts metav1.UpdateOptions) (*operatorv1.KubeControllerManager, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeControllerManager, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeControllerManagerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.KubeControllerManager, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.KubeControllerManagerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeControllerManager, err error) - Apply(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.KubeControllerManager, err error) + Apply(ctx context.Context, kubeControllerManager *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeControllerManager, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, kubeControllerManager *operatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeControllerManager, err error) + ApplyStatus(ctx context.Context, kubeControllerManager *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeControllerManager, err error) KubeControllerManagerExpansion } // kubeControllerManagers implements KubeControllerManagerInterface type kubeControllerManagers struct { - *gentype.ClientWithListAndApply[*v1.KubeControllerManager, *v1.KubeControllerManagerList, *operatorv1.KubeControllerManagerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.KubeControllerManager, *operatorv1.KubeControllerManagerList, *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration] } // newKubeControllerManagers returns a KubeControllerManagers func newKubeControllerManagers(c *OperatorV1Client) *kubeControllerManagers { return &kubeControllerManagers{ - gentype.NewClientWithListAndApply[*v1.KubeControllerManager, *v1.KubeControllerManagerList, *operatorv1.KubeControllerManagerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.KubeControllerManager, *operatorv1.KubeControllerManagerList, *applyconfigurationsoperatorv1.KubeControllerManagerApplyConfiguration]( "kubecontrollermanagers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.KubeControllerManager { return &v1.KubeControllerManager{} }, - func() *v1.KubeControllerManagerList { return &v1.KubeControllerManagerList{} }), + func() *operatorv1.KubeControllerManager { return &operatorv1.KubeControllerManager{} }, + func() *operatorv1.KubeControllerManagerList { return &operatorv1.KubeControllerManagerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/kubescheduler.go b/operator/clientset/versioned/typed/operator/v1/kubescheduler.go index ea29a00989..fe5bde8ff4 100644 --- a/operator/clientset/versioned/typed/operator/v1/kubescheduler.go +++ b/operator/clientset/versioned/typed/operator/v1/kubescheduler.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type KubeSchedulersGetter interface { // KubeSchedulerInterface has methods to work with KubeScheduler resources. type KubeSchedulerInterface interface { - Create(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.CreateOptions) (*v1.KubeScheduler, error) - Update(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (*v1.KubeScheduler, error) + Create(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts metav1.CreateOptions) (*operatorv1.KubeScheduler, error) + Update(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts metav1.UpdateOptions) (*operatorv1.KubeScheduler, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, kubeScheduler *v1.KubeScheduler, opts metav1.UpdateOptions) (*v1.KubeScheduler, error) + UpdateStatus(ctx context.Context, kubeScheduler *operatorv1.KubeScheduler, opts metav1.UpdateOptions) (*operatorv1.KubeScheduler, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeScheduler, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeSchedulerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.KubeScheduler, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.KubeSchedulerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeScheduler, err error) - Apply(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.KubeScheduler, err error) + Apply(ctx context.Context, kubeScheduler *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeScheduler, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, kubeScheduler *operatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeScheduler, err error) + ApplyStatus(ctx context.Context, kubeScheduler *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeScheduler, err error) KubeSchedulerExpansion } // kubeSchedulers implements KubeSchedulerInterface type kubeSchedulers struct { - *gentype.ClientWithListAndApply[*v1.KubeScheduler, *v1.KubeSchedulerList, *operatorv1.KubeSchedulerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.KubeScheduler, *operatorv1.KubeSchedulerList, *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration] } // newKubeSchedulers returns a KubeSchedulers func newKubeSchedulers(c *OperatorV1Client) *kubeSchedulers { return &kubeSchedulers{ - gentype.NewClientWithListAndApply[*v1.KubeScheduler, *v1.KubeSchedulerList, *operatorv1.KubeSchedulerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.KubeScheduler, *operatorv1.KubeSchedulerList, *applyconfigurationsoperatorv1.KubeSchedulerApplyConfiguration]( "kubeschedulers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.KubeScheduler { return &v1.KubeScheduler{} }, - func() *v1.KubeSchedulerList { return &v1.KubeSchedulerList{} }), + func() *operatorv1.KubeScheduler { return &operatorv1.KubeScheduler{} }, + func() *operatorv1.KubeSchedulerList { return &operatorv1.KubeSchedulerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/kubestorageversionmigrator.go b/operator/clientset/versioned/typed/operator/v1/kubestorageversionmigrator.go index baa0915750..b15f2b9022 100644 --- a/operator/clientset/versioned/typed/operator/v1/kubestorageversionmigrator.go +++ b/operator/clientset/versioned/typed/operator/v1/kubestorageversionmigrator.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type KubeStorageVersionMigratorsGetter interface { // KubeStorageVersionMigratorInterface has methods to work with KubeStorageVersionMigrator resources. type KubeStorageVersionMigratorInterface interface { - Create(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.CreateOptions) (*v1.KubeStorageVersionMigrator, error) - Update(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (*v1.KubeStorageVersionMigrator, error) + Create(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts metav1.CreateOptions) (*operatorv1.KubeStorageVersionMigrator, error) + Update(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (*operatorv1.KubeStorageVersionMigrator, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *v1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (*v1.KubeStorageVersionMigrator, error) + UpdateStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, opts metav1.UpdateOptions) (*operatorv1.KubeStorageVersionMigrator, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeStorageVersionMigrator, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeStorageVersionMigratorList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.KubeStorageVersionMigrator, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.KubeStorageVersionMigratorList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeStorageVersionMigrator, err error) - Apply(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.KubeStorageVersionMigrator, err error) + Apply(ctx context.Context, kubeStorageVersionMigrator *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubeStorageVersionMigrator, err error) + ApplyStatus(ctx context.Context, kubeStorageVersionMigrator *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.KubeStorageVersionMigrator, err error) KubeStorageVersionMigratorExpansion } // kubeStorageVersionMigrators implements KubeStorageVersionMigratorInterface type kubeStorageVersionMigrators struct { - *gentype.ClientWithListAndApply[*v1.KubeStorageVersionMigrator, *v1.KubeStorageVersionMigratorList, *operatorv1.KubeStorageVersionMigratorApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.KubeStorageVersionMigrator, *operatorv1.KubeStorageVersionMigratorList, *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration] } // newKubeStorageVersionMigrators returns a KubeStorageVersionMigrators func newKubeStorageVersionMigrators(c *OperatorV1Client) *kubeStorageVersionMigrators { return &kubeStorageVersionMigrators{ - gentype.NewClientWithListAndApply[*v1.KubeStorageVersionMigrator, *v1.KubeStorageVersionMigratorList, *operatorv1.KubeStorageVersionMigratorApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.KubeStorageVersionMigrator, *operatorv1.KubeStorageVersionMigratorList, *applyconfigurationsoperatorv1.KubeStorageVersionMigratorApplyConfiguration]( "kubestorageversionmigrators", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.KubeStorageVersionMigrator { return &v1.KubeStorageVersionMigrator{} }, - func() *v1.KubeStorageVersionMigratorList { return &v1.KubeStorageVersionMigratorList{} }), + func() *operatorv1.KubeStorageVersionMigrator { return &operatorv1.KubeStorageVersionMigrator{} }, + func() *operatorv1.KubeStorageVersionMigratorList { return &operatorv1.KubeStorageVersionMigratorList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go b/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go index bfd3520abb..813bc2f2e7 100644 --- a/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go +++ b/operator/clientset/versioned/typed/operator/v1/machineconfiguration.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type MachineConfigurationsGetter interface { // MachineConfigurationInterface has methods to work with MachineConfiguration resources. type MachineConfigurationInterface interface { - Create(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.CreateOptions) (*v1.MachineConfiguration, error) - Update(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (*v1.MachineConfiguration, error) + Create(ctx context.Context, machineConfiguration *operatorv1.MachineConfiguration, opts metav1.CreateOptions) (*operatorv1.MachineConfiguration, error) + Update(ctx context.Context, machineConfiguration *operatorv1.MachineConfiguration, opts metav1.UpdateOptions) (*operatorv1.MachineConfiguration, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, machineConfiguration *v1.MachineConfiguration, opts metav1.UpdateOptions) (*v1.MachineConfiguration, error) + UpdateStatus(ctx context.Context, machineConfiguration *operatorv1.MachineConfiguration, opts metav1.UpdateOptions) (*operatorv1.MachineConfiguration, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MachineConfiguration, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.MachineConfigurationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.MachineConfiguration, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.MachineConfigurationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MachineConfiguration, err error) - Apply(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.MachineConfiguration, err error) + Apply(ctx context.Context, machineConfiguration *applyconfigurationsoperatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.MachineConfiguration, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, machineConfiguration *operatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MachineConfiguration, err error) + ApplyStatus(ctx context.Context, machineConfiguration *applyconfigurationsoperatorv1.MachineConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.MachineConfiguration, err error) MachineConfigurationExpansion } // machineConfigurations implements MachineConfigurationInterface type machineConfigurations struct { - *gentype.ClientWithListAndApply[*v1.MachineConfiguration, *v1.MachineConfigurationList, *operatorv1.MachineConfigurationApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.MachineConfiguration, *operatorv1.MachineConfigurationList, *applyconfigurationsoperatorv1.MachineConfigurationApplyConfiguration] } // newMachineConfigurations returns a MachineConfigurations func newMachineConfigurations(c *OperatorV1Client) *machineConfigurations { return &machineConfigurations{ - gentype.NewClientWithListAndApply[*v1.MachineConfiguration, *v1.MachineConfigurationList, *operatorv1.MachineConfigurationApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.MachineConfiguration, *operatorv1.MachineConfigurationList, *applyconfigurationsoperatorv1.MachineConfigurationApplyConfiguration]( "machineconfigurations", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.MachineConfiguration { return &v1.MachineConfiguration{} }, - func() *v1.MachineConfigurationList { return &v1.MachineConfigurationList{} }), + func() *operatorv1.MachineConfiguration { return &operatorv1.MachineConfiguration{} }, + func() *operatorv1.MachineConfigurationList { return &operatorv1.MachineConfigurationList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/network.go b/operator/clientset/versioned/typed/operator/v1/network.go index 17d6f0959d..d4777b0241 100644 --- a/operator/clientset/versioned/typed/operator/v1/network.go +++ b/operator/clientset/versioned/typed/operator/v1/network.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type NetworksGetter interface { // NetworkInterface has methods to work with Network resources. type NetworkInterface interface { - Create(ctx context.Context, network *v1.Network, opts metav1.CreateOptions) (*v1.Network, error) - Update(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (*v1.Network, error) + Create(ctx context.Context, network *operatorv1.Network, opts metav1.CreateOptions) (*operatorv1.Network, error) + Update(ctx context.Context, network *operatorv1.Network, opts metav1.UpdateOptions) (*operatorv1.Network, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, network *v1.Network, opts metav1.UpdateOptions) (*v1.Network, error) + UpdateStatus(ctx context.Context, network *operatorv1.Network, opts metav1.UpdateOptions) (*operatorv1.Network, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Network, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.Network, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.NetworkList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Network, err error) - Apply(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.Network, err error) + Apply(ctx context.Context, network *applyconfigurationsoperatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Network, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, network *operatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Network, err error) + ApplyStatus(ctx context.Context, network *applyconfigurationsoperatorv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Network, err error) NetworkExpansion } // networks implements NetworkInterface type networks struct { - *gentype.ClientWithListAndApply[*v1.Network, *v1.NetworkList, *operatorv1.NetworkApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.Network, *operatorv1.NetworkList, *applyconfigurationsoperatorv1.NetworkApplyConfiguration] } // newNetworks returns a Networks func newNetworks(c *OperatorV1Client) *networks { return &networks{ - gentype.NewClientWithListAndApply[*v1.Network, *v1.NetworkList, *operatorv1.NetworkApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.Network, *operatorv1.NetworkList, *applyconfigurationsoperatorv1.NetworkApplyConfiguration]( "networks", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Network { return &v1.Network{} }, - func() *v1.NetworkList { return &v1.NetworkList{} }), + func() *operatorv1.Network { return &operatorv1.Network{} }, + func() *operatorv1.NetworkList { return &operatorv1.NetworkList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/olm.go b/operator/clientset/versioned/typed/operator/v1/olm.go index 6adb68c89a..866906e684 100644 --- a/operator/clientset/versioned/typed/operator/v1/olm.go +++ b/operator/clientset/versioned/typed/operator/v1/olm.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type OLMsGetter interface { // OLMInterface has methods to work with OLM resources. type OLMInterface interface { - Create(ctx context.Context, oLM *v1.OLM, opts metav1.CreateOptions) (*v1.OLM, error) - Update(ctx context.Context, oLM *v1.OLM, opts metav1.UpdateOptions) (*v1.OLM, error) + Create(ctx context.Context, oLM *operatorv1.OLM, opts metav1.CreateOptions) (*operatorv1.OLM, error) + Update(ctx context.Context, oLM *operatorv1.OLM, opts metav1.UpdateOptions) (*operatorv1.OLM, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, oLM *v1.OLM, opts metav1.UpdateOptions) (*v1.OLM, error) + UpdateStatus(ctx context.Context, oLM *operatorv1.OLM, opts metav1.UpdateOptions) (*operatorv1.OLM, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OLM, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OLMList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.OLM, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.OLMList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OLM, err error) - Apply(ctx context.Context, oLM *operatorv1.OLMApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OLM, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.OLM, err error) + Apply(ctx context.Context, oLM *applyconfigurationsoperatorv1.OLMApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.OLM, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, oLM *operatorv1.OLMApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OLM, err error) + ApplyStatus(ctx context.Context, oLM *applyconfigurationsoperatorv1.OLMApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.OLM, err error) OLMExpansion } // oLMs implements OLMInterface type oLMs struct { - *gentype.ClientWithListAndApply[*v1.OLM, *v1.OLMList, *operatorv1.OLMApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.OLM, *operatorv1.OLMList, *applyconfigurationsoperatorv1.OLMApplyConfiguration] } // newOLMs returns a OLMs func newOLMs(c *OperatorV1Client) *oLMs { return &oLMs{ - gentype.NewClientWithListAndApply[*v1.OLM, *v1.OLMList, *operatorv1.OLMApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.OLM, *operatorv1.OLMList, *applyconfigurationsoperatorv1.OLMApplyConfiguration]( "olms", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OLM { return &v1.OLM{} }, - func() *v1.OLMList { return &v1.OLMList{} }), + func() *operatorv1.OLM { return &operatorv1.OLM{} }, + func() *operatorv1.OLMList { return &operatorv1.OLMList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/openshiftapiserver.go b/operator/clientset/versioned/typed/operator/v1/openshiftapiserver.go index ab6d0a15b0..942c8fc6f1 100644 --- a/operator/clientset/versioned/typed/operator/v1/openshiftapiserver.go +++ b/operator/clientset/versioned/typed/operator/v1/openshiftapiserver.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type OpenShiftAPIServersGetter interface { // OpenShiftAPIServerInterface has methods to work with OpenShiftAPIServer resources. type OpenShiftAPIServerInterface interface { - Create(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.CreateOptions) (*v1.OpenShiftAPIServer, error) - Update(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (*v1.OpenShiftAPIServer, error) + Create(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts metav1.CreateOptions) (*operatorv1.OpenShiftAPIServer, error) + Update(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts metav1.UpdateOptions) (*operatorv1.OpenShiftAPIServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, openShiftAPIServer *v1.OpenShiftAPIServer, opts metav1.UpdateOptions) (*v1.OpenShiftAPIServer, error) + UpdateStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServer, opts metav1.UpdateOptions) (*operatorv1.OpenShiftAPIServer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OpenShiftAPIServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OpenShiftAPIServerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.OpenShiftAPIServer, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.OpenShiftAPIServerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftAPIServer, err error) - Apply(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.OpenShiftAPIServer, err error) + Apply(ctx context.Context, openShiftAPIServer *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.OpenShiftAPIServer, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, openShiftAPIServer *operatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftAPIServer, err error) + ApplyStatus(ctx context.Context, openShiftAPIServer *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.OpenShiftAPIServer, err error) OpenShiftAPIServerExpansion } // openShiftAPIServers implements OpenShiftAPIServerInterface type openShiftAPIServers struct { - *gentype.ClientWithListAndApply[*v1.OpenShiftAPIServer, *v1.OpenShiftAPIServerList, *operatorv1.OpenShiftAPIServerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.OpenShiftAPIServer, *operatorv1.OpenShiftAPIServerList, *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration] } // newOpenShiftAPIServers returns a OpenShiftAPIServers func newOpenShiftAPIServers(c *OperatorV1Client) *openShiftAPIServers { return &openShiftAPIServers{ - gentype.NewClientWithListAndApply[*v1.OpenShiftAPIServer, *v1.OpenShiftAPIServerList, *operatorv1.OpenShiftAPIServerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.OpenShiftAPIServer, *operatorv1.OpenShiftAPIServerList, *applyconfigurationsoperatorv1.OpenShiftAPIServerApplyConfiguration]( "openshiftapiservers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OpenShiftAPIServer { return &v1.OpenShiftAPIServer{} }, - func() *v1.OpenShiftAPIServerList { return &v1.OpenShiftAPIServerList{} }), + func() *operatorv1.OpenShiftAPIServer { return &operatorv1.OpenShiftAPIServer{} }, + func() *operatorv1.OpenShiftAPIServerList { return &operatorv1.OpenShiftAPIServerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/openshiftcontrollermanager.go b/operator/clientset/versioned/typed/operator/v1/openshiftcontrollermanager.go index 9537fa9493..0f729ad336 100644 --- a/operator/clientset/versioned/typed/operator/v1/openshiftcontrollermanager.go +++ b/operator/clientset/versioned/typed/operator/v1/openshiftcontrollermanager.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type OpenShiftControllerManagersGetter interface { // OpenShiftControllerManagerInterface has methods to work with OpenShiftControllerManager resources. type OpenShiftControllerManagerInterface interface { - Create(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.CreateOptions) (*v1.OpenShiftControllerManager, error) - Update(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (*v1.OpenShiftControllerManager, error) + Create(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts metav1.CreateOptions) (*operatorv1.OpenShiftControllerManager, error) + Update(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts metav1.UpdateOptions) (*operatorv1.OpenShiftControllerManager, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, openShiftControllerManager *v1.OpenShiftControllerManager, opts metav1.UpdateOptions) (*v1.OpenShiftControllerManager, error) + UpdateStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManager, opts metav1.UpdateOptions) (*operatorv1.OpenShiftControllerManager, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.OpenShiftControllerManager, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.OpenShiftControllerManagerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.OpenShiftControllerManager, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.OpenShiftControllerManagerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.OpenShiftControllerManager, err error) - Apply(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.OpenShiftControllerManager, err error) + Apply(ctx context.Context, openShiftControllerManager *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.OpenShiftControllerManager, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, openShiftControllerManager *operatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.OpenShiftControllerManager, err error) + ApplyStatus(ctx context.Context, openShiftControllerManager *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.OpenShiftControllerManager, err error) OpenShiftControllerManagerExpansion } // openShiftControllerManagers implements OpenShiftControllerManagerInterface type openShiftControllerManagers struct { - *gentype.ClientWithListAndApply[*v1.OpenShiftControllerManager, *v1.OpenShiftControllerManagerList, *operatorv1.OpenShiftControllerManagerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.OpenShiftControllerManager, *operatorv1.OpenShiftControllerManagerList, *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration] } // newOpenShiftControllerManagers returns a OpenShiftControllerManagers func newOpenShiftControllerManagers(c *OperatorV1Client) *openShiftControllerManagers { return &openShiftControllerManagers{ - gentype.NewClientWithListAndApply[*v1.OpenShiftControllerManager, *v1.OpenShiftControllerManagerList, *operatorv1.OpenShiftControllerManagerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.OpenShiftControllerManager, *operatorv1.OpenShiftControllerManagerList, *applyconfigurationsoperatorv1.OpenShiftControllerManagerApplyConfiguration]( "openshiftcontrollermanagers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.OpenShiftControllerManager { return &v1.OpenShiftControllerManager{} }, - func() *v1.OpenShiftControllerManagerList { return &v1.OpenShiftControllerManagerList{} }), + func() *operatorv1.OpenShiftControllerManager { return &operatorv1.OpenShiftControllerManager{} }, + func() *operatorv1.OpenShiftControllerManagerList { return &operatorv1.OpenShiftControllerManagerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/operator_client.go b/operator/clientset/versioned/typed/operator/v1/operator_client.go index 9ba66e07ce..0b52301c53 100644 --- a/operator/clientset/versioned/typed/operator/v1/operator_client.go +++ b/operator/clientset/versioned/typed/operator/v1/operator_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/operator/v1" - "github.com/openshift/client-go/operator/clientset/versioned/scheme" + operatorv1 "github.com/openshift/api/operator/v1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -179,10 +179,10 @@ func New(c rest.Interface) *OperatorV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := operatorv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/operator/clientset/versioned/typed/operator/v1/serviceca.go b/operator/clientset/versioned/typed/operator/v1/serviceca.go index 47feeb8282..1827f8793f 100644 --- a/operator/clientset/versioned/typed/operator/v1/serviceca.go +++ b/operator/clientset/versioned/typed/operator/v1/serviceca.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ServiceCAsGetter interface { // ServiceCAInterface has methods to work with ServiceCA resources. type ServiceCAInterface interface { - Create(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.CreateOptions) (*v1.ServiceCA, error) - Update(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (*v1.ServiceCA, error) + Create(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts metav1.CreateOptions) (*operatorv1.ServiceCA, error) + Update(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts metav1.UpdateOptions) (*operatorv1.ServiceCA, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, serviceCA *v1.ServiceCA, opts metav1.UpdateOptions) (*v1.ServiceCA, error) + UpdateStatus(ctx context.Context, serviceCA *operatorv1.ServiceCA, opts metav1.UpdateOptions) (*operatorv1.ServiceCA, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ServiceCA, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceCAList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.ServiceCA, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.ServiceCAList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCA, err error) - Apply(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCA, err error) + Apply(ctx context.Context, serviceCA *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ServiceCA, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, serviceCA *operatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCA, err error) + ApplyStatus(ctx context.Context, serviceCA *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ServiceCA, err error) ServiceCAExpansion } // serviceCAs implements ServiceCAInterface type serviceCAs struct { - *gentype.ClientWithListAndApply[*v1.ServiceCA, *v1.ServiceCAList, *operatorv1.ServiceCAApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.ServiceCA, *operatorv1.ServiceCAList, *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration] } // newServiceCAs returns a ServiceCAs func newServiceCAs(c *OperatorV1Client) *serviceCAs { return &serviceCAs{ - gentype.NewClientWithListAndApply[*v1.ServiceCA, *v1.ServiceCAList, *operatorv1.ServiceCAApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.ServiceCA, *operatorv1.ServiceCAList, *applyconfigurationsoperatorv1.ServiceCAApplyConfiguration]( "servicecas", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ServiceCA { return &v1.ServiceCA{} }, - func() *v1.ServiceCAList { return &v1.ServiceCAList{} }), + func() *operatorv1.ServiceCA { return &operatorv1.ServiceCA{} }, + func() *operatorv1.ServiceCAList { return &operatorv1.ServiceCAList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/servicecatalogapiserver.go b/operator/clientset/versioned/typed/operator/v1/servicecatalogapiserver.go index fc39f2ac7f..9c31f0a3eb 100644 --- a/operator/clientset/versioned/typed/operator/v1/servicecatalogapiserver.go +++ b/operator/clientset/versioned/typed/operator/v1/servicecatalogapiserver.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ServiceCatalogAPIServersGetter interface { // ServiceCatalogAPIServerInterface has methods to work with ServiceCatalogAPIServer resources. type ServiceCatalogAPIServerInterface interface { - Create(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.CreateOptions) (*v1.ServiceCatalogAPIServer, error) - Update(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (*v1.ServiceCatalogAPIServer, error) + Create(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts metav1.CreateOptions) (*operatorv1.ServiceCatalogAPIServer, error) + Update(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (*operatorv1.ServiceCatalogAPIServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, serviceCatalogAPIServer *v1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (*v1.ServiceCatalogAPIServer, error) + UpdateStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, opts metav1.UpdateOptions) (*operatorv1.ServiceCatalogAPIServer, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ServiceCatalogAPIServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceCatalogAPIServerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.ServiceCatalogAPIServer, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.ServiceCatalogAPIServerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogAPIServer, err error) - Apply(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCatalogAPIServer, err error) + Apply(ctx context.Context, serviceCatalogAPIServer *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogAPIServer, err error) + ApplyStatus(ctx context.Context, serviceCatalogAPIServer *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ServiceCatalogAPIServer, err error) ServiceCatalogAPIServerExpansion } // serviceCatalogAPIServers implements ServiceCatalogAPIServerInterface type serviceCatalogAPIServers struct { - *gentype.ClientWithListAndApply[*v1.ServiceCatalogAPIServer, *v1.ServiceCatalogAPIServerList, *operatorv1.ServiceCatalogAPIServerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.ServiceCatalogAPIServer, *operatorv1.ServiceCatalogAPIServerList, *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration] } // newServiceCatalogAPIServers returns a ServiceCatalogAPIServers func newServiceCatalogAPIServers(c *OperatorV1Client) *serviceCatalogAPIServers { return &serviceCatalogAPIServers{ - gentype.NewClientWithListAndApply[*v1.ServiceCatalogAPIServer, *v1.ServiceCatalogAPIServerList, *operatorv1.ServiceCatalogAPIServerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.ServiceCatalogAPIServer, *operatorv1.ServiceCatalogAPIServerList, *applyconfigurationsoperatorv1.ServiceCatalogAPIServerApplyConfiguration]( "servicecatalogapiservers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ServiceCatalogAPIServer { return &v1.ServiceCatalogAPIServer{} }, - func() *v1.ServiceCatalogAPIServerList { return &v1.ServiceCatalogAPIServerList{} }), + func() *operatorv1.ServiceCatalogAPIServer { return &operatorv1.ServiceCatalogAPIServer{} }, + func() *operatorv1.ServiceCatalogAPIServerList { return &operatorv1.ServiceCatalogAPIServerList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/servicecatalogcontrollermanager.go b/operator/clientset/versioned/typed/operator/v1/servicecatalogcontrollermanager.go index 0f9fc299b1..5e5e3f2083 100644 --- a/operator/clientset/versioned/typed/operator/v1/servicecatalogcontrollermanager.go +++ b/operator/clientset/versioned/typed/operator/v1/servicecatalogcontrollermanager.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type ServiceCatalogControllerManagersGetter interface { // ServiceCatalogControllerManagerInterface has methods to work with ServiceCatalogControllerManager resources. type ServiceCatalogControllerManagerInterface interface { - Create(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.CreateOptions) (*v1.ServiceCatalogControllerManager, error) - Update(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (*v1.ServiceCatalogControllerManager, error) + Create(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts metav1.CreateOptions) (*operatorv1.ServiceCatalogControllerManager, error) + Update(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (*operatorv1.ServiceCatalogControllerManager, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, serviceCatalogControllerManager *v1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (*v1.ServiceCatalogControllerManager, error) + UpdateStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, opts metav1.UpdateOptions) (*operatorv1.ServiceCatalogControllerManager, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ServiceCatalogControllerManager, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceCatalogControllerManagerList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.ServiceCatalogControllerManager, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.ServiceCatalogControllerManagerList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ServiceCatalogControllerManager, err error) - Apply(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.ServiceCatalogControllerManager, err error) + Apply(ctx context.Context, serviceCatalogControllerManager *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ServiceCatalogControllerManager, err error) + ApplyStatus(ctx context.Context, serviceCatalogControllerManager *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.ServiceCatalogControllerManager, err error) ServiceCatalogControllerManagerExpansion } // serviceCatalogControllerManagers implements ServiceCatalogControllerManagerInterface type serviceCatalogControllerManagers struct { - *gentype.ClientWithListAndApply[*v1.ServiceCatalogControllerManager, *v1.ServiceCatalogControllerManagerList, *operatorv1.ServiceCatalogControllerManagerApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.ServiceCatalogControllerManager, *operatorv1.ServiceCatalogControllerManagerList, *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration] } // newServiceCatalogControllerManagers returns a ServiceCatalogControllerManagers func newServiceCatalogControllerManagers(c *OperatorV1Client) *serviceCatalogControllerManagers { return &serviceCatalogControllerManagers{ - gentype.NewClientWithListAndApply[*v1.ServiceCatalogControllerManager, *v1.ServiceCatalogControllerManagerList, *operatorv1.ServiceCatalogControllerManagerApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.ServiceCatalogControllerManager, *operatorv1.ServiceCatalogControllerManagerList, *applyconfigurationsoperatorv1.ServiceCatalogControllerManagerApplyConfiguration]( "servicecatalogcontrollermanagers", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ServiceCatalogControllerManager { return &v1.ServiceCatalogControllerManager{} }, - func() *v1.ServiceCatalogControllerManagerList { return &v1.ServiceCatalogControllerManagerList{} }), + func() *operatorv1.ServiceCatalogControllerManager { + return &operatorv1.ServiceCatalogControllerManager{} + }, + func() *operatorv1.ServiceCatalogControllerManagerList { + return &operatorv1.ServiceCatalogControllerManagerList{} + }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1/storage.go b/operator/clientset/versioned/typed/operator/v1/storage.go index 410aa67994..e1110785fc 100644 --- a/operator/clientset/versioned/typed/operator/v1/storage.go +++ b/operator/clientset/versioned/typed/operator/v1/storage.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/operator/v1" - operatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" + applyconfigurationsoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type StoragesGetter interface { // StorageInterface has methods to work with Storage resources. type StorageInterface interface { - Create(ctx context.Context, storage *v1.Storage, opts metav1.CreateOptions) (*v1.Storage, error) - Update(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (*v1.Storage, error) + Create(ctx context.Context, storage *operatorv1.Storage, opts metav1.CreateOptions) (*operatorv1.Storage, error) + Update(ctx context.Context, storage *operatorv1.Storage, opts metav1.UpdateOptions) (*operatorv1.Storage, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, storage *v1.Storage, opts metav1.UpdateOptions) (*v1.Storage, error) + UpdateStatus(ctx context.Context, storage *operatorv1.Storage, opts metav1.UpdateOptions) (*operatorv1.Storage, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Storage, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.StorageList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*operatorv1.Storage, error) + List(ctx context.Context, opts metav1.ListOptions) (*operatorv1.StorageList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Storage, err error) - Apply(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *operatorv1.Storage, err error) + Apply(ctx context.Context, storage *applyconfigurationsoperatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Storage, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, storage *operatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Storage, err error) + ApplyStatus(ctx context.Context, storage *applyconfigurationsoperatorv1.StorageApplyConfiguration, opts metav1.ApplyOptions) (result *operatorv1.Storage, err error) StorageExpansion } // storages implements StorageInterface type storages struct { - *gentype.ClientWithListAndApply[*v1.Storage, *v1.StorageList, *operatorv1.StorageApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1.Storage, *operatorv1.StorageList, *applyconfigurationsoperatorv1.StorageApplyConfiguration] } // newStorages returns a Storages func newStorages(c *OperatorV1Client) *storages { return &storages{ - gentype.NewClientWithListAndApply[*v1.Storage, *v1.StorageList, *operatorv1.StorageApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1.Storage, *operatorv1.StorageList, *applyconfigurationsoperatorv1.StorageApplyConfiguration]( "storages", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Storage { return &v1.Storage{} }, - func() *v1.StorageList { return &v1.StorageList{} }), + func() *operatorv1.Storage { return &operatorv1.Storage{} }, + func() *operatorv1.StorageList { return &operatorv1.StorageList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/etcdbackup.go b/operator/clientset/versioned/typed/operator/v1alpha1/etcdbackup.go index 53787cc4b6..cc2889e44b 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/etcdbackup.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/etcdbackup.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + applyconfigurationsoperatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type EtcdBackupsGetter interface { // EtcdBackupInterface has methods to work with EtcdBackup resources. type EtcdBackupInterface interface { - Create(ctx context.Context, etcdBackup *v1alpha1.EtcdBackup, opts v1.CreateOptions) (*v1alpha1.EtcdBackup, error) - Update(ctx context.Context, etcdBackup *v1alpha1.EtcdBackup, opts v1.UpdateOptions) (*v1alpha1.EtcdBackup, error) + Create(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackup, opts v1.CreateOptions) (*operatorv1alpha1.EtcdBackup, error) + Update(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackup, opts v1.UpdateOptions) (*operatorv1alpha1.EtcdBackup, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, etcdBackup *v1alpha1.EtcdBackup, opts v1.UpdateOptions) (*v1alpha1.EtcdBackup, error) + UpdateStatus(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackup, opts v1.UpdateOptions) (*operatorv1alpha1.EtcdBackup, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.EtcdBackup, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.EtcdBackupList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.EtcdBackup, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.EtcdBackupList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EtcdBackup, err error) - Apply(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.EtcdBackup, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.EtcdBackup, err error) + Apply(ctx context.Context, etcdBackup *applyconfigurationsoperatorv1alpha1.EtcdBackupApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.EtcdBackup, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.EtcdBackup, err error) + ApplyStatus(ctx context.Context, etcdBackup *applyconfigurationsoperatorv1alpha1.EtcdBackupApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.EtcdBackup, err error) EtcdBackupExpansion } // etcdBackups implements EtcdBackupInterface type etcdBackups struct { - *gentype.ClientWithListAndApply[*v1alpha1.EtcdBackup, *v1alpha1.EtcdBackupList, *operatorv1alpha1.EtcdBackupApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1alpha1.EtcdBackup, *operatorv1alpha1.EtcdBackupList, *applyconfigurationsoperatorv1alpha1.EtcdBackupApplyConfiguration] } // newEtcdBackups returns a EtcdBackups func newEtcdBackups(c *OperatorV1alpha1Client) *etcdBackups { return &etcdBackups{ - gentype.NewClientWithListAndApply[*v1alpha1.EtcdBackup, *v1alpha1.EtcdBackupList, *operatorv1alpha1.EtcdBackupApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1alpha1.EtcdBackup, *operatorv1alpha1.EtcdBackupList, *applyconfigurationsoperatorv1alpha1.EtcdBackupApplyConfiguration]( "etcdbackups", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.EtcdBackup { return &v1alpha1.EtcdBackup{} }, - func() *v1alpha1.EtcdBackupList { return &v1alpha1.EtcdBackupList{} }), + func() *operatorv1alpha1.EtcdBackup { return &operatorv1alpha1.EtcdBackup{} }, + func() *operatorv1alpha1.EtcdBackupList { return &operatorv1alpha1.EtcdBackupList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go index f1bb3c76f0..be8667235e 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_etcdbackup.go @@ -3,168 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeEtcdBackups implements EtcdBackupInterface -type FakeEtcdBackups struct { +// fakeEtcdBackups implements EtcdBackupInterface +type fakeEtcdBackups struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.EtcdBackup, *v1alpha1.EtcdBackupList, *operatorv1alpha1.EtcdBackupApplyConfiguration] Fake *FakeOperatorV1alpha1 } -var etcdbackupsResource = v1alpha1.SchemeGroupVersion.WithResource("etcdbackups") - -var etcdbackupsKind = v1alpha1.SchemeGroupVersion.WithKind("EtcdBackup") - -// Get takes name of the etcdBackup, and returns the corresponding etcdBackup object, and an error if there is any. -func (c *FakeEtcdBackups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EtcdBackup, err error) { - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(etcdbackupsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.EtcdBackup), err -} - -// List takes label and field selectors, and returns the list of EtcdBackups that match those selectors. -func (c *FakeEtcdBackups) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EtcdBackupList, err error) { - emptyResult := &v1alpha1.EtcdBackupList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(etcdbackupsResource, etcdbackupsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.EtcdBackupList{ListMeta: obj.(*v1alpha1.EtcdBackupList).ListMeta} - for _, item := range obj.(*v1alpha1.EtcdBackupList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested etcdBackups. -func (c *FakeEtcdBackups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(etcdbackupsResource, opts)) -} - -// Create takes the representation of a etcdBackup and creates it. Returns the server's representation of the etcdBackup, and an error, if there is any. -func (c *FakeEtcdBackups) Create(ctx context.Context, etcdBackup *v1alpha1.EtcdBackup, opts v1.CreateOptions) (result *v1alpha1.EtcdBackup, err error) { - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(etcdbackupsResource, etcdBackup, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.EtcdBackup), err -} - -// Update takes the representation of a etcdBackup and updates it. Returns the server's representation of the etcdBackup, and an error, if there is any. -func (c *FakeEtcdBackups) Update(ctx context.Context, etcdBackup *v1alpha1.EtcdBackup, opts v1.UpdateOptions) (result *v1alpha1.EtcdBackup, err error) { - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(etcdbackupsResource, etcdBackup, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.EtcdBackup), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeEtcdBackups) UpdateStatus(ctx context.Context, etcdBackup *v1alpha1.EtcdBackup, opts v1.UpdateOptions) (result *v1alpha1.EtcdBackup, err error) { - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(etcdbackupsResource, "status", etcdBackup, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.EtcdBackup), err -} - -// Delete takes name of the etcdBackup and deletes it. Returns an error if one occurs. -func (c *FakeEtcdBackups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(etcdbackupsResource, name, opts), &v1alpha1.EtcdBackup{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeEtcdBackups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(etcdbackupsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.EtcdBackupList{}) - return err -} - -// Patch applies the patch and returns the patched etcdBackup. -func (c *FakeEtcdBackups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EtcdBackup, err error) { - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(etcdbackupsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.EtcdBackup), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied etcdBackup. -func (c *FakeEtcdBackups) Apply(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.EtcdBackup, err error) { - if etcdBackup == nil { - return nil, fmt.Errorf("etcdBackup provided to Apply must not be nil") - } - data, err := json.Marshal(etcdBackup) - if err != nil { - return nil, err - } - name := etcdBackup.Name - if name == nil { - return nil, fmt.Errorf("etcdBackup.Name must be provided to Apply") - } - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(etcdbackupsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.EtcdBackup), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeEtcdBackups) ApplyStatus(ctx context.Context, etcdBackup *operatorv1alpha1.EtcdBackupApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.EtcdBackup, err error) { - if etcdBackup == nil { - return nil, fmt.Errorf("etcdBackup provided to Apply must not be nil") - } - data, err := json.Marshal(etcdBackup) - if err != nil { - return nil, err - } - name := etcdBackup.Name - if name == nil { - return nil, fmt.Errorf("etcdBackup.Name must be provided to Apply") - } - emptyResult := &v1alpha1.EtcdBackup{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(etcdbackupsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeEtcdBackups(fake *FakeOperatorV1alpha1) typedoperatorv1alpha1.EtcdBackupInterface { + return &fakeEtcdBackups{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.EtcdBackup, *v1alpha1.EtcdBackupList, *operatorv1alpha1.EtcdBackupApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("etcdbackups"), + v1alpha1.SchemeGroupVersion.WithKind("EtcdBackup"), + func() *v1alpha1.EtcdBackup { return &v1alpha1.EtcdBackup{} }, + func() *v1alpha1.EtcdBackupList { return &v1alpha1.EtcdBackupList{} }, + func(dst, src *v1alpha1.EtcdBackupList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.EtcdBackupList) []*v1alpha1.EtcdBackup { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.EtcdBackupList, items []*v1alpha1.EtcdBackup) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.EtcdBackup), err } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go index e7a60d83e8..1cac3dbe3d 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeImageContentSourcePolicies implements ImageContentSourcePolicyInterface -type FakeImageContentSourcePolicies struct { +// fakeImageContentSourcePolicies implements ImageContentSourcePolicyInterface +type fakeImageContentSourcePolicies struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.ImageContentSourcePolicy, *v1alpha1.ImageContentSourcePolicyList, *operatorv1alpha1.ImageContentSourcePolicyApplyConfiguration] Fake *FakeOperatorV1alpha1 } -var imagecontentsourcepoliciesResource = v1alpha1.SchemeGroupVersion.WithResource("imagecontentsourcepolicies") - -var imagecontentsourcepoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("ImageContentSourcePolicy") - -// Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. -func (c *FakeImageContentSourcePolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { - emptyResult := &v1alpha1.ImageContentSourcePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(imagecontentsourcepoliciesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImageContentSourcePolicy), err -} - -// List takes label and field selectors, and returns the list of ImageContentSourcePolicies that match those selectors. -func (c *FakeImageContentSourcePolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ImageContentSourcePolicyList, err error) { - emptyResult := &v1alpha1.ImageContentSourcePolicyList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(imagecontentsourcepoliciesResource, imagecontentsourcepoliciesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ImageContentSourcePolicyList{ListMeta: obj.(*v1alpha1.ImageContentSourcePolicyList).ListMeta} - for _, item := range obj.(*v1alpha1.ImageContentSourcePolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested imageContentSourcePolicies. -func (c *FakeImageContentSourcePolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(imagecontentsourcepoliciesResource, opts)) -} - -// Create takes the representation of a imageContentSourcePolicy and creates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. -func (c *FakeImageContentSourcePolicies) Create(ctx context.Context, imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy, opts v1.CreateOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { - emptyResult := &v1alpha1.ImageContentSourcePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(imagecontentsourcepoliciesResource, imageContentSourcePolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImageContentSourcePolicy), err -} - -// Update takes the representation of a imageContentSourcePolicy and updates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. -func (c *FakeImageContentSourcePolicies) Update(ctx context.Context, imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy, opts v1.UpdateOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { - emptyResult := &v1alpha1.ImageContentSourcePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(imagecontentsourcepoliciesResource, imageContentSourcePolicy, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImageContentSourcePolicy), err -} - -// Delete takes name of the imageContentSourcePolicy and deletes it. Returns an error if one occurs. -func (c *FakeImageContentSourcePolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(imagecontentsourcepoliciesResource, name, opts), &v1alpha1.ImageContentSourcePolicy{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeImageContentSourcePolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(imagecontentsourcepoliciesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ImageContentSourcePolicyList{}) - return err -} - -// Patch applies the patch and returns the patched imageContentSourcePolicy. -func (c *FakeImageContentSourcePolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) { - emptyResult := &v1alpha1.ImageContentSourcePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagecontentsourcepoliciesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ImageContentSourcePolicy), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied imageContentSourcePolicy. -func (c *FakeImageContentSourcePolicies) Apply(ctx context.Context, imageContentSourcePolicy *operatorv1alpha1.ImageContentSourcePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { - if imageContentSourcePolicy == nil { - return nil, fmt.Errorf("imageContentSourcePolicy provided to Apply must not be nil") - } - data, err := json.Marshal(imageContentSourcePolicy) - if err != nil { - return nil, err - } - name := imageContentSourcePolicy.Name - if name == nil { - return nil, fmt.Errorf("imageContentSourcePolicy.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ImageContentSourcePolicy{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(imagecontentsourcepoliciesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeImageContentSourcePolicies(fake *FakeOperatorV1alpha1) typedoperatorv1alpha1.ImageContentSourcePolicyInterface { + return &fakeImageContentSourcePolicies{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.ImageContentSourcePolicy, *v1alpha1.ImageContentSourcePolicyList, *operatorv1alpha1.ImageContentSourcePolicyApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("imagecontentsourcepolicies"), + v1alpha1.SchemeGroupVersion.WithKind("ImageContentSourcePolicy"), + func() *v1alpha1.ImageContentSourcePolicy { return &v1alpha1.ImageContentSourcePolicy{} }, + func() *v1alpha1.ImageContentSourcePolicyList { return &v1alpha1.ImageContentSourcePolicyList{} }, + func(dst, src *v1alpha1.ImageContentSourcePolicyList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.ImageContentSourcePolicyList) []*v1alpha1.ImageContentSourcePolicy { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.ImageContentSourcePolicyList, items []*v1alpha1.ImageContentSourcePolicy) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.ImageContentSourcePolicy), err } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go index ad17394bf2..d5dddebc26 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_olm.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeOLMs implements OLMInterface -type FakeOLMs struct { +// fakeOLMs implements OLMInterface +type fakeOLMs struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.OLM, *v1alpha1.OLMList, *operatorv1alpha1.OLMApplyConfiguration] Fake *FakeOperatorV1alpha1 } -var olmsResource = v1alpha1.SchemeGroupVersion.WithResource("olms") - -var olmsKind = v1alpha1.SchemeGroupVersion.WithKind("OLM") - -// Get takes name of the oLM, and returns the corresponding oLM object, and an error if there is any. -func (c *FakeOLMs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OLM, err error) { - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(olmsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.OLM), err -} - -// List takes label and field selectors, and returns the list of OLMs that match those selectors. -func (c *FakeOLMs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OLMList, err error) { - emptyResult := &v1alpha1.OLMList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(olmsResource, olmsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.OLMList{ListMeta: obj.(*v1alpha1.OLMList).ListMeta} - for _, item := range obj.(*v1alpha1.OLMList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested oLMs. -func (c *FakeOLMs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(olmsResource, opts)) -} - -// Create takes the representation of a oLM and creates it. Returns the server's representation of the oLM, and an error, if there is any. -func (c *FakeOLMs) Create(ctx context.Context, oLM *v1alpha1.OLM, opts v1.CreateOptions) (result *v1alpha1.OLM, err error) { - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(olmsResource, oLM, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.OLM), err -} - -// Update takes the representation of a oLM and updates it. Returns the server's representation of the oLM, and an error, if there is any. -func (c *FakeOLMs) Update(ctx context.Context, oLM *v1alpha1.OLM, opts v1.UpdateOptions) (result *v1alpha1.OLM, err error) { - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(olmsResource, oLM, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.OLM), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOLMs) UpdateStatus(ctx context.Context, oLM *v1alpha1.OLM, opts v1.UpdateOptions) (result *v1alpha1.OLM, err error) { - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(olmsResource, "status", oLM, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.OLM), err -} - -// Delete takes name of the oLM and deletes it. Returns an error if one occurs. -func (c *FakeOLMs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(olmsResource, name, opts), &v1alpha1.OLM{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOLMs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(olmsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.OLMList{}) - return err -} - -// Patch applies the patch and returns the patched oLM. -func (c *FakeOLMs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OLM, err error) { - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(olmsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.OLM), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied oLM. -func (c *FakeOLMs) Apply(ctx context.Context, oLM *operatorv1alpha1.OLMApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.OLM, err error) { - if oLM == nil { - return nil, fmt.Errorf("oLM provided to Apply must not be nil") - } - data, err := json.Marshal(oLM) - if err != nil { - return nil, err - } - name := oLM.Name - if name == nil { - return nil, fmt.Errorf("oLM.Name must be provided to Apply") - } - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(olmsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.OLM), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeOLMs) ApplyStatus(ctx context.Context, oLM *operatorv1alpha1.OLMApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.OLM, err error) { - if oLM == nil { - return nil, fmt.Errorf("oLM provided to Apply must not be nil") - } - data, err := json.Marshal(oLM) - if err != nil { - return nil, err - } - name := oLM.Name - if name == nil { - return nil, fmt.Errorf("oLM.Name must be provided to Apply") - } - emptyResult := &v1alpha1.OLM{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(olmsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeOLMs(fake *FakeOperatorV1alpha1) typedoperatorv1alpha1.OLMInterface { + return &fakeOLMs{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.OLM, *v1alpha1.OLMList, *operatorv1alpha1.OLMApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("olms"), + v1alpha1.SchemeGroupVersion.WithKind("OLM"), + func() *v1alpha1.OLM { return &v1alpha1.OLM{} }, + func() *v1alpha1.OLMList { return &v1alpha1.OLMList{} }, + func(dst, src *v1alpha1.OLMList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.OLMList) []*v1alpha1.OLM { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.OLMList, items []*v1alpha1.OLM) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1alpha1.OLM), err } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go index a9da578ff6..139f2ef56e 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go @@ -13,15 +13,15 @@ type FakeOperatorV1alpha1 struct { } func (c *FakeOperatorV1alpha1) EtcdBackups() v1alpha1.EtcdBackupInterface { - return &FakeEtcdBackups{c} + return newFakeEtcdBackups(c) } func (c *FakeOperatorV1alpha1) ImageContentSourcePolicies() v1alpha1.ImageContentSourcePolicyInterface { - return &FakeImageContentSourcePolicies{c} + return newFakeImageContentSourcePolicies(c) } func (c *FakeOperatorV1alpha1) OLMs() v1alpha1.OLMInterface { - return &FakeOLMs{c} + return newFakeOLMs(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go index db39b2bc5d..8073b59e15 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + applyconfigurationsoperatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,35 @@ type ImageContentSourcePoliciesGetter interface { // ImageContentSourcePolicyInterface has methods to work with ImageContentSourcePolicy resources. type ImageContentSourcePolicyInterface interface { - Create(ctx context.Context, imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy, opts v1.CreateOptions) (*v1alpha1.ImageContentSourcePolicy, error) - Update(ctx context.Context, imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy, opts v1.UpdateOptions) (*v1alpha1.ImageContentSourcePolicy, error) + Create(ctx context.Context, imageContentSourcePolicy *operatorv1alpha1.ImageContentSourcePolicy, opts v1.CreateOptions) (*operatorv1alpha1.ImageContentSourcePolicy, error) + Update(ctx context.Context, imageContentSourcePolicy *operatorv1alpha1.ImageContentSourcePolicy, opts v1.UpdateOptions) (*operatorv1alpha1.ImageContentSourcePolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ImageContentSourcePolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ImageContentSourcePolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.ImageContentSourcePolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.ImageContentSourcePolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) - Apply(ctx context.Context, imageContentSourcePolicy *operatorv1alpha1.ImageContentSourcePolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.ImageContentSourcePolicy, err error) + Apply(ctx context.Context, imageContentSourcePolicy *applyconfigurationsoperatorv1alpha1.ImageContentSourcePolicyApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.ImageContentSourcePolicy, err error) ImageContentSourcePolicyExpansion } // imageContentSourcePolicies implements ImageContentSourcePolicyInterface type imageContentSourcePolicies struct { - *gentype.ClientWithListAndApply[*v1alpha1.ImageContentSourcePolicy, *v1alpha1.ImageContentSourcePolicyList, *operatorv1alpha1.ImageContentSourcePolicyApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1alpha1.ImageContentSourcePolicy, *operatorv1alpha1.ImageContentSourcePolicyList, *applyconfigurationsoperatorv1alpha1.ImageContentSourcePolicyApplyConfiguration] } // newImageContentSourcePolicies returns a ImageContentSourcePolicies func newImageContentSourcePolicies(c *OperatorV1alpha1Client) *imageContentSourcePolicies { return &imageContentSourcePolicies{ - gentype.NewClientWithListAndApply[*v1alpha1.ImageContentSourcePolicy, *v1alpha1.ImageContentSourcePolicyList, *operatorv1alpha1.ImageContentSourcePolicyApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1alpha1.ImageContentSourcePolicy, *operatorv1alpha1.ImageContentSourcePolicyList, *applyconfigurationsoperatorv1alpha1.ImageContentSourcePolicyApplyConfiguration]( "imagecontentsourcepolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.ImageContentSourcePolicy { return &v1alpha1.ImageContentSourcePolicy{} }, - func() *v1alpha1.ImageContentSourcePolicyList { return &v1alpha1.ImageContentSourcePolicyList{} }), + func() *operatorv1alpha1.ImageContentSourcePolicy { return &operatorv1alpha1.ImageContentSourcePolicy{} }, + func() *operatorv1alpha1.ImageContentSourcePolicyList { + return &operatorv1alpha1.ImageContentSourcePolicyList{} + }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/olm.go b/operator/clientset/versioned/typed/operator/v1alpha1/olm.go index e5b701abb8..6a8bfd05cb 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/olm.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/olm.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - operatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + applyconfigurationsoperatorv1alpha1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1alpha1" scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type OLMsGetter interface { // OLMInterface has methods to work with OLM resources. type OLMInterface interface { - Create(ctx context.Context, oLM *v1alpha1.OLM, opts v1.CreateOptions) (*v1alpha1.OLM, error) - Update(ctx context.Context, oLM *v1alpha1.OLM, opts v1.UpdateOptions) (*v1alpha1.OLM, error) + Create(ctx context.Context, oLM *operatorv1alpha1.OLM, opts v1.CreateOptions) (*operatorv1alpha1.OLM, error) + Update(ctx context.Context, oLM *operatorv1alpha1.OLM, opts v1.UpdateOptions) (*operatorv1alpha1.OLM, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, oLM *v1alpha1.OLM, opts v1.UpdateOptions) (*v1alpha1.OLM, error) + UpdateStatus(ctx context.Context, oLM *operatorv1alpha1.OLM, opts v1.UpdateOptions) (*operatorv1alpha1.OLM, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.OLM, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OLMList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.OLM, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.OLMList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OLM, err error) - Apply(ctx context.Context, oLM *operatorv1alpha1.OLMApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.OLM, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.OLM, err error) + Apply(ctx context.Context, oLM *applyconfigurationsoperatorv1alpha1.OLMApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.OLM, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, oLM *operatorv1alpha1.OLMApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.OLM, err error) + ApplyStatus(ctx context.Context, oLM *applyconfigurationsoperatorv1alpha1.OLMApplyConfiguration, opts v1.ApplyOptions) (result *operatorv1alpha1.OLM, err error) OLMExpansion } // oLMs implements OLMInterface type oLMs struct { - *gentype.ClientWithListAndApply[*v1alpha1.OLM, *v1alpha1.OLMList, *operatorv1alpha1.OLMApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorv1alpha1.OLM, *operatorv1alpha1.OLMList, *applyconfigurationsoperatorv1alpha1.OLMApplyConfiguration] } // newOLMs returns a OLMs func newOLMs(c *OperatorV1alpha1Client) *oLMs { return &oLMs{ - gentype.NewClientWithListAndApply[*v1alpha1.OLM, *v1alpha1.OLMList, *operatorv1alpha1.OLMApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorv1alpha1.OLM, *operatorv1alpha1.OLMList, *applyconfigurationsoperatorv1alpha1.OLMApplyConfiguration]( "olms", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.OLM { return &v1alpha1.OLM{} }, - func() *v1alpha1.OLMList { return &v1alpha1.OLMList{} }), + func() *operatorv1alpha1.OLM { return &operatorv1alpha1.OLM{} }, + func() *operatorv1alpha1.OLMList { return &operatorv1alpha1.OLMList{} }, + ), } } diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go b/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go index 999166e956..57b9bdf8fa 100644 --- a/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go +++ b/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - "github.com/openshift/client-go/operator/clientset/versioned/scheme" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -79,10 +79,10 @@ func New(c rest.Interface) *OperatorV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := operatorv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/operator/informers/externalversions/generic.go b/operator/informers/externalversions/generic.go index 413264349b..aa45f26e63 100644 --- a/operator/informers/externalversions/generic.go +++ b/operator/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/operator/v1" v1alpha1 "github.com/openshift/api/operator/v1alpha1" diff --git a/operator/informers/externalversions/operator/v1/authentication.go b/operator/informers/externalversions/operator/v1/authentication.go index 5ba8a37c1e..6fb982888d 100644 --- a/operator/informers/externalversions/operator/v1/authentication.go +++ b/operator/informers/externalversions/operator/v1/authentication.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Authentications. type AuthenticationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.AuthenticationLister + Lister() operatorv1.AuthenticationLister } type authenticationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredAuthenticationInformer(client versioned.Interface, resyncPeriod return client.OperatorV1().Authentications().Watch(context.TODO(), options) }, }, - &operatorv1.Authentication{}, + &apioperatorv1.Authentication{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *authenticationInformer) defaultInformer(client versioned.Interface, res } func (f *authenticationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.Authentication{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.Authentication{}, f.defaultInformer) } -func (f *authenticationInformer) Lister() v1.AuthenticationLister { - return v1.NewAuthenticationLister(f.Informer().GetIndexer()) +func (f *authenticationInformer) Lister() operatorv1.AuthenticationLister { + return operatorv1.NewAuthenticationLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/cloudcredential.go b/operator/informers/externalversions/operator/v1/cloudcredential.go index f2e7c71d15..c3aa02afd1 100644 --- a/operator/informers/externalversions/operator/v1/cloudcredential.go +++ b/operator/informers/externalversions/operator/v1/cloudcredential.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // CloudCredentials. type CloudCredentialInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.CloudCredentialLister + Lister() operatorv1.CloudCredentialLister } type cloudCredentialInformer struct { @@ -54,7 +54,7 @@ func NewFilteredCloudCredentialInformer(client versioned.Interface, resyncPeriod return client.OperatorV1().CloudCredentials().Watch(context.TODO(), options) }, }, - &operatorv1.CloudCredential{}, + &apioperatorv1.CloudCredential{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *cloudCredentialInformer) defaultInformer(client versioned.Interface, re } func (f *cloudCredentialInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.CloudCredential{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.CloudCredential{}, f.defaultInformer) } -func (f *cloudCredentialInformer) Lister() v1.CloudCredentialLister { - return v1.NewCloudCredentialLister(f.Informer().GetIndexer()) +func (f *cloudCredentialInformer) Lister() operatorv1.CloudCredentialLister { + return operatorv1.NewCloudCredentialLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/clustercsidriver.go b/operator/informers/externalversions/operator/v1/clustercsidriver.go index 8f3991e89a..c9cf5143ed 100644 --- a/operator/informers/externalversions/operator/v1/clustercsidriver.go +++ b/operator/informers/externalversions/operator/v1/clustercsidriver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterCSIDrivers. type ClusterCSIDriverInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterCSIDriverLister + Lister() operatorv1.ClusterCSIDriverLister } type clusterCSIDriverInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterCSIDriverInformer(client versioned.Interface, resyncPerio return client.OperatorV1().ClusterCSIDrivers().Watch(context.TODO(), options) }, }, - &operatorv1.ClusterCSIDriver{}, + &apioperatorv1.ClusterCSIDriver{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterCSIDriverInformer) defaultInformer(client versioned.Interface, r } func (f *clusterCSIDriverInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.ClusterCSIDriver{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.ClusterCSIDriver{}, f.defaultInformer) } -func (f *clusterCSIDriverInformer) Lister() v1.ClusterCSIDriverLister { - return v1.NewClusterCSIDriverLister(f.Informer().GetIndexer()) +func (f *clusterCSIDriverInformer) Lister() operatorv1.ClusterCSIDriverLister { + return operatorv1.NewClusterCSIDriverLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/config.go b/operator/informers/externalversions/operator/v1/config.go index b75116935f..6af4ed2d3c 100644 --- a/operator/informers/externalversions/operator/v1/config.go +++ b/operator/informers/externalversions/operator/v1/config.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Configs. type ConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConfigLister + Lister() operatorv1.ConfigLister } type configInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConfigInformer(client versioned.Interface, resyncPeriod time.Dur return client.OperatorV1().Configs().Watch(context.TODO(), options) }, }, - &operatorv1.Config{}, + &apioperatorv1.Config{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *configInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *configInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.Config{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.Config{}, f.defaultInformer) } -func (f *configInformer) Lister() v1.ConfigLister { - return v1.NewConfigLister(f.Informer().GetIndexer()) +func (f *configInformer) Lister() operatorv1.ConfigLister { + return operatorv1.NewConfigLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/console.go b/operator/informers/externalversions/operator/v1/console.go index 587f0cc0ce..18c8244578 100644 --- a/operator/informers/externalversions/operator/v1/console.go +++ b/operator/informers/externalversions/operator/v1/console.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Consoles. type ConsoleInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConsoleLister + Lister() operatorv1.ConsoleLister } type consoleInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConsoleInformer(client versioned.Interface, resyncPeriod time.Du return client.OperatorV1().Consoles().Watch(context.TODO(), options) }, }, - &operatorv1.Console{}, + &apioperatorv1.Console{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *consoleInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *consoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.Console{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.Console{}, f.defaultInformer) } -func (f *consoleInformer) Lister() v1.ConsoleLister { - return v1.NewConsoleLister(f.Informer().GetIndexer()) +func (f *consoleInformer) Lister() operatorv1.ConsoleLister { + return operatorv1.NewConsoleLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/csisnapshotcontroller.go b/operator/informers/externalversions/operator/v1/csisnapshotcontroller.go index 2319c70900..ca889d29cd 100644 --- a/operator/informers/externalversions/operator/v1/csisnapshotcontroller.go +++ b/operator/informers/externalversions/operator/v1/csisnapshotcontroller.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // CSISnapshotControllers. type CSISnapshotControllerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.CSISnapshotControllerLister + Lister() operatorv1.CSISnapshotControllerLister } type cSISnapshotControllerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredCSISnapshotControllerInformer(client versioned.Interface, resync return client.OperatorV1().CSISnapshotControllers().Watch(context.TODO(), options) }, }, - &operatorv1.CSISnapshotController{}, + &apioperatorv1.CSISnapshotController{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *cSISnapshotControllerInformer) defaultInformer(client versioned.Interfa } func (f *cSISnapshotControllerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.CSISnapshotController{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.CSISnapshotController{}, f.defaultInformer) } -func (f *cSISnapshotControllerInformer) Lister() v1.CSISnapshotControllerLister { - return v1.NewCSISnapshotControllerLister(f.Informer().GetIndexer()) +func (f *cSISnapshotControllerInformer) Lister() operatorv1.CSISnapshotControllerLister { + return operatorv1.NewCSISnapshotControllerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/dns.go b/operator/informers/externalversions/operator/v1/dns.go index 8e718ddbcd..a97b100640 100644 --- a/operator/informers/externalversions/operator/v1/dns.go +++ b/operator/informers/externalversions/operator/v1/dns.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // DNSes. type DNSInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.DNSLister + Lister() operatorv1.DNSLister } type dNSInformer struct { @@ -54,7 +54,7 @@ func NewFilteredDNSInformer(client versioned.Interface, resyncPeriod time.Durati return client.OperatorV1().DNSes().Watch(context.TODO(), options) }, }, - &operatorv1.DNS{}, + &apioperatorv1.DNS{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *dNSInformer) defaultInformer(client versioned.Interface, resyncPeriod t } func (f *dNSInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.DNS{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.DNS{}, f.defaultInformer) } -func (f *dNSInformer) Lister() v1.DNSLister { - return v1.NewDNSLister(f.Informer().GetIndexer()) +func (f *dNSInformer) Lister() operatorv1.DNSLister { + return operatorv1.NewDNSLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/etcd.go b/operator/informers/externalversions/operator/v1/etcd.go index bd4ee72db8..e410bd016e 100644 --- a/operator/informers/externalversions/operator/v1/etcd.go +++ b/operator/informers/externalversions/operator/v1/etcd.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Etcds. type EtcdInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.EtcdLister + Lister() operatorv1.EtcdLister } type etcdInformer struct { @@ -54,7 +54,7 @@ func NewFilteredEtcdInformer(client versioned.Interface, resyncPeriod time.Durat return client.OperatorV1().Etcds().Watch(context.TODO(), options) }, }, - &operatorv1.Etcd{}, + &apioperatorv1.Etcd{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *etcdInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *etcdInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.Etcd{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.Etcd{}, f.defaultInformer) } -func (f *etcdInformer) Lister() v1.EtcdLister { - return v1.NewEtcdLister(f.Informer().GetIndexer()) +func (f *etcdInformer) Lister() operatorv1.EtcdLister { + return operatorv1.NewEtcdLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/ingresscontroller.go b/operator/informers/externalversions/operator/v1/ingresscontroller.go index 06578a2b85..daa94221e4 100644 --- a/operator/informers/externalversions/operator/v1/ingresscontroller.go +++ b/operator/informers/externalversions/operator/v1/ingresscontroller.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // IngressControllers. type IngressControllerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.IngressControllerLister + Lister() operatorv1.IngressControllerLister } type ingressControllerInformer struct { @@ -55,7 +55,7 @@ func NewFilteredIngressControllerInformer(client versioned.Interface, namespace return client.OperatorV1().IngressControllers(namespace).Watch(context.TODO(), options) }, }, - &operatorv1.IngressController{}, + &apioperatorv1.IngressController{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *ingressControllerInformer) defaultInformer(client versioned.Interface, } func (f *ingressControllerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.IngressController{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.IngressController{}, f.defaultInformer) } -func (f *ingressControllerInformer) Lister() v1.IngressControllerLister { - return v1.NewIngressControllerLister(f.Informer().GetIndexer()) +func (f *ingressControllerInformer) Lister() operatorv1.IngressControllerLister { + return operatorv1.NewIngressControllerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/insightsoperator.go b/operator/informers/externalversions/operator/v1/insightsoperator.go index 4228006653..1ea8c183ae 100644 --- a/operator/informers/externalversions/operator/v1/insightsoperator.go +++ b/operator/informers/externalversions/operator/v1/insightsoperator.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // InsightsOperators. type InsightsOperatorInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.InsightsOperatorLister + Lister() operatorv1.InsightsOperatorLister } type insightsOperatorInformer struct { @@ -54,7 +54,7 @@ func NewFilteredInsightsOperatorInformer(client versioned.Interface, resyncPerio return client.OperatorV1().InsightsOperators().Watch(context.TODO(), options) }, }, - &operatorv1.InsightsOperator{}, + &apioperatorv1.InsightsOperator{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *insightsOperatorInformer) defaultInformer(client versioned.Interface, r } func (f *insightsOperatorInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.InsightsOperator{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.InsightsOperator{}, f.defaultInformer) } -func (f *insightsOperatorInformer) Lister() v1.InsightsOperatorLister { - return v1.NewInsightsOperatorLister(f.Informer().GetIndexer()) +func (f *insightsOperatorInformer) Lister() operatorv1.InsightsOperatorLister { + return operatorv1.NewInsightsOperatorLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/kubeapiserver.go b/operator/informers/externalversions/operator/v1/kubeapiserver.go index 6aa0cd4ebf..21ffb7900f 100644 --- a/operator/informers/externalversions/operator/v1/kubeapiserver.go +++ b/operator/informers/externalversions/operator/v1/kubeapiserver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // KubeAPIServers. type KubeAPIServerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.KubeAPIServerLister + Lister() operatorv1.KubeAPIServerLister } type kubeAPIServerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredKubeAPIServerInformer(client versioned.Interface, resyncPeriod t return client.OperatorV1().KubeAPIServers().Watch(context.TODO(), options) }, }, - &operatorv1.KubeAPIServer{}, + &apioperatorv1.KubeAPIServer{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *kubeAPIServerInformer) defaultInformer(client versioned.Interface, resy } func (f *kubeAPIServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.KubeAPIServer{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.KubeAPIServer{}, f.defaultInformer) } -func (f *kubeAPIServerInformer) Lister() v1.KubeAPIServerLister { - return v1.NewKubeAPIServerLister(f.Informer().GetIndexer()) +func (f *kubeAPIServerInformer) Lister() operatorv1.KubeAPIServerLister { + return operatorv1.NewKubeAPIServerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/kubecontrollermanager.go b/operator/informers/externalversions/operator/v1/kubecontrollermanager.go index 277ea92fcc..3554d60f5c 100644 --- a/operator/informers/externalversions/operator/v1/kubecontrollermanager.go +++ b/operator/informers/externalversions/operator/v1/kubecontrollermanager.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // KubeControllerManagers. type KubeControllerManagerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.KubeControllerManagerLister + Lister() operatorv1.KubeControllerManagerLister } type kubeControllerManagerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredKubeControllerManagerInformer(client versioned.Interface, resync return client.OperatorV1().KubeControllerManagers().Watch(context.TODO(), options) }, }, - &operatorv1.KubeControllerManager{}, + &apioperatorv1.KubeControllerManager{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *kubeControllerManagerInformer) defaultInformer(client versioned.Interfa } func (f *kubeControllerManagerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.KubeControllerManager{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.KubeControllerManager{}, f.defaultInformer) } -func (f *kubeControllerManagerInformer) Lister() v1.KubeControllerManagerLister { - return v1.NewKubeControllerManagerLister(f.Informer().GetIndexer()) +func (f *kubeControllerManagerInformer) Lister() operatorv1.KubeControllerManagerLister { + return operatorv1.NewKubeControllerManagerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/kubescheduler.go b/operator/informers/externalversions/operator/v1/kubescheduler.go index 91d55bd535..cf1dac5a79 100644 --- a/operator/informers/externalversions/operator/v1/kubescheduler.go +++ b/operator/informers/externalversions/operator/v1/kubescheduler.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // KubeSchedulers. type KubeSchedulerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.KubeSchedulerLister + Lister() operatorv1.KubeSchedulerLister } type kubeSchedulerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredKubeSchedulerInformer(client versioned.Interface, resyncPeriod t return client.OperatorV1().KubeSchedulers().Watch(context.TODO(), options) }, }, - &operatorv1.KubeScheduler{}, + &apioperatorv1.KubeScheduler{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *kubeSchedulerInformer) defaultInformer(client versioned.Interface, resy } func (f *kubeSchedulerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.KubeScheduler{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.KubeScheduler{}, f.defaultInformer) } -func (f *kubeSchedulerInformer) Lister() v1.KubeSchedulerLister { - return v1.NewKubeSchedulerLister(f.Informer().GetIndexer()) +func (f *kubeSchedulerInformer) Lister() operatorv1.KubeSchedulerLister { + return operatorv1.NewKubeSchedulerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/kubestorageversionmigrator.go b/operator/informers/externalversions/operator/v1/kubestorageversionmigrator.go index 0be7bce905..0693a366b0 100644 --- a/operator/informers/externalversions/operator/v1/kubestorageversionmigrator.go +++ b/operator/informers/externalversions/operator/v1/kubestorageversionmigrator.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // KubeStorageVersionMigrators. type KubeStorageVersionMigratorInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.KubeStorageVersionMigratorLister + Lister() operatorv1.KubeStorageVersionMigratorLister } type kubeStorageVersionMigratorInformer struct { @@ -54,7 +54,7 @@ func NewFilteredKubeStorageVersionMigratorInformer(client versioned.Interface, r return client.OperatorV1().KubeStorageVersionMigrators().Watch(context.TODO(), options) }, }, - &operatorv1.KubeStorageVersionMigrator{}, + &apioperatorv1.KubeStorageVersionMigrator{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *kubeStorageVersionMigratorInformer) defaultInformer(client versioned.In } func (f *kubeStorageVersionMigratorInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.KubeStorageVersionMigrator{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.KubeStorageVersionMigrator{}, f.defaultInformer) } -func (f *kubeStorageVersionMigratorInformer) Lister() v1.KubeStorageVersionMigratorLister { - return v1.NewKubeStorageVersionMigratorLister(f.Informer().GetIndexer()) +func (f *kubeStorageVersionMigratorInformer) Lister() operatorv1.KubeStorageVersionMigratorLister { + return operatorv1.NewKubeStorageVersionMigratorLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/machineconfiguration.go b/operator/informers/externalversions/operator/v1/machineconfiguration.go index e16f6ff104..07180912b5 100644 --- a/operator/informers/externalversions/operator/v1/machineconfiguration.go +++ b/operator/informers/externalversions/operator/v1/machineconfiguration.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // MachineConfigurations. type MachineConfigurationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.MachineConfigurationLister + Lister() operatorv1.MachineConfigurationLister } type machineConfigurationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredMachineConfigurationInformer(client versioned.Interface, resyncP return client.OperatorV1().MachineConfigurations().Watch(context.TODO(), options) }, }, - &operatorv1.MachineConfiguration{}, + &apioperatorv1.MachineConfiguration{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *machineConfigurationInformer) defaultInformer(client versioned.Interfac } func (f *machineConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.MachineConfiguration{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.MachineConfiguration{}, f.defaultInformer) } -func (f *machineConfigurationInformer) Lister() v1.MachineConfigurationLister { - return v1.NewMachineConfigurationLister(f.Informer().GetIndexer()) +func (f *machineConfigurationInformer) Lister() operatorv1.MachineConfigurationLister { + return operatorv1.NewMachineConfigurationLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/network.go b/operator/informers/externalversions/operator/v1/network.go index 7f9e7b59b5..8b2342c7de 100644 --- a/operator/informers/externalversions/operator/v1/network.go +++ b/operator/informers/externalversions/operator/v1/network.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Networks. type NetworkInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NetworkLister + Lister() operatorv1.NetworkLister } type networkInformer struct { @@ -54,7 +54,7 @@ func NewFilteredNetworkInformer(client versioned.Interface, resyncPeriod time.Du return client.OperatorV1().Networks().Watch(context.TODO(), options) }, }, - &operatorv1.Network{}, + &apioperatorv1.Network{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *networkInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *networkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.Network{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.Network{}, f.defaultInformer) } -func (f *networkInformer) Lister() v1.NetworkLister { - return v1.NewNetworkLister(f.Informer().GetIndexer()) +func (f *networkInformer) Lister() operatorv1.NetworkLister { + return operatorv1.NewNetworkLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/olm.go b/operator/informers/externalversions/operator/v1/olm.go index eafc07f47b..dbfeca0714 100644 --- a/operator/informers/externalversions/operator/v1/olm.go +++ b/operator/informers/externalversions/operator/v1/olm.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OLMs. type OLMInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OLMLister + Lister() operatorv1.OLMLister } type oLMInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOLMInformer(client versioned.Interface, resyncPeriod time.Durati return client.OperatorV1().OLMs().Watch(context.TODO(), options) }, }, - &operatorv1.OLM{}, + &apioperatorv1.OLM{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oLMInformer) defaultInformer(client versioned.Interface, resyncPeriod t } func (f *oLMInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.OLM{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.OLM{}, f.defaultInformer) } -func (f *oLMInformer) Lister() v1.OLMLister { - return v1.NewOLMLister(f.Informer().GetIndexer()) +func (f *oLMInformer) Lister() operatorv1.OLMLister { + return operatorv1.NewOLMLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/openshiftapiserver.go b/operator/informers/externalversions/operator/v1/openshiftapiserver.go index ee75de02c1..56d0e087ee 100644 --- a/operator/informers/externalversions/operator/v1/openshiftapiserver.go +++ b/operator/informers/externalversions/operator/v1/openshiftapiserver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OpenShiftAPIServers. type OpenShiftAPIServerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OpenShiftAPIServerLister + Lister() operatorv1.OpenShiftAPIServerLister } type openShiftAPIServerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOpenShiftAPIServerInformer(client versioned.Interface, resyncPer return client.OperatorV1().OpenShiftAPIServers().Watch(context.TODO(), options) }, }, - &operatorv1.OpenShiftAPIServer{}, + &apioperatorv1.OpenShiftAPIServer{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *openShiftAPIServerInformer) defaultInformer(client versioned.Interface, } func (f *openShiftAPIServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.OpenShiftAPIServer{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.OpenShiftAPIServer{}, f.defaultInformer) } -func (f *openShiftAPIServerInformer) Lister() v1.OpenShiftAPIServerLister { - return v1.NewOpenShiftAPIServerLister(f.Informer().GetIndexer()) +func (f *openShiftAPIServerInformer) Lister() operatorv1.OpenShiftAPIServerLister { + return operatorv1.NewOpenShiftAPIServerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/openshiftcontrollermanager.go b/operator/informers/externalversions/operator/v1/openshiftcontrollermanager.go index bea5c96bb8..27a3231691 100644 --- a/operator/informers/externalversions/operator/v1/openshiftcontrollermanager.go +++ b/operator/informers/externalversions/operator/v1/openshiftcontrollermanager.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OpenShiftControllerManagers. type OpenShiftControllerManagerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.OpenShiftControllerManagerLister + Lister() operatorv1.OpenShiftControllerManagerLister } type openShiftControllerManagerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOpenShiftControllerManagerInformer(client versioned.Interface, r return client.OperatorV1().OpenShiftControllerManagers().Watch(context.TODO(), options) }, }, - &operatorv1.OpenShiftControllerManager{}, + &apioperatorv1.OpenShiftControllerManager{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *openShiftControllerManagerInformer) defaultInformer(client versioned.In } func (f *openShiftControllerManagerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.OpenShiftControllerManager{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.OpenShiftControllerManager{}, f.defaultInformer) } -func (f *openShiftControllerManagerInformer) Lister() v1.OpenShiftControllerManagerLister { - return v1.NewOpenShiftControllerManagerLister(f.Informer().GetIndexer()) +func (f *openShiftControllerManagerInformer) Lister() operatorv1.OpenShiftControllerManagerLister { + return operatorv1.NewOpenShiftControllerManagerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/serviceca.go b/operator/informers/externalversions/operator/v1/serviceca.go index c75dd0a6fe..5676dc15ca 100644 --- a/operator/informers/externalversions/operator/v1/serviceca.go +++ b/operator/informers/externalversions/operator/v1/serviceca.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ServiceCAs. type ServiceCAInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ServiceCALister + Lister() operatorv1.ServiceCALister } type serviceCAInformer struct { @@ -54,7 +54,7 @@ func NewFilteredServiceCAInformer(client versioned.Interface, resyncPeriod time. return client.OperatorV1().ServiceCAs().Watch(context.TODO(), options) }, }, - &operatorv1.ServiceCA{}, + &apioperatorv1.ServiceCA{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *serviceCAInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *serviceCAInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.ServiceCA{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.ServiceCA{}, f.defaultInformer) } -func (f *serviceCAInformer) Lister() v1.ServiceCALister { - return v1.NewServiceCALister(f.Informer().GetIndexer()) +func (f *serviceCAInformer) Lister() operatorv1.ServiceCALister { + return operatorv1.NewServiceCALister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/servicecatalogapiserver.go b/operator/informers/externalversions/operator/v1/servicecatalogapiserver.go index af18520532..8a13dfbb96 100644 --- a/operator/informers/externalversions/operator/v1/servicecatalogapiserver.go +++ b/operator/informers/externalversions/operator/v1/servicecatalogapiserver.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ServiceCatalogAPIServers. type ServiceCatalogAPIServerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ServiceCatalogAPIServerLister + Lister() operatorv1.ServiceCatalogAPIServerLister } type serviceCatalogAPIServerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredServiceCatalogAPIServerInformer(client versioned.Interface, resy return client.OperatorV1().ServiceCatalogAPIServers().Watch(context.TODO(), options) }, }, - &operatorv1.ServiceCatalogAPIServer{}, + &apioperatorv1.ServiceCatalogAPIServer{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *serviceCatalogAPIServerInformer) defaultInformer(client versioned.Inter } func (f *serviceCatalogAPIServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.ServiceCatalogAPIServer{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.ServiceCatalogAPIServer{}, f.defaultInformer) } -func (f *serviceCatalogAPIServerInformer) Lister() v1.ServiceCatalogAPIServerLister { - return v1.NewServiceCatalogAPIServerLister(f.Informer().GetIndexer()) +func (f *serviceCatalogAPIServerInformer) Lister() operatorv1.ServiceCatalogAPIServerLister { + return operatorv1.NewServiceCatalogAPIServerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/servicecatalogcontrollermanager.go b/operator/informers/externalversions/operator/v1/servicecatalogcontrollermanager.go index 6f629dc4a7..e527150c32 100644 --- a/operator/informers/externalversions/operator/v1/servicecatalogcontrollermanager.go +++ b/operator/informers/externalversions/operator/v1/servicecatalogcontrollermanager.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ServiceCatalogControllerManagers. type ServiceCatalogControllerManagerInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ServiceCatalogControllerManagerLister + Lister() operatorv1.ServiceCatalogControllerManagerLister } type serviceCatalogControllerManagerInformer struct { @@ -54,7 +54,7 @@ func NewFilteredServiceCatalogControllerManagerInformer(client versioned.Interfa return client.OperatorV1().ServiceCatalogControllerManagers().Watch(context.TODO(), options) }, }, - &operatorv1.ServiceCatalogControllerManager{}, + &apioperatorv1.ServiceCatalogControllerManager{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *serviceCatalogControllerManagerInformer) defaultInformer(client version } func (f *serviceCatalogControllerManagerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.ServiceCatalogControllerManager{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.ServiceCatalogControllerManager{}, f.defaultInformer) } -func (f *serviceCatalogControllerManagerInformer) Lister() v1.ServiceCatalogControllerManagerLister { - return v1.NewServiceCatalogControllerManagerLister(f.Informer().GetIndexer()) +func (f *serviceCatalogControllerManagerInformer) Lister() operatorv1.ServiceCatalogControllerManagerLister { + return operatorv1.NewServiceCatalogControllerManagerLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1/storage.go b/operator/informers/externalversions/operator/v1/storage.go index 982ed18284..4f6c6b3313 100644 --- a/operator/informers/externalversions/operator/v1/storage.go +++ b/operator/informers/externalversions/operator/v1/storage.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - operatorv1 "github.com/openshift/api/operator/v1" + apioperatorv1 "github.com/openshift/api/operator/v1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/operator/listers/operator/v1" + operatorv1 "github.com/openshift/client-go/operator/listers/operator/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Storages. type StorageInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.StorageLister + Lister() operatorv1.StorageLister } type storageInformer struct { @@ -54,7 +54,7 @@ func NewFilteredStorageInformer(client versioned.Interface, resyncPeriod time.Du return client.OperatorV1().Storages().Watch(context.TODO(), options) }, }, - &operatorv1.Storage{}, + &apioperatorv1.Storage{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *storageInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *storageInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1.Storage{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1.Storage{}, f.defaultInformer) } -func (f *storageInformer) Lister() v1.StorageLister { - return v1.NewStorageLister(f.Informer().GetIndexer()) +func (f *storageInformer) Lister() operatorv1.StorageLister { + return operatorv1.NewStorageLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1alpha1/etcdbackup.go b/operator/informers/externalversions/operator/v1alpha1/etcdbackup.go index 7a18144004..2558b9b24e 100644 --- a/operator/informers/externalversions/operator/v1alpha1/etcdbackup.go +++ b/operator/informers/externalversions/operator/v1alpha1/etcdbackup.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + apioperatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" + operatorv1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // EtcdBackups. type EtcdBackupInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.EtcdBackupLister + Lister() operatorv1alpha1.EtcdBackupLister } type etcdBackupInformer struct { @@ -54,7 +54,7 @@ func NewFilteredEtcdBackupInformer(client versioned.Interface, resyncPeriod time return client.OperatorV1alpha1().EtcdBackups().Watch(context.TODO(), options) }, }, - &operatorv1alpha1.EtcdBackup{}, + &apioperatorv1alpha1.EtcdBackup{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *etcdBackupInformer) defaultInformer(client versioned.Interface, resyncP } func (f *etcdBackupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1alpha1.EtcdBackup{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1alpha1.EtcdBackup{}, f.defaultInformer) } -func (f *etcdBackupInformer) Lister() v1alpha1.EtcdBackupLister { - return v1alpha1.NewEtcdBackupLister(f.Informer().GetIndexer()) +func (f *etcdBackupInformer) Lister() operatorv1alpha1.EtcdBackupLister { + return operatorv1alpha1.NewEtcdBackupLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go index be4c20715f..b5d4fcf067 100644 --- a/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go +++ b/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + apioperatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" + operatorv1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ImageContentSourcePolicies. type ImageContentSourcePolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.ImageContentSourcePolicyLister + Lister() operatorv1alpha1.ImageContentSourcePolicyLister } type imageContentSourcePolicyInformer struct { @@ -54,7 +54,7 @@ func NewFilteredImageContentSourcePolicyInformer(client versioned.Interface, res return client.OperatorV1alpha1().ImageContentSourcePolicies().Watch(context.TODO(), options) }, }, - &operatorv1alpha1.ImageContentSourcePolicy{}, + &apioperatorv1alpha1.ImageContentSourcePolicy{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *imageContentSourcePolicyInformer) defaultInformer(client versioned.Inte } func (f *imageContentSourcePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1alpha1.ImageContentSourcePolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1alpha1.ImageContentSourcePolicy{}, f.defaultInformer) } -func (f *imageContentSourcePolicyInformer) Lister() v1alpha1.ImageContentSourcePolicyLister { - return v1alpha1.NewImageContentSourcePolicyLister(f.Informer().GetIndexer()) +func (f *imageContentSourcePolicyInformer) Lister() operatorv1alpha1.ImageContentSourcePolicyLister { + return operatorv1alpha1.NewImageContentSourcePolicyLister(f.Informer().GetIndexer()) } diff --git a/operator/informers/externalversions/operator/v1alpha1/olm.go b/operator/informers/externalversions/operator/v1alpha1/olm.go index cd904a9484..1bce2de82c 100644 --- a/operator/informers/externalversions/operator/v1alpha1/olm.go +++ b/operator/informers/externalversions/operator/v1alpha1/olm.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + apioperatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" versioned "github.com/openshift/client-go/operator/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" + operatorv1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // OLMs. type OLMInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.OLMLister + Lister() operatorv1alpha1.OLMLister } type oLMInformer struct { @@ -54,7 +54,7 @@ func NewFilteredOLMInformer(client versioned.Interface, resyncPeriod time.Durati return client.OperatorV1alpha1().OLMs().Watch(context.TODO(), options) }, }, - &operatorv1alpha1.OLM{}, + &apioperatorv1alpha1.OLM{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *oLMInformer) defaultInformer(client versioned.Interface, resyncPeriod t } func (f *oLMInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorv1alpha1.OLM{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorv1alpha1.OLM{}, f.defaultInformer) } -func (f *oLMInformer) Lister() v1alpha1.OLMLister { - return v1alpha1.NewOLMLister(f.Informer().GetIndexer()) +func (f *oLMInformer) Lister() operatorv1alpha1.OLMLister { + return operatorv1alpha1.NewOLMLister(f.Informer().GetIndexer()) } diff --git a/operator/listers/operator/v1/authentication.go b/operator/listers/operator/v1/authentication.go index 2009c59a46..1b77a086e8 100644 --- a/operator/listers/operator/v1/authentication.go +++ b/operator/listers/operator/v1/authentication.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // AuthenticationLister helps list Authentications. @@ -14,19 +14,19 @@ import ( type AuthenticationLister interface { // List lists all Authentications in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Authentication, err error) + List(selector labels.Selector) (ret []*operatorv1.Authentication, err error) // Get retrieves the Authentication from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Authentication, error) + Get(name string) (*operatorv1.Authentication, error) AuthenticationListerExpansion } // authenticationLister implements the AuthenticationLister interface. type authenticationLister struct { - listers.ResourceIndexer[*v1.Authentication] + listers.ResourceIndexer[*operatorv1.Authentication] } // NewAuthenticationLister returns a new AuthenticationLister. func NewAuthenticationLister(indexer cache.Indexer) AuthenticationLister { - return &authenticationLister{listers.New[*v1.Authentication](indexer, v1.Resource("authentication"))} + return &authenticationLister{listers.New[*operatorv1.Authentication](indexer, operatorv1.Resource("authentication"))} } diff --git a/operator/listers/operator/v1/cloudcredential.go b/operator/listers/operator/v1/cloudcredential.go index 00e7602575..b968bbee4d 100644 --- a/operator/listers/operator/v1/cloudcredential.go +++ b/operator/listers/operator/v1/cloudcredential.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CloudCredentialLister helps list CloudCredentials. @@ -14,19 +14,19 @@ import ( type CloudCredentialLister interface { // List lists all CloudCredentials in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.CloudCredential, err error) + List(selector labels.Selector) (ret []*operatorv1.CloudCredential, err error) // Get retrieves the CloudCredential from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.CloudCredential, error) + Get(name string) (*operatorv1.CloudCredential, error) CloudCredentialListerExpansion } // cloudCredentialLister implements the CloudCredentialLister interface. type cloudCredentialLister struct { - listers.ResourceIndexer[*v1.CloudCredential] + listers.ResourceIndexer[*operatorv1.CloudCredential] } // NewCloudCredentialLister returns a new CloudCredentialLister. func NewCloudCredentialLister(indexer cache.Indexer) CloudCredentialLister { - return &cloudCredentialLister{listers.New[*v1.CloudCredential](indexer, v1.Resource("cloudcredential"))} + return &cloudCredentialLister{listers.New[*operatorv1.CloudCredential](indexer, operatorv1.Resource("cloudcredential"))} } diff --git a/operator/listers/operator/v1/clustercsidriver.go b/operator/listers/operator/v1/clustercsidriver.go index 01505eeb56..d28e7f1e95 100644 --- a/operator/listers/operator/v1/clustercsidriver.go +++ b/operator/listers/operator/v1/clustercsidriver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterCSIDriverLister helps list ClusterCSIDrivers. @@ -14,19 +14,19 @@ import ( type ClusterCSIDriverLister interface { // List lists all ClusterCSIDrivers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterCSIDriver, err error) + List(selector labels.Selector) (ret []*operatorv1.ClusterCSIDriver, err error) // Get retrieves the ClusterCSIDriver from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterCSIDriver, error) + Get(name string) (*operatorv1.ClusterCSIDriver, error) ClusterCSIDriverListerExpansion } // clusterCSIDriverLister implements the ClusterCSIDriverLister interface. type clusterCSIDriverLister struct { - listers.ResourceIndexer[*v1.ClusterCSIDriver] + listers.ResourceIndexer[*operatorv1.ClusterCSIDriver] } // NewClusterCSIDriverLister returns a new ClusterCSIDriverLister. func NewClusterCSIDriverLister(indexer cache.Indexer) ClusterCSIDriverLister { - return &clusterCSIDriverLister{listers.New[*v1.ClusterCSIDriver](indexer, v1.Resource("clustercsidriver"))} + return &clusterCSIDriverLister{listers.New[*operatorv1.ClusterCSIDriver](indexer, operatorv1.Resource("clustercsidriver"))} } diff --git a/operator/listers/operator/v1/config.go b/operator/listers/operator/v1/config.go index 8610d0a07f..916abbb4e6 100644 --- a/operator/listers/operator/v1/config.go +++ b/operator/listers/operator/v1/config.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConfigLister helps list Configs. @@ -14,19 +14,19 @@ import ( type ConfigLister interface { // List lists all Configs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Config, err error) + List(selector labels.Selector) (ret []*operatorv1.Config, err error) // Get retrieves the Config from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Config, error) + Get(name string) (*operatorv1.Config, error) ConfigListerExpansion } // configLister implements the ConfigLister interface. type configLister struct { - listers.ResourceIndexer[*v1.Config] + listers.ResourceIndexer[*operatorv1.Config] } // NewConfigLister returns a new ConfigLister. func NewConfigLister(indexer cache.Indexer) ConfigLister { - return &configLister{listers.New[*v1.Config](indexer, v1.Resource("config"))} + return &configLister{listers.New[*operatorv1.Config](indexer, operatorv1.Resource("config"))} } diff --git a/operator/listers/operator/v1/console.go b/operator/listers/operator/v1/console.go index a102eb5dfc..45b9e36721 100644 --- a/operator/listers/operator/v1/console.go +++ b/operator/listers/operator/v1/console.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConsoleLister helps list Consoles. @@ -14,19 +14,19 @@ import ( type ConsoleLister interface { // List lists all Consoles in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Console, err error) + List(selector labels.Selector) (ret []*operatorv1.Console, err error) // Get retrieves the Console from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Console, error) + Get(name string) (*operatorv1.Console, error) ConsoleListerExpansion } // consoleLister implements the ConsoleLister interface. type consoleLister struct { - listers.ResourceIndexer[*v1.Console] + listers.ResourceIndexer[*operatorv1.Console] } // NewConsoleLister returns a new ConsoleLister. func NewConsoleLister(indexer cache.Indexer) ConsoleLister { - return &consoleLister{listers.New[*v1.Console](indexer, v1.Resource("console"))} + return &consoleLister{listers.New[*operatorv1.Console](indexer, operatorv1.Resource("console"))} } diff --git a/operator/listers/operator/v1/csisnapshotcontroller.go b/operator/listers/operator/v1/csisnapshotcontroller.go index 44a9d30c41..a73ca72e59 100644 --- a/operator/listers/operator/v1/csisnapshotcontroller.go +++ b/operator/listers/operator/v1/csisnapshotcontroller.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CSISnapshotControllerLister helps list CSISnapshotControllers. @@ -14,19 +14,19 @@ import ( type CSISnapshotControllerLister interface { // List lists all CSISnapshotControllers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.CSISnapshotController, err error) + List(selector labels.Selector) (ret []*operatorv1.CSISnapshotController, err error) // Get retrieves the CSISnapshotController from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.CSISnapshotController, error) + Get(name string) (*operatorv1.CSISnapshotController, error) CSISnapshotControllerListerExpansion } // cSISnapshotControllerLister implements the CSISnapshotControllerLister interface. type cSISnapshotControllerLister struct { - listers.ResourceIndexer[*v1.CSISnapshotController] + listers.ResourceIndexer[*operatorv1.CSISnapshotController] } // NewCSISnapshotControllerLister returns a new CSISnapshotControllerLister. func NewCSISnapshotControllerLister(indexer cache.Indexer) CSISnapshotControllerLister { - return &cSISnapshotControllerLister{listers.New[*v1.CSISnapshotController](indexer, v1.Resource("csisnapshotcontroller"))} + return &cSISnapshotControllerLister{listers.New[*operatorv1.CSISnapshotController](indexer, operatorv1.Resource("csisnapshotcontroller"))} } diff --git a/operator/listers/operator/v1/dns.go b/operator/listers/operator/v1/dns.go index 5e4d5e0cac..4ecdd8bb03 100644 --- a/operator/listers/operator/v1/dns.go +++ b/operator/listers/operator/v1/dns.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // DNSLister helps list DNSes. @@ -14,19 +14,19 @@ import ( type DNSLister interface { // List lists all DNSes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.DNS, err error) + List(selector labels.Selector) (ret []*operatorv1.DNS, err error) // Get retrieves the DNS from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.DNS, error) + Get(name string) (*operatorv1.DNS, error) DNSListerExpansion } // dNSLister implements the DNSLister interface. type dNSLister struct { - listers.ResourceIndexer[*v1.DNS] + listers.ResourceIndexer[*operatorv1.DNS] } // NewDNSLister returns a new DNSLister. func NewDNSLister(indexer cache.Indexer) DNSLister { - return &dNSLister{listers.New[*v1.DNS](indexer, v1.Resource("dns"))} + return &dNSLister{listers.New[*operatorv1.DNS](indexer, operatorv1.Resource("dns"))} } diff --git a/operator/listers/operator/v1/etcd.go b/operator/listers/operator/v1/etcd.go index 817f120dbd..0708fcf852 100644 --- a/operator/listers/operator/v1/etcd.go +++ b/operator/listers/operator/v1/etcd.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // EtcdLister helps list Etcds. @@ -14,19 +14,19 @@ import ( type EtcdLister interface { // List lists all Etcds in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Etcd, err error) + List(selector labels.Selector) (ret []*operatorv1.Etcd, err error) // Get retrieves the Etcd from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Etcd, error) + Get(name string) (*operatorv1.Etcd, error) EtcdListerExpansion } // etcdLister implements the EtcdLister interface. type etcdLister struct { - listers.ResourceIndexer[*v1.Etcd] + listers.ResourceIndexer[*operatorv1.Etcd] } // NewEtcdLister returns a new EtcdLister. func NewEtcdLister(indexer cache.Indexer) EtcdLister { - return &etcdLister{listers.New[*v1.Etcd](indexer, v1.Resource("etcd"))} + return &etcdLister{listers.New[*operatorv1.Etcd](indexer, operatorv1.Resource("etcd"))} } diff --git a/operator/listers/operator/v1/ingresscontroller.go b/operator/listers/operator/v1/ingresscontroller.go index 76fde745d7..322952fd7b 100644 --- a/operator/listers/operator/v1/ingresscontroller.go +++ b/operator/listers/operator/v1/ingresscontroller.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // IngressControllerLister helps list IngressControllers. @@ -14,7 +14,7 @@ import ( type IngressControllerLister interface { // List lists all IngressControllers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.IngressController, err error) + List(selector labels.Selector) (ret []*operatorv1.IngressController, err error) // IngressControllers returns an object that can list and get IngressControllers. IngressControllers(namespace string) IngressControllerNamespaceLister IngressControllerListerExpansion @@ -22,17 +22,17 @@ type IngressControllerLister interface { // ingressControllerLister implements the IngressControllerLister interface. type ingressControllerLister struct { - listers.ResourceIndexer[*v1.IngressController] + listers.ResourceIndexer[*operatorv1.IngressController] } // NewIngressControllerLister returns a new IngressControllerLister. func NewIngressControllerLister(indexer cache.Indexer) IngressControllerLister { - return &ingressControllerLister{listers.New[*v1.IngressController](indexer, v1.Resource("ingresscontroller"))} + return &ingressControllerLister{listers.New[*operatorv1.IngressController](indexer, operatorv1.Resource("ingresscontroller"))} } // IngressControllers returns an object that can list and get IngressControllers. func (s *ingressControllerLister) IngressControllers(namespace string) IngressControllerNamespaceLister { - return ingressControllerNamespaceLister{listers.NewNamespaced[*v1.IngressController](s.ResourceIndexer, namespace)} + return ingressControllerNamespaceLister{listers.NewNamespaced[*operatorv1.IngressController](s.ResourceIndexer, namespace)} } // IngressControllerNamespaceLister helps list and get IngressControllers. @@ -40,15 +40,15 @@ func (s *ingressControllerLister) IngressControllers(namespace string) IngressCo type IngressControllerNamespaceLister interface { // List lists all IngressControllers in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.IngressController, err error) + List(selector labels.Selector) (ret []*operatorv1.IngressController, err error) // Get retrieves the IngressController from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.IngressController, error) + Get(name string) (*operatorv1.IngressController, error) IngressControllerNamespaceListerExpansion } // ingressControllerNamespaceLister implements the IngressControllerNamespaceLister // interface. type ingressControllerNamespaceLister struct { - listers.ResourceIndexer[*v1.IngressController] + listers.ResourceIndexer[*operatorv1.IngressController] } diff --git a/operator/listers/operator/v1/insightsoperator.go b/operator/listers/operator/v1/insightsoperator.go index 159429c0a9..0a79b9aa05 100644 --- a/operator/listers/operator/v1/insightsoperator.go +++ b/operator/listers/operator/v1/insightsoperator.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // InsightsOperatorLister helps list InsightsOperators. @@ -14,19 +14,19 @@ import ( type InsightsOperatorLister interface { // List lists all InsightsOperators in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.InsightsOperator, err error) + List(selector labels.Selector) (ret []*operatorv1.InsightsOperator, err error) // Get retrieves the InsightsOperator from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.InsightsOperator, error) + Get(name string) (*operatorv1.InsightsOperator, error) InsightsOperatorListerExpansion } // insightsOperatorLister implements the InsightsOperatorLister interface. type insightsOperatorLister struct { - listers.ResourceIndexer[*v1.InsightsOperator] + listers.ResourceIndexer[*operatorv1.InsightsOperator] } // NewInsightsOperatorLister returns a new InsightsOperatorLister. func NewInsightsOperatorLister(indexer cache.Indexer) InsightsOperatorLister { - return &insightsOperatorLister{listers.New[*v1.InsightsOperator](indexer, v1.Resource("insightsoperator"))} + return &insightsOperatorLister{listers.New[*operatorv1.InsightsOperator](indexer, operatorv1.Resource("insightsoperator"))} } diff --git a/operator/listers/operator/v1/kubeapiserver.go b/operator/listers/operator/v1/kubeapiserver.go index 4e03cf9bb3..99744ebc3d 100644 --- a/operator/listers/operator/v1/kubeapiserver.go +++ b/operator/listers/operator/v1/kubeapiserver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // KubeAPIServerLister helps list KubeAPIServers. @@ -14,19 +14,19 @@ import ( type KubeAPIServerLister interface { // List lists all KubeAPIServers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.KubeAPIServer, err error) + List(selector labels.Selector) (ret []*operatorv1.KubeAPIServer, err error) // Get retrieves the KubeAPIServer from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.KubeAPIServer, error) + Get(name string) (*operatorv1.KubeAPIServer, error) KubeAPIServerListerExpansion } // kubeAPIServerLister implements the KubeAPIServerLister interface. type kubeAPIServerLister struct { - listers.ResourceIndexer[*v1.KubeAPIServer] + listers.ResourceIndexer[*operatorv1.KubeAPIServer] } // NewKubeAPIServerLister returns a new KubeAPIServerLister. func NewKubeAPIServerLister(indexer cache.Indexer) KubeAPIServerLister { - return &kubeAPIServerLister{listers.New[*v1.KubeAPIServer](indexer, v1.Resource("kubeapiserver"))} + return &kubeAPIServerLister{listers.New[*operatorv1.KubeAPIServer](indexer, operatorv1.Resource("kubeapiserver"))} } diff --git a/operator/listers/operator/v1/kubecontrollermanager.go b/operator/listers/operator/v1/kubecontrollermanager.go index 18e082cec0..dbca5fea81 100644 --- a/operator/listers/operator/v1/kubecontrollermanager.go +++ b/operator/listers/operator/v1/kubecontrollermanager.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // KubeControllerManagerLister helps list KubeControllerManagers. @@ -14,19 +14,19 @@ import ( type KubeControllerManagerLister interface { // List lists all KubeControllerManagers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.KubeControllerManager, err error) + List(selector labels.Selector) (ret []*operatorv1.KubeControllerManager, err error) // Get retrieves the KubeControllerManager from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.KubeControllerManager, error) + Get(name string) (*operatorv1.KubeControllerManager, error) KubeControllerManagerListerExpansion } // kubeControllerManagerLister implements the KubeControllerManagerLister interface. type kubeControllerManagerLister struct { - listers.ResourceIndexer[*v1.KubeControllerManager] + listers.ResourceIndexer[*operatorv1.KubeControllerManager] } // NewKubeControllerManagerLister returns a new KubeControllerManagerLister. func NewKubeControllerManagerLister(indexer cache.Indexer) KubeControllerManagerLister { - return &kubeControllerManagerLister{listers.New[*v1.KubeControllerManager](indexer, v1.Resource("kubecontrollermanager"))} + return &kubeControllerManagerLister{listers.New[*operatorv1.KubeControllerManager](indexer, operatorv1.Resource("kubecontrollermanager"))} } diff --git a/operator/listers/operator/v1/kubescheduler.go b/operator/listers/operator/v1/kubescheduler.go index 73e44219a1..2c9ca49f63 100644 --- a/operator/listers/operator/v1/kubescheduler.go +++ b/operator/listers/operator/v1/kubescheduler.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // KubeSchedulerLister helps list KubeSchedulers. @@ -14,19 +14,19 @@ import ( type KubeSchedulerLister interface { // List lists all KubeSchedulers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.KubeScheduler, err error) + List(selector labels.Selector) (ret []*operatorv1.KubeScheduler, err error) // Get retrieves the KubeScheduler from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.KubeScheduler, error) + Get(name string) (*operatorv1.KubeScheduler, error) KubeSchedulerListerExpansion } // kubeSchedulerLister implements the KubeSchedulerLister interface. type kubeSchedulerLister struct { - listers.ResourceIndexer[*v1.KubeScheduler] + listers.ResourceIndexer[*operatorv1.KubeScheduler] } // NewKubeSchedulerLister returns a new KubeSchedulerLister. func NewKubeSchedulerLister(indexer cache.Indexer) KubeSchedulerLister { - return &kubeSchedulerLister{listers.New[*v1.KubeScheduler](indexer, v1.Resource("kubescheduler"))} + return &kubeSchedulerLister{listers.New[*operatorv1.KubeScheduler](indexer, operatorv1.Resource("kubescheduler"))} } diff --git a/operator/listers/operator/v1/kubestorageversionmigrator.go b/operator/listers/operator/v1/kubestorageversionmigrator.go index c6e3f9b035..0f00042e73 100644 --- a/operator/listers/operator/v1/kubestorageversionmigrator.go +++ b/operator/listers/operator/v1/kubestorageversionmigrator.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // KubeStorageVersionMigratorLister helps list KubeStorageVersionMigrators. @@ -14,19 +14,19 @@ import ( type KubeStorageVersionMigratorLister interface { // List lists all KubeStorageVersionMigrators in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.KubeStorageVersionMigrator, err error) + List(selector labels.Selector) (ret []*operatorv1.KubeStorageVersionMigrator, err error) // Get retrieves the KubeStorageVersionMigrator from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.KubeStorageVersionMigrator, error) + Get(name string) (*operatorv1.KubeStorageVersionMigrator, error) KubeStorageVersionMigratorListerExpansion } // kubeStorageVersionMigratorLister implements the KubeStorageVersionMigratorLister interface. type kubeStorageVersionMigratorLister struct { - listers.ResourceIndexer[*v1.KubeStorageVersionMigrator] + listers.ResourceIndexer[*operatorv1.KubeStorageVersionMigrator] } // NewKubeStorageVersionMigratorLister returns a new KubeStorageVersionMigratorLister. func NewKubeStorageVersionMigratorLister(indexer cache.Indexer) KubeStorageVersionMigratorLister { - return &kubeStorageVersionMigratorLister{listers.New[*v1.KubeStorageVersionMigrator](indexer, v1.Resource("kubestorageversionmigrator"))} + return &kubeStorageVersionMigratorLister{listers.New[*operatorv1.KubeStorageVersionMigrator](indexer, operatorv1.Resource("kubestorageversionmigrator"))} } diff --git a/operator/listers/operator/v1/machineconfiguration.go b/operator/listers/operator/v1/machineconfiguration.go index 6444b4d9a0..c9ef3def51 100644 --- a/operator/listers/operator/v1/machineconfiguration.go +++ b/operator/listers/operator/v1/machineconfiguration.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // MachineConfigurationLister helps list MachineConfigurations. @@ -14,19 +14,19 @@ import ( type MachineConfigurationLister interface { // List lists all MachineConfigurations in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.MachineConfiguration, err error) + List(selector labels.Selector) (ret []*operatorv1.MachineConfiguration, err error) // Get retrieves the MachineConfiguration from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.MachineConfiguration, error) + Get(name string) (*operatorv1.MachineConfiguration, error) MachineConfigurationListerExpansion } // machineConfigurationLister implements the MachineConfigurationLister interface. type machineConfigurationLister struct { - listers.ResourceIndexer[*v1.MachineConfiguration] + listers.ResourceIndexer[*operatorv1.MachineConfiguration] } // NewMachineConfigurationLister returns a new MachineConfigurationLister. func NewMachineConfigurationLister(indexer cache.Indexer) MachineConfigurationLister { - return &machineConfigurationLister{listers.New[*v1.MachineConfiguration](indexer, v1.Resource("machineconfiguration"))} + return &machineConfigurationLister{listers.New[*operatorv1.MachineConfiguration](indexer, operatorv1.Resource("machineconfiguration"))} } diff --git a/operator/listers/operator/v1/network.go b/operator/listers/operator/v1/network.go index e4748e29e4..d9b678162b 100644 --- a/operator/listers/operator/v1/network.go +++ b/operator/listers/operator/v1/network.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NetworkLister helps list Networks. @@ -14,19 +14,19 @@ import ( type NetworkLister interface { // List lists all Networks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Network, err error) + List(selector labels.Selector) (ret []*operatorv1.Network, err error) // Get retrieves the Network from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Network, error) + Get(name string) (*operatorv1.Network, error) NetworkListerExpansion } // networkLister implements the NetworkLister interface. type networkLister struct { - listers.ResourceIndexer[*v1.Network] + listers.ResourceIndexer[*operatorv1.Network] } // NewNetworkLister returns a new NetworkLister. func NewNetworkLister(indexer cache.Indexer) NetworkLister { - return &networkLister{listers.New[*v1.Network](indexer, v1.Resource("network"))} + return &networkLister{listers.New[*operatorv1.Network](indexer, operatorv1.Resource("network"))} } diff --git a/operator/listers/operator/v1/olm.go b/operator/listers/operator/v1/olm.go index c1ce009556..c5f6417059 100644 --- a/operator/listers/operator/v1/olm.go +++ b/operator/listers/operator/v1/olm.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OLMLister helps list OLMs. @@ -14,19 +14,19 @@ import ( type OLMLister interface { // List lists all OLMs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OLM, err error) + List(selector labels.Selector) (ret []*operatorv1.OLM, err error) // Get retrieves the OLM from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OLM, error) + Get(name string) (*operatorv1.OLM, error) OLMListerExpansion } // oLMLister implements the OLMLister interface. type oLMLister struct { - listers.ResourceIndexer[*v1.OLM] + listers.ResourceIndexer[*operatorv1.OLM] } // NewOLMLister returns a new OLMLister. func NewOLMLister(indexer cache.Indexer) OLMLister { - return &oLMLister{listers.New[*v1.OLM](indexer, v1.Resource("olm"))} + return &oLMLister{listers.New[*operatorv1.OLM](indexer, operatorv1.Resource("olm"))} } diff --git a/operator/listers/operator/v1/openshiftapiserver.go b/operator/listers/operator/v1/openshiftapiserver.go index 797c3d5d20..96ad171cbb 100644 --- a/operator/listers/operator/v1/openshiftapiserver.go +++ b/operator/listers/operator/v1/openshiftapiserver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OpenShiftAPIServerLister helps list OpenShiftAPIServers. @@ -14,19 +14,19 @@ import ( type OpenShiftAPIServerLister interface { // List lists all OpenShiftAPIServers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OpenShiftAPIServer, err error) + List(selector labels.Selector) (ret []*operatorv1.OpenShiftAPIServer, err error) // Get retrieves the OpenShiftAPIServer from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OpenShiftAPIServer, error) + Get(name string) (*operatorv1.OpenShiftAPIServer, error) OpenShiftAPIServerListerExpansion } // openShiftAPIServerLister implements the OpenShiftAPIServerLister interface. type openShiftAPIServerLister struct { - listers.ResourceIndexer[*v1.OpenShiftAPIServer] + listers.ResourceIndexer[*operatorv1.OpenShiftAPIServer] } // NewOpenShiftAPIServerLister returns a new OpenShiftAPIServerLister. func NewOpenShiftAPIServerLister(indexer cache.Indexer) OpenShiftAPIServerLister { - return &openShiftAPIServerLister{listers.New[*v1.OpenShiftAPIServer](indexer, v1.Resource("openshiftapiserver"))} + return &openShiftAPIServerLister{listers.New[*operatorv1.OpenShiftAPIServer](indexer, operatorv1.Resource("openshiftapiserver"))} } diff --git a/operator/listers/operator/v1/openshiftcontrollermanager.go b/operator/listers/operator/v1/openshiftcontrollermanager.go index 023156cd84..66e4d9af0c 100644 --- a/operator/listers/operator/v1/openshiftcontrollermanager.go +++ b/operator/listers/operator/v1/openshiftcontrollermanager.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OpenShiftControllerManagerLister helps list OpenShiftControllerManagers. @@ -14,19 +14,19 @@ import ( type OpenShiftControllerManagerLister interface { // List lists all OpenShiftControllerManagers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.OpenShiftControllerManager, err error) + List(selector labels.Selector) (ret []*operatorv1.OpenShiftControllerManager, err error) // Get retrieves the OpenShiftControllerManager from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.OpenShiftControllerManager, error) + Get(name string) (*operatorv1.OpenShiftControllerManager, error) OpenShiftControllerManagerListerExpansion } // openShiftControllerManagerLister implements the OpenShiftControllerManagerLister interface. type openShiftControllerManagerLister struct { - listers.ResourceIndexer[*v1.OpenShiftControllerManager] + listers.ResourceIndexer[*operatorv1.OpenShiftControllerManager] } // NewOpenShiftControllerManagerLister returns a new OpenShiftControllerManagerLister. func NewOpenShiftControllerManagerLister(indexer cache.Indexer) OpenShiftControllerManagerLister { - return &openShiftControllerManagerLister{listers.New[*v1.OpenShiftControllerManager](indexer, v1.Resource("openshiftcontrollermanager"))} + return &openShiftControllerManagerLister{listers.New[*operatorv1.OpenShiftControllerManager](indexer, operatorv1.Resource("openshiftcontrollermanager"))} } diff --git a/operator/listers/operator/v1/serviceca.go b/operator/listers/operator/v1/serviceca.go index 361ed3741a..68e3678f69 100644 --- a/operator/listers/operator/v1/serviceca.go +++ b/operator/listers/operator/v1/serviceca.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ServiceCALister helps list ServiceCAs. @@ -14,19 +14,19 @@ import ( type ServiceCALister interface { // List lists all ServiceCAs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ServiceCA, err error) + List(selector labels.Selector) (ret []*operatorv1.ServiceCA, err error) // Get retrieves the ServiceCA from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ServiceCA, error) + Get(name string) (*operatorv1.ServiceCA, error) ServiceCAListerExpansion } // serviceCALister implements the ServiceCALister interface. type serviceCALister struct { - listers.ResourceIndexer[*v1.ServiceCA] + listers.ResourceIndexer[*operatorv1.ServiceCA] } // NewServiceCALister returns a new ServiceCALister. func NewServiceCALister(indexer cache.Indexer) ServiceCALister { - return &serviceCALister{listers.New[*v1.ServiceCA](indexer, v1.Resource("serviceca"))} + return &serviceCALister{listers.New[*operatorv1.ServiceCA](indexer, operatorv1.Resource("serviceca"))} } diff --git a/operator/listers/operator/v1/servicecatalogapiserver.go b/operator/listers/operator/v1/servicecatalogapiserver.go index e4828fc0a2..b82d90a51d 100644 --- a/operator/listers/operator/v1/servicecatalogapiserver.go +++ b/operator/listers/operator/v1/servicecatalogapiserver.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ServiceCatalogAPIServerLister helps list ServiceCatalogAPIServers. @@ -14,19 +14,19 @@ import ( type ServiceCatalogAPIServerLister interface { // List lists all ServiceCatalogAPIServers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ServiceCatalogAPIServer, err error) + List(selector labels.Selector) (ret []*operatorv1.ServiceCatalogAPIServer, err error) // Get retrieves the ServiceCatalogAPIServer from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ServiceCatalogAPIServer, error) + Get(name string) (*operatorv1.ServiceCatalogAPIServer, error) ServiceCatalogAPIServerListerExpansion } // serviceCatalogAPIServerLister implements the ServiceCatalogAPIServerLister interface. type serviceCatalogAPIServerLister struct { - listers.ResourceIndexer[*v1.ServiceCatalogAPIServer] + listers.ResourceIndexer[*operatorv1.ServiceCatalogAPIServer] } // NewServiceCatalogAPIServerLister returns a new ServiceCatalogAPIServerLister. func NewServiceCatalogAPIServerLister(indexer cache.Indexer) ServiceCatalogAPIServerLister { - return &serviceCatalogAPIServerLister{listers.New[*v1.ServiceCatalogAPIServer](indexer, v1.Resource("servicecatalogapiserver"))} + return &serviceCatalogAPIServerLister{listers.New[*operatorv1.ServiceCatalogAPIServer](indexer, operatorv1.Resource("servicecatalogapiserver"))} } diff --git a/operator/listers/operator/v1/servicecatalogcontrollermanager.go b/operator/listers/operator/v1/servicecatalogcontrollermanager.go index c98632f6e4..32c70828b9 100644 --- a/operator/listers/operator/v1/servicecatalogcontrollermanager.go +++ b/operator/listers/operator/v1/servicecatalogcontrollermanager.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ServiceCatalogControllerManagerLister helps list ServiceCatalogControllerManagers. @@ -14,19 +14,19 @@ import ( type ServiceCatalogControllerManagerLister interface { // List lists all ServiceCatalogControllerManagers in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ServiceCatalogControllerManager, err error) + List(selector labels.Selector) (ret []*operatorv1.ServiceCatalogControllerManager, err error) // Get retrieves the ServiceCatalogControllerManager from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ServiceCatalogControllerManager, error) + Get(name string) (*operatorv1.ServiceCatalogControllerManager, error) ServiceCatalogControllerManagerListerExpansion } // serviceCatalogControllerManagerLister implements the ServiceCatalogControllerManagerLister interface. type serviceCatalogControllerManagerLister struct { - listers.ResourceIndexer[*v1.ServiceCatalogControllerManager] + listers.ResourceIndexer[*operatorv1.ServiceCatalogControllerManager] } // NewServiceCatalogControllerManagerLister returns a new ServiceCatalogControllerManagerLister. func NewServiceCatalogControllerManagerLister(indexer cache.Indexer) ServiceCatalogControllerManagerLister { - return &serviceCatalogControllerManagerLister{listers.New[*v1.ServiceCatalogControllerManager](indexer, v1.Resource("servicecatalogcontrollermanager"))} + return &serviceCatalogControllerManagerLister{listers.New[*operatorv1.ServiceCatalogControllerManager](indexer, operatorv1.Resource("servicecatalogcontrollermanager"))} } diff --git a/operator/listers/operator/v1/storage.go b/operator/listers/operator/v1/storage.go index 77144c7872..9817c3cbcc 100644 --- a/operator/listers/operator/v1/storage.go +++ b/operator/listers/operator/v1/storage.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1 "github.com/openshift/api/operator/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // StorageLister helps list Storages. @@ -14,19 +14,19 @@ import ( type StorageLister interface { // List lists all Storages in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Storage, err error) + List(selector labels.Selector) (ret []*operatorv1.Storage, err error) // Get retrieves the Storage from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Storage, error) + Get(name string) (*operatorv1.Storage, error) StorageListerExpansion } // storageLister implements the StorageLister interface. type storageLister struct { - listers.ResourceIndexer[*v1.Storage] + listers.ResourceIndexer[*operatorv1.Storage] } // NewStorageLister returns a new StorageLister. func NewStorageLister(indexer cache.Indexer) StorageLister { - return &storageLister{listers.New[*v1.Storage](indexer, v1.Resource("storage"))} + return &storageLister{listers.New[*operatorv1.Storage](indexer, operatorv1.Resource("storage"))} } diff --git a/operator/listers/operator/v1alpha1/etcdbackup.go b/operator/listers/operator/v1alpha1/etcdbackup.go index c039ef29ee..d44cce3376 100644 --- a/operator/listers/operator/v1alpha1/etcdbackup.go +++ b/operator/listers/operator/v1alpha1/etcdbackup.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // EtcdBackupLister helps list EtcdBackups. @@ -14,19 +14,19 @@ import ( type EtcdBackupLister interface { // List lists all EtcdBackups in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.EtcdBackup, err error) + List(selector labels.Selector) (ret []*operatorv1alpha1.EtcdBackup, err error) // Get retrieves the EtcdBackup from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.EtcdBackup, error) + Get(name string) (*operatorv1alpha1.EtcdBackup, error) EtcdBackupListerExpansion } // etcdBackupLister implements the EtcdBackupLister interface. type etcdBackupLister struct { - listers.ResourceIndexer[*v1alpha1.EtcdBackup] + listers.ResourceIndexer[*operatorv1alpha1.EtcdBackup] } // NewEtcdBackupLister returns a new EtcdBackupLister. func NewEtcdBackupLister(indexer cache.Indexer) EtcdBackupLister { - return &etcdBackupLister{listers.New[*v1alpha1.EtcdBackup](indexer, v1alpha1.Resource("etcdbackup"))} + return &etcdBackupLister{listers.New[*operatorv1alpha1.EtcdBackup](indexer, operatorv1alpha1.Resource("etcdbackup"))} } diff --git a/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go index 7a502744a6..8408ee2b28 100644 --- a/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go +++ b/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ImageContentSourcePolicyLister helps list ImageContentSourcePolicies. @@ -14,19 +14,19 @@ import ( type ImageContentSourcePolicyLister interface { // List lists all ImageContentSourcePolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ImageContentSourcePolicy, err error) + List(selector labels.Selector) (ret []*operatorv1alpha1.ImageContentSourcePolicy, err error) // Get retrieves the ImageContentSourcePolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.ImageContentSourcePolicy, error) + Get(name string) (*operatorv1alpha1.ImageContentSourcePolicy, error) ImageContentSourcePolicyListerExpansion } // imageContentSourcePolicyLister implements the ImageContentSourcePolicyLister interface. type imageContentSourcePolicyLister struct { - listers.ResourceIndexer[*v1alpha1.ImageContentSourcePolicy] + listers.ResourceIndexer[*operatorv1alpha1.ImageContentSourcePolicy] } // NewImageContentSourcePolicyLister returns a new ImageContentSourcePolicyLister. func NewImageContentSourcePolicyLister(indexer cache.Indexer) ImageContentSourcePolicyLister { - return &imageContentSourcePolicyLister{listers.New[*v1alpha1.ImageContentSourcePolicy](indexer, v1alpha1.Resource("imagecontentsourcepolicy"))} + return &imageContentSourcePolicyLister{listers.New[*operatorv1alpha1.ImageContentSourcePolicy](indexer, operatorv1alpha1.Resource("imagecontentsourcepolicy"))} } diff --git a/operator/listers/operator/v1alpha1/olm.go b/operator/listers/operator/v1alpha1/olm.go index c6c2727cbd..0a66150651 100644 --- a/operator/listers/operator/v1alpha1/olm.go +++ b/operator/listers/operator/v1alpha1/olm.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/operator/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // OLMLister helps list OLMs. @@ -14,19 +14,19 @@ import ( type OLMLister interface { // List lists all OLMs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OLM, err error) + List(selector labels.Selector) (ret []*operatorv1alpha1.OLM, err error) // Get retrieves the OLM from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.OLM, error) + Get(name string) (*operatorv1alpha1.OLM, error) OLMListerExpansion } // oLMLister implements the OLMLister interface. type oLMLister struct { - listers.ResourceIndexer[*v1alpha1.OLM] + listers.ResourceIndexer[*operatorv1alpha1.OLM] } // NewOLMLister returns a new OLMLister. func NewOLMLister(indexer cache.Indexer) OLMLister { - return &oLMLister{listers.New[*v1alpha1.OLM](indexer, v1alpha1.Resource("olm"))} + return &oLMLister{listers.New[*operatorv1alpha1.OLM](indexer, operatorv1alpha1.Resource("olm"))} } diff --git a/operatorcontrolplane/applyconfigurations/internal/internal.go b/operatorcontrolplane/applyconfigurations/internal/internal.go index 30e4c8f162..5a955d9b37 100644 --- a/operatorcontrolplane/applyconfigurations/internal/internal.go +++ b/operatorcontrolplane/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go b/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go index c1286effe5..e8445ff8ef 100644 --- a/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go +++ b/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go @@ -71,7 +71,7 @@ func extractPodNetworkConnectivityCheck(podNetworkConnectivityCheck *operatorcon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithKind(value string) *PodNetworkConnectivityCheckApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithKind(value string) * // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithAPIVersion(value string) *PodNetworkConnectivityCheckApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithAPIVersion(value str // If called multiple times, the Name field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithName(value string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithName(value string) * // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithGenerateName(value string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithGenerateName(value s // If called multiple times, the Namespace field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithNamespace(value string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithNamespace(value stri // If called multiple times, the UID field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithUID(value types.UID) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithUID(value types.UID) // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithResourceVersion(value string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,7 +133,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithResourceVersion(valu // If called multiple times, the Generation field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithGeneration(value int64) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -142,7 +142,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithGeneration(value int // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -151,7 +151,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithCreationTimestamp(va // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithDeletionTimestamp(va // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithDeletionGracePeriodS // overwriting an existing map entries in Labels field with the same key. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithLabels(entries map[string]string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithLabels(entries map[s // overwriting an existing map entries in Annotations field with the same key. func (b *PodNetworkConnectivityCheckApplyConfiguration) WithAnnotations(entries map[string]string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -203,7 +203,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithOwnerReferences(valu if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,7 +214,7 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithOwnerReferences(valu func (b *PodNetworkConnectivityCheckApplyConfiguration) WithFinalizers(values ...string) *PodNetworkConnectivityCheckApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -244,5 +244,5 @@ func (b *PodNetworkConnectivityCheckApplyConfiguration) WithStatus(value *PodNet // GetName retrieves the value of the Name field in the declarative configuration. func (b *PodNetworkConnectivityCheckApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheckcondition.go b/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheckcondition.go index 493ac40260..404e4ab856 100644 --- a/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheckcondition.go +++ b/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheckcondition.go @@ -3,18 +3,18 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" + operatorcontrolplanev1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // PodNetworkConnectivityCheckConditionApplyConfiguration represents a declarative configuration of the PodNetworkConnectivityCheckCondition type for use // with apply. type PodNetworkConnectivityCheckConditionApplyConfiguration struct { - Type *v1alpha1.PodNetworkConnectivityCheckConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` + Type *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` } // PodNetworkConnectivityCheckConditionApplyConfiguration constructs a declarative configuration of the PodNetworkConnectivityCheckCondition type for use with @@ -26,7 +26,7 @@ func PodNetworkConnectivityCheckCondition() *PodNetworkConnectivityCheckConditio // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *PodNetworkConnectivityCheckConditionApplyConfiguration) WithType(value v1alpha1.PodNetworkConnectivityCheckConditionType) *PodNetworkConnectivityCheckConditionApplyConfiguration { +func (b *PodNetworkConnectivityCheckConditionApplyConfiguration) WithType(value operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckConditionType) *PodNetworkConnectivityCheckConditionApplyConfiguration { b.Type = &value return b } diff --git a/operatorcontrolplane/clientset/versioned/clientset.go b/operatorcontrolplane/clientset/versioned/clientset.go index 0a03d2e182..07f9902a74 100644 --- a/operatorcontrolplane/clientset/versioned/clientset.go +++ b/operatorcontrolplane/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" controlplanev1alpha1 "github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1" discovery "k8s.io/client-go/discovery" diff --git a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_operatorcontrolplane_client.go b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_operatorcontrolplane_client.go index 3c64a06820..aa4fb6a4cd 100644 --- a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_operatorcontrolplane_client.go +++ b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_operatorcontrolplane_client.go @@ -13,7 +13,7 @@ type FakeControlplaneV1alpha1 struct { } func (c *FakeControlplaneV1alpha1) PodNetworkConnectivityChecks(namespace string) v1alpha1.PodNetworkConnectivityCheckInterface { - return &FakePodNetworkConnectivityChecks{c, namespace} + return newFakePodNetworkConnectivityChecks(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_podnetworkconnectivitycheck.go b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_podnetworkconnectivitycheck.go index deff349492..b97dd81f0f 100644 --- a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_podnetworkconnectivitycheck.go +++ b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/fake/fake_podnetworkconnectivitycheck.go @@ -3,179 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" operatorcontrolplanev1alpha1 "github.com/openshift/client-go/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedoperatorcontrolplanev1alpha1 "github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakePodNetworkConnectivityChecks implements PodNetworkConnectivityCheckInterface -type FakePodNetworkConnectivityChecks struct { +// fakePodNetworkConnectivityChecks implements PodNetworkConnectivityCheckInterface +type fakePodNetworkConnectivityChecks struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.PodNetworkConnectivityCheck, *v1alpha1.PodNetworkConnectivityCheckList, *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration] Fake *FakeControlplaneV1alpha1 - ns string -} - -var podnetworkconnectivitychecksResource = v1alpha1.SchemeGroupVersion.WithResource("podnetworkconnectivitychecks") - -var podnetworkconnectivitychecksKind = v1alpha1.SchemeGroupVersion.WithKind("PodNetworkConnectivityCheck") - -// Get takes name of the podNetworkConnectivityCheck, and returns the corresponding podNetworkConnectivityCheck object, and an error if there is any. -func (c *FakePodNetworkConnectivityChecks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(podnetworkconnectivitychecksResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err -} - -// List takes label and field selectors, and returns the list of PodNetworkConnectivityChecks that match those selectors. -func (c *FakePodNetworkConnectivityChecks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodNetworkConnectivityCheckList, err error) { - emptyResult := &v1alpha1.PodNetworkConnectivityCheckList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(podnetworkconnectivitychecksResource, podnetworkconnectivitychecksKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.PodNetworkConnectivityCheckList{ListMeta: obj.(*v1alpha1.PodNetworkConnectivityCheckList).ListMeta} - for _, item := range obj.(*v1alpha1.PodNetworkConnectivityCheckList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested podNetworkConnectivityChecks. -func (c *FakePodNetworkConnectivityChecks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(podnetworkconnectivitychecksResource, c.ns, opts)) - -} - -// Create takes the representation of a podNetworkConnectivityCheck and creates it. Returns the server's representation of the podNetworkConnectivityCheck, and an error, if there is any. -func (c *FakePodNetworkConnectivityChecks) Create(ctx context.Context, podNetworkConnectivityCheck *v1alpha1.PodNetworkConnectivityCheck, opts v1.CreateOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(podnetworkconnectivitychecksResource, c.ns, podNetworkConnectivityCheck, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err -} - -// Update takes the representation of a podNetworkConnectivityCheck and updates it. Returns the server's representation of the podNetworkConnectivityCheck, and an error, if there is any. -func (c *FakePodNetworkConnectivityChecks) Update(ctx context.Context, podNetworkConnectivityCheck *v1alpha1.PodNetworkConnectivityCheck, opts v1.UpdateOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(podnetworkconnectivitychecksResource, c.ns, podNetworkConnectivityCheck, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePodNetworkConnectivityChecks) UpdateStatus(ctx context.Context, podNetworkConnectivityCheck *v1alpha1.PodNetworkConnectivityCheck, opts v1.UpdateOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(podnetworkconnectivitychecksResource, "status", c.ns, podNetworkConnectivityCheck, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err -} - -// Delete takes name of the podNetworkConnectivityCheck and deletes it. Returns an error if one occurs. -func (c *FakePodNetworkConnectivityChecks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(podnetworkconnectivitychecksResource, c.ns, name, opts), &v1alpha1.PodNetworkConnectivityCheck{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakePodNetworkConnectivityChecks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(podnetworkconnectivitychecksResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.PodNetworkConnectivityCheckList{}) - return err -} - -// Patch applies the patch and returns the patched podNetworkConnectivityCheck. -func (c *FakePodNetworkConnectivityChecks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(podnetworkconnectivitychecksResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied podNetworkConnectivityCheck. -func (c *FakePodNetworkConnectivityChecks) Apply(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - if podNetworkConnectivityCheck == nil { - return nil, fmt.Errorf("podNetworkConnectivityCheck provided to Apply must not be nil") - } - data, err := json.Marshal(podNetworkConnectivityCheck) - if err != nil { - return nil, err - } - name := podNetworkConnectivityCheck.Name - if name == nil { - return nil, fmt.Errorf("podNetworkConnectivityCheck.Name must be provided to Apply") - } - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(podnetworkconnectivitychecksResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakePodNetworkConnectivityChecks) ApplyStatus(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) { - if podNetworkConnectivityCheck == nil { - return nil, fmt.Errorf("podNetworkConnectivityCheck provided to Apply must not be nil") - } - data, err := json.Marshal(podNetworkConnectivityCheck) - if err != nil { - return nil, err - } - name := podNetworkConnectivityCheck.Name - if name == nil { - return nil, fmt.Errorf("podNetworkConnectivityCheck.Name must be provided to Apply") - } - emptyResult := &v1alpha1.PodNetworkConnectivityCheck{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(podnetworkconnectivitychecksResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePodNetworkConnectivityChecks(fake *FakeControlplaneV1alpha1, namespace string) typedoperatorcontrolplanev1alpha1.PodNetworkConnectivityCheckInterface { + return &fakePodNetworkConnectivityChecks{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.PodNetworkConnectivityCheck, *v1alpha1.PodNetworkConnectivityCheckList, *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("podnetworkconnectivitychecks"), + v1alpha1.SchemeGroupVersion.WithKind("PodNetworkConnectivityCheck"), + func() *v1alpha1.PodNetworkConnectivityCheck { return &v1alpha1.PodNetworkConnectivityCheck{} }, + func() *v1alpha1.PodNetworkConnectivityCheckList { return &v1alpha1.PodNetworkConnectivityCheckList{} }, + func(dst, src *v1alpha1.PodNetworkConnectivityCheckList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.PodNetworkConnectivityCheckList) []*v1alpha1.PodNetworkConnectivityCheck { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.PodNetworkConnectivityCheckList, items []*v1alpha1.PodNetworkConnectivityCheck) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.PodNetworkConnectivityCheck), err } diff --git a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/operatorcontrolplane_client.go b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/operatorcontrolplane_client.go index 29c600d3c6..cf04fb2894 100644 --- a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/operatorcontrolplane_client.go +++ b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/operatorcontrolplane_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" - "github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/scheme" + operatorcontrolplanev1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" + scheme "github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *ControlplaneV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := operatorcontrolplanev1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go index 503561a139..5177a2e148 100644 --- a/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go +++ b/operatorcontrolplane/clientset/versioned/typed/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" - operatorcontrolplanev1alpha1 "github.com/openshift/client-go/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1" + operatorcontrolplanev1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" + applyconfigurationsoperatorcontrolplanev1alpha1 "github.com/openshift/client-go/operatorcontrolplane/applyconfigurations/operatorcontrolplane/v1alpha1" scheme "github.com/openshift/client-go/operatorcontrolplane/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,41 @@ type PodNetworkConnectivityChecksGetter interface { // PodNetworkConnectivityCheckInterface has methods to work with PodNetworkConnectivityCheck resources. type PodNetworkConnectivityCheckInterface interface { - Create(ctx context.Context, podNetworkConnectivityCheck *v1alpha1.PodNetworkConnectivityCheck, opts v1.CreateOptions) (*v1alpha1.PodNetworkConnectivityCheck, error) - Update(ctx context.Context, podNetworkConnectivityCheck *v1alpha1.PodNetworkConnectivityCheck, opts v1.UpdateOptions) (*v1alpha1.PodNetworkConnectivityCheck, error) + Create(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, opts v1.CreateOptions) (*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, error) + Update(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, opts v1.UpdateOptions) (*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, podNetworkConnectivityCheck *v1alpha1.PodNetworkConnectivityCheck, opts v1.UpdateOptions) (*v1alpha1.PodNetworkConnectivityCheck, error) + UpdateStatus(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, opts v1.UpdateOptions) (*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodNetworkConnectivityCheck, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodNetworkConnectivityCheckList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodNetworkConnectivityCheck, err error) - Apply(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, err error) + Apply(ctx context.Context, podNetworkConnectivityCheck *applyconfigurationsoperatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration, opts v1.ApplyOptions) (result *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, podNetworkConnectivityCheck *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodNetworkConnectivityCheck, err error) + ApplyStatus(ctx context.Context, podNetworkConnectivityCheck *applyconfigurationsoperatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration, opts v1.ApplyOptions) (result *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, err error) PodNetworkConnectivityCheckExpansion } // podNetworkConnectivityChecks implements PodNetworkConnectivityCheckInterface type podNetworkConnectivityChecks struct { - *gentype.ClientWithListAndApply[*v1alpha1.PodNetworkConnectivityCheck, *v1alpha1.PodNetworkConnectivityCheckList, *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration] + *gentype.ClientWithListAndApply[*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckList, *applyconfigurationsoperatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration] } // newPodNetworkConnectivityChecks returns a PodNetworkConnectivityChecks func newPodNetworkConnectivityChecks(c *ControlplaneV1alpha1Client, namespace string) *podNetworkConnectivityChecks { return &podNetworkConnectivityChecks{ - gentype.NewClientWithListAndApply[*v1alpha1.PodNetworkConnectivityCheck, *v1alpha1.PodNetworkConnectivityCheckList, *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration]( + gentype.NewClientWithListAndApply[*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckList, *applyconfigurationsoperatorcontrolplanev1alpha1.PodNetworkConnectivityCheckApplyConfiguration]( "podnetworkconnectivitychecks", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.PodNetworkConnectivityCheck { return &v1alpha1.PodNetworkConnectivityCheck{} }, - func() *v1alpha1.PodNetworkConnectivityCheckList { return &v1alpha1.PodNetworkConnectivityCheckList{} }), + func() *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck { + return &operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck{} + }, + func() *operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckList { + return &operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckList{} + }, + ), } } diff --git a/operatorcontrolplane/informers/externalversions/generic.go b/operatorcontrolplane/informers/externalversions/generic.go index 5adcac48be..02a29ddf08 100644 --- a/operatorcontrolplane/informers/externalversions/generic.go +++ b/operatorcontrolplane/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/operatorcontrolplane/informers/externalversions/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go b/operatorcontrolplane/informers/externalversions/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go index 8b828c5057..4f2b1e9434 100644 --- a/operatorcontrolplane/informers/externalversions/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go +++ b/operatorcontrolplane/informers/externalversions/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - operatorcontrolplanev1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" + apioperatorcontrolplanev1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" versioned "github.com/openshift/client-go/operatorcontrolplane/clientset/versioned" internalinterfaces "github.com/openshift/client-go/operatorcontrolplane/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1" + operatorcontrolplanev1alpha1 "github.com/openshift/client-go/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // PodNetworkConnectivityChecks. type PodNetworkConnectivityCheckInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.PodNetworkConnectivityCheckLister + Lister() operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckLister } type podNetworkConnectivityCheckInformer struct { @@ -55,7 +55,7 @@ func NewFilteredPodNetworkConnectivityCheckInformer(client versioned.Interface, return client.ControlplaneV1alpha1().PodNetworkConnectivityChecks(namespace).Watch(context.TODO(), options) }, }, - &operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck{}, + &apioperatorcontrolplanev1alpha1.PodNetworkConnectivityCheck{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *podNetworkConnectivityCheckInformer) defaultInformer(client versioned.I } func (f *podNetworkConnectivityCheckInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck{}, f.defaultInformer) + return f.factory.InformerFor(&apioperatorcontrolplanev1alpha1.PodNetworkConnectivityCheck{}, f.defaultInformer) } -func (f *podNetworkConnectivityCheckInformer) Lister() v1alpha1.PodNetworkConnectivityCheckLister { - return v1alpha1.NewPodNetworkConnectivityCheckLister(f.Informer().GetIndexer()) +func (f *podNetworkConnectivityCheckInformer) Lister() operatorcontrolplanev1alpha1.PodNetworkConnectivityCheckLister { + return operatorcontrolplanev1alpha1.NewPodNetworkConnectivityCheckLister(f.Informer().GetIndexer()) } diff --git a/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go b/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go index 1085dd4771..ebffd8bcb8 100644 --- a/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go +++ b/operatorcontrolplane/listers/operatorcontrolplane/v1alpha1/podnetworkconnectivitycheck.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + operatorcontrolplanev1alpha1 "github.com/openshift/api/operatorcontrolplane/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // PodNetworkConnectivityCheckLister helps list PodNetworkConnectivityChecks. @@ -14,7 +14,7 @@ import ( type PodNetworkConnectivityCheckLister interface { // List lists all PodNetworkConnectivityChecks in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.PodNetworkConnectivityCheck, err error) + List(selector labels.Selector) (ret []*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, err error) // PodNetworkConnectivityChecks returns an object that can list and get PodNetworkConnectivityChecks. PodNetworkConnectivityChecks(namespace string) PodNetworkConnectivityCheckNamespaceLister PodNetworkConnectivityCheckListerExpansion @@ -22,17 +22,17 @@ type PodNetworkConnectivityCheckLister interface { // podNetworkConnectivityCheckLister implements the PodNetworkConnectivityCheckLister interface. type podNetworkConnectivityCheckLister struct { - listers.ResourceIndexer[*v1alpha1.PodNetworkConnectivityCheck] + listers.ResourceIndexer[*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck] } // NewPodNetworkConnectivityCheckLister returns a new PodNetworkConnectivityCheckLister. func NewPodNetworkConnectivityCheckLister(indexer cache.Indexer) PodNetworkConnectivityCheckLister { - return &podNetworkConnectivityCheckLister{listers.New[*v1alpha1.PodNetworkConnectivityCheck](indexer, v1alpha1.Resource("podnetworkconnectivitycheck"))} + return &podNetworkConnectivityCheckLister{listers.New[*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck](indexer, operatorcontrolplanev1alpha1.Resource("podnetworkconnectivitycheck"))} } // PodNetworkConnectivityChecks returns an object that can list and get PodNetworkConnectivityChecks. func (s *podNetworkConnectivityCheckLister) PodNetworkConnectivityChecks(namespace string) PodNetworkConnectivityCheckNamespaceLister { - return podNetworkConnectivityCheckNamespaceLister{listers.NewNamespaced[*v1alpha1.PodNetworkConnectivityCheck](s.ResourceIndexer, namespace)} + return podNetworkConnectivityCheckNamespaceLister{listers.NewNamespaced[*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck](s.ResourceIndexer, namespace)} } // PodNetworkConnectivityCheckNamespaceLister helps list and get PodNetworkConnectivityChecks. @@ -40,15 +40,15 @@ func (s *podNetworkConnectivityCheckLister) PodNetworkConnectivityChecks(namespa type PodNetworkConnectivityCheckNamespaceLister interface { // List lists all PodNetworkConnectivityChecks in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.PodNetworkConnectivityCheck, err error) + List(selector labels.Selector) (ret []*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, err error) // Get retrieves the PodNetworkConnectivityCheck from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.PodNetworkConnectivityCheck, error) + Get(name string) (*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck, error) PodNetworkConnectivityCheckNamespaceListerExpansion } // podNetworkConnectivityCheckNamespaceLister implements the PodNetworkConnectivityCheckNamespaceLister // interface. type podNetworkConnectivityCheckNamespaceLister struct { - listers.ResourceIndexer[*v1alpha1.PodNetworkConnectivityCheck] + listers.ResourceIndexer[*operatorcontrolplanev1alpha1.PodNetworkConnectivityCheck] } diff --git a/project/applyconfigurations/internal/internal.go b/project/applyconfigurations/internal/internal.go index c66a566817..7ae7830c21 100644 --- a/project/applyconfigurations/internal/internal.go +++ b/project/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/project/applyconfigurations/project/v1/project.go b/project/applyconfigurations/project/v1/project.go index 59555ec2bc..6a59c40725 100644 --- a/project/applyconfigurations/project/v1/project.go +++ b/project/applyconfigurations/project/v1/project.go @@ -3,21 +3,21 @@ package v1 import ( - apiprojectv1 "github.com/openshift/api/project/v1" + projectv1 "github.com/openshift/api/project/v1" internal "github.com/openshift/client-go/project/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ProjectApplyConfiguration represents a declarative configuration of the Project type for use // with apply. type ProjectApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ProjectSpecApplyConfiguration `json:"spec,omitempty"` - Status *ProjectStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ProjectSpecApplyConfiguration `json:"spec,omitempty"` + Status *ProjectStatusApplyConfiguration `json:"status,omitempty"` } // Project constructs a declarative configuration of the Project type for use with @@ -41,18 +41,18 @@ func Project(name string) *ProjectApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractProject(project *apiprojectv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { +func ExtractProject(project *projectv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { return extractProject(project, fieldManager, "") } // ExtractProjectStatus is the same as ExtractProject except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractProjectStatus(project *apiprojectv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { +func ExtractProjectStatus(project *projectv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { return extractProject(project, fieldManager, "status") } -func extractProject(project *apiprojectv1.Project, fieldManager string, subresource string) (*ProjectApplyConfiguration, error) { +func extractProject(project *projectv1.Project, fieldManager string, subresource string) (*ProjectApplyConfiguration, error) { b := &ProjectApplyConfiguration{} err := managedfields.ExtractInto(project, internal.Parser().Type("com.github.openshift.api.project.v1.Project"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractProject(project *apiprojectv1.Project, fieldManager string, subresou // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithKind(value string) *ProjectApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ProjectApplyConfiguration) WithKind(value string) *ProjectApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithAPIVersion(value string) *ProjectApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ProjectApplyConfiguration) WithAPIVersion(value string) *ProjectApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithName(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ProjectApplyConfiguration) WithName(value string) *ProjectApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithGenerateName(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ProjectApplyConfiguration) WithGenerateName(value string) *ProjectApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithNamespace(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ProjectApplyConfiguration) WithNamespace(value string) *ProjectApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithUID(value types.UID) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ProjectApplyConfiguration) WithUID(value types.UID) *ProjectApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithResourceVersion(value string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ProjectApplyConfiguration) WithResourceVersion(value string) *ProjectAp // If called multiple times, the Generation field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithGeneration(value int64) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Pr // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ProjectApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ProjectApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *ProjectApplyConfiguration) WithLabels(entries map[string]string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ProjectApplyConfiguration) WithLabels(entries map[string]string) *Proje // overwriting an existing map entries in Annotations field with the same key. func (b *ProjectApplyConfiguration) WithAnnotations(entries map[string]string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ProjectApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ProjectApplyConfiguration { +func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *ProjectApplyConfiguration) WithFinalizers(values ...string) *ProjectApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ProjectApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ProjectApplyConfiguration) WithStatus(value *ProjectStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *ProjectApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/project/applyconfigurations/project/v1/projectrequest.go b/project/applyconfigurations/project/v1/projectrequest.go index acfca5efa1..a5d484dd25 100644 --- a/project/applyconfigurations/project/v1/projectrequest.go +++ b/project/applyconfigurations/project/v1/projectrequest.go @@ -5,19 +5,19 @@ package v1 import ( projectv1 "github.com/openshift/api/project/v1" internal "github.com/openshift/client-go/project/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ProjectRequestApplyConfiguration represents a declarative configuration of the ProjectRequest type for use // with apply. type ProjectRequestApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Description *string `json:"description,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Description *string `json:"description,omitempty"` } // ProjectRequest constructs a declarative configuration of the ProjectRequest type for use with @@ -69,7 +69,7 @@ func extractProjectRequest(projectRequest *projectv1.ProjectRequest, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithKind(value string) *ProjectRequestApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ProjectRequestApplyConfiguration) WithKind(value string) *ProjectReques // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithAPIVersion(value string) *ProjectRequestApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ProjectRequestApplyConfiguration) WithAPIVersion(value string) *Project // If called multiple times, the Name field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithName(value string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ProjectRequestApplyConfiguration) WithName(value string) *ProjectReques // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithGenerateName(value string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ProjectRequestApplyConfiguration) WithGenerateName(value string) *Proje // If called multiple times, the Namespace field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithNamespace(value string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ProjectRequestApplyConfiguration) WithNamespace(value string) *ProjectR // If called multiple times, the UID field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithUID(value types.UID) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ProjectRequestApplyConfiguration) WithUID(value types.UID) *ProjectRequ // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithResourceVersion(value string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ProjectRequestApplyConfiguration) WithResourceVersion(value string) *Pr // If called multiple times, the Generation field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithGeneration(value int64) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ProjectRequestApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ProjectRequestApplyConfiguration { +func (b *ProjectRequestApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ProjectRequestApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ProjectRequestApplyConfiguration { +func (b *ProjectRequestApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ProjectRequestApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ProjectRequestApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ProjectRequestApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ProjectRequestApplyConfiguration) WithLabels(entries map[string]string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ProjectRequestApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ProjectRequestApplyConfiguration) WithAnnotations(entries map[string]string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ProjectRequestApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ProjectRequestApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ProjectRequestApplyConfiguration { +func (b *ProjectRequestApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ProjectRequestApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ProjectRequestApplyConfiguration) WithFinalizers(values ...string) *ProjectRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ProjectRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ProjectRequestApplyConfiguration) WithDescription(value string) *Projec // GetName retrieves the value of the Name field in the declarative configuration. func (b *ProjectRequestApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/project/applyconfigurations/project/v1/projectspec.go b/project/applyconfigurations/project/v1/projectspec.go index df5f8bcb65..49765c170e 100644 --- a/project/applyconfigurations/project/v1/projectspec.go +++ b/project/applyconfigurations/project/v1/projectspec.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ProjectSpecApplyConfiguration represents a declarative configuration of the ProjectSpec type for use // with apply. type ProjectSpecApplyConfiguration struct { - Finalizers []v1.FinalizerName `json:"finalizers,omitempty"` + Finalizers []corev1.FinalizerName `json:"finalizers,omitempty"` } // ProjectSpecApplyConfiguration constructs a declarative configuration of the ProjectSpec type for use with @@ -21,7 +21,7 @@ func ProjectSpec() *ProjectSpecApplyConfiguration { // WithFinalizers adds the given value to the Finalizers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ProjectSpecApplyConfiguration) WithFinalizers(values ...v1.FinalizerName) *ProjectSpecApplyConfiguration { +func (b *ProjectSpecApplyConfiguration) WithFinalizers(values ...corev1.FinalizerName) *ProjectSpecApplyConfiguration { for i := range values { b.Finalizers = append(b.Finalizers, values[i]) } diff --git a/project/applyconfigurations/project/v1/projectstatus.go b/project/applyconfigurations/project/v1/projectstatus.go index 905379165f..07ab025a78 100644 --- a/project/applyconfigurations/project/v1/projectstatus.go +++ b/project/applyconfigurations/project/v1/projectstatus.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ProjectStatusApplyConfiguration represents a declarative configuration of the ProjectStatus type for use // with apply. type ProjectStatusApplyConfiguration struct { - Phase *v1.NamespacePhase `json:"phase,omitempty"` - Conditions []v1.NamespaceCondition `json:"conditions,omitempty"` + Phase *corev1.NamespacePhase `json:"phase,omitempty"` + Conditions []corev1.NamespaceCondition `json:"conditions,omitempty"` } // ProjectStatusApplyConfiguration constructs a declarative configuration of the ProjectStatus type for use with @@ -22,7 +22,7 @@ func ProjectStatus() *ProjectStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *ProjectStatusApplyConfiguration) WithPhase(value v1.NamespacePhase) *ProjectStatusApplyConfiguration { +func (b *ProjectStatusApplyConfiguration) WithPhase(value corev1.NamespacePhase) *ProjectStatusApplyConfiguration { b.Phase = &value return b } @@ -30,7 +30,7 @@ func (b *ProjectStatusApplyConfiguration) WithPhase(value v1.NamespacePhase) *Pr // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ProjectStatusApplyConfiguration) WithConditions(values ...v1.NamespaceCondition) *ProjectStatusApplyConfiguration { +func (b *ProjectStatusApplyConfiguration) WithConditions(values ...corev1.NamespaceCondition) *ProjectStatusApplyConfiguration { for i := range values { b.Conditions = append(b.Conditions, values[i]) } diff --git a/project/clientset/versioned/clientset.go b/project/clientset/versioned/clientset.go index 3489558fd7..6925af6cb3 100644 --- a/project/clientset/versioned/clientset.go +++ b/project/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" projectv1 "github.com/openshift/client-go/project/clientset/versioned/typed/project/v1" discovery "k8s.io/client-go/discovery" diff --git a/project/clientset/versioned/typed/project/v1/fake/fake_project.go b/project/clientset/versioned/typed/project/v1/fake/fake_project.go index 18cb924a15..a4b8ba74b2 100644 --- a/project/clientset/versioned/typed/project/v1/fake/fake_project.go +++ b/project/clientset/versioned/typed/project/v1/fake/fake_project.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/project/v1" projectv1 "github.com/openshift/client-go/project/applyconfigurations/project/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedprojectv1 "github.com/openshift/client-go/project/clientset/versioned/typed/project/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeProjects implements ProjectInterface -type FakeProjects struct { +// fakeProjects implements ProjectInterface +type fakeProjects struct { + *gentype.FakeClientWithListAndApply[*v1.Project, *v1.ProjectList, *projectv1.ProjectApplyConfiguration] Fake *FakeProjectV1 } -var projectsResource = v1.SchemeGroupVersion.WithResource("projects") - -var projectsKind = v1.SchemeGroupVersion.WithKind("Project") - -// Get takes name of the project, and returns the corresponding project object, and an error if there is any. -func (c *FakeProjects) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(projectsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// List takes label and field selectors, and returns the list of Projects that match those selectors. -func (c *FakeProjects) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ProjectList, err error) { - emptyResult := &v1.ProjectList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(projectsResource, projectsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ProjectList{ListMeta: obj.(*v1.ProjectList).ListMeta} - for _, item := range obj.(*v1.ProjectList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested projects. -func (c *FakeProjects) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(projectsResource, opts)) -} - -// Create takes the representation of a project and creates it. Returns the server's representation of the project, and an error, if there is any. -func (c *FakeProjects) Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(projectsResource, project, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// Update takes the representation of a project and updates it. Returns the server's representation of the project, and an error, if there is any. -func (c *FakeProjects) Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(projectsResource, project, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeProjects) UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(projectsResource, "status", project, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// Delete takes name of the project and deletes it. Returns an error if one occurs. -func (c *FakeProjects) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(projectsResource, name, opts), &v1.Project{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeProjects) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(projectsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ProjectList{}) - return err -} - -// Patch applies the patch and returns the patched project. -func (c *FakeProjects) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) { - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied project. -func (c *FakeProjects) Apply(ctx context.Context, project *projectv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) { - if project == nil { - return nil, fmt.Errorf("project provided to Apply must not be nil") - } - data, err := json.Marshal(project) - if err != nil { - return nil, err - } - name := project.Name - if name == nil { - return nil, fmt.Errorf("project.Name must be provided to Apply") - } - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Project), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeProjects) ApplyStatus(ctx context.Context, project *projectv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) { - if project == nil { - return nil, fmt.Errorf("project provided to Apply must not be nil") - } - data, err := json.Marshal(project) - if err != nil { - return nil, err - } - name := project.Name - if name == nil { - return nil, fmt.Errorf("project.Name must be provided to Apply") - } - emptyResult := &v1.Project{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeProjects(fake *FakeProjectV1) typedprojectv1.ProjectInterface { + return &fakeProjects{ + gentype.NewFakeClientWithListAndApply[*v1.Project, *v1.ProjectList, *projectv1.ProjectApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("projects"), + v1.SchemeGroupVersion.WithKind("Project"), + func() *v1.Project { return &v1.Project{} }, + func() *v1.ProjectList { return &v1.ProjectList{} }, + func(dst, src *v1.ProjectList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ProjectList) []*v1.Project { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ProjectList, items []*v1.Project) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Project), err } diff --git a/project/clientset/versioned/typed/project/v1/fake/fake_project_client.go b/project/clientset/versioned/typed/project/v1/fake/fake_project_client.go index 7cec012539..a38ab7afcb 100644 --- a/project/clientset/versioned/typed/project/v1/fake/fake_project_client.go +++ b/project/clientset/versioned/typed/project/v1/fake/fake_project_client.go @@ -13,11 +13,11 @@ type FakeProjectV1 struct { } func (c *FakeProjectV1) Projects() v1.ProjectInterface { - return &FakeProjects{c} + return newFakeProjects(c) } func (c *FakeProjectV1) ProjectRequests() v1.ProjectRequestInterface { - return &FakeProjectRequests{c} + return newFakeProjectRequests(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/project/clientset/versioned/typed/project/v1/fake/fake_projectrequest.go b/project/clientset/versioned/typed/project/v1/fake/fake_projectrequest.go index e6cd00a309..4db074b29e 100644 --- a/project/clientset/versioned/typed/project/v1/fake/fake_projectrequest.go +++ b/project/clientset/versioned/typed/project/v1/fake/fake_projectrequest.go @@ -3,53 +3,40 @@ package fake import ( - "context" - json "encoding/json" - "fmt" + context "context" v1 "github.com/openshift/api/project/v1" projectv1 "github.com/openshift/client-go/project/applyconfigurations/project/v1" + typedprojectv1 "github.com/openshift/client-go/project/clientset/versioned/typed/project/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" + gentype "k8s.io/client-go/gentype" testing "k8s.io/client-go/testing" ) -// FakeProjectRequests implements ProjectRequestInterface -type FakeProjectRequests struct { +// fakeProjectRequests implements ProjectRequestInterface +type fakeProjectRequests struct { + *gentype.FakeClientWithApply[*v1.ProjectRequest, *projectv1.ProjectRequestApplyConfiguration] Fake *FakeProjectV1 } -var projectrequestsResource = v1.SchemeGroupVersion.WithResource("projectrequests") - -var projectrequestsKind = v1.SchemeGroupVersion.WithKind("ProjectRequest") - -// Apply takes the given apply declarative configuration, applies it and returns the applied projectRequest. -func (c *FakeProjectRequests) Apply(ctx context.Context, projectRequest *projectv1.ProjectRequestApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ProjectRequest, err error) { - if projectRequest == nil { - return nil, fmt.Errorf("projectRequest provided to Apply must not be nil") - } - data, err := json.Marshal(projectRequest) - if err != nil { - return nil, err - } - name := projectRequest.Name - if name == nil { - return nil, fmt.Errorf("projectRequest.Name must be provided to Apply") - } - emptyResult := &v1.ProjectRequest{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(projectrequestsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeProjectRequests(fake *FakeProjectV1) typedprojectv1.ProjectRequestInterface { + return &fakeProjectRequests{ + gentype.NewFakeClientWithApply[*v1.ProjectRequest, *projectv1.ProjectRequestApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("projectrequests"), + v1.SchemeGroupVersion.WithKind("ProjectRequest"), + func() *v1.ProjectRequest { return &v1.ProjectRequest{} }, + ), + fake, } - return obj.(*v1.ProjectRequest), err } // Create takes the representation of a projectRequest and creates it. Returns the server's representation of the project, and an error, if there is any. -func (c *FakeProjectRequests) Create(ctx context.Context, projectRequest *v1.ProjectRequest, opts metav1.CreateOptions) (result *v1.Project, err error) { +func (c *fakeProjectRequests) Create(ctx context.Context, projectRequest *v1.ProjectRequest, opts metav1.CreateOptions) (result *v1.Project, err error) { emptyResult := &v1.Project{} obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(projectrequestsResource, projectRequest, opts), emptyResult) + Invokes(testing.NewRootCreateActionWithOptions(c.Resource(), projectRequest, opts), emptyResult) if obj == nil { return emptyResult, err } diff --git a/project/clientset/versioned/typed/project/v1/project.go b/project/clientset/versioned/typed/project/v1/project.go index c11c80ef5a..20d0753e2e 100644 --- a/project/clientset/versioned/typed/project/v1/project.go +++ b/project/clientset/versioned/typed/project/v1/project.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/project/v1" - projectv1 "github.com/openshift/client-go/project/applyconfigurations/project/v1" + projectv1 "github.com/openshift/api/project/v1" + applyconfigurationsprojectv1 "github.com/openshift/client-go/project/applyconfigurations/project/v1" scheme "github.com/openshift/client-go/project/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ProjectsGetter interface { // ProjectInterface has methods to work with Project resources. type ProjectInterface interface { - Create(ctx context.Context, project *v1.Project, opts metav1.CreateOptions) (*v1.Project, error) - Update(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + Create(ctx context.Context, project *projectv1.Project, opts metav1.CreateOptions) (*projectv1.Project, error) + Update(ctx context.Context, project *projectv1.Project, opts metav1.UpdateOptions) (*projectv1.Project, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, project *v1.Project, opts metav1.UpdateOptions) (*v1.Project, error) + UpdateStatus(ctx context.Context, project *projectv1.Project, opts metav1.UpdateOptions) (*projectv1.Project, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Project, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ProjectList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*projectv1.Project, error) + List(ctx context.Context, opts metav1.ListOptions) (*projectv1.ProjectList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Project, err error) - Apply(ctx context.Context, project *projectv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *projectv1.Project, err error) + Apply(ctx context.Context, project *applyconfigurationsprojectv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *projectv1.Project, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, project *projectv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Project, err error) + ApplyStatus(ctx context.Context, project *applyconfigurationsprojectv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *projectv1.Project, err error) ProjectExpansion } // projects implements ProjectInterface type projects struct { - *gentype.ClientWithListAndApply[*v1.Project, *v1.ProjectList, *projectv1.ProjectApplyConfiguration] + *gentype.ClientWithListAndApply[*projectv1.Project, *projectv1.ProjectList, *applyconfigurationsprojectv1.ProjectApplyConfiguration] } // newProjects returns a Projects func newProjects(c *ProjectV1Client) *projects { return &projects{ - gentype.NewClientWithListAndApply[*v1.Project, *v1.ProjectList, *projectv1.ProjectApplyConfiguration]( + gentype.NewClientWithListAndApply[*projectv1.Project, *projectv1.ProjectList, *applyconfigurationsprojectv1.ProjectApplyConfiguration]( "projects", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Project { return &v1.Project{} }, - func() *v1.ProjectList { return &v1.ProjectList{} }), + func() *projectv1.Project { return &projectv1.Project{} }, + func() *projectv1.ProjectList { return &projectv1.ProjectList{} }, + ), } } diff --git a/project/clientset/versioned/typed/project/v1/project_client.go b/project/clientset/versioned/typed/project/v1/project_client.go index 4757d14a90..c7a95421c0 100644 --- a/project/clientset/versioned/typed/project/v1/project_client.go +++ b/project/clientset/versioned/typed/project/v1/project_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/project/v1" - "github.com/openshift/client-go/project/clientset/versioned/scheme" + projectv1 "github.com/openshift/api/project/v1" + scheme "github.com/openshift/client-go/project/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *ProjectV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := projectv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/project/clientset/versioned/typed/project/v1/projectrequest.go b/project/clientset/versioned/typed/project/v1/projectrequest.go index 62e4d366bc..33cdcaa5e4 100644 --- a/project/clientset/versioned/typed/project/v1/projectrequest.go +++ b/project/clientset/versioned/typed/project/v1/projectrequest.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - projectv1 "github.com/openshift/api/project/v1" - v1 "github.com/openshift/client-go/project/applyconfigurations/project/v1" + apiprojectv1 "github.com/openshift/api/project/v1" + projectv1 "github.com/openshift/client-go/project/applyconfigurations/project/v1" scheme "github.com/openshift/client-go/project/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -20,32 +20,33 @@ type ProjectRequestsGetter interface { // ProjectRequestInterface has methods to work with ProjectRequest resources. type ProjectRequestInterface interface { - Apply(ctx context.Context, projectRequest *v1.ProjectRequestApplyConfiguration, opts metav1.ApplyOptions) (result *projectv1.ProjectRequest, err error) - Create(ctx context.Context, projectRequest *projectv1.ProjectRequest, opts metav1.CreateOptions) (*projectv1.Project, error) + Apply(ctx context.Context, projectRequest *projectv1.ProjectRequestApplyConfiguration, opts metav1.ApplyOptions) (result *apiprojectv1.ProjectRequest, err error) + Create(ctx context.Context, projectRequest *apiprojectv1.ProjectRequest, opts metav1.CreateOptions) (*apiprojectv1.Project, error) ProjectRequestExpansion } // projectRequests implements ProjectRequestInterface type projectRequests struct { - *gentype.ClientWithApply[*projectv1.ProjectRequest, *v1.ProjectRequestApplyConfiguration] + *gentype.ClientWithApply[*apiprojectv1.ProjectRequest, *projectv1.ProjectRequestApplyConfiguration] } // newProjectRequests returns a ProjectRequests func newProjectRequests(c *ProjectV1Client) *projectRequests { return &projectRequests{ - gentype.NewClientWithApply[*projectv1.ProjectRequest, *v1.ProjectRequestApplyConfiguration]( + gentype.NewClientWithApply[*apiprojectv1.ProjectRequest, *projectv1.ProjectRequestApplyConfiguration]( "projectrequests", c.RESTClient(), scheme.ParameterCodec, "", - func() *projectv1.ProjectRequest { return &projectv1.ProjectRequest{} }), + func() *apiprojectv1.ProjectRequest { return &apiprojectv1.ProjectRequest{} }, + ), } } // Create takes the representation of a projectRequest and creates it. Returns the server's representation of the project, and an error, if there is any. -func (c *projectRequests) Create(ctx context.Context, projectRequest *projectv1.ProjectRequest, opts metav1.CreateOptions) (result *projectv1.Project, err error) { - result = &projectv1.Project{} +func (c *projectRequests) Create(ctx context.Context, projectRequest *apiprojectv1.ProjectRequest, opts metav1.CreateOptions) (result *apiprojectv1.Project, err error) { + result = &apiprojectv1.Project{} err = c.GetClient().Post(). Resource("projectrequests"). VersionedParams(&opts, scheme.ParameterCodec). diff --git a/project/informers/externalversions/generic.go b/project/informers/externalversions/generic.go index a92d6839c7..3ebb948deb 100644 --- a/project/informers/externalversions/generic.go +++ b/project/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/project/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/project/informers/externalversions/project/v1/project.go b/project/informers/externalversions/project/v1/project.go index d7aab0f90a..c12eb047e0 100644 --- a/project/informers/externalversions/project/v1/project.go +++ b/project/informers/externalversions/project/v1/project.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - projectv1 "github.com/openshift/api/project/v1" + apiprojectv1 "github.com/openshift/api/project/v1" versioned "github.com/openshift/client-go/project/clientset/versioned" internalinterfaces "github.com/openshift/client-go/project/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/project/listers/project/v1" + projectv1 "github.com/openshift/client-go/project/listers/project/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Projects. type ProjectInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ProjectLister + Lister() projectv1.ProjectLister } type projectInformer struct { @@ -54,7 +54,7 @@ func NewFilteredProjectInformer(client versioned.Interface, resyncPeriod time.Du return client.ProjectV1().Projects().Watch(context.TODO(), options) }, }, - &projectv1.Project{}, + &apiprojectv1.Project{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *projectInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *projectInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&projectv1.Project{}, f.defaultInformer) + return f.factory.InformerFor(&apiprojectv1.Project{}, f.defaultInformer) } -func (f *projectInformer) Lister() v1.ProjectLister { - return v1.NewProjectLister(f.Informer().GetIndexer()) +func (f *projectInformer) Lister() projectv1.ProjectLister { + return projectv1.NewProjectLister(f.Informer().GetIndexer()) } diff --git a/project/listers/project/v1/project.go b/project/listers/project/v1/project.go index 6bb403fd6b..8d397249ca 100644 --- a/project/listers/project/v1/project.go +++ b/project/listers/project/v1/project.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/project/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + projectv1 "github.com/openshift/api/project/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ProjectLister helps list Projects. @@ -14,19 +14,19 @@ import ( type ProjectLister interface { // List lists all Projects in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Project, err error) + List(selector labels.Selector) (ret []*projectv1.Project, err error) // Get retrieves the Project from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Project, error) + Get(name string) (*projectv1.Project, error) ProjectListerExpansion } // projectLister implements the ProjectLister interface. type projectLister struct { - listers.ResourceIndexer[*v1.Project] + listers.ResourceIndexer[*projectv1.Project] } // NewProjectLister returns a new ProjectLister. func NewProjectLister(indexer cache.Indexer) ProjectLister { - return &projectLister{listers.New[*v1.Project](indexer, v1.Resource("project"))} + return &projectLister{listers.New[*projectv1.Project](indexer, projectv1.Resource("project"))} } diff --git a/quota/applyconfigurations/internal/internal.go b/quota/applyconfigurations/internal/internal.go index 9f68b9af28..003565e7a3 100644 --- a/quota/applyconfigurations/internal/internal.go +++ b/quota/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/quota/applyconfigurations/quota/v1/clusterresourcequota.go b/quota/applyconfigurations/quota/v1/clusterresourcequota.go index 4f03f40087..c279b27887 100644 --- a/quota/applyconfigurations/quota/v1/clusterresourcequota.go +++ b/quota/applyconfigurations/quota/v1/clusterresourcequota.go @@ -3,21 +3,21 @@ package v1 import ( - apiquotav1 "github.com/openshift/api/quota/v1" + quotav1 "github.com/openshift/api/quota/v1" internal "github.com/openshift/client-go/quota/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterResourceQuotaApplyConfiguration represents a declarative configuration of the ClusterResourceQuota type for use // with apply. type ClusterResourceQuotaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterResourceQuotaSpecApplyConfiguration `json:"spec,omitempty"` - Status *ClusterResourceQuotaStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ClusterResourceQuotaSpecApplyConfiguration `json:"spec,omitempty"` + Status *ClusterResourceQuotaStatusApplyConfiguration `json:"status,omitempty"` } // ClusterResourceQuota constructs a declarative configuration of the ClusterResourceQuota type for use with @@ -41,18 +41,18 @@ func ClusterResourceQuota(name string) *ClusterResourceQuotaApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractClusterResourceQuota(clusterResourceQuota *apiquotav1.ClusterResourceQuota, fieldManager string) (*ClusterResourceQuotaApplyConfiguration, error) { +func ExtractClusterResourceQuota(clusterResourceQuota *quotav1.ClusterResourceQuota, fieldManager string) (*ClusterResourceQuotaApplyConfiguration, error) { return extractClusterResourceQuota(clusterResourceQuota, fieldManager, "") } // ExtractClusterResourceQuotaStatus is the same as ExtractClusterResourceQuota except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractClusterResourceQuotaStatus(clusterResourceQuota *apiquotav1.ClusterResourceQuota, fieldManager string) (*ClusterResourceQuotaApplyConfiguration, error) { +func ExtractClusterResourceQuotaStatus(clusterResourceQuota *quotav1.ClusterResourceQuota, fieldManager string) (*ClusterResourceQuotaApplyConfiguration, error) { return extractClusterResourceQuota(clusterResourceQuota, fieldManager, "status") } -func extractClusterResourceQuota(clusterResourceQuota *apiquotav1.ClusterResourceQuota, fieldManager string, subresource string) (*ClusterResourceQuotaApplyConfiguration, error) { +func extractClusterResourceQuota(clusterResourceQuota *quotav1.ClusterResourceQuota, fieldManager string, subresource string) (*ClusterResourceQuotaApplyConfiguration, error) { b := &ClusterResourceQuotaApplyConfiguration{} err := managedfields.ExtractInto(clusterResourceQuota, internal.Parser().Type("com.github.openshift.api.quota.v1.ClusterResourceQuota"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractClusterResourceQuota(clusterResourceQuota *apiquotav1.ClusterResourc // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithKind(value string) *ClusterResourceQuotaApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithKind(value string) *Cluster // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithAPIVersion(value string) *ClusterResourceQuotaApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithAPIVersion(value string) *C // If called multiple times, the Name field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithName(value string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithName(value string) *Cluster // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithGenerateName(value string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithNamespace(value string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithNamespace(value string) *Cl // If called multiple times, the UID field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithUID(value types.UID) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithUID(value types.UID) *Clust // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithResourceVersion(value string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithResourceVersion(value strin // If called multiple times, the Generation field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithGeneration(value int64) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterResourceQuotaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterResourceQuotaApplyConfiguration { +func (b *ClusterResourceQuotaApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterResourceQuotaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterResourceQuotaApplyConfiguration { +func (b *ClusterResourceQuotaApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithDeletionTimestamp(value met // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ClusterResourceQuotaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithDeletionGracePeriodSeconds( // overwriting an existing map entries in Labels field with the same key. func (b *ClusterResourceQuotaApplyConfiguration) WithLabels(entries map[string]string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithLabels(entries map[string]s // overwriting an existing map entries in Annotations field with the same key. func (b *ClusterResourceQuotaApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithAnnotations(entries map[str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterResourceQuotaApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterResourceQuotaApplyConfiguration { +func (b *ClusterResourceQuotaApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithOwnerReferences(values ...* func (b *ClusterResourceQuotaApplyConfiguration) WithFinalizers(values ...string) *ClusterResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ClusterResourceQuotaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ClusterResourceQuotaApplyConfiguration) WithStatus(value *ClusterResour // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterResourceQuotaApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/quota/applyconfigurations/quota/v1/clusterresourcequotaselector.go b/quota/applyconfigurations/quota/v1/clusterresourcequotaselector.go index eadd4d6101..a759a1b9bc 100644 --- a/quota/applyconfigurations/quota/v1/clusterresourcequotaselector.go +++ b/quota/applyconfigurations/quota/v1/clusterresourcequotaselector.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterResourceQuotaSelectorApplyConfiguration represents a declarative configuration of the ClusterResourceQuotaSelector type for use // with apply. type ClusterResourceQuotaSelectorApplyConfiguration struct { - LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labels,omitempty"` - AnnotationSelector map[string]string `json:"annotations,omitempty"` + LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labels,omitempty"` + AnnotationSelector map[string]string `json:"annotations,omitempty"` } // ClusterResourceQuotaSelectorApplyConfiguration constructs a declarative configuration of the ClusterResourceQuotaSelector type for use with @@ -22,7 +22,7 @@ func ClusterResourceQuotaSelector() *ClusterResourceQuotaSelectorApplyConfigurat // WithLabelSelector sets the LabelSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LabelSelector field is set to the value of the last call. -func (b *ClusterResourceQuotaSelectorApplyConfiguration) WithLabelSelector(value *v1.LabelSelectorApplyConfiguration) *ClusterResourceQuotaSelectorApplyConfiguration { +func (b *ClusterResourceQuotaSelectorApplyConfiguration) WithLabelSelector(value *metav1.LabelSelectorApplyConfiguration) *ClusterResourceQuotaSelectorApplyConfiguration { b.LabelSelector = value return b } diff --git a/quota/applyconfigurations/quota/v1/clusterresourcequotastatus.go b/quota/applyconfigurations/quota/v1/clusterresourcequotastatus.go index b872413437..bd5dbca4d5 100644 --- a/quota/applyconfigurations/quota/v1/clusterresourcequotastatus.go +++ b/quota/applyconfigurations/quota/v1/clusterresourcequotastatus.go @@ -4,13 +4,13 @@ package v1 import ( quotav1 "github.com/openshift/api/quota/v1" - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ClusterResourceQuotaStatusApplyConfiguration represents a declarative configuration of the ClusterResourceQuotaStatus type for use // with apply. type ClusterResourceQuotaStatusApplyConfiguration struct { - Total *v1.ResourceQuotaStatus `json:"total,omitempty"` + Total *corev1.ResourceQuotaStatus `json:"total,omitempty"` Namespaces *quotav1.ResourceQuotasStatusByNamespace `json:"namespaces,omitempty"` } @@ -23,7 +23,7 @@ func ClusterResourceQuotaStatus() *ClusterResourceQuotaStatusApplyConfiguration // WithTotal sets the Total field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Total field is set to the value of the last call. -func (b *ClusterResourceQuotaStatusApplyConfiguration) WithTotal(value v1.ResourceQuotaStatus) *ClusterResourceQuotaStatusApplyConfiguration { +func (b *ClusterResourceQuotaStatusApplyConfiguration) WithTotal(value corev1.ResourceQuotaStatus) *ClusterResourceQuotaStatusApplyConfiguration { b.Total = &value return b } diff --git a/quota/applyconfigurations/quota/v1/resourcequotastatusbynamespace.go b/quota/applyconfigurations/quota/v1/resourcequotastatusbynamespace.go index dd854cbb50..973ba124f2 100644 --- a/quota/applyconfigurations/quota/v1/resourcequotastatusbynamespace.go +++ b/quota/applyconfigurations/quota/v1/resourcequotastatusbynamespace.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ResourceQuotaStatusByNamespaceApplyConfiguration represents a declarative configuration of the ResourceQuotaStatusByNamespace type for use // with apply. type ResourceQuotaStatusByNamespaceApplyConfiguration struct { - Namespace *string `json:"namespace,omitempty"` - Status *v1.ResourceQuotaStatus `json:"status,omitempty"` + Namespace *string `json:"namespace,omitempty"` + Status *corev1.ResourceQuotaStatus `json:"status,omitempty"` } // ResourceQuotaStatusByNamespaceApplyConfiguration constructs a declarative configuration of the ResourceQuotaStatusByNamespace type for use with @@ -30,7 +30,7 @@ func (b *ResourceQuotaStatusByNamespaceApplyConfiguration) WithNamespace(value s // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ResourceQuotaStatusByNamespaceApplyConfiguration) WithStatus(value v1.ResourceQuotaStatus) *ResourceQuotaStatusByNamespaceApplyConfiguration { +func (b *ResourceQuotaStatusByNamespaceApplyConfiguration) WithStatus(value corev1.ResourceQuotaStatus) *ResourceQuotaStatusByNamespaceApplyConfiguration { b.Status = &value return b } diff --git a/quota/clientset/versioned/clientset.go b/quota/clientset/versioned/clientset.go index 1881a32a28..e3a6e4f138 100644 --- a/quota/clientset/versioned/clientset.go +++ b/quota/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" quotav1 "github.com/openshift/client-go/quota/clientset/versioned/typed/quota/v1" discovery "k8s.io/client-go/discovery" diff --git a/quota/clientset/versioned/typed/quota/v1/appliedclusterresourcequota.go b/quota/clientset/versioned/typed/quota/v1/appliedclusterresourcequota.go index 87d2ca7dbc..61015404dd 100644 --- a/quota/clientset/versioned/typed/quota/v1/appliedclusterresourcequota.go +++ b/quota/clientset/versioned/typed/quota/v1/appliedclusterresourcequota.go @@ -3,11 +3,11 @@ package v1 import ( - "context" + context "context" quotav1 "github.com/openshift/api/quota/v1" scheme "github.com/openshift/client-go/quota/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" ) @@ -19,8 +19,8 @@ type AppliedClusterResourceQuotasGetter interface { // AppliedClusterResourceQuotaInterface has methods to work with AppliedClusterResourceQuota resources. type AppliedClusterResourceQuotaInterface interface { - Get(ctx context.Context, name string, opts v1.GetOptions) (*quotav1.AppliedClusterResourceQuota, error) - List(ctx context.Context, opts v1.ListOptions) (*quotav1.AppliedClusterResourceQuotaList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*quotav1.AppliedClusterResourceQuota, error) + List(ctx context.Context, opts metav1.ListOptions) (*quotav1.AppliedClusterResourceQuotaList, error) AppliedClusterResourceQuotaExpansion } @@ -38,6 +38,7 @@ func newAppliedClusterResourceQuotas(c *QuotaV1Client, namespace string) *applie scheme.ParameterCodec, namespace, func() *quotav1.AppliedClusterResourceQuota { return "av1.AppliedClusterResourceQuota{} }, - func() *quotav1.AppliedClusterResourceQuotaList { return "av1.AppliedClusterResourceQuotaList{} }), + func() *quotav1.AppliedClusterResourceQuotaList { return "av1.AppliedClusterResourceQuotaList{} }, + ), } } diff --git a/quota/clientset/versioned/typed/quota/v1/clusterresourcequota.go b/quota/clientset/versioned/typed/quota/v1/clusterresourcequota.go index e18988edab..20f25acfdf 100644 --- a/quota/clientset/versioned/typed/quota/v1/clusterresourcequota.go +++ b/quota/clientset/versioned/typed/quota/v1/clusterresourcequota.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/quota/v1" - quotav1 "github.com/openshift/client-go/quota/applyconfigurations/quota/v1" + quotav1 "github.com/openshift/api/quota/v1" + applyconfigurationsquotav1 "github.com/openshift/client-go/quota/applyconfigurations/quota/v1" scheme "github.com/openshift/client-go/quota/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ClusterResourceQuotasGetter interface { // ClusterResourceQuotaInterface has methods to work with ClusterResourceQuota resources. type ClusterResourceQuotaInterface interface { - Create(ctx context.Context, clusterResourceQuota *v1.ClusterResourceQuota, opts metav1.CreateOptions) (*v1.ClusterResourceQuota, error) - Update(ctx context.Context, clusterResourceQuota *v1.ClusterResourceQuota, opts metav1.UpdateOptions) (*v1.ClusterResourceQuota, error) + Create(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuota, opts metav1.CreateOptions) (*quotav1.ClusterResourceQuota, error) + Update(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuota, opts metav1.UpdateOptions) (*quotav1.ClusterResourceQuota, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterResourceQuota *v1.ClusterResourceQuota, opts metav1.UpdateOptions) (*v1.ClusterResourceQuota, error) + UpdateStatus(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuota, opts metav1.UpdateOptions) (*quotav1.ClusterResourceQuota, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.ClusterResourceQuota, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ClusterResourceQuotaList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*quotav1.ClusterResourceQuota, error) + List(ctx context.Context, opts metav1.ListOptions) (*quotav1.ClusterResourceQuotaList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterResourceQuota, err error) - Apply(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterResourceQuota, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *quotav1.ClusterResourceQuota, err error) + Apply(ctx context.Context, clusterResourceQuota *applyconfigurationsquotav1.ClusterResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *quotav1.ClusterResourceQuota, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterResourceQuota, err error) + ApplyStatus(ctx context.Context, clusterResourceQuota *applyconfigurationsquotav1.ClusterResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *quotav1.ClusterResourceQuota, err error) ClusterResourceQuotaExpansion } // clusterResourceQuotas implements ClusterResourceQuotaInterface type clusterResourceQuotas struct { - *gentype.ClientWithListAndApply[*v1.ClusterResourceQuota, *v1.ClusterResourceQuotaList, *quotav1.ClusterResourceQuotaApplyConfiguration] + *gentype.ClientWithListAndApply[*quotav1.ClusterResourceQuota, *quotav1.ClusterResourceQuotaList, *applyconfigurationsquotav1.ClusterResourceQuotaApplyConfiguration] } // newClusterResourceQuotas returns a ClusterResourceQuotas func newClusterResourceQuotas(c *QuotaV1Client) *clusterResourceQuotas { return &clusterResourceQuotas{ - gentype.NewClientWithListAndApply[*v1.ClusterResourceQuota, *v1.ClusterResourceQuotaList, *quotav1.ClusterResourceQuotaApplyConfiguration]( + gentype.NewClientWithListAndApply[*quotav1.ClusterResourceQuota, *quotav1.ClusterResourceQuotaList, *applyconfigurationsquotav1.ClusterResourceQuotaApplyConfiguration]( "clusterresourcequotas", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.ClusterResourceQuota { return &v1.ClusterResourceQuota{} }, - func() *v1.ClusterResourceQuotaList { return &v1.ClusterResourceQuotaList{} }), + func() *quotav1.ClusterResourceQuota { return "av1.ClusterResourceQuota{} }, + func() *quotav1.ClusterResourceQuotaList { return "av1.ClusterResourceQuotaList{} }, + ), } } diff --git a/quota/clientset/versioned/typed/quota/v1/fake/fake_appliedclusterresourcequota.go b/quota/clientset/versioned/typed/quota/v1/fake/fake_appliedclusterresourcequota.go index 0a59e0df0f..4f0aacb1ae 100644 --- a/quota/clientset/versioned/typed/quota/v1/fake/fake_appliedclusterresourcequota.go +++ b/quota/clientset/versioned/typed/quota/v1/fake/fake_appliedclusterresourcequota.go @@ -3,55 +3,34 @@ package fake import ( - "context" - v1 "github.com/openshift/api/quota/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - testing "k8s.io/client-go/testing" + quotav1 "github.com/openshift/client-go/quota/clientset/versioned/typed/quota/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeAppliedClusterResourceQuotas implements AppliedClusterResourceQuotaInterface -type FakeAppliedClusterResourceQuotas struct { +// fakeAppliedClusterResourceQuotas implements AppliedClusterResourceQuotaInterface +type fakeAppliedClusterResourceQuotas struct { + *gentype.FakeClientWithList[*v1.AppliedClusterResourceQuota, *v1.AppliedClusterResourceQuotaList] Fake *FakeQuotaV1 - ns string } -var appliedclusterresourcequotasResource = v1.SchemeGroupVersion.WithResource("appliedclusterresourcequotas") - -var appliedclusterresourcequotasKind = v1.SchemeGroupVersion.WithKind("AppliedClusterResourceQuota") - -// Get takes name of the appliedClusterResourceQuota, and returns the corresponding appliedClusterResourceQuota object, and an error if there is any. -func (c *FakeAppliedClusterResourceQuotas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.AppliedClusterResourceQuota, err error) { - emptyResult := &v1.AppliedClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(appliedclusterresourcequotasResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.AppliedClusterResourceQuota), err -} - -// List takes label and field selectors, and returns the list of AppliedClusterResourceQuotas that match those selectors. -func (c *FakeAppliedClusterResourceQuotas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AppliedClusterResourceQuotaList, err error) { - emptyResult := &v1.AppliedClusterResourceQuotaList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(appliedclusterresourcequotasResource, appliedclusterresourcequotasKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.AppliedClusterResourceQuotaList{ListMeta: obj.(*v1.AppliedClusterResourceQuotaList).ListMeta} - for _, item := range obj.(*v1.AppliedClusterResourceQuotaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } +func newFakeAppliedClusterResourceQuotas(fake *FakeQuotaV1, namespace string) quotav1.AppliedClusterResourceQuotaInterface { + return &fakeAppliedClusterResourceQuotas{ + gentype.NewFakeClientWithList[*v1.AppliedClusterResourceQuota, *v1.AppliedClusterResourceQuotaList]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("appliedclusterresourcequotas"), + v1.SchemeGroupVersion.WithKind("AppliedClusterResourceQuota"), + func() *v1.AppliedClusterResourceQuota { return &v1.AppliedClusterResourceQuota{} }, + func() *v1.AppliedClusterResourceQuotaList { return &v1.AppliedClusterResourceQuotaList{} }, + func(dst, src *v1.AppliedClusterResourceQuotaList) { dst.ListMeta = src.ListMeta }, + func(list *v1.AppliedClusterResourceQuotaList) []*v1.AppliedClusterResourceQuota { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.AppliedClusterResourceQuotaList, items []*v1.AppliedClusterResourceQuota) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return list, err } diff --git a/quota/clientset/versioned/typed/quota/v1/fake/fake_clusterresourcequota.go b/quota/clientset/versioned/typed/quota/v1/fake/fake_clusterresourcequota.go index 3e596944a1..1190f29aaa 100644 --- a/quota/clientset/versioned/typed/quota/v1/fake/fake_clusterresourcequota.go +++ b/quota/clientset/versioned/typed/quota/v1/fake/fake_clusterresourcequota.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/quota/v1" quotav1 "github.com/openshift/client-go/quota/applyconfigurations/quota/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedquotav1 "github.com/openshift/client-go/quota/clientset/versioned/typed/quota/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeClusterResourceQuotas implements ClusterResourceQuotaInterface -type FakeClusterResourceQuotas struct { +// fakeClusterResourceQuotas implements ClusterResourceQuotaInterface +type fakeClusterResourceQuotas struct { + *gentype.FakeClientWithListAndApply[*v1.ClusterResourceQuota, *v1.ClusterResourceQuotaList, *quotav1.ClusterResourceQuotaApplyConfiguration] Fake *FakeQuotaV1 } -var clusterresourcequotasResource = v1.SchemeGroupVersion.WithResource("clusterresourcequotas") - -var clusterresourcequotasKind = v1.SchemeGroupVersion.WithKind("ClusterResourceQuota") - -// Get takes name of the clusterResourceQuota, and returns the corresponding clusterResourceQuota object, and an error if there is any. -func (c *FakeClusterResourceQuotas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterResourceQuota, err error) { - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(clusterresourcequotasResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterResourceQuota), err -} - -// List takes label and field selectors, and returns the list of ClusterResourceQuotas that match those selectors. -func (c *FakeClusterResourceQuotas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterResourceQuotaList, err error) { - emptyResult := &v1.ClusterResourceQuotaList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(clusterresourcequotasResource, clusterresourcequotasKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ClusterResourceQuotaList{ListMeta: obj.(*v1.ClusterResourceQuotaList).ListMeta} - for _, item := range obj.(*v1.ClusterResourceQuotaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested clusterResourceQuotas. -func (c *FakeClusterResourceQuotas) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(clusterresourcequotasResource, opts)) -} - -// Create takes the representation of a clusterResourceQuota and creates it. Returns the server's representation of the clusterResourceQuota, and an error, if there is any. -func (c *FakeClusterResourceQuotas) Create(ctx context.Context, clusterResourceQuota *v1.ClusterResourceQuota, opts metav1.CreateOptions) (result *v1.ClusterResourceQuota, err error) { - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(clusterresourcequotasResource, clusterResourceQuota, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterResourceQuota), err -} - -// Update takes the representation of a clusterResourceQuota and updates it. Returns the server's representation of the clusterResourceQuota, and an error, if there is any. -func (c *FakeClusterResourceQuotas) Update(ctx context.Context, clusterResourceQuota *v1.ClusterResourceQuota, opts metav1.UpdateOptions) (result *v1.ClusterResourceQuota, err error) { - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(clusterresourcequotasResource, clusterResourceQuota, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterResourceQuota), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeClusterResourceQuotas) UpdateStatus(ctx context.Context, clusterResourceQuota *v1.ClusterResourceQuota, opts metav1.UpdateOptions) (result *v1.ClusterResourceQuota, err error) { - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(clusterresourcequotasResource, "status", clusterResourceQuota, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterResourceQuota), err -} - -// Delete takes name of the clusterResourceQuota and deletes it. Returns an error if one occurs. -func (c *FakeClusterResourceQuotas) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(clusterresourcequotasResource, name, opts), &v1.ClusterResourceQuota{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeClusterResourceQuotas) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(clusterresourcequotasResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ClusterResourceQuotaList{}) - return err -} - -// Patch applies the patch and returns the patched clusterResourceQuota. -func (c *FakeClusterResourceQuotas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterResourceQuota, err error) { - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterresourcequotasResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterResourceQuota), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied clusterResourceQuota. -func (c *FakeClusterResourceQuotas) Apply(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterResourceQuota, err error) { - if clusterResourceQuota == nil { - return nil, fmt.Errorf("clusterResourceQuota provided to Apply must not be nil") - } - data, err := json.Marshal(clusterResourceQuota) - if err != nil { - return nil, err - } - name := clusterResourceQuota.Name - if name == nil { - return nil, fmt.Errorf("clusterResourceQuota.Name must be provided to Apply") - } - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterresourcequotasResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.ClusterResourceQuota), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeClusterResourceQuotas) ApplyStatus(ctx context.Context, clusterResourceQuota *quotav1.ClusterResourceQuotaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.ClusterResourceQuota, err error) { - if clusterResourceQuota == nil { - return nil, fmt.Errorf("clusterResourceQuota provided to Apply must not be nil") - } - data, err := json.Marshal(clusterResourceQuota) - if err != nil { - return nil, err - } - name := clusterResourceQuota.Name - if name == nil { - return nil, fmt.Errorf("clusterResourceQuota.Name must be provided to Apply") - } - emptyResult := &v1.ClusterResourceQuota{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(clusterresourcequotasResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeClusterResourceQuotas(fake *FakeQuotaV1) typedquotav1.ClusterResourceQuotaInterface { + return &fakeClusterResourceQuotas{ + gentype.NewFakeClientWithListAndApply[*v1.ClusterResourceQuota, *v1.ClusterResourceQuotaList, *quotav1.ClusterResourceQuotaApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("clusterresourcequotas"), + v1.SchemeGroupVersion.WithKind("ClusterResourceQuota"), + func() *v1.ClusterResourceQuota { return &v1.ClusterResourceQuota{} }, + func() *v1.ClusterResourceQuotaList { return &v1.ClusterResourceQuotaList{} }, + func(dst, src *v1.ClusterResourceQuotaList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ClusterResourceQuotaList) []*v1.ClusterResourceQuota { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ClusterResourceQuotaList, items []*v1.ClusterResourceQuota) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.ClusterResourceQuota), err } diff --git a/quota/clientset/versioned/typed/quota/v1/fake/fake_quota_client.go b/quota/clientset/versioned/typed/quota/v1/fake/fake_quota_client.go index 7cb456bdff..eef668c671 100644 --- a/quota/clientset/versioned/typed/quota/v1/fake/fake_quota_client.go +++ b/quota/clientset/versioned/typed/quota/v1/fake/fake_quota_client.go @@ -13,11 +13,11 @@ type FakeQuotaV1 struct { } func (c *FakeQuotaV1) AppliedClusterResourceQuotas(namespace string) v1.AppliedClusterResourceQuotaInterface { - return &FakeAppliedClusterResourceQuotas{c, namespace} + return newFakeAppliedClusterResourceQuotas(c, namespace) } func (c *FakeQuotaV1) ClusterResourceQuotas() v1.ClusterResourceQuotaInterface { - return &FakeClusterResourceQuotas{c} + return newFakeClusterResourceQuotas(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/quota/clientset/versioned/typed/quota/v1/quota_client.go b/quota/clientset/versioned/typed/quota/v1/quota_client.go index 7b0fc89a56..3ff8154774 100644 --- a/quota/clientset/versioned/typed/quota/v1/quota_client.go +++ b/quota/clientset/versioned/typed/quota/v1/quota_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/quota/v1" - "github.com/openshift/client-go/quota/clientset/versioned/scheme" + quotav1 "github.com/openshift/api/quota/v1" + scheme "github.com/openshift/client-go/quota/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *QuotaV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := quotav1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/quota/informers/externalversions/generic.go b/quota/informers/externalversions/generic.go index d739a07c9c..54a2e3887c 100644 --- a/quota/informers/externalversions/generic.go +++ b/quota/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/quota/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/quota/informers/externalversions/quota/v1/clusterresourcequota.go b/quota/informers/externalversions/quota/v1/clusterresourcequota.go index cb8eb0e308..df790ff94a 100644 --- a/quota/informers/externalversions/quota/v1/clusterresourcequota.go +++ b/quota/informers/externalversions/quota/v1/clusterresourcequota.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - quotav1 "github.com/openshift/api/quota/v1" + apiquotav1 "github.com/openshift/api/quota/v1" versioned "github.com/openshift/client-go/quota/clientset/versioned" internalinterfaces "github.com/openshift/client-go/quota/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/quota/listers/quota/v1" + quotav1 "github.com/openshift/client-go/quota/listers/quota/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ClusterResourceQuotas. type ClusterResourceQuotaInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ClusterResourceQuotaLister + Lister() quotav1.ClusterResourceQuotaLister } type clusterResourceQuotaInformer struct { @@ -54,7 +54,7 @@ func NewFilteredClusterResourceQuotaInformer(client versioned.Interface, resyncP return client.QuotaV1().ClusterResourceQuotas().Watch(context.TODO(), options) }, }, - "av1.ClusterResourceQuota{}, + &apiquotav1.ClusterResourceQuota{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *clusterResourceQuotaInformer) defaultInformer(client versioned.Interfac } func (f *clusterResourceQuotaInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor("av1.ClusterResourceQuota{}, f.defaultInformer) + return f.factory.InformerFor(&apiquotav1.ClusterResourceQuota{}, f.defaultInformer) } -func (f *clusterResourceQuotaInformer) Lister() v1.ClusterResourceQuotaLister { - return v1.NewClusterResourceQuotaLister(f.Informer().GetIndexer()) +func (f *clusterResourceQuotaInformer) Lister() quotav1.ClusterResourceQuotaLister { + return quotav1.NewClusterResourceQuotaLister(f.Informer().GetIndexer()) } diff --git a/quota/listers/quota/v1/appliedclusterresourcequota.go b/quota/listers/quota/v1/appliedclusterresourcequota.go index 795d7f3476..6a393c0669 100644 --- a/quota/listers/quota/v1/appliedclusterresourcequota.go +++ b/quota/listers/quota/v1/appliedclusterresourcequota.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/quota/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + quotav1 "github.com/openshift/api/quota/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // AppliedClusterResourceQuotaLister helps list AppliedClusterResourceQuotas. @@ -14,7 +14,7 @@ import ( type AppliedClusterResourceQuotaLister interface { // List lists all AppliedClusterResourceQuotas in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.AppliedClusterResourceQuota, err error) + List(selector labels.Selector) (ret []*quotav1.AppliedClusterResourceQuota, err error) // AppliedClusterResourceQuotas returns an object that can list and get AppliedClusterResourceQuotas. AppliedClusterResourceQuotas(namespace string) AppliedClusterResourceQuotaNamespaceLister AppliedClusterResourceQuotaListerExpansion @@ -22,17 +22,17 @@ type AppliedClusterResourceQuotaLister interface { // appliedClusterResourceQuotaLister implements the AppliedClusterResourceQuotaLister interface. type appliedClusterResourceQuotaLister struct { - listers.ResourceIndexer[*v1.AppliedClusterResourceQuota] + listers.ResourceIndexer[*quotav1.AppliedClusterResourceQuota] } // NewAppliedClusterResourceQuotaLister returns a new AppliedClusterResourceQuotaLister. func NewAppliedClusterResourceQuotaLister(indexer cache.Indexer) AppliedClusterResourceQuotaLister { - return &appliedClusterResourceQuotaLister{listers.New[*v1.AppliedClusterResourceQuota](indexer, v1.Resource("appliedclusterresourcequota"))} + return &appliedClusterResourceQuotaLister{listers.New[*quotav1.AppliedClusterResourceQuota](indexer, quotav1.Resource("appliedclusterresourcequota"))} } // AppliedClusterResourceQuotas returns an object that can list and get AppliedClusterResourceQuotas. func (s *appliedClusterResourceQuotaLister) AppliedClusterResourceQuotas(namespace string) AppliedClusterResourceQuotaNamespaceLister { - return appliedClusterResourceQuotaNamespaceLister{listers.NewNamespaced[*v1.AppliedClusterResourceQuota](s.ResourceIndexer, namespace)} + return appliedClusterResourceQuotaNamespaceLister{listers.NewNamespaced[*quotav1.AppliedClusterResourceQuota](s.ResourceIndexer, namespace)} } // AppliedClusterResourceQuotaNamespaceLister helps list and get AppliedClusterResourceQuotas. @@ -40,15 +40,15 @@ func (s *appliedClusterResourceQuotaLister) AppliedClusterResourceQuotas(namespa type AppliedClusterResourceQuotaNamespaceLister interface { // List lists all AppliedClusterResourceQuotas in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.AppliedClusterResourceQuota, err error) + List(selector labels.Selector) (ret []*quotav1.AppliedClusterResourceQuota, err error) // Get retrieves the AppliedClusterResourceQuota from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.AppliedClusterResourceQuota, error) + Get(name string) (*quotav1.AppliedClusterResourceQuota, error) AppliedClusterResourceQuotaNamespaceListerExpansion } // appliedClusterResourceQuotaNamespaceLister implements the AppliedClusterResourceQuotaNamespaceLister // interface. type appliedClusterResourceQuotaNamespaceLister struct { - listers.ResourceIndexer[*v1.AppliedClusterResourceQuota] + listers.ResourceIndexer[*quotav1.AppliedClusterResourceQuota] } diff --git a/quota/listers/quota/v1/clusterresourcequota.go b/quota/listers/quota/v1/clusterresourcequota.go index 20c9bff349..ab47dd76cf 100644 --- a/quota/listers/quota/v1/clusterresourcequota.go +++ b/quota/listers/quota/v1/clusterresourcequota.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/quota/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + quotav1 "github.com/openshift/api/quota/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ClusterResourceQuotaLister helps list ClusterResourceQuotas. @@ -14,19 +14,19 @@ import ( type ClusterResourceQuotaLister interface { // List lists all ClusterResourceQuotas in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.ClusterResourceQuota, err error) + List(selector labels.Selector) (ret []*quotav1.ClusterResourceQuota, err error) // Get retrieves the ClusterResourceQuota from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.ClusterResourceQuota, error) + Get(name string) (*quotav1.ClusterResourceQuota, error) ClusterResourceQuotaListerExpansion } // clusterResourceQuotaLister implements the ClusterResourceQuotaLister interface. type clusterResourceQuotaLister struct { - listers.ResourceIndexer[*v1.ClusterResourceQuota] + listers.ResourceIndexer[*quotav1.ClusterResourceQuota] } // NewClusterResourceQuotaLister returns a new ClusterResourceQuotaLister. func NewClusterResourceQuotaLister(indexer cache.Indexer) ClusterResourceQuotaLister { - return &clusterResourceQuotaLister{listers.New[*v1.ClusterResourceQuota](indexer, v1.Resource("clusterresourcequota"))} + return &clusterResourceQuotaLister{listers.New[*quotav1.ClusterResourceQuota](indexer, quotav1.Resource("clusterresourcequota"))} } diff --git a/route/applyconfigurations/internal/internal.go b/route/applyconfigurations/internal/internal.go index 3775c9b7a1..028bb32f03 100644 --- a/route/applyconfigurations/internal/internal.go +++ b/route/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/route/applyconfigurations/route/v1/route.go b/route/applyconfigurations/route/v1/route.go index c08d46b9b5..b962647b8f 100644 --- a/route/applyconfigurations/route/v1/route.go +++ b/route/applyconfigurations/route/v1/route.go @@ -3,21 +3,21 @@ package v1 import ( - apiroutev1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" internal "github.com/openshift/client-go/route/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RouteApplyConfiguration represents a declarative configuration of the Route type for use // with apply. type RouteApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *RouteSpecApplyConfiguration `json:"spec,omitempty"` - Status *RouteStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *RouteSpecApplyConfiguration `json:"spec,omitempty"` + Status *RouteStatusApplyConfiguration `json:"status,omitempty"` } // Route constructs a declarative configuration of the Route type for use with @@ -42,18 +42,18 @@ func Route(name, namespace string) *RouteApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractRoute(route *apiroutev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { +func ExtractRoute(route *routev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { return extractRoute(route, fieldManager, "") } // ExtractRouteStatus is the same as ExtractRoute except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractRouteStatus(route *apiroutev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { +func ExtractRouteStatus(route *routev1.Route, fieldManager string) (*RouteApplyConfiguration, error) { return extractRoute(route, fieldManager, "status") } -func extractRoute(route *apiroutev1.Route, fieldManager string, subresource string) (*RouteApplyConfiguration, error) { +func extractRoute(route *routev1.Route, fieldManager string, subresource string) (*RouteApplyConfiguration, error) { b := &RouteApplyConfiguration{} err := managedfields.ExtractInto(route, internal.Parser().Type("com.github.openshift.api.route.v1.Route"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractRoute(route *apiroutev1.Route, fieldManager string, subresource stri // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RouteApplyConfiguration) WithKind(value string) *RouteApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *RouteApplyConfiguration) WithKind(value string) *RouteApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RouteApplyConfiguration) WithAPIVersion(value string) *RouteApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *RouteApplyConfiguration) WithAPIVersion(value string) *RouteApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *RouteApplyConfiguration) WithName(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *RouteApplyConfiguration) WithName(value string) *RouteApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RouteApplyConfiguration) WithGenerateName(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *RouteApplyConfiguration) WithGenerateName(value string) *RouteApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *RouteApplyConfiguration) WithNamespace(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *RouteApplyConfiguration) WithNamespace(value string) *RouteApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *RouteApplyConfiguration) WithUID(value types.UID) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *RouteApplyConfiguration) WithUID(value types.UID) *RouteApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RouteApplyConfiguration) WithResourceVersion(value string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *RouteApplyConfiguration) WithResourceVersion(value string) *RouteApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *RouteApplyConfiguration) WithGeneration(value int64) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RouteApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RouteApplyConfiguration { +func (b *RouteApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RouteApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RouteApplyConfiguration { +func (b *RouteApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *RouteApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Rout // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RouteApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *RouteApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *R // overwriting an existing map entries in Labels field with the same key. func (b *RouteApplyConfiguration) WithLabels(entries map[string]string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *RouteApplyConfiguration) WithLabels(entries map[string]string) *RouteAp // overwriting an existing map entries in Annotations field with the same key. func (b *RouteApplyConfiguration) WithAnnotations(entries map[string]string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *RouteApplyConfiguration) WithAnnotations(entries map[string]string) *Ro // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RouteApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RouteApplyConfiguration { +func (b *RouteApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *RouteApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *RouteApplyConfiguration) WithFinalizers(values ...string) *RouteApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RouteApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *RouteApplyConfiguration) WithStatus(value *RouteStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *RouteApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/route/applyconfigurations/route/v1/routehttpheaderactionunion.go b/route/applyconfigurations/route/v1/routehttpheaderactionunion.go index 6dfe8916b2..a54a0913cc 100644 --- a/route/applyconfigurations/route/v1/routehttpheaderactionunion.go +++ b/route/applyconfigurations/route/v1/routehttpheaderactionunion.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" ) // RouteHTTPHeaderActionUnionApplyConfiguration represents a declarative configuration of the RouteHTTPHeaderActionUnion type for use // with apply. type RouteHTTPHeaderActionUnionApplyConfiguration struct { - Type *v1.RouteHTTPHeaderActionType `json:"type,omitempty"` + Type *routev1.RouteHTTPHeaderActionType `json:"type,omitempty"` Set *RouteSetHTTPHeaderApplyConfiguration `json:"set,omitempty"` } @@ -22,7 +22,7 @@ func RouteHTTPHeaderActionUnion() *RouteHTTPHeaderActionUnionApplyConfiguration // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *RouteHTTPHeaderActionUnionApplyConfiguration) WithType(value v1.RouteHTTPHeaderActionType) *RouteHTTPHeaderActionUnionApplyConfiguration { +func (b *RouteHTTPHeaderActionUnionApplyConfiguration) WithType(value routev1.RouteHTTPHeaderActionType) *RouteHTTPHeaderActionUnionApplyConfiguration { b.Type = &value return b } diff --git a/route/applyconfigurations/route/v1/routeingresscondition.go b/route/applyconfigurations/route/v1/routeingresscondition.go index 191ce55757..1ddebe528d 100644 --- a/route/applyconfigurations/route/v1/routeingresscondition.go +++ b/route/applyconfigurations/route/v1/routeingresscondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // RouteIngressConditionApplyConfiguration represents a declarative configuration of the RouteIngressCondition type for use // with apply. type RouteIngressConditionApplyConfiguration struct { - Type *v1.RouteIngressConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Type *routev1.RouteIngressConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` } // RouteIngressConditionApplyConfiguration constructs a declarative configuration of the RouteIngressCondition type for use with @@ -27,7 +27,7 @@ func RouteIngressCondition() *RouteIngressConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *RouteIngressConditionApplyConfiguration) WithType(value v1.RouteIngressConditionType) *RouteIngressConditionApplyConfiguration { +func (b *RouteIngressConditionApplyConfiguration) WithType(value routev1.RouteIngressConditionType) *RouteIngressConditionApplyConfiguration { b.Type = &value return b } diff --git a/route/applyconfigurations/route/v1/tlsconfig.go b/route/applyconfigurations/route/v1/tlsconfig.go index e76edd2b86..296c4efc9b 100644 --- a/route/applyconfigurations/route/v1/tlsconfig.go +++ b/route/applyconfigurations/route/v1/tlsconfig.go @@ -3,19 +3,19 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" + routev1 "github.com/openshift/api/route/v1" ) // TLSConfigApplyConfiguration represents a declarative configuration of the TLSConfig type for use // with apply. type TLSConfigApplyConfiguration struct { - Termination *v1.TLSTerminationType `json:"termination,omitempty"` - Certificate *string `json:"certificate,omitempty"` - Key *string `json:"key,omitempty"` - CACertificate *string `json:"caCertificate,omitempty"` - DestinationCACertificate *string `json:"destinationCACertificate,omitempty"` - InsecureEdgeTerminationPolicy *v1.InsecureEdgeTerminationPolicyType `json:"insecureEdgeTerminationPolicy,omitempty"` - ExternalCertificate *LocalObjectReferenceApplyConfiguration `json:"externalCertificate,omitempty"` + Termination *routev1.TLSTerminationType `json:"termination,omitempty"` + Certificate *string `json:"certificate,omitempty"` + Key *string `json:"key,omitempty"` + CACertificate *string `json:"caCertificate,omitempty"` + DestinationCACertificate *string `json:"destinationCACertificate,omitempty"` + InsecureEdgeTerminationPolicy *routev1.InsecureEdgeTerminationPolicyType `json:"insecureEdgeTerminationPolicy,omitempty"` + ExternalCertificate *LocalObjectReferenceApplyConfiguration `json:"externalCertificate,omitempty"` } // TLSConfigApplyConfiguration constructs a declarative configuration of the TLSConfig type for use with @@ -27,7 +27,7 @@ func TLSConfig() *TLSConfigApplyConfiguration { // WithTermination sets the Termination field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Termination field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithTermination(value v1.TLSTerminationType) *TLSConfigApplyConfiguration { +func (b *TLSConfigApplyConfiguration) WithTermination(value routev1.TLSTerminationType) *TLSConfigApplyConfiguration { b.Termination = &value return b } @@ -67,7 +67,7 @@ func (b *TLSConfigApplyConfiguration) WithDestinationCACertificate(value string) // WithInsecureEdgeTerminationPolicy sets the InsecureEdgeTerminationPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the InsecureEdgeTerminationPolicy field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithInsecureEdgeTerminationPolicy(value v1.InsecureEdgeTerminationPolicyType) *TLSConfigApplyConfiguration { +func (b *TLSConfigApplyConfiguration) WithInsecureEdgeTerminationPolicy(value routev1.InsecureEdgeTerminationPolicyType) *TLSConfigApplyConfiguration { b.InsecureEdgeTerminationPolicy = &value return b } diff --git a/route/clientset/versioned/clientset.go b/route/clientset/versioned/clientset.go index 23c80b601f..e81ff98b38 100644 --- a/route/clientset/versioned/clientset.go +++ b/route/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" routev1 "github.com/openshift/client-go/route/clientset/versioned/typed/route/v1" discovery "k8s.io/client-go/discovery" diff --git a/route/clientset/versioned/typed/route/v1/fake/fake_route.go b/route/clientset/versioned/typed/route/v1/fake/fake_route.go index acf7eb8c5a..08eb7215a3 100644 --- a/route/clientset/versioned/typed/route/v1/fake/fake_route.go +++ b/route/clientset/versioned/typed/route/v1/fake/fake_route.go @@ -3,179 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/route/v1" routev1 "github.com/openshift/client-go/route/applyconfigurations/route/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedroutev1 "github.com/openshift/client-go/route/clientset/versioned/typed/route/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeRoutes implements RouteInterface -type FakeRoutes struct { +// fakeRoutes implements RouteInterface +type fakeRoutes struct { + *gentype.FakeClientWithListAndApply[*v1.Route, *v1.RouteList, *routev1.RouteApplyConfiguration] Fake *FakeRouteV1 - ns string -} - -var routesResource = v1.SchemeGroupVersion.WithResource("routes") - -var routesKind = v1.SchemeGroupVersion.WithKind("Route") - -// Get takes name of the route, and returns the corresponding route object, and an error if there is any. -func (c *FakeRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Route, err error) { - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(routesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Route), err -} - -// List takes label and field selectors, and returns the list of Routes that match those selectors. -func (c *FakeRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RouteList, err error) { - emptyResult := &v1.RouteList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(routesResource, routesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.RouteList{ListMeta: obj.(*v1.RouteList).ListMeta} - for _, item := range obj.(*v1.RouteList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested routes. -func (c *FakeRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(routesResource, c.ns, opts)) - -} - -// Create takes the representation of a route and creates it. Returns the server's representation of the route, and an error, if there is any. -func (c *FakeRoutes) Create(ctx context.Context, route *v1.Route, opts metav1.CreateOptions) (result *v1.Route, err error) { - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(routesResource, c.ns, route, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Route), err -} - -// Update takes the representation of a route and updates it. Returns the server's representation of the route, and an error, if there is any. -func (c *FakeRoutes) Update(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (result *v1.Route, err error) { - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(routesResource, c.ns, route, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Route), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeRoutes) UpdateStatus(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (result *v1.Route, err error) { - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(routesResource, "status", c.ns, route, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Route), err -} - -// Delete takes name of the route and deletes it. Returns an error if one occurs. -func (c *FakeRoutes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(routesResource, c.ns, name, opts), &v1.Route{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(routesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.RouteList{}) - return err -} - -// Patch applies the patch and returns the patched route. -func (c *FakeRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Route, err error) { - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(routesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Route), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied route. -func (c *FakeRoutes) Apply(ctx context.Context, route *routev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Route, err error) { - if route == nil { - return nil, fmt.Errorf("route provided to Apply must not be nil") - } - data, err := json.Marshal(route) - if err != nil { - return nil, err - } - name := route.Name - if name == nil { - return nil, fmt.Errorf("route.Name must be provided to Apply") - } - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(routesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Route), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeRoutes) ApplyStatus(ctx context.Context, route *routev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Route, err error) { - if route == nil { - return nil, fmt.Errorf("route provided to Apply must not be nil") - } - data, err := json.Marshal(route) - if err != nil { - return nil, err - } - name := route.Name - if name == nil { - return nil, fmt.Errorf("route.Name must be provided to Apply") - } - emptyResult := &v1.Route{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(routesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeRoutes(fake *FakeRouteV1, namespace string) typedroutev1.RouteInterface { + return &fakeRoutes{ + gentype.NewFakeClientWithListAndApply[*v1.Route, *v1.RouteList, *routev1.RouteApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("routes"), + v1.SchemeGroupVersion.WithKind("Route"), + func() *v1.Route { return &v1.Route{} }, + func() *v1.RouteList { return &v1.RouteList{} }, + func(dst, src *v1.RouteList) { dst.ListMeta = src.ListMeta }, + func(list *v1.RouteList) []*v1.Route { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.RouteList, items []*v1.Route) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Route), err } diff --git a/route/clientset/versioned/typed/route/v1/fake/fake_route_client.go b/route/clientset/versioned/typed/route/v1/fake/fake_route_client.go index f942964366..1dd296d727 100644 --- a/route/clientset/versioned/typed/route/v1/fake/fake_route_client.go +++ b/route/clientset/versioned/typed/route/v1/fake/fake_route_client.go @@ -13,7 +13,7 @@ type FakeRouteV1 struct { } func (c *FakeRouteV1) Routes(namespace string) v1.RouteInterface { - return &FakeRoutes{c, namespace} + return newFakeRoutes(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/route/clientset/versioned/typed/route/v1/route.go b/route/clientset/versioned/typed/route/v1/route.go index c37f331af8..fa11e4aa14 100644 --- a/route/clientset/versioned/typed/route/v1/route.go +++ b/route/clientset/versioned/typed/route/v1/route.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/route/v1" - routev1 "github.com/openshift/client-go/route/applyconfigurations/route/v1" + routev1 "github.com/openshift/api/route/v1" + applyconfigurationsroutev1 "github.com/openshift/client-go/route/applyconfigurations/route/v1" scheme "github.com/openshift/client-go/route/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type RoutesGetter interface { // RouteInterface has methods to work with Route resources. type RouteInterface interface { - Create(ctx context.Context, route *v1.Route, opts metav1.CreateOptions) (*v1.Route, error) - Update(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) + Create(ctx context.Context, route *routev1.Route, opts metav1.CreateOptions) (*routev1.Route, error) + Update(ctx context.Context, route *routev1.Route, opts metav1.UpdateOptions) (*routev1.Route, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, route *v1.Route, opts metav1.UpdateOptions) (*v1.Route, error) + UpdateStatus(ctx context.Context, route *routev1.Route, opts metav1.UpdateOptions) (*routev1.Route, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Route, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RouteList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*routev1.Route, error) + List(ctx context.Context, opts metav1.ListOptions) (*routev1.RouteList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Route, err error) - Apply(ctx context.Context, route *routev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Route, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *routev1.Route, err error) + Apply(ctx context.Context, route *applyconfigurationsroutev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *routev1.Route, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, route *routev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Route, err error) + ApplyStatus(ctx context.Context, route *applyconfigurationsroutev1.RouteApplyConfiguration, opts metav1.ApplyOptions) (result *routev1.Route, err error) RouteExpansion } // routes implements RouteInterface type routes struct { - *gentype.ClientWithListAndApply[*v1.Route, *v1.RouteList, *routev1.RouteApplyConfiguration] + *gentype.ClientWithListAndApply[*routev1.Route, *routev1.RouteList, *applyconfigurationsroutev1.RouteApplyConfiguration] } // newRoutes returns a Routes func newRoutes(c *RouteV1Client, namespace string) *routes { return &routes{ - gentype.NewClientWithListAndApply[*v1.Route, *v1.RouteList, *routev1.RouteApplyConfiguration]( + gentype.NewClientWithListAndApply[*routev1.Route, *routev1.RouteList, *applyconfigurationsroutev1.RouteApplyConfiguration]( "routes", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Route { return &v1.Route{} }, - func() *v1.RouteList { return &v1.RouteList{} }), + func() *routev1.Route { return &routev1.Route{} }, + func() *routev1.RouteList { return &routev1.RouteList{} }, + ), } } diff --git a/route/clientset/versioned/typed/route/v1/route_client.go b/route/clientset/versioned/typed/route/v1/route_client.go index e71d826c9f..44da893cdb 100644 --- a/route/clientset/versioned/typed/route/v1/route_client.go +++ b/route/clientset/versioned/typed/route/v1/route_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/route/v1" - "github.com/openshift/client-go/route/clientset/versioned/scheme" + routev1 "github.com/openshift/api/route/v1" + scheme "github.com/openshift/client-go/route/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *RouteV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := routev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/route/informers/externalversions/generic.go b/route/informers/externalversions/generic.go index e0067144fd..1615e24cd1 100644 --- a/route/informers/externalversions/generic.go +++ b/route/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/route/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/route/informers/externalversions/route/v1/route.go b/route/informers/externalversions/route/v1/route.go index adb8459582..f437983ff8 100644 --- a/route/informers/externalversions/route/v1/route.go +++ b/route/informers/externalversions/route/v1/route.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - routev1 "github.com/openshift/api/route/v1" + apiroutev1 "github.com/openshift/api/route/v1" versioned "github.com/openshift/client-go/route/clientset/versioned" internalinterfaces "github.com/openshift/client-go/route/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/route/listers/route/v1" + routev1 "github.com/openshift/client-go/route/listers/route/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Routes. type RouteInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.RouteLister + Lister() routev1.RouteLister } type routeInformer struct { @@ -55,7 +55,7 @@ func NewFilteredRouteInformer(client versioned.Interface, namespace string, resy return client.RouteV1().Routes(namespace).Watch(context.TODO(), options) }, }, - &routev1.Route{}, + &apiroutev1.Route{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *routeInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *routeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&routev1.Route{}, f.defaultInformer) + return f.factory.InformerFor(&apiroutev1.Route{}, f.defaultInformer) } -func (f *routeInformer) Lister() v1.RouteLister { - return v1.NewRouteLister(f.Informer().GetIndexer()) +func (f *routeInformer) Lister() routev1.RouteLister { + return routev1.NewRouteLister(f.Informer().GetIndexer()) } diff --git a/route/listers/route/v1/route.go b/route/listers/route/v1/route.go index f6dc2f852f..abe1b0efd5 100644 --- a/route/listers/route/v1/route.go +++ b/route/listers/route/v1/route.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/route/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + routev1 "github.com/openshift/api/route/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RouteLister helps list Routes. @@ -14,7 +14,7 @@ import ( type RouteLister interface { // List lists all Routes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Route, err error) + List(selector labels.Selector) (ret []*routev1.Route, err error) // Routes returns an object that can list and get Routes. Routes(namespace string) RouteNamespaceLister RouteListerExpansion @@ -22,17 +22,17 @@ type RouteLister interface { // routeLister implements the RouteLister interface. type routeLister struct { - listers.ResourceIndexer[*v1.Route] + listers.ResourceIndexer[*routev1.Route] } // NewRouteLister returns a new RouteLister. func NewRouteLister(indexer cache.Indexer) RouteLister { - return &routeLister{listers.New[*v1.Route](indexer, v1.Resource("route"))} + return &routeLister{listers.New[*routev1.Route](indexer, routev1.Resource("route"))} } // Routes returns an object that can list and get Routes. func (s *routeLister) Routes(namespace string) RouteNamespaceLister { - return routeNamespaceLister{listers.NewNamespaced[*v1.Route](s.ResourceIndexer, namespace)} + return routeNamespaceLister{listers.NewNamespaced[*routev1.Route](s.ResourceIndexer, namespace)} } // RouteNamespaceLister helps list and get Routes. @@ -40,15 +40,15 @@ func (s *routeLister) Routes(namespace string) RouteNamespaceLister { type RouteNamespaceLister interface { // List lists all Routes in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Route, err error) + List(selector labels.Selector) (ret []*routev1.Route, err error) // Get retrieves the Route from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Route, error) + Get(name string) (*routev1.Route, error) RouteNamespaceListerExpansion } // routeNamespaceLister implements the RouteNamespaceLister // interface. type routeNamespaceLister struct { - listers.ResourceIndexer[*v1.Route] + listers.ResourceIndexer[*routev1.Route] } diff --git a/samples/applyconfigurations/internal/internal.go b/samples/applyconfigurations/internal/internal.go index 2c728a1e26..344b96b10e 100644 --- a/samples/applyconfigurations/internal/internal.go +++ b/samples/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/samples/applyconfigurations/samples/v1/config.go b/samples/applyconfigurations/samples/v1/config.go index 1ba5160a5f..05f973bf29 100644 --- a/samples/applyconfigurations/samples/v1/config.go +++ b/samples/applyconfigurations/samples/v1/config.go @@ -3,21 +3,21 @@ package v1 import ( - apisamplesv1 "github.com/openshift/api/samples/v1" + samplesv1 "github.com/openshift/api/samples/v1" internal "github.com/openshift/client-go/samples/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConfigApplyConfiguration represents a declarative configuration of the Config type for use // with apply. type ConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConfigSpecApplyConfiguration `json:"spec,omitempty"` - Status *ConfigStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ConfigStatusApplyConfiguration `json:"status,omitempty"` } // Config constructs a declarative configuration of the Config type for use with @@ -41,18 +41,18 @@ func Config(name string) *ConfigApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractConfig(config *apisamplesv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { +func ExtractConfig(config *samplesv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { return extractConfig(config, fieldManager, "") } // ExtractConfigStatus is the same as ExtractConfig except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractConfigStatus(config *apisamplesv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { +func ExtractConfigStatus(config *samplesv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { return extractConfig(config, fieldManager, "status") } -func extractConfig(config *apisamplesv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { +func extractConfig(config *samplesv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { b := &ConfigApplyConfiguration{} err := managedfields.ExtractInto(config, internal.Parser().Type("com.github.openshift.api.samples.v1.Config"), fieldManager, b, subresource) if err != nil { @@ -69,7 +69,7 @@ func extractConfig(config *apisamplesv1.Config, fieldManager string, subresource // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConf // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfigurat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyCo // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfi // If called multiple times, the UID field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfigur // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigAppl // If called multiple times, the Generation field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithGeneration(value int64) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Con // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) * // overwriting an existing map entries in Labels field with the same key. func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *Config // overwriting an existing map entries in Annotations field with the same key. func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *C // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { +func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefere func (b *ConfigApplyConfiguration) WithFinalizers(values ...string) *ConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -242,5 +242,5 @@ func (b *ConfigApplyConfiguration) WithStatus(value *ConfigStatusApplyConfigurat // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/samples/applyconfigurations/samples/v1/configcondition.go b/samples/applyconfigurations/samples/v1/configcondition.go index 7fc6dba29d..cfadf45ffc 100644 --- a/samples/applyconfigurations/samples/v1/configcondition.go +++ b/samples/applyconfigurations/samples/v1/configcondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/samples/v1" + samplesv1 "github.com/openshift/api/samples/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,12 +11,12 @@ import ( // ConfigConditionApplyConfiguration represents a declarative configuration of the ConfigCondition type for use // with apply. type ConfigConditionApplyConfiguration struct { - Type *v1.ConfigConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *samplesv1.ConfigConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ConfigConditionApplyConfiguration constructs a declarative configuration of the ConfigCondition type for use with @@ -28,7 +28,7 @@ func ConfigCondition() *ConfigConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ConfigConditionApplyConfiguration) WithType(value v1.ConfigConditionType) *ConfigConditionApplyConfiguration { +func (b *ConfigConditionApplyConfiguration) WithType(value samplesv1.ConfigConditionType) *ConfigConditionApplyConfiguration { b.Type = &value return b } diff --git a/samples/applyconfigurations/samples/v1/configspec.go b/samples/applyconfigurations/samples/v1/configspec.go index 7e5adae416..1e344032e3 100644 --- a/samples/applyconfigurations/samples/v1/configspec.go +++ b/samples/applyconfigurations/samples/v1/configspec.go @@ -3,19 +3,19 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" samplesv1 "github.com/openshift/api/samples/v1" ) // ConfigSpecApplyConfiguration represents a declarative configuration of the ConfigSpec type for use // with apply. type ConfigSpecApplyConfiguration struct { - ManagementState *v1.ManagementState `json:"managementState,omitempty"` - SamplesRegistry *string `json:"samplesRegistry,omitempty"` - Architectures []string `json:"architectures,omitempty"` - SkippedImagestreams []string `json:"skippedImagestreams,omitempty"` - SkippedTemplates []string `json:"skippedTemplates,omitempty"` - SkippedHelmCharts []samplesv1.HelmChartName `json:"skippedHelmCharts,omitempty"` + ManagementState *operatorv1.ManagementState `json:"managementState,omitempty"` + SamplesRegistry *string `json:"samplesRegistry,omitempty"` + Architectures []string `json:"architectures,omitempty"` + SkippedImagestreams []string `json:"skippedImagestreams,omitempty"` + SkippedTemplates []string `json:"skippedTemplates,omitempty"` + SkippedHelmCharts []samplesv1.HelmChartName `json:"skippedHelmCharts,omitempty"` } // ConfigSpecApplyConfiguration constructs a declarative configuration of the ConfigSpec type for use with @@ -27,7 +27,7 @@ func ConfigSpec() *ConfigSpecApplyConfiguration { // WithManagementState sets the ManagementState field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ConfigSpecApplyConfiguration) WithManagementState(value v1.ManagementState) *ConfigSpecApplyConfiguration { +func (b *ConfigSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ConfigSpecApplyConfiguration { b.ManagementState = &value return b } diff --git a/samples/applyconfigurations/samples/v1/configstatus.go b/samples/applyconfigurations/samples/v1/configstatus.go index 2f242b7d24..2266418fd8 100644 --- a/samples/applyconfigurations/samples/v1/configstatus.go +++ b/samples/applyconfigurations/samples/v1/configstatus.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "github.com/openshift/api/operator/v1" + operatorv1 "github.com/openshift/api/operator/v1" ) // ConfigStatusApplyConfiguration represents a declarative configuration of the ConfigStatus type for use // with apply. type ConfigStatusApplyConfiguration struct { - ManagementState *v1.ManagementState `json:"managementState,omitempty"` + ManagementState *operatorv1.ManagementState `json:"managementState,omitempty"` Conditions []ConfigConditionApplyConfiguration `json:"conditions,omitempty"` SamplesRegistry *string `json:"samplesRegistry,omitempty"` Architectures []string `json:"architectures,omitempty"` @@ -27,7 +27,7 @@ func ConfigStatus() *ConfigStatusApplyConfiguration { // WithManagementState sets the ManagementState field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ConfigStatusApplyConfiguration) WithManagementState(value v1.ManagementState) *ConfigStatusApplyConfiguration { +func (b *ConfigStatusApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ConfigStatusApplyConfiguration { b.ManagementState = &value return b } diff --git a/samples/clientset/versioned/clientset.go b/samples/clientset/versioned/clientset.go index a1120c2f9e..c89f2b88ea 100644 --- a/samples/clientset/versioned/clientset.go +++ b/samples/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" samplesv1 "github.com/openshift/client-go/samples/clientset/versioned/typed/samples/v1" discovery "k8s.io/client-go/discovery" diff --git a/samples/clientset/versioned/typed/samples/v1/config.go b/samples/clientset/versioned/typed/samples/v1/config.go index 7e9681d3ce..39a0598964 100644 --- a/samples/clientset/versioned/typed/samples/v1/config.go +++ b/samples/clientset/versioned/typed/samples/v1/config.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/samples/v1" - samplesv1 "github.com/openshift/client-go/samples/applyconfigurations/samples/v1" + samplesv1 "github.com/openshift/api/samples/v1" + applyconfigurationssamplesv1 "github.com/openshift/client-go/samples/applyconfigurations/samples/v1" scheme "github.com/openshift/client-go/samples/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type ConfigsGetter interface { // ConfigInterface has methods to work with Config resources. type ConfigInterface interface { - Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (*v1.Config, error) - Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + Create(ctx context.Context, config *samplesv1.Config, opts metav1.CreateOptions) (*samplesv1.Config, error) + Update(ctx context.Context, config *samplesv1.Config, opts metav1.UpdateOptions) (*samplesv1.Config, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (*v1.Config, error) + UpdateStatus(ctx context.Context, config *samplesv1.Config, opts metav1.UpdateOptions) (*samplesv1.Config, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Config, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ConfigList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*samplesv1.Config, error) + List(ctx context.Context, opts metav1.ListOptions) (*samplesv1.ConfigList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) - Apply(ctx context.Context, config *samplesv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *samplesv1.Config, err error) + Apply(ctx context.Context, config *applyconfigurationssamplesv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *samplesv1.Config, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, config *samplesv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) + ApplyStatus(ctx context.Context, config *applyconfigurationssamplesv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *samplesv1.Config, err error) ConfigExpansion } // configs implements ConfigInterface type configs struct { - *gentype.ClientWithListAndApply[*v1.Config, *v1.ConfigList, *samplesv1.ConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*samplesv1.Config, *samplesv1.ConfigList, *applyconfigurationssamplesv1.ConfigApplyConfiguration] } // newConfigs returns a Configs func newConfigs(c *SamplesV1Client) *configs { return &configs{ - gentype.NewClientWithListAndApply[*v1.Config, *v1.ConfigList, *samplesv1.ConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*samplesv1.Config, *samplesv1.ConfigList, *applyconfigurationssamplesv1.ConfigApplyConfiguration]( "configs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Config { return &v1.Config{} }, - func() *v1.ConfigList { return &v1.ConfigList{} }), + func() *samplesv1.Config { return &samplesv1.Config{} }, + func() *samplesv1.ConfigList { return &samplesv1.ConfigList{} }, + ), } } diff --git a/samples/clientset/versioned/typed/samples/v1/fake/fake_config.go b/samples/clientset/versioned/typed/samples/v1/fake/fake_config.go index 765b27b3f2..e189f2b11f 100644 --- a/samples/clientset/versioned/typed/samples/v1/fake/fake_config.go +++ b/samples/clientset/versioned/typed/samples/v1/fake/fake_config.go @@ -3,168 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/samples/v1" samplesv1 "github.com/openshift/client-go/samples/applyconfigurations/samples/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedsamplesv1 "github.com/openshift/client-go/samples/clientset/versioned/typed/samples/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeConfigs implements ConfigInterface -type FakeConfigs struct { +// fakeConfigs implements ConfigInterface +type fakeConfigs struct { + *gentype.FakeClientWithListAndApply[*v1.Config, *v1.ConfigList, *samplesv1.ConfigApplyConfiguration] Fake *FakeSamplesV1 } -var configsResource = v1.SchemeGroupVersion.WithResource("configs") - -var configsKind = v1.SchemeGroupVersion.WithKind("Config") - -// Get takes name of the config, and returns the corresponding config object, and an error if there is any. -func (c *FakeConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(configsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// List takes label and field selectors, and returns the list of Configs that match those selectors. -func (c *FakeConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ConfigList, err error) { - emptyResult := &v1.ConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(configsResource, configsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.ConfigList{ListMeta: obj.(*v1.ConfigList).ListMeta} - for _, item := range obj.(*v1.ConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested configs. -func (c *FakeConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(configsResource, opts)) -} - -// Create takes the representation of a config and creates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Create(ctx context.Context, config *v1.Config, opts metav1.CreateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(configsResource, config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Update takes the representation of a config and updates it. Returns the server's representation of the config, and an error, if there is any. -func (c *FakeConfigs) Update(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(configsResource, config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeConfigs) UpdateStatus(ctx context.Context, config *v1.Config, opts metav1.UpdateOptions) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(configsResource, "status", config, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Delete takes name of the config and deletes it. Returns an error if one occurs. -func (c *FakeConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(configsResource, name, opts), &v1.Config{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(configsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.ConfigList{}) - return err -} - -// Patch applies the patch and returns the patched config. -func (c *FakeConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Config, err error) { - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied config. -func (c *FakeConfigs) Apply(ctx context.Context, config *samplesv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { - if config == nil { - return nil, fmt.Errorf("config provided to Apply must not be nil") - } - data, err := json.Marshal(config) - if err != nil { - return nil, err - } - name := config.Name - if name == nil { - return nil, fmt.Errorf("config.Name must be provided to Apply") - } - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Config), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeConfigs) ApplyStatus(ctx context.Context, config *samplesv1.ConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Config, err error) { - if config == nil { - return nil, fmt.Errorf("config provided to Apply must not be nil") - } - data, err := json.Marshal(config) - if err != nil { - return nil, err - } - name := config.Name - if name == nil { - return nil, fmt.Errorf("config.Name must be provided to Apply") - } - emptyResult := &v1.Config{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(configsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeConfigs(fake *FakeSamplesV1) typedsamplesv1.ConfigInterface { + return &fakeConfigs{ + gentype.NewFakeClientWithListAndApply[*v1.Config, *v1.ConfigList, *samplesv1.ConfigApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("configs"), + v1.SchemeGroupVersion.WithKind("Config"), + func() *v1.Config { return &v1.Config{} }, + func() *v1.ConfigList { return &v1.ConfigList{} }, + func(dst, src *v1.ConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConfigList) []*v1.Config { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConfigList, items []*v1.Config) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Config), err } diff --git a/samples/clientset/versioned/typed/samples/v1/fake/fake_samples_client.go b/samples/clientset/versioned/typed/samples/v1/fake/fake_samples_client.go index ab849b20ef..c823d59345 100644 --- a/samples/clientset/versioned/typed/samples/v1/fake/fake_samples_client.go +++ b/samples/clientset/versioned/typed/samples/v1/fake/fake_samples_client.go @@ -13,7 +13,7 @@ type FakeSamplesV1 struct { } func (c *FakeSamplesV1) Configs() v1.ConfigInterface { - return &FakeConfigs{c} + return newFakeConfigs(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/samples/clientset/versioned/typed/samples/v1/samples_client.go b/samples/clientset/versioned/typed/samples/v1/samples_client.go index 7701965fb6..49a978c5ee 100644 --- a/samples/clientset/versioned/typed/samples/v1/samples_client.go +++ b/samples/clientset/versioned/typed/samples/v1/samples_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/samples/v1" - "github.com/openshift/client-go/samples/clientset/versioned/scheme" + samplesv1 "github.com/openshift/api/samples/v1" + scheme "github.com/openshift/client-go/samples/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *SamplesV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := samplesv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/samples/informers/externalversions/generic.go b/samples/informers/externalversions/generic.go index d5b5e1501b..2a510665cf 100644 --- a/samples/informers/externalversions/generic.go +++ b/samples/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/samples/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/samples/informers/externalversions/samples/v1/config.go b/samples/informers/externalversions/samples/v1/config.go index 78e8b8d5ca..82bb250f82 100644 --- a/samples/informers/externalversions/samples/v1/config.go +++ b/samples/informers/externalversions/samples/v1/config.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - samplesv1 "github.com/openshift/api/samples/v1" + apisamplesv1 "github.com/openshift/api/samples/v1" versioned "github.com/openshift/client-go/samples/clientset/versioned" internalinterfaces "github.com/openshift/client-go/samples/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/samples/listers/samples/v1" + samplesv1 "github.com/openshift/client-go/samples/listers/samples/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Configs. type ConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ConfigLister + Lister() samplesv1.ConfigLister } type configInformer struct { @@ -54,7 +54,7 @@ func NewFilteredConfigInformer(client versioned.Interface, resyncPeriod time.Dur return client.SamplesV1().Configs().Watch(context.TODO(), options) }, }, - &samplesv1.Config{}, + &apisamplesv1.Config{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *configInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *configInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&samplesv1.Config{}, f.defaultInformer) + return f.factory.InformerFor(&apisamplesv1.Config{}, f.defaultInformer) } -func (f *configInformer) Lister() v1.ConfigLister { - return v1.NewConfigLister(f.Informer().GetIndexer()) +func (f *configInformer) Lister() samplesv1.ConfigLister { + return samplesv1.NewConfigLister(f.Informer().GetIndexer()) } diff --git a/samples/listers/samples/v1/config.go b/samples/listers/samples/v1/config.go index bd44c9acc4..5630a04fba 100644 --- a/samples/listers/samples/v1/config.go +++ b/samples/listers/samples/v1/config.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/samples/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + samplesv1 "github.com/openshift/api/samples/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ConfigLister helps list Configs. @@ -14,19 +14,19 @@ import ( type ConfigLister interface { // List lists all Configs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Config, err error) + List(selector labels.Selector) (ret []*samplesv1.Config, err error) // Get retrieves the Config from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Config, error) + Get(name string) (*samplesv1.Config, error) ConfigListerExpansion } // configLister implements the ConfigLister interface. type configLister struct { - listers.ResourceIndexer[*v1.Config] + listers.ResourceIndexer[*samplesv1.Config] } // NewConfigLister returns a new ConfigLister. func NewConfigLister(indexer cache.Indexer) ConfigLister { - return &configLister{listers.New[*v1.Config](indexer, v1.Resource("config"))} + return &configLister{listers.New[*samplesv1.Config](indexer, samplesv1.Resource("config"))} } diff --git a/security/applyconfigurations/internal/internal.go b/security/applyconfigurations/internal/internal.go index b6dcc15482..995779a57d 100644 --- a/security/applyconfigurations/internal/internal.go +++ b/security/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go b/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go index d85d2a62ff..d9c1dd1a60 100644 --- a/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go +++ b/security/applyconfigurations/security/v1/fsgroupstrategyoptions.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" ) // FSGroupStrategyOptionsApplyConfiguration represents a declarative configuration of the FSGroupStrategyOptions type for use // with apply. type FSGroupStrategyOptionsApplyConfiguration struct { - Type *v1.FSGroupStrategyType `json:"type,omitempty"` - Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` + Type *securityv1.FSGroupStrategyType `json:"type,omitempty"` + Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` } // FSGroupStrategyOptionsApplyConfiguration constructs a declarative configuration of the FSGroupStrategyOptions type for use with @@ -22,7 +22,7 @@ func FSGroupStrategyOptions() *FSGroupStrategyOptionsApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *FSGroupStrategyOptionsApplyConfiguration) WithType(value v1.FSGroupStrategyType) *FSGroupStrategyOptionsApplyConfiguration { +func (b *FSGroupStrategyOptionsApplyConfiguration) WithType(value securityv1.FSGroupStrategyType) *FSGroupStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/security/applyconfigurations/security/v1/rangeallocation.go b/security/applyconfigurations/security/v1/rangeallocation.go index ecba8c6ac0..1993bd8d72 100644 --- a/security/applyconfigurations/security/v1/rangeallocation.go +++ b/security/applyconfigurations/security/v1/rangeallocation.go @@ -5,19 +5,19 @@ package v1 import ( securityv1 "github.com/openshift/api/security/v1" internal "github.com/openshift/client-go/security/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RangeAllocationApplyConfiguration represents a declarative configuration of the RangeAllocation type for use // with apply. type RangeAllocationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Range *string `json:"range,omitempty"` - Data []byte `json:"data,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Range *string `json:"range,omitempty"` + Data []byte `json:"data,omitempty"` } // RangeAllocation constructs a declarative configuration of the RangeAllocation type for use with @@ -69,7 +69,7 @@ func extractRangeAllocation(rangeAllocation *securityv1.RangeAllocation, fieldMa // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithKind(value string) *RangeAllocationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *RangeAllocationApplyConfiguration) WithKind(value string) *RangeAllocat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithAPIVersion(value string) *RangeAllocationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *RangeAllocationApplyConfiguration) WithAPIVersion(value string) *RangeA // If called multiple times, the Name field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithName(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *RangeAllocationApplyConfiguration) WithName(value string) *RangeAllocat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithGenerateName(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *RangeAllocationApplyConfiguration) WithGenerateName(value string) *Rang // If called multiple times, the Namespace field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithNamespace(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *RangeAllocationApplyConfiguration) WithNamespace(value string) *RangeAl // If called multiple times, the UID field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithUID(value types.UID) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *RangeAllocationApplyConfiguration) WithUID(value types.UID) *RangeAlloc // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithResourceVersion(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *RangeAllocationApplyConfiguration) WithResourceVersion(value string) *R // If called multiple times, the Generation field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithGeneration(value int64) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RangeAllocationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *RangeAllocationApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *RangeAllocationApplyConfiguration) WithLabels(entries map[string]string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *RangeAllocationApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *RangeAllocationApplyConfiguration) WithAnnotations(entries map[string]string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *RangeAllocationApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *RangeAllocationApplyConfiguration) WithFinalizers(values ...string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RangeAllocationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *RangeAllocationApplyConfiguration) WithData(values ...byte) *RangeAlloc // GetName retrieves the value of the Name field in the declarative configuration. func (b *RangeAllocationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/security/applyconfigurations/security/v1/runasuserstrategyoptions.go b/security/applyconfigurations/security/v1/runasuserstrategyoptions.go index ed671136e1..e93f8d6436 100644 --- a/security/applyconfigurations/security/v1/runasuserstrategyoptions.go +++ b/security/applyconfigurations/security/v1/runasuserstrategyoptions.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" ) // RunAsUserStrategyOptionsApplyConfiguration represents a declarative configuration of the RunAsUserStrategyOptions type for use // with apply. type RunAsUserStrategyOptionsApplyConfiguration struct { - Type *v1.RunAsUserStrategyType `json:"type,omitempty"` - UID *int64 `json:"uid,omitempty"` - UIDRangeMin *int64 `json:"uidRangeMin,omitempty"` - UIDRangeMax *int64 `json:"uidRangeMax,omitempty"` + Type *securityv1.RunAsUserStrategyType `json:"type,omitempty"` + UID *int64 `json:"uid,omitempty"` + UIDRangeMin *int64 `json:"uidRangeMin,omitempty"` + UIDRangeMax *int64 `json:"uidRangeMax,omitempty"` } // RunAsUserStrategyOptionsApplyConfiguration constructs a declarative configuration of the RunAsUserStrategyOptions type for use with @@ -24,7 +24,7 @@ func RunAsUserStrategyOptions() *RunAsUserStrategyOptionsApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *RunAsUserStrategyOptionsApplyConfiguration) WithType(value v1.RunAsUserStrategyType) *RunAsUserStrategyOptionsApplyConfiguration { +func (b *RunAsUserStrategyOptionsApplyConfiguration) WithType(value securityv1.RunAsUserStrategyType) *RunAsUserStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/security/applyconfigurations/security/v1/securitycontextconstraints.go b/security/applyconfigurations/security/v1/securitycontextconstraints.go index d7026978e6..ecd908713f 100644 --- a/security/applyconfigurations/security/v1/securitycontextconstraints.go +++ b/security/applyconfigurations/security/v1/securitycontextconstraints.go @@ -6,42 +6,42 @@ import ( securityv1 "github.com/openshift/api/security/v1" internal "github.com/openshift/client-go/security/applyconfigurations/internal" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // SecurityContextConstraintsApplyConfiguration represents a declarative configuration of the SecurityContextConstraints type for use // with apply. type SecurityContextConstraintsApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Priority *int32 `json:"priority,omitempty"` - AllowPrivilegedContainer *bool `json:"allowPrivilegedContainer,omitempty"` - DefaultAddCapabilities []corev1.Capability `json:"defaultAddCapabilities,omitempty"` - RequiredDropCapabilities []corev1.Capability `json:"requiredDropCapabilities,omitempty"` - AllowedCapabilities []corev1.Capability `json:"allowedCapabilities,omitempty"` - AllowHostDirVolumePlugin *bool `json:"allowHostDirVolumePlugin,omitempty"` - Volumes []securityv1.FSType `json:"volumes,omitempty"` - AllowedFlexVolumes []AllowedFlexVolumeApplyConfiguration `json:"allowedFlexVolumes,omitempty"` - AllowHostNetwork *bool `json:"allowHostNetwork,omitempty"` - AllowHostPorts *bool `json:"allowHostPorts,omitempty"` - AllowHostPID *bool `json:"allowHostPID,omitempty"` - AllowHostIPC *bool `json:"allowHostIPC,omitempty"` - UserNamespaceLevel *securityv1.NamespaceLevelType `json:"userNamespaceLevel,omitempty"` - DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty"` - AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` - SELinuxContext *SELinuxContextStrategyOptionsApplyConfiguration `json:"seLinuxContext,omitempty"` - RunAsUser *RunAsUserStrategyOptionsApplyConfiguration `json:"runAsUser,omitempty"` - SupplementalGroups *SupplementalGroupsStrategyOptionsApplyConfiguration `json:"supplementalGroups,omitempty"` - FSGroup *FSGroupStrategyOptionsApplyConfiguration `json:"fsGroup,omitempty"` - ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` - Users []string `json:"users,omitempty"` - Groups []string `json:"groups,omitempty"` - SeccompProfiles []string `json:"seccompProfiles,omitempty"` - AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` - ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Priority *int32 `json:"priority,omitempty"` + AllowPrivilegedContainer *bool `json:"allowPrivilegedContainer,omitempty"` + DefaultAddCapabilities []corev1.Capability `json:"defaultAddCapabilities,omitempty"` + RequiredDropCapabilities []corev1.Capability `json:"requiredDropCapabilities,omitempty"` + AllowedCapabilities []corev1.Capability `json:"allowedCapabilities,omitempty"` + AllowHostDirVolumePlugin *bool `json:"allowHostDirVolumePlugin,omitempty"` + Volumes []securityv1.FSType `json:"volumes,omitempty"` + AllowedFlexVolumes []AllowedFlexVolumeApplyConfiguration `json:"allowedFlexVolumes,omitempty"` + AllowHostNetwork *bool `json:"allowHostNetwork,omitempty"` + AllowHostPorts *bool `json:"allowHostPorts,omitempty"` + AllowHostPID *bool `json:"allowHostPID,omitempty"` + AllowHostIPC *bool `json:"allowHostIPC,omitempty"` + UserNamespaceLevel *securityv1.NamespaceLevelType `json:"userNamespaceLevel,omitempty"` + DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty"` + AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` + SELinuxContext *SELinuxContextStrategyOptionsApplyConfiguration `json:"seLinuxContext,omitempty"` + RunAsUser *RunAsUserStrategyOptionsApplyConfiguration `json:"runAsUser,omitempty"` + SupplementalGroups *SupplementalGroupsStrategyOptionsApplyConfiguration `json:"supplementalGroups,omitempty"` + FSGroup *FSGroupStrategyOptionsApplyConfiguration `json:"fsGroup,omitempty"` + ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` + Users []string `json:"users,omitempty"` + Groups []string `json:"groups,omitempty"` + SeccompProfiles []string `json:"seccompProfiles,omitempty"` + AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` + ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty"` } // SecurityContextConstraints constructs a declarative configuration of the SecurityContextConstraints type for use with @@ -93,7 +93,7 @@ func extractSecurityContextConstraints(securityContextConstraints *securityv1.Se // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithKind(value string) *SecurityContextConstraintsApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -101,7 +101,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithKind(value string) *S // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithAPIVersion(value string) *SecurityContextConstraintsApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -110,7 +110,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithAPIVersion(value stri // If called multiple times, the Name field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithName(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -119,7 +119,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithName(value string) *S // If called multiple times, the GenerateName field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithGenerateName(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -128,7 +128,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithGenerateName(value st // If called multiple times, the Namespace field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithNamespace(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -137,7 +137,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithNamespace(value strin // If called multiple times, the UID field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithUID(value types.UID) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -146,7 +146,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithUID(value types.UID) // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithResourceVersion(value string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -155,25 +155,25 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithResourceVersion(value // If called multiple times, the Generation field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithGeneration(value int64) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *SecurityContextConstraintsApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SecurityContextConstraintsApplyConfiguration { +func (b *SecurityContextConstraintsApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SecurityContextConstraintsApplyConfiguration { +func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -182,7 +182,7 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionTimestamp(val // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -192,11 +192,11 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithDeletionGracePeriodSe // overwriting an existing map entries in Labels field with the same key. func (b *SecurityContextConstraintsApplyConfiguration) WithLabels(entries map[string]string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -207,11 +207,11 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithLabels(entries map[st // overwriting an existing map entries in Annotations field with the same key. func (b *SecurityContextConstraintsApplyConfiguration) WithAnnotations(entries map[string]string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -219,13 +219,13 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithAnnotations(entries m // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *SecurityContextConstraintsApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SecurityContextConstraintsApplyConfiguration { +func (b *SecurityContextConstraintsApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -236,14 +236,14 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithOwnerReferences(value func (b *SecurityContextConstraintsApplyConfiguration) WithFinalizers(values ...string) *SecurityContextConstraintsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *SecurityContextConstraintsApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -473,5 +473,5 @@ func (b *SecurityContextConstraintsApplyConfiguration) WithForbiddenSysctls(valu // GetName retrieves the value of the Name field in the declarative configuration. func (b *SecurityContextConstraintsApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go b/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go index 580c596b0c..985472fea4 100644 --- a/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go +++ b/security/applyconfigurations/security/v1/selinuxcontextstrategyoptions.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" corev1 "k8s.io/api/core/v1" ) // SELinuxContextStrategyOptionsApplyConfiguration represents a declarative configuration of the SELinuxContextStrategyOptions type for use // with apply. type SELinuxContextStrategyOptionsApplyConfiguration struct { - Type *v1.SELinuxContextStrategyType `json:"type,omitempty"` - SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty"` + Type *securityv1.SELinuxContextStrategyType `json:"type,omitempty"` + SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty"` } // SELinuxContextStrategyOptionsApplyConfiguration constructs a declarative configuration of the SELinuxContextStrategyOptions type for use with @@ -23,7 +23,7 @@ func SELinuxContextStrategyOptions() *SELinuxContextStrategyOptionsApplyConfigur // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SELinuxContextStrategyOptionsApplyConfiguration) WithType(value v1.SELinuxContextStrategyType) *SELinuxContextStrategyOptionsApplyConfiguration { +func (b *SELinuxContextStrategyOptionsApplyConfiguration) WithType(value securityv1.SELinuxContextStrategyType) *SELinuxContextStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go b/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go index 563e9d2856..e1f1db6211 100644 --- a/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go +++ b/security/applyconfigurations/security/v1/supplementalgroupsstrategyoptions.go @@ -3,14 +3,14 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" ) // SupplementalGroupsStrategyOptionsApplyConfiguration represents a declarative configuration of the SupplementalGroupsStrategyOptions type for use // with apply. type SupplementalGroupsStrategyOptionsApplyConfiguration struct { - Type *v1.SupplementalGroupsStrategyType `json:"type,omitempty"` - Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` + Type *securityv1.SupplementalGroupsStrategyType `json:"type,omitempty"` + Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"` } // SupplementalGroupsStrategyOptionsApplyConfiguration constructs a declarative configuration of the SupplementalGroupsStrategyOptions type for use with @@ -22,7 +22,7 @@ func SupplementalGroupsStrategyOptions() *SupplementalGroupsStrategyOptionsApply // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SupplementalGroupsStrategyOptionsApplyConfiguration) WithType(value v1.SupplementalGroupsStrategyType) *SupplementalGroupsStrategyOptionsApplyConfiguration { +func (b *SupplementalGroupsStrategyOptionsApplyConfiguration) WithType(value securityv1.SupplementalGroupsStrategyType) *SupplementalGroupsStrategyOptionsApplyConfiguration { b.Type = &value return b } diff --git a/security/clientset/versioned/clientset.go b/security/clientset/versioned/clientset.go index 535a59d3e1..62f63b51f9 100644 --- a/security/clientset/versioned/clientset.go +++ b/security/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" securityv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" discovery "k8s.io/client-go/discovery" diff --git a/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyreview.go b/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyreview.go index e48b7cb686..de05294ffe 100644 --- a/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyreview.go +++ b/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyreview.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/security/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + securityv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + gentype "k8s.io/client-go/gentype" ) -// FakePodSecurityPolicyReviews implements PodSecurityPolicyReviewInterface -type FakePodSecurityPolicyReviews struct { +// fakePodSecurityPolicyReviews implements PodSecurityPolicyReviewInterface +type fakePodSecurityPolicyReviews struct { + *gentype.FakeClient[*v1.PodSecurityPolicyReview] Fake *FakeSecurityV1 - ns string } -var podsecuritypolicyreviewsResource = v1.SchemeGroupVersion.WithResource("podsecuritypolicyreviews") - -var podsecuritypolicyreviewsKind = v1.SchemeGroupVersion.WithKind("PodSecurityPolicyReview") - -// Create takes the representation of a podSecurityPolicyReview and creates it. Returns the server's representation of the podSecurityPolicyReview, and an error, if there is any. -func (c *FakePodSecurityPolicyReviews) Create(ctx context.Context, podSecurityPolicyReview *v1.PodSecurityPolicyReview, opts metav1.CreateOptions) (result *v1.PodSecurityPolicyReview, err error) { - emptyResult := &v1.PodSecurityPolicyReview{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(podsecuritypolicyreviewsResource, c.ns, podSecurityPolicyReview, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePodSecurityPolicyReviews(fake *FakeSecurityV1, namespace string) securityv1.PodSecurityPolicyReviewInterface { + return &fakePodSecurityPolicyReviews{ + gentype.NewFakeClient[*v1.PodSecurityPolicyReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("podsecuritypolicyreviews"), + v1.SchemeGroupVersion.WithKind("PodSecurityPolicyReview"), + func() *v1.PodSecurityPolicyReview { return &v1.PodSecurityPolicyReview{} }, + ), + fake, } - return obj.(*v1.PodSecurityPolicyReview), err } diff --git a/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyselfsubjectreview.go b/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyselfsubjectreview.go index df51469695..96fc01729b 100644 --- a/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyselfsubjectreview.go +++ b/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicyselfsubjectreview.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/security/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + securityv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + gentype "k8s.io/client-go/gentype" ) -// FakePodSecurityPolicySelfSubjectReviews implements PodSecurityPolicySelfSubjectReviewInterface -type FakePodSecurityPolicySelfSubjectReviews struct { +// fakePodSecurityPolicySelfSubjectReviews implements PodSecurityPolicySelfSubjectReviewInterface +type fakePodSecurityPolicySelfSubjectReviews struct { + *gentype.FakeClient[*v1.PodSecurityPolicySelfSubjectReview] Fake *FakeSecurityV1 - ns string } -var podsecuritypolicyselfsubjectreviewsResource = v1.SchemeGroupVersion.WithResource("podsecuritypolicyselfsubjectreviews") - -var podsecuritypolicyselfsubjectreviewsKind = v1.SchemeGroupVersion.WithKind("PodSecurityPolicySelfSubjectReview") - -// Create takes the representation of a podSecurityPolicySelfSubjectReview and creates it. Returns the server's representation of the podSecurityPolicySelfSubjectReview, and an error, if there is any. -func (c *FakePodSecurityPolicySelfSubjectReviews) Create(ctx context.Context, podSecurityPolicySelfSubjectReview *v1.PodSecurityPolicySelfSubjectReview, opts metav1.CreateOptions) (result *v1.PodSecurityPolicySelfSubjectReview, err error) { - emptyResult := &v1.PodSecurityPolicySelfSubjectReview{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(podsecuritypolicyselfsubjectreviewsResource, c.ns, podSecurityPolicySelfSubjectReview, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePodSecurityPolicySelfSubjectReviews(fake *FakeSecurityV1, namespace string) securityv1.PodSecurityPolicySelfSubjectReviewInterface { + return &fakePodSecurityPolicySelfSubjectReviews{ + gentype.NewFakeClient[*v1.PodSecurityPolicySelfSubjectReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("podsecuritypolicyselfsubjectreviews"), + v1.SchemeGroupVersion.WithKind("PodSecurityPolicySelfSubjectReview"), + func() *v1.PodSecurityPolicySelfSubjectReview { return &v1.PodSecurityPolicySelfSubjectReview{} }, + ), + fake, } - return obj.(*v1.PodSecurityPolicySelfSubjectReview), err } diff --git a/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicysubjectreview.go b/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicysubjectreview.go index 1927c74441..c49a19ce13 100644 --- a/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicysubjectreview.go +++ b/security/clientset/versioned/typed/security/v1/fake/fake_podsecuritypolicysubjectreview.go @@ -3,31 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/security/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + securityv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + gentype "k8s.io/client-go/gentype" ) -// FakePodSecurityPolicySubjectReviews implements PodSecurityPolicySubjectReviewInterface -type FakePodSecurityPolicySubjectReviews struct { +// fakePodSecurityPolicySubjectReviews implements PodSecurityPolicySubjectReviewInterface +type fakePodSecurityPolicySubjectReviews struct { + *gentype.FakeClient[*v1.PodSecurityPolicySubjectReview] Fake *FakeSecurityV1 - ns string } -var podsecuritypolicysubjectreviewsResource = v1.SchemeGroupVersion.WithResource("podsecuritypolicysubjectreviews") - -var podsecuritypolicysubjectreviewsKind = v1.SchemeGroupVersion.WithKind("PodSecurityPolicySubjectReview") - -// Create takes the representation of a podSecurityPolicySubjectReview and creates it. Returns the server's representation of the podSecurityPolicySubjectReview, and an error, if there is any. -func (c *FakePodSecurityPolicySubjectReviews) Create(ctx context.Context, podSecurityPolicySubjectReview *v1.PodSecurityPolicySubjectReview, opts metav1.CreateOptions) (result *v1.PodSecurityPolicySubjectReview, err error) { - emptyResult := &v1.PodSecurityPolicySubjectReview{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(podsecuritypolicysubjectreviewsResource, c.ns, podSecurityPolicySubjectReview, opts), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakePodSecurityPolicySubjectReviews(fake *FakeSecurityV1, namespace string) securityv1.PodSecurityPolicySubjectReviewInterface { + return &fakePodSecurityPolicySubjectReviews{ + gentype.NewFakeClient[*v1.PodSecurityPolicySubjectReview]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("podsecuritypolicysubjectreviews"), + v1.SchemeGroupVersion.WithKind("PodSecurityPolicySubjectReview"), + func() *v1.PodSecurityPolicySubjectReview { return &v1.PodSecurityPolicySubjectReview{} }, + ), + fake, } - return obj.(*v1.PodSecurityPolicySubjectReview), err } diff --git a/security/clientset/versioned/typed/security/v1/fake/fake_rangeallocation.go b/security/clientset/versioned/typed/security/v1/fake/fake_rangeallocation.go index cda0cc7b12..99667d11f2 100644 --- a/security/clientset/versioned/typed/security/v1/fake/fake_rangeallocation.go +++ b/security/clientset/versioned/typed/security/v1/fake/fake_rangeallocation.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/security/v1" securityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedsecurityv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeRangeAllocations implements RangeAllocationInterface -type FakeRangeAllocations struct { +// fakeRangeAllocations implements RangeAllocationInterface +type fakeRangeAllocations struct { + *gentype.FakeClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityv1.RangeAllocationApplyConfiguration] Fake *FakeSecurityV1 } -var rangeallocationsResource = v1.SchemeGroupVersion.WithResource("rangeallocations") - -var rangeallocationsKind = v1.SchemeGroupVersion.WithKind("RangeAllocation") - -// Get takes name of the rangeAllocation, and returns the corresponding rangeAllocation object, and an error if there is any. -func (c *FakeRangeAllocations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(rangeallocationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// List takes label and field selectors, and returns the list of RangeAllocations that match those selectors. -func (c *FakeRangeAllocations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RangeAllocationList, err error) { - emptyResult := &v1.RangeAllocationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(rangeallocationsResource, rangeallocationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.RangeAllocationList{ListMeta: obj.(*v1.RangeAllocationList).ListMeta} - for _, item := range obj.(*v1.RangeAllocationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested rangeAllocations. -func (c *FakeRangeAllocations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(rangeallocationsResource, opts)) -} - -// Create takes the representation of a rangeAllocation and creates it. Returns the server's representation of the rangeAllocation, and an error, if there is any. -func (c *FakeRangeAllocations) Create(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.CreateOptions) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(rangeallocationsResource, rangeAllocation, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// Update takes the representation of a rangeAllocation and updates it. Returns the server's representation of the rangeAllocation, and an error, if there is any. -func (c *FakeRangeAllocations) Update(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.UpdateOptions) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(rangeallocationsResource, rangeAllocation, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// Delete takes name of the rangeAllocation and deletes it. Returns an error if one occurs. -func (c *FakeRangeAllocations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(rangeallocationsResource, name, opts), &v1.RangeAllocation{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRangeAllocations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(rangeallocationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.RangeAllocationList{}) - return err -} - -// Patch applies the patch and returns the patched rangeAllocation. -func (c *FakeRangeAllocations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(rangeallocationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied rangeAllocation. -func (c *FakeRangeAllocations) Apply(ctx context.Context, rangeAllocation *securityv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RangeAllocation, err error) { - if rangeAllocation == nil { - return nil, fmt.Errorf("rangeAllocation provided to Apply must not be nil") - } - data, err := json.Marshal(rangeAllocation) - if err != nil { - return nil, err - } - name := rangeAllocation.Name - if name == nil { - return nil, fmt.Errorf("rangeAllocation.Name must be provided to Apply") - } - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(rangeallocationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeRangeAllocations(fake *FakeSecurityV1) typedsecurityv1.RangeAllocationInterface { + return &fakeRangeAllocations{ + gentype.NewFakeClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityv1.RangeAllocationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("rangeallocations"), + v1.SchemeGroupVersion.WithKind("RangeAllocation"), + func() *v1.RangeAllocation { return &v1.RangeAllocation{} }, + func() *v1.RangeAllocationList { return &v1.RangeAllocationList{} }, + func(dst, src *v1.RangeAllocationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.RangeAllocationList) []*v1.RangeAllocation { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.RangeAllocationList, items []*v1.RangeAllocation) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.RangeAllocation), err } diff --git a/security/clientset/versioned/typed/security/v1/fake/fake_security_client.go b/security/clientset/versioned/typed/security/v1/fake/fake_security_client.go index 33240c41c1..36d54ae64a 100644 --- a/security/clientset/versioned/typed/security/v1/fake/fake_security_client.go +++ b/security/clientset/versioned/typed/security/v1/fake/fake_security_client.go @@ -13,23 +13,23 @@ type FakeSecurityV1 struct { } func (c *FakeSecurityV1) PodSecurityPolicyReviews(namespace string) v1.PodSecurityPolicyReviewInterface { - return &FakePodSecurityPolicyReviews{c, namespace} + return newFakePodSecurityPolicyReviews(c, namespace) } func (c *FakeSecurityV1) PodSecurityPolicySelfSubjectReviews(namespace string) v1.PodSecurityPolicySelfSubjectReviewInterface { - return &FakePodSecurityPolicySelfSubjectReviews{c, namespace} + return newFakePodSecurityPolicySelfSubjectReviews(c, namespace) } func (c *FakeSecurityV1) PodSecurityPolicySubjectReviews(namespace string) v1.PodSecurityPolicySubjectReviewInterface { - return &FakePodSecurityPolicySubjectReviews{c, namespace} + return newFakePodSecurityPolicySubjectReviews(c, namespace) } func (c *FakeSecurityV1) RangeAllocations() v1.RangeAllocationInterface { - return &FakeRangeAllocations{c} + return newFakeRangeAllocations(c) } func (c *FakeSecurityV1) SecurityContextConstraints() v1.SecurityContextConstraintsInterface { - return &FakeSecurityContextConstraints{c} + return newFakeSecurityContextConstraints(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/security/clientset/versioned/typed/security/v1/fake/fake_securitycontextconstraints.go b/security/clientset/versioned/typed/security/v1/fake/fake_securitycontextconstraints.go index d3674b611a..f81699ac9c 100644 --- a/security/clientset/versioned/typed/security/v1/fake/fake_securitycontextconstraints.go +++ b/security/clientset/versioned/typed/security/v1/fake/fake_securitycontextconstraints.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/security/v1" securityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedsecurityv1 "github.com/openshift/client-go/security/clientset/versioned/typed/security/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeSecurityContextConstraints implements SecurityContextConstraintsInterface -type FakeSecurityContextConstraints struct { +// fakeSecurityContextConstraints implements SecurityContextConstraintsInterface +type fakeSecurityContextConstraints struct { + *gentype.FakeClientWithListAndApply[*v1.SecurityContextConstraints, *v1.SecurityContextConstraintsList, *securityv1.SecurityContextConstraintsApplyConfiguration] Fake *FakeSecurityV1 } -var securitycontextconstraintsResource = v1.SchemeGroupVersion.WithResource("securitycontextconstraints") - -var securitycontextconstraintsKind = v1.SchemeGroupVersion.WithKind("SecurityContextConstraints") - -// Get takes name of the securityContextConstraints, and returns the corresponding securityContextConstraints object, and an error if there is any. -func (c *FakeSecurityContextConstraints) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.SecurityContextConstraints, err error) { - emptyResult := &v1.SecurityContextConstraints{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(securitycontextconstraintsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.SecurityContextConstraints), err -} - -// List takes label and field selectors, and returns the list of SecurityContextConstraints that match those selectors. -func (c *FakeSecurityContextConstraints) List(ctx context.Context, opts metav1.ListOptions) (result *v1.SecurityContextConstraintsList, err error) { - emptyResult := &v1.SecurityContextConstraintsList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(securitycontextconstraintsResource, securitycontextconstraintsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.SecurityContextConstraintsList{ListMeta: obj.(*v1.SecurityContextConstraintsList).ListMeta} - for _, item := range obj.(*v1.SecurityContextConstraintsList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested securityContextConstraints. -func (c *FakeSecurityContextConstraints) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(securitycontextconstraintsResource, opts)) -} - -// Create takes the representation of a securityContextConstraints and creates it. Returns the server's representation of the securityContextConstraints, and an error, if there is any. -func (c *FakeSecurityContextConstraints) Create(ctx context.Context, securityContextConstraints *v1.SecurityContextConstraints, opts metav1.CreateOptions) (result *v1.SecurityContextConstraints, err error) { - emptyResult := &v1.SecurityContextConstraints{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(securitycontextconstraintsResource, securityContextConstraints, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.SecurityContextConstraints), err -} - -// Update takes the representation of a securityContextConstraints and updates it. Returns the server's representation of the securityContextConstraints, and an error, if there is any. -func (c *FakeSecurityContextConstraints) Update(ctx context.Context, securityContextConstraints *v1.SecurityContextConstraints, opts metav1.UpdateOptions) (result *v1.SecurityContextConstraints, err error) { - emptyResult := &v1.SecurityContextConstraints{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(securitycontextconstraintsResource, securityContextConstraints, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.SecurityContextConstraints), err -} - -// Delete takes name of the securityContextConstraints and deletes it. Returns an error if one occurs. -func (c *FakeSecurityContextConstraints) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(securitycontextconstraintsResource, name, opts), &v1.SecurityContextConstraints{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSecurityContextConstraints) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(securitycontextconstraintsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.SecurityContextConstraintsList{}) - return err -} - -// Patch applies the patch and returns the patched securityContextConstraints. -func (c *FakeSecurityContextConstraints) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SecurityContextConstraints, err error) { - emptyResult := &v1.SecurityContextConstraints{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(securitycontextconstraintsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.SecurityContextConstraints), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied securityContextConstraints. -func (c *FakeSecurityContextConstraints) Apply(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraintsApplyConfiguration, opts metav1.ApplyOptions) (result *v1.SecurityContextConstraints, err error) { - if securityContextConstraints == nil { - return nil, fmt.Errorf("securityContextConstraints provided to Apply must not be nil") - } - data, err := json.Marshal(securityContextConstraints) - if err != nil { - return nil, err - } - name := securityContextConstraints.Name - if name == nil { - return nil, fmt.Errorf("securityContextConstraints.Name must be provided to Apply") - } - emptyResult := &v1.SecurityContextConstraints{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(securitycontextconstraintsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeSecurityContextConstraints(fake *FakeSecurityV1) typedsecurityv1.SecurityContextConstraintsInterface { + return &fakeSecurityContextConstraints{ + gentype.NewFakeClientWithListAndApply[*v1.SecurityContextConstraints, *v1.SecurityContextConstraintsList, *securityv1.SecurityContextConstraintsApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("securitycontextconstraints"), + v1.SchemeGroupVersion.WithKind("SecurityContextConstraints"), + func() *v1.SecurityContextConstraints { return &v1.SecurityContextConstraints{} }, + func() *v1.SecurityContextConstraintsList { return &v1.SecurityContextConstraintsList{} }, + func(dst, src *v1.SecurityContextConstraintsList) { dst.ListMeta = src.ListMeta }, + func(list *v1.SecurityContextConstraintsList) []*v1.SecurityContextConstraints { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.SecurityContextConstraintsList, items []*v1.SecurityContextConstraints) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.SecurityContextConstraints), err } diff --git a/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go b/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go index 9ccf473a78..f92ff7f4f5 100644 --- a/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go +++ b/security/clientset/versioned/typed/security/v1/podsecuritypolicyreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type PodSecurityPolicyReviewsGetter interface { // PodSecurityPolicyReviewInterface has methods to work with PodSecurityPolicyReview resources. type PodSecurityPolicyReviewInterface interface { - Create(ctx context.Context, podSecurityPolicyReview *v1.PodSecurityPolicyReview, opts metav1.CreateOptions) (*v1.PodSecurityPolicyReview, error) + Create(ctx context.Context, podSecurityPolicyReview *securityv1.PodSecurityPolicyReview, opts metav1.CreateOptions) (*securityv1.PodSecurityPolicyReview, error) PodSecurityPolicyReviewExpansion } // podSecurityPolicyReviews implements PodSecurityPolicyReviewInterface type podSecurityPolicyReviews struct { - *gentype.Client[*v1.PodSecurityPolicyReview] + *gentype.Client[*securityv1.PodSecurityPolicyReview] } // newPodSecurityPolicyReviews returns a PodSecurityPolicyReviews func newPodSecurityPolicyReviews(c *SecurityV1Client, namespace string) *podSecurityPolicyReviews { return &podSecurityPolicyReviews{ - gentype.NewClient[*v1.PodSecurityPolicyReview]( + gentype.NewClient[*securityv1.PodSecurityPolicyReview]( "podsecuritypolicyreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PodSecurityPolicyReview { return &v1.PodSecurityPolicyReview{} }), + func() *securityv1.PodSecurityPolicyReview { return &securityv1.PodSecurityPolicyReview{} }, + ), } } diff --git a/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go b/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go index 794322ea95..47afca0970 100644 --- a/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go +++ b/security/clientset/versioned/typed/security/v1/podsecuritypolicyselfsubjectreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,26 @@ type PodSecurityPolicySelfSubjectReviewsGetter interface { // PodSecurityPolicySelfSubjectReviewInterface has methods to work with PodSecurityPolicySelfSubjectReview resources. type PodSecurityPolicySelfSubjectReviewInterface interface { - Create(ctx context.Context, podSecurityPolicySelfSubjectReview *v1.PodSecurityPolicySelfSubjectReview, opts metav1.CreateOptions) (*v1.PodSecurityPolicySelfSubjectReview, error) + Create(ctx context.Context, podSecurityPolicySelfSubjectReview *securityv1.PodSecurityPolicySelfSubjectReview, opts metav1.CreateOptions) (*securityv1.PodSecurityPolicySelfSubjectReview, error) PodSecurityPolicySelfSubjectReviewExpansion } // podSecurityPolicySelfSubjectReviews implements PodSecurityPolicySelfSubjectReviewInterface type podSecurityPolicySelfSubjectReviews struct { - *gentype.Client[*v1.PodSecurityPolicySelfSubjectReview] + *gentype.Client[*securityv1.PodSecurityPolicySelfSubjectReview] } // newPodSecurityPolicySelfSubjectReviews returns a PodSecurityPolicySelfSubjectReviews func newPodSecurityPolicySelfSubjectReviews(c *SecurityV1Client, namespace string) *podSecurityPolicySelfSubjectReviews { return &podSecurityPolicySelfSubjectReviews{ - gentype.NewClient[*v1.PodSecurityPolicySelfSubjectReview]( + gentype.NewClient[*securityv1.PodSecurityPolicySelfSubjectReview]( "podsecuritypolicyselfsubjectreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PodSecurityPolicySelfSubjectReview { return &v1.PodSecurityPolicySelfSubjectReview{} }), + func() *securityv1.PodSecurityPolicySelfSubjectReview { + return &securityv1.PodSecurityPolicySelfSubjectReview{} + }, + ), } } diff --git a/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go b/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go index 88bf620959..ebbcd8cb6d 100644 --- a/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go +++ b/security/clientset/versioned/typed/security/v1/podsecuritypolicysubjectreview.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" + securityv1 "github.com/openshift/api/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,23 +19,24 @@ type PodSecurityPolicySubjectReviewsGetter interface { // PodSecurityPolicySubjectReviewInterface has methods to work with PodSecurityPolicySubjectReview resources. type PodSecurityPolicySubjectReviewInterface interface { - Create(ctx context.Context, podSecurityPolicySubjectReview *v1.PodSecurityPolicySubjectReview, opts metav1.CreateOptions) (*v1.PodSecurityPolicySubjectReview, error) + Create(ctx context.Context, podSecurityPolicySubjectReview *securityv1.PodSecurityPolicySubjectReview, opts metav1.CreateOptions) (*securityv1.PodSecurityPolicySubjectReview, error) PodSecurityPolicySubjectReviewExpansion } // podSecurityPolicySubjectReviews implements PodSecurityPolicySubjectReviewInterface type podSecurityPolicySubjectReviews struct { - *gentype.Client[*v1.PodSecurityPolicySubjectReview] + *gentype.Client[*securityv1.PodSecurityPolicySubjectReview] } // newPodSecurityPolicySubjectReviews returns a PodSecurityPolicySubjectReviews func newPodSecurityPolicySubjectReviews(c *SecurityV1Client, namespace string) *podSecurityPolicySubjectReviews { return &podSecurityPolicySubjectReviews{ - gentype.NewClient[*v1.PodSecurityPolicySubjectReview]( + gentype.NewClient[*securityv1.PodSecurityPolicySubjectReview]( "podsecuritypolicysubjectreviews", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.PodSecurityPolicySubjectReview { return &v1.PodSecurityPolicySubjectReview{} }), + func() *securityv1.PodSecurityPolicySubjectReview { return &securityv1.PodSecurityPolicySubjectReview{} }, + ), } } diff --git a/security/clientset/versioned/typed/security/v1/rangeallocation.go b/security/clientset/versioned/typed/security/v1/rangeallocation.go index 8980a4d607..b4469ddff5 100644 --- a/security/clientset/versioned/typed/security/v1/rangeallocation.go +++ b/security/clientset/versioned/typed/security/v1/rangeallocation.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" - securityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" + securityv1 "github.com/openshift/api/security/v1" + applyconfigurationssecurityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type RangeAllocationsGetter interface { // RangeAllocationInterface has methods to work with RangeAllocation resources. type RangeAllocationInterface interface { - Create(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.CreateOptions) (*v1.RangeAllocation, error) - Update(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.UpdateOptions) (*v1.RangeAllocation, error) + Create(ctx context.Context, rangeAllocation *securityv1.RangeAllocation, opts metav1.CreateOptions) (*securityv1.RangeAllocation, error) + Update(ctx context.Context, rangeAllocation *securityv1.RangeAllocation, opts metav1.UpdateOptions) (*securityv1.RangeAllocation, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RangeAllocation, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RangeAllocationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*securityv1.RangeAllocation, error) + List(ctx context.Context, opts metav1.ListOptions) (*securityv1.RangeAllocationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RangeAllocation, err error) - Apply(ctx context.Context, rangeAllocation *securityv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RangeAllocation, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *securityv1.RangeAllocation, err error) + Apply(ctx context.Context, rangeAllocation *applyconfigurationssecurityv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *securityv1.RangeAllocation, err error) RangeAllocationExpansion } // rangeAllocations implements RangeAllocationInterface type rangeAllocations struct { - *gentype.ClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityv1.RangeAllocationApplyConfiguration] + *gentype.ClientWithListAndApply[*securityv1.RangeAllocation, *securityv1.RangeAllocationList, *applyconfigurationssecurityv1.RangeAllocationApplyConfiguration] } // newRangeAllocations returns a RangeAllocations func newRangeAllocations(c *SecurityV1Client) *rangeAllocations { return &rangeAllocations{ - gentype.NewClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityv1.RangeAllocationApplyConfiguration]( + gentype.NewClientWithListAndApply[*securityv1.RangeAllocation, *securityv1.RangeAllocationList, *applyconfigurationssecurityv1.RangeAllocationApplyConfiguration]( "rangeallocations", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.RangeAllocation { return &v1.RangeAllocation{} }, - func() *v1.RangeAllocationList { return &v1.RangeAllocationList{} }), + func() *securityv1.RangeAllocation { return &securityv1.RangeAllocation{} }, + func() *securityv1.RangeAllocationList { return &securityv1.RangeAllocationList{} }, + ), } } diff --git a/security/clientset/versioned/typed/security/v1/security_client.go b/security/clientset/versioned/typed/security/v1/security_client.go index 8b87437ed4..0fe95d0280 100644 --- a/security/clientset/versioned/typed/security/v1/security_client.go +++ b/security/clientset/versioned/typed/security/v1/security_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/security/v1" - "github.com/openshift/client-go/security/clientset/versioned/scheme" + securityv1 "github.com/openshift/api/security/v1" + scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -89,10 +89,10 @@ func New(c rest.Interface) *SecurityV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := securityv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go b/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go index f4b52587f2..82eda438d1 100644 --- a/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go +++ b/security/clientset/versioned/typed/security/v1/securitycontextconstraints.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/security/v1" - securityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" + securityv1 "github.com/openshift/api/security/v1" + applyconfigurationssecurityv1 "github.com/openshift/client-go/security/applyconfigurations/security/v1" scheme "github.com/openshift/client-go/security/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type SecurityContextConstraintsGetter interface { // SecurityContextConstraintsInterface has methods to work with SecurityContextConstraints resources. type SecurityContextConstraintsInterface interface { - Create(ctx context.Context, securityContextConstraints *v1.SecurityContextConstraints, opts metav1.CreateOptions) (*v1.SecurityContextConstraints, error) - Update(ctx context.Context, securityContextConstraints *v1.SecurityContextConstraints, opts metav1.UpdateOptions) (*v1.SecurityContextConstraints, error) + Create(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraints, opts metav1.CreateOptions) (*securityv1.SecurityContextConstraints, error) + Update(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraints, opts metav1.UpdateOptions) (*securityv1.SecurityContextConstraints, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.SecurityContextConstraints, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SecurityContextConstraintsList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*securityv1.SecurityContextConstraints, error) + List(ctx context.Context, opts metav1.ListOptions) (*securityv1.SecurityContextConstraintsList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.SecurityContextConstraints, err error) - Apply(ctx context.Context, securityContextConstraints *securityv1.SecurityContextConstraintsApplyConfiguration, opts metav1.ApplyOptions) (result *v1.SecurityContextConstraints, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *securityv1.SecurityContextConstraints, err error) + Apply(ctx context.Context, securityContextConstraints *applyconfigurationssecurityv1.SecurityContextConstraintsApplyConfiguration, opts metav1.ApplyOptions) (result *securityv1.SecurityContextConstraints, err error) SecurityContextConstraintsExpansion } // securityContextConstraints implements SecurityContextConstraintsInterface type securityContextConstraints struct { - *gentype.ClientWithListAndApply[*v1.SecurityContextConstraints, *v1.SecurityContextConstraintsList, *securityv1.SecurityContextConstraintsApplyConfiguration] + *gentype.ClientWithListAndApply[*securityv1.SecurityContextConstraints, *securityv1.SecurityContextConstraintsList, *applyconfigurationssecurityv1.SecurityContextConstraintsApplyConfiguration] } // newSecurityContextConstraints returns a SecurityContextConstraints func newSecurityContextConstraints(c *SecurityV1Client) *securityContextConstraints { return &securityContextConstraints{ - gentype.NewClientWithListAndApply[*v1.SecurityContextConstraints, *v1.SecurityContextConstraintsList, *securityv1.SecurityContextConstraintsApplyConfiguration]( + gentype.NewClientWithListAndApply[*securityv1.SecurityContextConstraints, *securityv1.SecurityContextConstraintsList, *applyconfigurationssecurityv1.SecurityContextConstraintsApplyConfiguration]( "securitycontextconstraints", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.SecurityContextConstraints { return &v1.SecurityContextConstraints{} }, - func() *v1.SecurityContextConstraintsList { return &v1.SecurityContextConstraintsList{} }), + func() *securityv1.SecurityContextConstraints { return &securityv1.SecurityContextConstraints{} }, + func() *securityv1.SecurityContextConstraintsList { return &securityv1.SecurityContextConstraintsList{} }, + ), } } diff --git a/security/informers/externalversions/generic.go b/security/informers/externalversions/generic.go index 6a0d9f170f..729e6666f2 100644 --- a/security/informers/externalversions/generic.go +++ b/security/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/security/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/security/informers/externalversions/security/v1/rangeallocation.go b/security/informers/externalversions/security/v1/rangeallocation.go index 98f26821a5..34adaf89de 100644 --- a/security/informers/externalversions/security/v1/rangeallocation.go +++ b/security/informers/externalversions/security/v1/rangeallocation.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - securityv1 "github.com/openshift/api/security/v1" + apisecurityv1 "github.com/openshift/api/security/v1" versioned "github.com/openshift/client-go/security/clientset/versioned" internalinterfaces "github.com/openshift/client-go/security/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/security/listers/security/v1" + securityv1 "github.com/openshift/client-go/security/listers/security/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // RangeAllocations. type RangeAllocationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.RangeAllocationLister + Lister() securityv1.RangeAllocationLister } type rangeAllocationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredRangeAllocationInformer(client versioned.Interface, resyncPeriod return client.SecurityV1().RangeAllocations().Watch(context.TODO(), options) }, }, - &securityv1.RangeAllocation{}, + &apisecurityv1.RangeAllocation{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *rangeAllocationInformer) defaultInformer(client versioned.Interface, re } func (f *rangeAllocationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&securityv1.RangeAllocation{}, f.defaultInformer) + return f.factory.InformerFor(&apisecurityv1.RangeAllocation{}, f.defaultInformer) } -func (f *rangeAllocationInformer) Lister() v1.RangeAllocationLister { - return v1.NewRangeAllocationLister(f.Informer().GetIndexer()) +func (f *rangeAllocationInformer) Lister() securityv1.RangeAllocationLister { + return securityv1.NewRangeAllocationLister(f.Informer().GetIndexer()) } diff --git a/security/informers/externalversions/security/v1/securitycontextconstraints.go b/security/informers/externalversions/security/v1/securitycontextconstraints.go index 107888c45f..5e7e6c9820 100644 --- a/security/informers/externalversions/security/v1/securitycontextconstraints.go +++ b/security/informers/externalversions/security/v1/securitycontextconstraints.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - securityv1 "github.com/openshift/api/security/v1" + apisecurityv1 "github.com/openshift/api/security/v1" versioned "github.com/openshift/client-go/security/clientset/versioned" internalinterfaces "github.com/openshift/client-go/security/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/security/listers/security/v1" + securityv1 "github.com/openshift/client-go/security/listers/security/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // SecurityContextConstraints. type SecurityContextConstraintsInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.SecurityContextConstraintsLister + Lister() securityv1.SecurityContextConstraintsLister } type securityContextConstraintsInformer struct { @@ -54,7 +54,7 @@ func NewFilteredSecurityContextConstraintsInformer(client versioned.Interface, r return client.SecurityV1().SecurityContextConstraints().Watch(context.TODO(), options) }, }, - &securityv1.SecurityContextConstraints{}, + &apisecurityv1.SecurityContextConstraints{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *securityContextConstraintsInformer) defaultInformer(client versioned.In } func (f *securityContextConstraintsInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&securityv1.SecurityContextConstraints{}, f.defaultInformer) + return f.factory.InformerFor(&apisecurityv1.SecurityContextConstraints{}, f.defaultInformer) } -func (f *securityContextConstraintsInformer) Lister() v1.SecurityContextConstraintsLister { - return v1.NewSecurityContextConstraintsLister(f.Informer().GetIndexer()) +func (f *securityContextConstraintsInformer) Lister() securityv1.SecurityContextConstraintsLister { + return securityv1.NewSecurityContextConstraintsLister(f.Informer().GetIndexer()) } diff --git a/security/listers/security/v1/rangeallocation.go b/security/listers/security/v1/rangeallocation.go index 394eea2389..bb185f4a7f 100644 --- a/security/listers/security/v1/rangeallocation.go +++ b/security/listers/security/v1/rangeallocation.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + securityv1 "github.com/openshift/api/security/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RangeAllocationLister helps list RangeAllocations. @@ -14,19 +14,19 @@ import ( type RangeAllocationLister interface { // List lists all RangeAllocations in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.RangeAllocation, err error) + List(selector labels.Selector) (ret []*securityv1.RangeAllocation, err error) // Get retrieves the RangeAllocation from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.RangeAllocation, error) + Get(name string) (*securityv1.RangeAllocation, error) RangeAllocationListerExpansion } // rangeAllocationLister implements the RangeAllocationLister interface. type rangeAllocationLister struct { - listers.ResourceIndexer[*v1.RangeAllocation] + listers.ResourceIndexer[*securityv1.RangeAllocation] } // NewRangeAllocationLister returns a new RangeAllocationLister. func NewRangeAllocationLister(indexer cache.Indexer) RangeAllocationLister { - return &rangeAllocationLister{listers.New[*v1.RangeAllocation](indexer, v1.Resource("rangeallocation"))} + return &rangeAllocationLister{listers.New[*securityv1.RangeAllocation](indexer, securityv1.Resource("rangeallocation"))} } diff --git a/security/listers/security/v1/securitycontextconstraints.go b/security/listers/security/v1/securitycontextconstraints.go index 9c52d7ecf0..f27825633d 100644 --- a/security/listers/security/v1/securitycontextconstraints.go +++ b/security/listers/security/v1/securitycontextconstraints.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/security/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + securityv1 "github.com/openshift/api/security/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // SecurityContextConstraintsLister helps list SecurityContextConstraints. @@ -14,19 +14,19 @@ import ( type SecurityContextConstraintsLister interface { // List lists all SecurityContextConstraints in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.SecurityContextConstraints, err error) + List(selector labels.Selector) (ret []*securityv1.SecurityContextConstraints, err error) // Get retrieves the SecurityContextConstraints from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.SecurityContextConstraints, error) + Get(name string) (*securityv1.SecurityContextConstraints, error) SecurityContextConstraintsListerExpansion } // securityContextConstraintsLister implements the SecurityContextConstraintsLister interface. type securityContextConstraintsLister struct { - listers.ResourceIndexer[*v1.SecurityContextConstraints] + listers.ResourceIndexer[*securityv1.SecurityContextConstraints] } // NewSecurityContextConstraintsLister returns a new SecurityContextConstraintsLister. func NewSecurityContextConstraintsLister(indexer cache.Indexer) SecurityContextConstraintsLister { - return &securityContextConstraintsLister{listers.New[*v1.SecurityContextConstraints](indexer, v1.Resource("securitycontextconstraints"))} + return &securityContextConstraintsLister{listers.New[*securityv1.SecurityContextConstraints](indexer, securityv1.Resource("securitycontextconstraints"))} } diff --git a/securityinternal/applyconfigurations/internal/internal.go b/securityinternal/applyconfigurations/internal/internal.go index e364694a8a..1cbe65fac2 100644 --- a/securityinternal/applyconfigurations/internal/internal.go +++ b/securityinternal/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/securityinternal/applyconfigurations/securityinternal/v1/rangeallocation.go b/securityinternal/applyconfigurations/securityinternal/v1/rangeallocation.go index df59ee7949..9a0daa7ba5 100644 --- a/securityinternal/applyconfigurations/securityinternal/v1/rangeallocation.go +++ b/securityinternal/applyconfigurations/securityinternal/v1/rangeallocation.go @@ -5,19 +5,19 @@ package v1 import ( securityinternalv1 "github.com/openshift/api/securityinternal/v1" internal "github.com/openshift/client-go/securityinternal/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // RangeAllocationApplyConfiguration represents a declarative configuration of the RangeAllocation type for use // with apply. type RangeAllocationApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Range *string `json:"range,omitempty"` - Data []byte `json:"data,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Range *string `json:"range,omitempty"` + Data []byte `json:"data,omitempty"` } // RangeAllocation constructs a declarative configuration of the RangeAllocation type for use with @@ -69,7 +69,7 @@ func extractRangeAllocation(rangeAllocation *securityinternalv1.RangeAllocation, // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithKind(value string) *RangeAllocationApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *RangeAllocationApplyConfiguration) WithKind(value string) *RangeAllocat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithAPIVersion(value string) *RangeAllocationApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *RangeAllocationApplyConfiguration) WithAPIVersion(value string) *RangeA // If called multiple times, the Name field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithName(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *RangeAllocationApplyConfiguration) WithName(value string) *RangeAllocat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithGenerateName(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *RangeAllocationApplyConfiguration) WithGenerateName(value string) *Rang // If called multiple times, the Namespace field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithNamespace(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *RangeAllocationApplyConfiguration) WithNamespace(value string) *RangeAl // If called multiple times, the UID field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithUID(value types.UID) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *RangeAllocationApplyConfiguration) WithUID(value types.UID) *RangeAlloc // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithResourceVersion(value string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,25 +131,25 @@ func (b *RangeAllocationApplyConfiguration) WithResourceVersion(value string) *R // If called multiple times, the Generation field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithGeneration(value int64) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *RangeAllocationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *RangeAllocationApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RangeAllocationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *RangeAllocationApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *RangeAllocationApplyConfiguration) WithLabels(entries map[string]string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *RangeAllocationApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *RangeAllocationApplyConfiguration) WithAnnotations(entries map[string]string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -195,13 +195,13 @@ func (b *RangeAllocationApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RangeAllocationApplyConfiguration { +func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,14 +212,14 @@ func (b *RangeAllocationApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *RangeAllocationApplyConfiguration) WithFinalizers(values ...string) *RangeAllocationApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *RangeAllocationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *RangeAllocationApplyConfiguration) WithData(values ...byte) *RangeAlloc // GetName retrieves the value of the Name field in the declarative configuration. func (b *RangeAllocationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/securityinternal/clientset/versioned/clientset.go b/securityinternal/clientset/versioned/clientset.go index c110c8b9b7..56a052c278 100644 --- a/securityinternal/clientset/versioned/clientset.go +++ b/securityinternal/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" securityv1 "github.com/openshift/client-go/securityinternal/clientset/versioned/typed/securityinternal/v1" discovery "k8s.io/client-go/discovery" diff --git a/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_rangeallocation.go b/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_rangeallocation.go index 0c87218da5..4d9a59411c 100644 --- a/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_rangeallocation.go +++ b/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_rangeallocation.go @@ -3,133 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/securityinternal/v1" securityinternalv1 "github.com/openshift/client-go/securityinternal/applyconfigurations/securityinternal/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedsecurityinternalv1 "github.com/openshift/client-go/securityinternal/clientset/versioned/typed/securityinternal/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeRangeAllocations implements RangeAllocationInterface -type FakeRangeAllocations struct { +// fakeRangeAllocations implements RangeAllocationInterface +type fakeRangeAllocations struct { + *gentype.FakeClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityinternalv1.RangeAllocationApplyConfiguration] Fake *FakeSecurityV1 } -var rangeallocationsResource = v1.SchemeGroupVersion.WithResource("rangeallocations") - -var rangeallocationsKind = v1.SchemeGroupVersion.WithKind("RangeAllocation") - -// Get takes name of the rangeAllocation, and returns the corresponding rangeAllocation object, and an error if there is any. -func (c *FakeRangeAllocations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(rangeallocationsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// List takes label and field selectors, and returns the list of RangeAllocations that match those selectors. -func (c *FakeRangeAllocations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RangeAllocationList, err error) { - emptyResult := &v1.RangeAllocationList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(rangeallocationsResource, rangeallocationsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.RangeAllocationList{ListMeta: obj.(*v1.RangeAllocationList).ListMeta} - for _, item := range obj.(*v1.RangeAllocationList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested rangeAllocations. -func (c *FakeRangeAllocations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(rangeallocationsResource, opts)) -} - -// Create takes the representation of a rangeAllocation and creates it. Returns the server's representation of the rangeAllocation, and an error, if there is any. -func (c *FakeRangeAllocations) Create(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.CreateOptions) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(rangeallocationsResource, rangeAllocation, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// Update takes the representation of a rangeAllocation and updates it. Returns the server's representation of the rangeAllocation, and an error, if there is any. -func (c *FakeRangeAllocations) Update(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.UpdateOptions) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(rangeallocationsResource, rangeAllocation, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// Delete takes name of the rangeAllocation and deletes it. Returns an error if one occurs. -func (c *FakeRangeAllocations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(rangeallocationsResource, name, opts), &v1.RangeAllocation{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeRangeAllocations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(rangeallocationsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.RangeAllocationList{}) - return err -} - -// Patch applies the patch and returns the patched rangeAllocation. -func (c *FakeRangeAllocations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RangeAllocation, err error) { - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(rangeallocationsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.RangeAllocation), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied rangeAllocation. -func (c *FakeRangeAllocations) Apply(ctx context.Context, rangeAllocation *securityinternalv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RangeAllocation, err error) { - if rangeAllocation == nil { - return nil, fmt.Errorf("rangeAllocation provided to Apply must not be nil") - } - data, err := json.Marshal(rangeAllocation) - if err != nil { - return nil, err - } - name := rangeAllocation.Name - if name == nil { - return nil, fmt.Errorf("rangeAllocation.Name must be provided to Apply") - } - emptyResult := &v1.RangeAllocation{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(rangeallocationsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeRangeAllocations(fake *FakeSecurityV1) typedsecurityinternalv1.RangeAllocationInterface { + return &fakeRangeAllocations{ + gentype.NewFakeClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityinternalv1.RangeAllocationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("rangeallocations"), + v1.SchemeGroupVersion.WithKind("RangeAllocation"), + func() *v1.RangeAllocation { return &v1.RangeAllocation{} }, + func() *v1.RangeAllocationList { return &v1.RangeAllocationList{} }, + func(dst, src *v1.RangeAllocationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.RangeAllocationList) []*v1.RangeAllocation { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.RangeAllocationList, items []*v1.RangeAllocation) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.RangeAllocation), err } diff --git a/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_securityinternal_client.go b/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_securityinternal_client.go index d158142e34..559630dedd 100644 --- a/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_securityinternal_client.go +++ b/securityinternal/clientset/versioned/typed/securityinternal/v1/fake/fake_securityinternal_client.go @@ -13,7 +13,7 @@ type FakeSecurityV1 struct { } func (c *FakeSecurityV1) RangeAllocations() v1.RangeAllocationInterface { - return &FakeRangeAllocations{c} + return newFakeRangeAllocations(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/securityinternal/clientset/versioned/typed/securityinternal/v1/rangeallocation.go b/securityinternal/clientset/versioned/typed/securityinternal/v1/rangeallocation.go index ce8b9a0c5f..19bda77263 100644 --- a/securityinternal/clientset/versioned/typed/securityinternal/v1/rangeallocation.go +++ b/securityinternal/clientset/versioned/typed/securityinternal/v1/rangeallocation.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/securityinternal/v1" - securityinternalv1 "github.com/openshift/client-go/securityinternal/applyconfigurations/securityinternal/v1" + securityinternalv1 "github.com/openshift/api/securityinternal/v1" + applyconfigurationssecurityinternalv1 "github.com/openshift/client-go/securityinternal/applyconfigurations/securityinternal/v1" scheme "github.com/openshift/client-go/securityinternal/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type RangeAllocationsGetter interface { // RangeAllocationInterface has methods to work with RangeAllocation resources. type RangeAllocationInterface interface { - Create(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.CreateOptions) (*v1.RangeAllocation, error) - Update(ctx context.Context, rangeAllocation *v1.RangeAllocation, opts metav1.UpdateOptions) (*v1.RangeAllocation, error) + Create(ctx context.Context, rangeAllocation *securityinternalv1.RangeAllocation, opts metav1.CreateOptions) (*securityinternalv1.RangeAllocation, error) + Update(ctx context.Context, rangeAllocation *securityinternalv1.RangeAllocation, opts metav1.UpdateOptions) (*securityinternalv1.RangeAllocation, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RangeAllocation, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.RangeAllocationList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*securityinternalv1.RangeAllocation, error) + List(ctx context.Context, opts metav1.ListOptions) (*securityinternalv1.RangeAllocationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RangeAllocation, err error) - Apply(ctx context.Context, rangeAllocation *securityinternalv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.RangeAllocation, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *securityinternalv1.RangeAllocation, err error) + Apply(ctx context.Context, rangeAllocation *applyconfigurationssecurityinternalv1.RangeAllocationApplyConfiguration, opts metav1.ApplyOptions) (result *securityinternalv1.RangeAllocation, err error) RangeAllocationExpansion } // rangeAllocations implements RangeAllocationInterface type rangeAllocations struct { - *gentype.ClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityinternalv1.RangeAllocationApplyConfiguration] + *gentype.ClientWithListAndApply[*securityinternalv1.RangeAllocation, *securityinternalv1.RangeAllocationList, *applyconfigurationssecurityinternalv1.RangeAllocationApplyConfiguration] } // newRangeAllocations returns a RangeAllocations func newRangeAllocations(c *SecurityV1Client) *rangeAllocations { return &rangeAllocations{ - gentype.NewClientWithListAndApply[*v1.RangeAllocation, *v1.RangeAllocationList, *securityinternalv1.RangeAllocationApplyConfiguration]( + gentype.NewClientWithListAndApply[*securityinternalv1.RangeAllocation, *securityinternalv1.RangeAllocationList, *applyconfigurationssecurityinternalv1.RangeAllocationApplyConfiguration]( "rangeallocations", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.RangeAllocation { return &v1.RangeAllocation{} }, - func() *v1.RangeAllocationList { return &v1.RangeAllocationList{} }), + func() *securityinternalv1.RangeAllocation { return &securityinternalv1.RangeAllocation{} }, + func() *securityinternalv1.RangeAllocationList { return &securityinternalv1.RangeAllocationList{} }, + ), } } diff --git a/securityinternal/clientset/versioned/typed/securityinternal/v1/securityinternal_client.go b/securityinternal/clientset/versioned/typed/securityinternal/v1/securityinternal_client.go index f5aafde088..6a37e6120c 100644 --- a/securityinternal/clientset/versioned/typed/securityinternal/v1/securityinternal_client.go +++ b/securityinternal/clientset/versioned/typed/securityinternal/v1/securityinternal_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/securityinternal/v1" - "github.com/openshift/client-go/securityinternal/clientset/versioned/scheme" + securityinternalv1 "github.com/openshift/api/securityinternal/v1" + scheme "github.com/openshift/client-go/securityinternal/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *SecurityV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := securityinternalv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/securityinternal/informers/externalversions/generic.go b/securityinternal/informers/externalversions/generic.go index 795a06a32e..86a5a66fb2 100644 --- a/securityinternal/informers/externalversions/generic.go +++ b/securityinternal/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/securityinternal/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/securityinternal/informers/externalversions/securityinternal/v1/rangeallocation.go b/securityinternal/informers/externalversions/securityinternal/v1/rangeallocation.go index b0218553b7..949c637bd4 100644 --- a/securityinternal/informers/externalversions/securityinternal/v1/rangeallocation.go +++ b/securityinternal/informers/externalversions/securityinternal/v1/rangeallocation.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - securityinternalv1 "github.com/openshift/api/securityinternal/v1" + apisecurityinternalv1 "github.com/openshift/api/securityinternal/v1" versioned "github.com/openshift/client-go/securityinternal/clientset/versioned" internalinterfaces "github.com/openshift/client-go/securityinternal/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/securityinternal/listers/securityinternal/v1" + securityinternalv1 "github.com/openshift/client-go/securityinternal/listers/securityinternal/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // RangeAllocations. type RangeAllocationInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.RangeAllocationLister + Lister() securityinternalv1.RangeAllocationLister } type rangeAllocationInformer struct { @@ -54,7 +54,7 @@ func NewFilteredRangeAllocationInformer(client versioned.Interface, resyncPeriod return client.SecurityV1().RangeAllocations().Watch(context.TODO(), options) }, }, - &securityinternalv1.RangeAllocation{}, + &apisecurityinternalv1.RangeAllocation{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *rangeAllocationInformer) defaultInformer(client versioned.Interface, re } func (f *rangeAllocationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&securityinternalv1.RangeAllocation{}, f.defaultInformer) + return f.factory.InformerFor(&apisecurityinternalv1.RangeAllocation{}, f.defaultInformer) } -func (f *rangeAllocationInformer) Lister() v1.RangeAllocationLister { - return v1.NewRangeAllocationLister(f.Informer().GetIndexer()) +func (f *rangeAllocationInformer) Lister() securityinternalv1.RangeAllocationLister { + return securityinternalv1.NewRangeAllocationLister(f.Informer().GetIndexer()) } diff --git a/securityinternal/listers/securityinternal/v1/rangeallocation.go b/securityinternal/listers/securityinternal/v1/rangeallocation.go index 3a410c5832..533b05412a 100644 --- a/securityinternal/listers/securityinternal/v1/rangeallocation.go +++ b/securityinternal/listers/securityinternal/v1/rangeallocation.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/securityinternal/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + securityinternalv1 "github.com/openshift/api/securityinternal/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // RangeAllocationLister helps list RangeAllocations. @@ -14,19 +14,19 @@ import ( type RangeAllocationLister interface { // List lists all RangeAllocations in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.RangeAllocation, err error) + List(selector labels.Selector) (ret []*securityinternalv1.RangeAllocation, err error) // Get retrieves the RangeAllocation from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.RangeAllocation, error) + Get(name string) (*securityinternalv1.RangeAllocation, error) RangeAllocationListerExpansion } // rangeAllocationLister implements the RangeAllocationLister interface. type rangeAllocationLister struct { - listers.ResourceIndexer[*v1.RangeAllocation] + listers.ResourceIndexer[*securityinternalv1.RangeAllocation] } // NewRangeAllocationLister returns a new RangeAllocationLister. func NewRangeAllocationLister(indexer cache.Indexer) RangeAllocationLister { - return &rangeAllocationLister{listers.New[*v1.RangeAllocation](indexer, v1.Resource("rangeallocation"))} + return &rangeAllocationLister{listers.New[*securityinternalv1.RangeAllocation](indexer, securityinternalv1.Resource("rangeallocation"))} } diff --git a/servicecertsigner/applyconfigurations/internal/internal.go b/servicecertsigner/applyconfigurations/internal/internal.go index cf8ae386cb..27de16dcdf 100644 --- a/servicecertsigner/applyconfigurations/internal/internal.go +++ b/servicecertsigner/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go b/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go index a540dd64d3..f676842a35 100644 --- a/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go +++ b/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go @@ -69,7 +69,7 @@ func extractServiceCertSignerOperatorConfig(serviceCertSignerOperatorConfig *ser // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithKind(value string) *ServiceCertSignerOperatorConfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithKind(value strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithAPIVersion(value string) *ServiceCertSignerOperatorConfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithAPIVersion(value // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithName(value string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithName(value strin // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithGenerateName(value string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithGenerateName(val // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithNamespace(value string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithNamespace(value // If called multiple times, the UID field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithUID(value types.UID) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithUID(value types. // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithResourceVersion(value string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithResourceVersion( // If called multiple times, the Generation field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithGeneration(value int64) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithGeneration(value // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithCreationTimestam // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithDeletionTimestam // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithDeletionGracePer // overwriting an existing map entries in Labels field with the same key. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithLabels(entries map[string]string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithLabels(entries m // overwriting an existing map entries in Annotations field with the same key. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithOwnerReferences( if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithOwnerReferences( func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithFinalizers(values ...string) *ServiceCertSignerOperatorConfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *ServiceCertSignerOperatorConfigApplyConfiguration) WithStatus(value *Se // GetName retrieves the value of the Name field in the declarative configuration. func (b *ServiceCertSignerOperatorConfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigspec.go b/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigspec.go index d9283a43f9..37bce66d47 100644 --- a/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigspec.go +++ b/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigspec.go @@ -24,7 +24,7 @@ func ServiceCertSignerOperatorConfigSpec() *ServiceCertSignerOperatorConfigSpecA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ManagementState field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCertSignerOperatorConfigSpecApplyConfiguration { - b.ManagementState = &value + b.OperatorSpecApplyConfiguration.ManagementState = &value return b } @@ -32,7 +32,7 @@ func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithManagementSt // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LogLevel field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCertSignerOperatorConfigSpecApplyConfiguration { - b.LogLevel = &value + b.OperatorSpecApplyConfiguration.LogLevel = &value return b } @@ -40,7 +40,7 @@ func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithLogLevel(val // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatorLogLevel field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCertSignerOperatorConfigSpecApplyConfiguration { - b.OperatorLogLevel = &value + b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value return b } @@ -48,7 +48,7 @@ func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithOperatorLogL // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCertSignerOperatorConfigSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value + b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value return b } @@ -56,6 +56,6 @@ func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithUnsupportedC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedConfig field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCertSignerOperatorConfigSpecApplyConfiguration { - b.ObservedConfig = &value + b.OperatorSpecApplyConfiguration.ObservedConfig = &value return b } diff --git a/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigstatus.go b/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigstatus.go index 182c4adba2..60037e2d98 100644 --- a/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigstatus.go +++ b/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1/servicecertsigneroperatorconfigstatus.go @@ -22,7 +22,7 @@ func ServiceCertSignerOperatorConfigStatus() *ServiceCertSignerOperatorConfigSta // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ObservedGeneration field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCertSignerOperatorConfigStatusApplyConfiguration { - b.ObservedGeneration = &value + b.OperatorStatusApplyConfiguration.ObservedGeneration = &value return b } @@ -34,7 +34,7 @@ func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithConditions if values[i] == nil { panic("nil value passed to WithConditions") } - b.Conditions = append(b.Conditions, *values[i]) + b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) } return b } @@ -43,7 +43,7 @@ func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithConditions // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Version field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithVersion(value string) *ServiceCertSignerOperatorConfigStatusApplyConfiguration { - b.Version = &value + b.OperatorStatusApplyConfiguration.Version = &value return b } @@ -51,7 +51,7 @@ func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithVersion(va // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadyReplicas field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCertSignerOperatorConfigStatusApplyConfiguration { - b.ReadyReplicas = &value + b.OperatorStatusApplyConfiguration.ReadyReplicas = &value return b } @@ -59,7 +59,7 @@ func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithReadyRepli // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LatestAvailableRevision field is set to the value of the last call. func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCertSignerOperatorConfigStatusApplyConfiguration { - b.LatestAvailableRevision = &value + b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value return b } @@ -71,7 +71,7 @@ func (b *ServiceCertSignerOperatorConfigStatusApplyConfiguration) WithGeneration if values[i] == nil { panic("nil value passed to WithGenerations") } - b.Generations = append(b.Generations, *values[i]) + b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) } return b } diff --git a/servicecertsigner/clientset/versioned/clientset.go b/servicecertsigner/clientset/versioned/clientset.go index 688bd42974..4a87cdc1c1 100644 --- a/servicecertsigner/clientset/versioned/clientset.go +++ b/servicecertsigner/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" servicecertsignerv1alpha1 "github.com/openshift/client-go/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1" discovery "k8s.io/client-go/discovery" diff --git a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigner_client.go b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigner_client.go index 7537340fa9..7e37e2a93c 100644 --- a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigner_client.go +++ b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigner_client.go @@ -13,7 +13,7 @@ type FakeServicecertsignerV1alpha1 struct { } func (c *FakeServicecertsignerV1alpha1) ServiceCertSignerOperatorConfigs() v1alpha1.ServiceCertSignerOperatorConfigInterface { - return &FakeServiceCertSignerOperatorConfigs{c} + return newFakeServiceCertSignerOperatorConfigs(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigneroperatorconfig.go b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigneroperatorconfig.go index 695f3fa016..223304a35c 100644 --- a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigneroperatorconfig.go +++ b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/fake/fake_servicecertsigneroperatorconfig.go @@ -3,168 +3,37 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" servicecertsignerv1alpha1 "github.com/openshift/client-go/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedservicecertsignerv1alpha1 "github.com/openshift/client-go/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeServiceCertSignerOperatorConfigs implements ServiceCertSignerOperatorConfigInterface -type FakeServiceCertSignerOperatorConfigs struct { +// fakeServiceCertSignerOperatorConfigs implements ServiceCertSignerOperatorConfigInterface +type fakeServiceCertSignerOperatorConfigs struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.ServiceCertSignerOperatorConfig, *v1alpha1.ServiceCertSignerOperatorConfigList, *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration] Fake *FakeServicecertsignerV1alpha1 } -var servicecertsigneroperatorconfigsResource = v1alpha1.SchemeGroupVersion.WithResource("servicecertsigneroperatorconfigs") - -var servicecertsigneroperatorconfigsKind = v1alpha1.SchemeGroupVersion.WithKind("ServiceCertSignerOperatorConfig") - -// Get takes name of the serviceCertSignerOperatorConfig, and returns the corresponding serviceCertSignerOperatorConfig object, and an error if there is any. -func (c *FakeServiceCertSignerOperatorConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(servicecertsigneroperatorconfigsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err -} - -// List takes label and field selectors, and returns the list of ServiceCertSignerOperatorConfigs that match those selectors. -func (c *FakeServiceCertSignerOperatorConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServiceCertSignerOperatorConfigList, err error) { - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfigList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(servicecertsigneroperatorconfigsResource, servicecertsigneroperatorconfigsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ServiceCertSignerOperatorConfigList{ListMeta: obj.(*v1alpha1.ServiceCertSignerOperatorConfigList).ListMeta} - for _, item := range obj.(*v1alpha1.ServiceCertSignerOperatorConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested serviceCertSignerOperatorConfigs. -func (c *FakeServiceCertSignerOperatorConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(servicecertsigneroperatorconfigsResource, opts)) -} - -// Create takes the representation of a serviceCertSignerOperatorConfig and creates it. Returns the server's representation of the serviceCertSignerOperatorConfig, and an error, if there is any. -func (c *FakeServiceCertSignerOperatorConfigs) Create(ctx context.Context, serviceCertSignerOperatorConfig *v1alpha1.ServiceCertSignerOperatorConfig, opts v1.CreateOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(servicecertsigneroperatorconfigsResource, serviceCertSignerOperatorConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err -} - -// Update takes the representation of a serviceCertSignerOperatorConfig and updates it. Returns the server's representation of the serviceCertSignerOperatorConfig, and an error, if there is any. -func (c *FakeServiceCertSignerOperatorConfigs) Update(ctx context.Context, serviceCertSignerOperatorConfig *v1alpha1.ServiceCertSignerOperatorConfig, opts v1.UpdateOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(servicecertsigneroperatorconfigsResource, serviceCertSignerOperatorConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServiceCertSignerOperatorConfigs) UpdateStatus(ctx context.Context, serviceCertSignerOperatorConfig *v1alpha1.ServiceCertSignerOperatorConfig, opts v1.UpdateOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(servicecertsigneroperatorconfigsResource, "status", serviceCertSignerOperatorConfig, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err -} - -// Delete takes name of the serviceCertSignerOperatorConfig and deletes it. Returns an error if one occurs. -func (c *FakeServiceCertSignerOperatorConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(servicecertsigneroperatorconfigsResource, name, opts), &v1alpha1.ServiceCertSignerOperatorConfig{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServiceCertSignerOperatorConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(servicecertsigneroperatorconfigsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ServiceCertSignerOperatorConfigList{}) - return err -} - -// Patch applies the patch and returns the patched serviceCertSignerOperatorConfig. -func (c *FakeServiceCertSignerOperatorConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecertsigneroperatorconfigsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied serviceCertSignerOperatorConfig. -func (c *FakeServiceCertSignerOperatorConfigs) Apply(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - if serviceCertSignerOperatorConfig == nil { - return nil, fmt.Errorf("serviceCertSignerOperatorConfig provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCertSignerOperatorConfig) - if err != nil { - return nil, err - } - name := serviceCertSignerOperatorConfig.Name - if name == nil { - return nil, fmt.Errorf("serviceCertSignerOperatorConfig.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecertsigneroperatorconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeServiceCertSignerOperatorConfigs) ApplyStatus(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) { - if serviceCertSignerOperatorConfig == nil { - return nil, fmt.Errorf("serviceCertSignerOperatorConfig provided to Apply must not be nil") - } - data, err := json.Marshal(serviceCertSignerOperatorConfig) - if err != nil { - return nil, err - } - name := serviceCertSignerOperatorConfig.Name - if name == nil { - return nil, fmt.Errorf("serviceCertSignerOperatorConfig.Name must be provided to Apply") - } - emptyResult := &v1alpha1.ServiceCertSignerOperatorConfig{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(servicecertsigneroperatorconfigsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeServiceCertSignerOperatorConfigs(fake *FakeServicecertsignerV1alpha1) typedservicecertsignerv1alpha1.ServiceCertSignerOperatorConfigInterface { + return &fakeServiceCertSignerOperatorConfigs{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.ServiceCertSignerOperatorConfig, *v1alpha1.ServiceCertSignerOperatorConfigList, *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("servicecertsigneroperatorconfigs"), + v1alpha1.SchemeGroupVersion.WithKind("ServiceCertSignerOperatorConfig"), + func() *v1alpha1.ServiceCertSignerOperatorConfig { return &v1alpha1.ServiceCertSignerOperatorConfig{} }, + func() *v1alpha1.ServiceCertSignerOperatorConfigList { + return &v1alpha1.ServiceCertSignerOperatorConfigList{} + }, + func(dst, src *v1alpha1.ServiceCertSignerOperatorConfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.ServiceCertSignerOperatorConfigList) []*v1alpha1.ServiceCertSignerOperatorConfig { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.ServiceCertSignerOperatorConfigList, items []*v1alpha1.ServiceCertSignerOperatorConfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.ServiceCertSignerOperatorConfig), err } diff --git a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigner_client.go b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigner_client.go index c08f3aeb09..190ba39dab 100644 --- a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigner_client.go +++ b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigner_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" - "github.com/openshift/client-go/servicecertsigner/clientset/versioned/scheme" + servicecertsignerv1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" + scheme "github.com/openshift/client-go/servicecertsigner/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -69,10 +69,10 @@ func New(c rest.Interface) *ServicecertsignerV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := servicecertsignerv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go index 33a0b4a0eb..52a111d801 100644 --- a/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go +++ b/servicecertsigner/clientset/versioned/typed/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" - servicecertsignerv1alpha1 "github.com/openshift/client-go/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1" + servicecertsignerv1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" + applyconfigurationsservicecertsignerv1alpha1 "github.com/openshift/client-go/servicecertsigner/applyconfigurations/servicecertsigner/v1alpha1" scheme "github.com/openshift/client-go/servicecertsigner/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,38 +22,41 @@ type ServiceCertSignerOperatorConfigsGetter interface { // ServiceCertSignerOperatorConfigInterface has methods to work with ServiceCertSignerOperatorConfig resources. type ServiceCertSignerOperatorConfigInterface interface { - Create(ctx context.Context, serviceCertSignerOperatorConfig *v1alpha1.ServiceCertSignerOperatorConfig, opts v1.CreateOptions) (*v1alpha1.ServiceCertSignerOperatorConfig, error) - Update(ctx context.Context, serviceCertSignerOperatorConfig *v1alpha1.ServiceCertSignerOperatorConfig, opts v1.UpdateOptions) (*v1alpha1.ServiceCertSignerOperatorConfig, error) + Create(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, opts v1.CreateOptions) (*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, error) + Update(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, opts v1.UpdateOptions) (*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, serviceCertSignerOperatorConfig *v1alpha1.ServiceCertSignerOperatorConfig, opts v1.UpdateOptions) (*v1alpha1.ServiceCertSignerOperatorConfig, error) + UpdateStatus(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, opts v1.UpdateOptions) (*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ServiceCertSignerOperatorConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ServiceCertSignerOperatorConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) - Apply(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, err error) + Apply(ctx context.Context, serviceCertSignerOperatorConfig *applyconfigurationsservicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration, opts v1.ApplyOptions) (result *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, serviceCertSignerOperatorConfig *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCertSignerOperatorConfig, err error) + ApplyStatus(ctx context.Context, serviceCertSignerOperatorConfig *applyconfigurationsservicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration, opts v1.ApplyOptions) (result *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, err error) ServiceCertSignerOperatorConfigExpansion } // serviceCertSignerOperatorConfigs implements ServiceCertSignerOperatorConfigInterface type serviceCertSignerOperatorConfigs struct { - *gentype.ClientWithListAndApply[*v1alpha1.ServiceCertSignerOperatorConfig, *v1alpha1.ServiceCertSignerOperatorConfigList, *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration] + *gentype.ClientWithListAndApply[*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigList, *applyconfigurationsservicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration] } // newServiceCertSignerOperatorConfigs returns a ServiceCertSignerOperatorConfigs func newServiceCertSignerOperatorConfigs(c *ServicecertsignerV1alpha1Client) *serviceCertSignerOperatorConfigs { return &serviceCertSignerOperatorConfigs{ - gentype.NewClientWithListAndApply[*v1alpha1.ServiceCertSignerOperatorConfig, *v1alpha1.ServiceCertSignerOperatorConfigList, *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration]( + gentype.NewClientWithListAndApply[*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigList, *applyconfigurationsservicecertsignerv1alpha1.ServiceCertSignerOperatorConfigApplyConfiguration]( "servicecertsigneroperatorconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.ServiceCertSignerOperatorConfig { return &v1alpha1.ServiceCertSignerOperatorConfig{} }, - func() *v1alpha1.ServiceCertSignerOperatorConfigList { - return &v1alpha1.ServiceCertSignerOperatorConfigList{} - }), + func() *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig { + return &servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig{} + }, + func() *servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigList { + return &servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigList{} + }, + ), } } diff --git a/servicecertsigner/informers/externalversions/generic.go b/servicecertsigner/informers/externalversions/generic.go index d1b19f6a69..300c0ddc0b 100644 --- a/servicecertsigner/informers/externalversions/generic.go +++ b/servicecertsigner/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/servicecertsigner/informers/externalversions/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go b/servicecertsigner/informers/externalversions/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go index 4d9a7217dd..8b66c76adf 100644 --- a/servicecertsigner/informers/externalversions/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go +++ b/servicecertsigner/informers/externalversions/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - servicecertsignerv1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" + apiservicecertsignerv1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" versioned "github.com/openshift/client-go/servicecertsigner/clientset/versioned" internalinterfaces "github.com/openshift/client-go/servicecertsigner/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/servicecertsigner/listers/servicecertsigner/v1alpha1" + servicecertsignerv1alpha1 "github.com/openshift/client-go/servicecertsigner/listers/servicecertsigner/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // ServiceCertSignerOperatorConfigs. type ServiceCertSignerOperatorConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.ServiceCertSignerOperatorConfigLister + Lister() servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigLister } type serviceCertSignerOperatorConfigInformer struct { @@ -54,7 +54,7 @@ func NewFilteredServiceCertSignerOperatorConfigInformer(client versioned.Interfa return client.ServicecertsignerV1alpha1().ServiceCertSignerOperatorConfigs().Watch(context.TODO(), options) }, }, - &servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig{}, + &apiservicecertsignerv1alpha1.ServiceCertSignerOperatorConfig{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *serviceCertSignerOperatorConfigInformer) defaultInformer(client version } func (f *serviceCertSignerOperatorConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apiservicecertsignerv1alpha1.ServiceCertSignerOperatorConfig{}, f.defaultInformer) } -func (f *serviceCertSignerOperatorConfigInformer) Lister() v1alpha1.ServiceCertSignerOperatorConfigLister { - return v1alpha1.NewServiceCertSignerOperatorConfigLister(f.Informer().GetIndexer()) +func (f *serviceCertSignerOperatorConfigInformer) Lister() servicecertsignerv1alpha1.ServiceCertSignerOperatorConfigLister { + return servicecertsignerv1alpha1.NewServiceCertSignerOperatorConfigLister(f.Informer().GetIndexer()) } diff --git a/servicecertsigner/listers/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go b/servicecertsigner/listers/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go index df6e0faf4e..c79a1c4b3d 100644 --- a/servicecertsigner/listers/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go +++ b/servicecertsigner/listers/servicecertsigner/v1alpha1/servicecertsigneroperatorconfig.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + servicecertsignerv1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ServiceCertSignerOperatorConfigLister helps list ServiceCertSignerOperatorConfigs. @@ -14,19 +14,19 @@ import ( type ServiceCertSignerOperatorConfigLister interface { // List lists all ServiceCertSignerOperatorConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.ServiceCertSignerOperatorConfig, err error) + List(selector labels.Selector) (ret []*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, err error) // Get retrieves the ServiceCertSignerOperatorConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.ServiceCertSignerOperatorConfig, error) + Get(name string) (*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig, error) ServiceCertSignerOperatorConfigListerExpansion } // serviceCertSignerOperatorConfigLister implements the ServiceCertSignerOperatorConfigLister interface. type serviceCertSignerOperatorConfigLister struct { - listers.ResourceIndexer[*v1alpha1.ServiceCertSignerOperatorConfig] + listers.ResourceIndexer[*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig] } // NewServiceCertSignerOperatorConfigLister returns a new ServiceCertSignerOperatorConfigLister. func NewServiceCertSignerOperatorConfigLister(indexer cache.Indexer) ServiceCertSignerOperatorConfigLister { - return &serviceCertSignerOperatorConfigLister{listers.New[*v1alpha1.ServiceCertSignerOperatorConfig](indexer, v1alpha1.Resource("servicecertsigneroperatorconfig"))} + return &serviceCertSignerOperatorConfigLister{listers.New[*servicecertsignerv1alpha1.ServiceCertSignerOperatorConfig](indexer, servicecertsignerv1alpha1.Resource("servicecertsigneroperatorconfig"))} } diff --git a/sharedresource/applyconfigurations/internal/internal.go b/sharedresource/applyconfigurations/internal/internal.go index 1ed540e937..5ece6f5f1d 100644 --- a/sharedresource/applyconfigurations/internal/internal.go +++ b/sharedresource/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedconfigmap.go index 96d2b561ea..ea56aeb05e 100644 --- a/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedconfigmap.go +++ b/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedconfigmap.go @@ -69,7 +69,7 @@ func extractSharedConfigMap(sharedConfigMap *sharedresourcev1alpha1.SharedConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithKind(value string) *SharedConfigMapApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *SharedConfigMapApplyConfiguration) WithKind(value string) *SharedConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithAPIVersion(value string) *SharedConfigMapApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *SharedConfigMapApplyConfiguration) WithAPIVersion(value string) *Shared // If called multiple times, the Name field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithName(value string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *SharedConfigMapApplyConfiguration) WithName(value string) *SharedConfig // If called multiple times, the GenerateName field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithGenerateName(value string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *SharedConfigMapApplyConfiguration) WithGenerateName(value string) *Shar // If called multiple times, the Namespace field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithNamespace(value string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *SharedConfigMapApplyConfiguration) WithNamespace(value string) *SharedC // If called multiple times, the UID field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithUID(value types.UID) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *SharedConfigMapApplyConfiguration) WithUID(value types.UID) *SharedConf // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithResourceVersion(value string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *SharedConfigMapApplyConfiguration) WithResourceVersion(value string) *S // If called multiple times, the Generation field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithGeneration(value int64) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *SharedConfigMapApplyConfiguration) WithGeneration(value int64) *SharedC // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *SharedConfigMapApplyConfiguration) WithCreationTimestamp(value metav1.T // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *SharedConfigMapApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *SharedConfigMapApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *SharedConfigMapApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *SharedConfigMapApplyConfiguration) WithLabels(entries map[string]string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *SharedConfigMapApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *SharedConfigMapApplyConfiguration) WithAnnotations(entries map[string]string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *SharedConfigMapApplyConfiguration) WithOwnerReferences(values ...*v1.Ow if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *SharedConfigMapApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *SharedConfigMapApplyConfiguration) WithFinalizers(values ...string) *SharedConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *SharedConfigMapApplyConfiguration) WithStatus(value *SharedConfigMapSta // GetName retrieves the value of the Name field in the declarative configuration. func (b *SharedConfigMapApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedsecret.go index eb10c9a69f..c4f0713ed3 100644 --- a/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedsecret.go +++ b/sharedresource/applyconfigurations/sharedresource/v1alpha1/sharedsecret.go @@ -69,7 +69,7 @@ func extractSharedSecret(sharedSecret *sharedresourcev1alpha1.SharedSecret, fiel // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithKind(value string) *SharedSecretApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -77,7 +77,7 @@ func (b *SharedSecretApplyConfiguration) WithKind(value string) *SharedSecretApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithAPIVersion(value string) *SharedSecretApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -86,7 +86,7 @@ func (b *SharedSecretApplyConfiguration) WithAPIVersion(value string) *SharedSec // If called multiple times, the Name field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithName(value string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -95,7 +95,7 @@ func (b *SharedSecretApplyConfiguration) WithName(value string) *SharedSecretApp // If called multiple times, the GenerateName field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithGenerateName(value string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -104,7 +104,7 @@ func (b *SharedSecretApplyConfiguration) WithGenerateName(value string) *SharedS // If called multiple times, the Namespace field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithNamespace(value string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -113,7 +113,7 @@ func (b *SharedSecretApplyConfiguration) WithNamespace(value string) *SharedSecr // If called multiple times, the UID field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithUID(value types.UID) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -122,7 +122,7 @@ func (b *SharedSecretApplyConfiguration) WithUID(value types.UID) *SharedSecretA // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithResourceVersion(value string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -131,7 +131,7 @@ func (b *SharedSecretApplyConfiguration) WithResourceVersion(value string) *Shar // If called multiple times, the Generation field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithGeneration(value int64) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -140,7 +140,7 @@ func (b *SharedSecretApplyConfiguration) WithGeneration(value int64) *SharedSecr // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -149,7 +149,7 @@ func (b *SharedSecretApplyConfiguration) WithCreationTimestamp(value metav1.Time // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -158,7 +158,7 @@ func (b *SharedSecretApplyConfiguration) WithDeletionTimestamp(value metav1.Time // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *SharedSecretApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -168,11 +168,11 @@ func (b *SharedSecretApplyConfiguration) WithDeletionGracePeriodSeconds(value in // overwriting an existing map entries in Labels field with the same key. func (b *SharedSecretApplyConfiguration) WithLabels(entries map[string]string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -183,11 +183,11 @@ func (b *SharedSecretApplyConfiguration) WithLabels(entries map[string]string) * // overwriting an existing map entries in Annotations field with the same key. func (b *SharedSecretApplyConfiguration) WithAnnotations(entries map[string]string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -201,7 +201,7 @@ func (b *SharedSecretApplyConfiguration) WithOwnerReferences(values ...*v1.Owner if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -212,7 +212,7 @@ func (b *SharedSecretApplyConfiguration) WithOwnerReferences(values ...*v1.Owner func (b *SharedSecretApplyConfiguration) WithFinalizers(values ...string) *SharedSecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -242,5 +242,5 @@ func (b *SharedSecretApplyConfiguration) WithStatus(value *SharedSecretStatusApp // GetName retrieves the value of the Name field in the declarative configuration. func (b *SharedSecretApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sharedresource/clientset/versioned/clientset.go b/sharedresource/clientset/versioned/clientset.go index f378a7b6ff..635395a96d 100644 --- a/sharedresource/clientset/versioned/clientset.go +++ b/sharedresource/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1" discovery "k8s.io/client-go/discovery" diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go index 7f7656eafd..7d1ee321fd 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/applyconfigurations/sharedresource/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedsharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeSharedConfigMaps implements SharedConfigMapInterface -type FakeSharedConfigMaps struct { +// fakeSharedConfigMaps implements SharedConfigMapInterface +type fakeSharedConfigMaps struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.SharedConfigMap, *v1alpha1.SharedConfigMapList, *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration] Fake *FakeSharedresourceV1alpha1 } -var sharedconfigmapsResource = v1alpha1.SchemeGroupVersion.WithResource("sharedconfigmaps") - -var sharedconfigmapsKind = v1alpha1.SchemeGroupVersion.WithKind("SharedConfigMap") - -// Get takes name of the sharedConfigMap, and returns the corresponding sharedConfigMap object, and an error if there is any. -func (c *FakeSharedConfigMaps) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SharedConfigMap, err error) { - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(sharedconfigmapsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedConfigMap), err -} - -// List takes label and field selectors, and returns the list of SharedConfigMaps that match those selectors. -func (c *FakeSharedConfigMaps) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SharedConfigMapList, err error) { - emptyResult := &v1alpha1.SharedConfigMapList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(sharedconfigmapsResource, sharedconfigmapsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.SharedConfigMapList{ListMeta: obj.(*v1alpha1.SharedConfigMapList).ListMeta} - for _, item := range obj.(*v1alpha1.SharedConfigMapList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested sharedConfigMaps. -func (c *FakeSharedConfigMaps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(sharedconfigmapsResource, opts)) -} - -// Create takes the representation of a sharedConfigMap and creates it. Returns the server's representation of the sharedConfigMap, and an error, if there is any. -func (c *FakeSharedConfigMaps) Create(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.CreateOptions) (result *v1alpha1.SharedConfigMap, err error) { - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(sharedconfigmapsResource, sharedConfigMap, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedConfigMap), err -} - -// Update takes the representation of a sharedConfigMap and updates it. Returns the server's representation of the sharedConfigMap, and an error, if there is any. -func (c *FakeSharedConfigMaps) Update(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (result *v1alpha1.SharedConfigMap, err error) { - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(sharedconfigmapsResource, sharedConfigMap, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedConfigMap), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSharedConfigMaps) UpdateStatus(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (result *v1alpha1.SharedConfigMap, err error) { - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(sharedconfigmapsResource, "status", sharedConfigMap, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedConfigMap), err -} - -// Delete takes name of the sharedConfigMap and deletes it. Returns an error if one occurs. -func (c *FakeSharedConfigMaps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(sharedconfigmapsResource, name, opts), &v1alpha1.SharedConfigMap{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSharedConfigMaps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(sharedconfigmapsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.SharedConfigMapList{}) - return err -} - -// Patch applies the patch and returns the patched sharedConfigMap. -func (c *FakeSharedConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedConfigMap, err error) { - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(sharedconfigmapsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedConfigMap), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied sharedConfigMap. -func (c *FakeSharedConfigMaps) Apply(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedConfigMap, err error) { - if sharedConfigMap == nil { - return nil, fmt.Errorf("sharedConfigMap provided to Apply must not be nil") - } - data, err := json.Marshal(sharedConfigMap) - if err != nil { - return nil, err - } - name := sharedConfigMap.Name - if name == nil { - return nil, fmt.Errorf("sharedConfigMap.Name must be provided to Apply") - } - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(sharedconfigmapsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedConfigMap), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeSharedConfigMaps) ApplyStatus(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedConfigMap, err error) { - if sharedConfigMap == nil { - return nil, fmt.Errorf("sharedConfigMap provided to Apply must not be nil") - } - data, err := json.Marshal(sharedConfigMap) - if err != nil { - return nil, err - } - name := sharedConfigMap.Name - if name == nil { - return nil, fmt.Errorf("sharedConfigMap.Name must be provided to Apply") - } - emptyResult := &v1alpha1.SharedConfigMap{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(sharedconfigmapsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeSharedConfigMaps(fake *FakeSharedresourceV1alpha1) typedsharedresourcev1alpha1.SharedConfigMapInterface { + return &fakeSharedConfigMaps{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.SharedConfigMap, *v1alpha1.SharedConfigMapList, *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("sharedconfigmaps"), + v1alpha1.SchemeGroupVersion.WithKind("SharedConfigMap"), + func() *v1alpha1.SharedConfigMap { return &v1alpha1.SharedConfigMap{} }, + func() *v1alpha1.SharedConfigMapList { return &v1alpha1.SharedConfigMapList{} }, + func(dst, src *v1alpha1.SharedConfigMapList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.SharedConfigMapList) []*v1alpha1.SharedConfigMap { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.SharedConfigMapList, items []*v1alpha1.SharedConfigMap) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.SharedConfigMap), err } diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go index 05a9729920..ccc49233fe 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go @@ -13,11 +13,11 @@ type FakeSharedresourceV1alpha1 struct { } func (c *FakeSharedresourceV1alpha1) SharedConfigMaps() v1alpha1.SharedConfigMapInterface { - return &FakeSharedConfigMaps{c} + return newFakeSharedConfigMaps(c) } func (c *FakeSharedresourceV1alpha1) SharedSecrets() v1alpha1.SharedSecretInterface { - return &FakeSharedSecrets{c} + return newFakeSharedSecrets(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go index 3e4803a95b..89534b25d0 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go @@ -3,168 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/applyconfigurations/sharedresource/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedsharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1" + gentype "k8s.io/client-go/gentype" ) -// FakeSharedSecrets implements SharedSecretInterface -type FakeSharedSecrets struct { +// fakeSharedSecrets implements SharedSecretInterface +type fakeSharedSecrets struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.SharedSecret, *v1alpha1.SharedSecretList, *sharedresourcev1alpha1.SharedSecretApplyConfiguration] Fake *FakeSharedresourceV1alpha1 } -var sharedsecretsResource = v1alpha1.SchemeGroupVersion.WithResource("sharedsecrets") - -var sharedsecretsKind = v1alpha1.SchemeGroupVersion.WithKind("SharedSecret") - -// Get takes name of the sharedSecret, and returns the corresponding sharedSecret object, and an error if there is any. -func (c *FakeSharedSecrets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SharedSecret, err error) { - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(sharedsecretsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedSecret), err -} - -// List takes label and field selectors, and returns the list of SharedSecrets that match those selectors. -func (c *FakeSharedSecrets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SharedSecretList, err error) { - emptyResult := &v1alpha1.SharedSecretList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(sharedsecretsResource, sharedsecretsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.SharedSecretList{ListMeta: obj.(*v1alpha1.SharedSecretList).ListMeta} - for _, item := range obj.(*v1alpha1.SharedSecretList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested sharedSecrets. -func (c *FakeSharedSecrets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(sharedsecretsResource, opts)) -} - -// Create takes the representation of a sharedSecret and creates it. Returns the server's representation of the sharedSecret, and an error, if there is any. -func (c *FakeSharedSecrets) Create(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.CreateOptions) (result *v1alpha1.SharedSecret, err error) { - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(sharedsecretsResource, sharedSecret, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedSecret), err -} - -// Update takes the representation of a sharedSecret and updates it. Returns the server's representation of the sharedSecret, and an error, if there is any. -func (c *FakeSharedSecrets) Update(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (result *v1alpha1.SharedSecret, err error) { - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(sharedsecretsResource, sharedSecret, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedSecret), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeSharedSecrets) UpdateStatus(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (result *v1alpha1.SharedSecret, err error) { - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceActionWithOptions(sharedsecretsResource, "status", sharedSecret, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedSecret), err -} - -// Delete takes name of the sharedSecret and deletes it. Returns an error if one occurs. -func (c *FakeSharedSecrets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(sharedsecretsResource, name, opts), &v1alpha1.SharedSecret{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeSharedSecrets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(sharedsecretsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.SharedSecretList{}) - return err -} - -// Patch applies the patch and returns the patched sharedSecret. -func (c *FakeSharedSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedSecret, err error) { - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(sharedsecretsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedSecret), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied sharedSecret. -func (c *FakeSharedSecrets) Apply(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecretApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedSecret, err error) { - if sharedSecret == nil { - return nil, fmt.Errorf("sharedSecret provided to Apply must not be nil") - } - data, err := json.Marshal(sharedSecret) - if err != nil { - return nil, err - } - name := sharedSecret.Name - if name == nil { - return nil, fmt.Errorf("sharedSecret.Name must be provided to Apply") - } - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(sharedsecretsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.SharedSecret), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeSharedSecrets) ApplyStatus(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecretApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedSecret, err error) { - if sharedSecret == nil { - return nil, fmt.Errorf("sharedSecret provided to Apply must not be nil") - } - data, err := json.Marshal(sharedSecret) - if err != nil { - return nil, err - } - name := sharedSecret.Name - if name == nil { - return nil, fmt.Errorf("sharedSecret.Name must be provided to Apply") - } - emptyResult := &v1alpha1.SharedSecret{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(sharedsecretsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeSharedSecrets(fake *FakeSharedresourceV1alpha1) typedsharedresourcev1alpha1.SharedSecretInterface { + return &fakeSharedSecrets{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.SharedSecret, *v1alpha1.SharedSecretList, *sharedresourcev1alpha1.SharedSecretApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("sharedsecrets"), + v1alpha1.SchemeGroupVersion.WithKind("SharedSecret"), + func() *v1alpha1.SharedSecret { return &v1alpha1.SharedSecret{} }, + func() *v1alpha1.SharedSecretList { return &v1alpha1.SharedSecretList{} }, + func(dst, src *v1alpha1.SharedSecretList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.SharedSecretList) []*v1alpha1.SharedSecret { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.SharedSecretList, items []*v1alpha1.SharedSecret) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.SharedSecret), err } diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go index a153c277da..1ec50c1e4e 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" - sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/applyconfigurations/sharedresource/v1alpha1" + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + applyconfigurationssharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/applyconfigurations/sharedresource/v1alpha1" scheme "github.com/openshift/client-go/sharedresource/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,39 @@ type SharedConfigMapsGetter interface { // SharedConfigMapInterface has methods to work with SharedConfigMap resources. type SharedConfigMapInterface interface { - Create(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.CreateOptions) (*v1alpha1.SharedConfigMap, error) - Update(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*v1alpha1.SharedConfigMap, error) + Create(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMap, opts v1.CreateOptions) (*sharedresourcev1alpha1.SharedConfigMap, error) + Update(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*sharedresourcev1alpha1.SharedConfigMap, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*v1alpha1.SharedConfigMap, error) + UpdateStatus(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*sharedresourcev1alpha1.SharedConfigMap, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.SharedConfigMap, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SharedConfigMapList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*sharedresourcev1alpha1.SharedConfigMap, error) + List(ctx context.Context, opts v1.ListOptions) (*sharedresourcev1alpha1.SharedConfigMapList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedConfigMap, err error) - Apply(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedConfigMap, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sharedresourcev1alpha1.SharedConfigMap, err error) + Apply(ctx context.Context, sharedConfigMap *applyconfigurationssharedresourcev1alpha1.SharedConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *sharedresourcev1alpha1.SharedConfigMap, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, sharedConfigMap *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedConfigMap, err error) + ApplyStatus(ctx context.Context, sharedConfigMap *applyconfigurationssharedresourcev1alpha1.SharedConfigMapApplyConfiguration, opts v1.ApplyOptions) (result *sharedresourcev1alpha1.SharedConfigMap, err error) SharedConfigMapExpansion } // sharedConfigMaps implements SharedConfigMapInterface type sharedConfigMaps struct { - *gentype.ClientWithListAndApply[*v1alpha1.SharedConfigMap, *v1alpha1.SharedConfigMapList, *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration] + *gentype.ClientWithListAndApply[*sharedresourcev1alpha1.SharedConfigMap, *sharedresourcev1alpha1.SharedConfigMapList, *applyconfigurationssharedresourcev1alpha1.SharedConfigMapApplyConfiguration] } // newSharedConfigMaps returns a SharedConfigMaps func newSharedConfigMaps(c *SharedresourceV1alpha1Client) *sharedConfigMaps { return &sharedConfigMaps{ - gentype.NewClientWithListAndApply[*v1alpha1.SharedConfigMap, *v1alpha1.SharedConfigMapList, *sharedresourcev1alpha1.SharedConfigMapApplyConfiguration]( + gentype.NewClientWithListAndApply[*sharedresourcev1alpha1.SharedConfigMap, *sharedresourcev1alpha1.SharedConfigMapList, *applyconfigurationssharedresourcev1alpha1.SharedConfigMapApplyConfiguration]( "sharedconfigmaps", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.SharedConfigMap { return &v1alpha1.SharedConfigMap{} }, - func() *v1alpha1.SharedConfigMapList { return &v1alpha1.SharedConfigMapList{} }), + func() *sharedresourcev1alpha1.SharedConfigMap { return &sharedresourcev1alpha1.SharedConfigMap{} }, + func() *sharedresourcev1alpha1.SharedConfigMapList { + return &sharedresourcev1alpha1.SharedConfigMapList{} + }, + ), } } diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go index d4fa77f844..5e563208f1 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "net/http" + http "net/http" - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" - "github.com/openshift/client-go/sharedresource/clientset/versioned/scheme" + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + scheme "github.com/openshift/client-go/sharedresource/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -74,10 +74,10 @@ func New(c rest.Interface) *SharedresourceV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := sharedresourcev1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go index 37532dda60..d6661db89a 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - "context" + context "context" - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" - sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/applyconfigurations/sharedresource/v1alpha1" + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + applyconfigurationssharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/applyconfigurations/sharedresource/v1alpha1" scheme "github.com/openshift/client-go/sharedresource/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type SharedSecretsGetter interface { // SharedSecretInterface has methods to work with SharedSecret resources. type SharedSecretInterface interface { - Create(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.CreateOptions) (*v1alpha1.SharedSecret, error) - Update(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (*v1alpha1.SharedSecret, error) + Create(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecret, opts v1.CreateOptions) (*sharedresourcev1alpha1.SharedSecret, error) + Update(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecret, opts v1.UpdateOptions) (*sharedresourcev1alpha1.SharedSecret, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (*v1alpha1.SharedSecret, error) + UpdateStatus(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecret, opts v1.UpdateOptions) (*sharedresourcev1alpha1.SharedSecret, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.SharedSecret, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SharedSecretList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*sharedresourcev1alpha1.SharedSecret, error) + List(ctx context.Context, opts v1.ListOptions) (*sharedresourcev1alpha1.SharedSecretList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedSecret, err error) - Apply(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecretApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedSecret, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sharedresourcev1alpha1.SharedSecret, err error) + Apply(ctx context.Context, sharedSecret *applyconfigurationssharedresourcev1alpha1.SharedSecretApplyConfiguration, opts v1.ApplyOptions) (result *sharedresourcev1alpha1.SharedSecret, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, sharedSecret *sharedresourcev1alpha1.SharedSecretApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.SharedSecret, err error) + ApplyStatus(ctx context.Context, sharedSecret *applyconfigurationssharedresourcev1alpha1.SharedSecretApplyConfiguration, opts v1.ApplyOptions) (result *sharedresourcev1alpha1.SharedSecret, err error) SharedSecretExpansion } // sharedSecrets implements SharedSecretInterface type sharedSecrets struct { - *gentype.ClientWithListAndApply[*v1alpha1.SharedSecret, *v1alpha1.SharedSecretList, *sharedresourcev1alpha1.SharedSecretApplyConfiguration] + *gentype.ClientWithListAndApply[*sharedresourcev1alpha1.SharedSecret, *sharedresourcev1alpha1.SharedSecretList, *applyconfigurationssharedresourcev1alpha1.SharedSecretApplyConfiguration] } // newSharedSecrets returns a SharedSecrets func newSharedSecrets(c *SharedresourceV1alpha1Client) *sharedSecrets { return &sharedSecrets{ - gentype.NewClientWithListAndApply[*v1alpha1.SharedSecret, *v1alpha1.SharedSecretList, *sharedresourcev1alpha1.SharedSecretApplyConfiguration]( + gentype.NewClientWithListAndApply[*sharedresourcev1alpha1.SharedSecret, *sharedresourcev1alpha1.SharedSecretList, *applyconfigurationssharedresourcev1alpha1.SharedSecretApplyConfiguration]( "sharedsecrets", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha1.SharedSecret { return &v1alpha1.SharedSecret{} }, - func() *v1alpha1.SharedSecretList { return &v1alpha1.SharedSecretList{} }), + func() *sharedresourcev1alpha1.SharedSecret { return &sharedresourcev1alpha1.SharedSecret{} }, + func() *sharedresourcev1alpha1.SharedSecretList { return &sharedresourcev1alpha1.SharedSecretList{} }, + ), } } diff --git a/sharedresource/informers/externalversions/generic.go b/sharedresource/informers/externalversions/generic.go index cd01619c59..d925153f5f 100644 --- a/sharedresource/informers/externalversions/generic.go +++ b/sharedresource/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go index c6abdf730d..d99b786a18 100644 --- a/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go +++ b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + apisharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" versioned "github.com/openshift/client-go/sharedresource/clientset/versioned" internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/sharedresource/listers/sharedresource/v1alpha1" + sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/listers/sharedresource/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // SharedConfigMaps. type SharedConfigMapInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.SharedConfigMapLister + Lister() sharedresourcev1alpha1.SharedConfigMapLister } type sharedConfigMapInformer struct { @@ -54,7 +54,7 @@ func NewFilteredSharedConfigMapInformer(client versioned.Interface, resyncPeriod return client.SharedresourceV1alpha1().SharedConfigMaps().Watch(context.TODO(), options) }, }, - &sharedresourcev1alpha1.SharedConfigMap{}, + &apisharedresourcev1alpha1.SharedConfigMap{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *sharedConfigMapInformer) defaultInformer(client versioned.Interface, re } func (f *sharedConfigMapInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sharedresourcev1alpha1.SharedConfigMap{}, f.defaultInformer) + return f.factory.InformerFor(&apisharedresourcev1alpha1.SharedConfigMap{}, f.defaultInformer) } -func (f *sharedConfigMapInformer) Lister() v1alpha1.SharedConfigMapLister { - return v1alpha1.NewSharedConfigMapLister(f.Informer().GetIndexer()) +func (f *sharedConfigMapInformer) Lister() sharedresourcev1alpha1.SharedConfigMapLister { + return sharedresourcev1alpha1.NewSharedConfigMapLister(f.Informer().GetIndexer()) } diff --git a/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go index cf10a8ef78..dd2956499c 100644 --- a/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go +++ b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go @@ -3,13 +3,13 @@ package v1alpha1 import ( - "context" + context "context" time "time" - sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + apisharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" versioned "github.com/openshift/client-go/sharedresource/clientset/versioned" internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/openshift/client-go/sharedresource/listers/sharedresource/v1alpha1" + sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/listers/sharedresource/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // SharedSecrets. type SharedSecretInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha1.SharedSecretLister + Lister() sharedresourcev1alpha1.SharedSecretLister } type sharedSecretInformer struct { @@ -54,7 +54,7 @@ func NewFilteredSharedSecretInformer(client versioned.Interface, resyncPeriod ti return client.SharedresourceV1alpha1().SharedSecrets().Watch(context.TODO(), options) }, }, - &sharedresourcev1alpha1.SharedSecret{}, + &apisharedresourcev1alpha1.SharedSecret{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *sharedSecretInformer) defaultInformer(client versioned.Interface, resyn } func (f *sharedSecretInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&sharedresourcev1alpha1.SharedSecret{}, f.defaultInformer) + return f.factory.InformerFor(&apisharedresourcev1alpha1.SharedSecret{}, f.defaultInformer) } -func (f *sharedSecretInformer) Lister() v1alpha1.SharedSecretLister { - return v1alpha1.NewSharedSecretLister(f.Informer().GetIndexer()) +func (f *sharedSecretInformer) Lister() sharedresourcev1alpha1.SharedSecretLister { + return sharedresourcev1alpha1.NewSharedSecretLister(f.Informer().GetIndexer()) } diff --git a/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go index 84233e07fc..838bb46aec 100644 --- a/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go +++ b/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // SharedConfigMapLister helps list SharedConfigMaps. @@ -14,19 +14,19 @@ import ( type SharedConfigMapLister interface { // List lists all SharedConfigMaps in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.SharedConfigMap, err error) + List(selector labels.Selector) (ret []*sharedresourcev1alpha1.SharedConfigMap, err error) // Get retrieves the SharedConfigMap from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.SharedConfigMap, error) + Get(name string) (*sharedresourcev1alpha1.SharedConfigMap, error) SharedConfigMapListerExpansion } // sharedConfigMapLister implements the SharedConfigMapLister interface. type sharedConfigMapLister struct { - listers.ResourceIndexer[*v1alpha1.SharedConfigMap] + listers.ResourceIndexer[*sharedresourcev1alpha1.SharedConfigMap] } // NewSharedConfigMapLister returns a new SharedConfigMapLister. func NewSharedConfigMapLister(indexer cache.Indexer) SharedConfigMapLister { - return &sharedConfigMapLister{listers.New[*v1alpha1.SharedConfigMap](indexer, v1alpha1.Resource("sharedconfigmap"))} + return &sharedConfigMapLister{listers.New[*sharedresourcev1alpha1.SharedConfigMap](indexer, sharedresourcev1alpha1.Resource("sharedconfigmap"))} } diff --git a/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go index dc1de9efd3..9e708bdc34 100644 --- a/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go +++ b/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go @@ -3,10 +3,10 @@ package v1alpha1 import ( - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // SharedSecretLister helps list SharedSecrets. @@ -14,19 +14,19 @@ import ( type SharedSecretLister interface { // List lists all SharedSecrets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.SharedSecret, err error) + List(selector labels.Selector) (ret []*sharedresourcev1alpha1.SharedSecret, err error) // Get retrieves the SharedSecret from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.SharedSecret, error) + Get(name string) (*sharedresourcev1alpha1.SharedSecret, error) SharedSecretListerExpansion } // sharedSecretLister implements the SharedSecretLister interface. type sharedSecretLister struct { - listers.ResourceIndexer[*v1alpha1.SharedSecret] + listers.ResourceIndexer[*sharedresourcev1alpha1.SharedSecret] } // NewSharedSecretLister returns a new SharedSecretLister. func NewSharedSecretLister(indexer cache.Indexer) SharedSecretLister { - return &sharedSecretLister{listers.New[*v1alpha1.SharedSecret](indexer, v1alpha1.Resource("sharedsecret"))} + return &sharedSecretLister{listers.New[*sharedresourcev1alpha1.SharedSecret](indexer, sharedresourcev1alpha1.Resource("sharedsecret"))} } diff --git a/template/applyconfigurations/internal/internal.go b/template/applyconfigurations/internal/internal.go index c108d30dbd..11da09f323 100644 --- a/template/applyconfigurations/internal/internal.go +++ b/template/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/template/applyconfigurations/template/v1/brokertemplateinstance.go b/template/applyconfigurations/template/v1/brokertemplateinstance.go index e99082a30b..837c2831c4 100644 --- a/template/applyconfigurations/template/v1/brokertemplateinstance.go +++ b/template/applyconfigurations/template/v1/brokertemplateinstance.go @@ -3,20 +3,20 @@ package v1 import ( - apitemplatev1 "github.com/openshift/api/template/v1" + templatev1 "github.com/openshift/api/template/v1" internal "github.com/openshift/client-go/template/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // BrokerTemplateInstanceApplyConfiguration represents a declarative configuration of the BrokerTemplateInstance type for use // with apply. type BrokerTemplateInstanceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *BrokerTemplateInstanceSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *BrokerTemplateInstanceSpecApplyConfiguration `json:"spec,omitempty"` } // BrokerTemplateInstance constructs a declarative configuration of the BrokerTemplateInstance type for use with @@ -40,18 +40,18 @@ func BrokerTemplateInstance(name string) *BrokerTemplateInstanceApplyConfigurati // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractBrokerTemplateInstance(brokerTemplateInstance *apitemplatev1.BrokerTemplateInstance, fieldManager string) (*BrokerTemplateInstanceApplyConfiguration, error) { +func ExtractBrokerTemplateInstance(brokerTemplateInstance *templatev1.BrokerTemplateInstance, fieldManager string) (*BrokerTemplateInstanceApplyConfiguration, error) { return extractBrokerTemplateInstance(brokerTemplateInstance, fieldManager, "") } // ExtractBrokerTemplateInstanceStatus is the same as ExtractBrokerTemplateInstance except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractBrokerTemplateInstanceStatus(brokerTemplateInstance *apitemplatev1.BrokerTemplateInstance, fieldManager string) (*BrokerTemplateInstanceApplyConfiguration, error) { +func ExtractBrokerTemplateInstanceStatus(brokerTemplateInstance *templatev1.BrokerTemplateInstance, fieldManager string) (*BrokerTemplateInstanceApplyConfiguration, error) { return extractBrokerTemplateInstance(brokerTemplateInstance, fieldManager, "status") } -func extractBrokerTemplateInstance(brokerTemplateInstance *apitemplatev1.BrokerTemplateInstance, fieldManager string, subresource string) (*BrokerTemplateInstanceApplyConfiguration, error) { +func extractBrokerTemplateInstance(brokerTemplateInstance *templatev1.BrokerTemplateInstance, fieldManager string, subresource string) (*BrokerTemplateInstanceApplyConfiguration, error) { b := &BrokerTemplateInstanceApplyConfiguration{} err := managedfields.ExtractInto(brokerTemplateInstance, internal.Parser().Type("com.github.openshift.api.template.v1.BrokerTemplateInstance"), fieldManager, b, subresource) if err != nil { @@ -68,7 +68,7 @@ func extractBrokerTemplateInstance(brokerTemplateInstance *apitemplatev1.BrokerT // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithKind(value string) *BrokerTemplateInstanceApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithKind(value string) *Broke // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithAPIVersion(value string) *BrokerTemplateInstanceApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithAPIVersion(value string) // If called multiple times, the Name field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithName(value string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithName(value string) *Broke // If called multiple times, the GenerateName field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithGenerateName(value string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithGenerateName(value string // If called multiple times, the Namespace field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithNamespace(value string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithNamespace(value string) * // If called multiple times, the UID field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithUID(value types.UID) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithUID(value types.UID) *Bro // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithResourceVersion(value string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithResourceVersion(value str // If called multiple times, the Generation field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithGeneration(value int64) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BrokerTemplateInstanceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BrokerTemplateInstanceApplyConfiguration { +func (b *BrokerTemplateInstanceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BrokerTemplateInstanceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BrokerTemplateInstanceApplyConfiguration { +func (b *BrokerTemplateInstanceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithDeletionTimestamp(value m // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *BrokerTemplateInstanceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithDeletionGracePeriodSecond // overwriting an existing map entries in Labels field with the same key. func (b *BrokerTemplateInstanceApplyConfiguration) WithLabels(entries map[string]string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithLabels(entries map[string // overwriting an existing map entries in Annotations field with the same key. func (b *BrokerTemplateInstanceApplyConfiguration) WithAnnotations(entries map[string]string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithAnnotations(entries map[s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BrokerTemplateInstanceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BrokerTemplateInstanceApplyConfiguration { +func (b *BrokerTemplateInstanceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithOwnerReferences(values .. func (b *BrokerTemplateInstanceApplyConfiguration) WithFinalizers(values ...string) *BrokerTemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *BrokerTemplateInstanceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *BrokerTemplateInstanceApplyConfiguration) WithSpec(value *BrokerTemplat // GetName retrieves the value of the Name field in the declarative configuration. func (b *BrokerTemplateInstanceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/template/applyconfigurations/template/v1/brokertemplateinstancespec.go b/template/applyconfigurations/template/v1/brokertemplateinstancespec.go index 9fb2cb179e..e65b74928c 100644 --- a/template/applyconfigurations/template/v1/brokertemplateinstancespec.go +++ b/template/applyconfigurations/template/v1/brokertemplateinstancespec.go @@ -3,15 +3,15 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // BrokerTemplateInstanceSpecApplyConfiguration represents a declarative configuration of the BrokerTemplateInstanceSpec type for use // with apply. type BrokerTemplateInstanceSpecApplyConfiguration struct { - TemplateInstance *v1.ObjectReference `json:"templateInstance,omitempty"` - Secret *v1.ObjectReference `json:"secret,omitempty"` - BindingIDs []string `json:"bindingIDs,omitempty"` + TemplateInstance *corev1.ObjectReference `json:"templateInstance,omitempty"` + Secret *corev1.ObjectReference `json:"secret,omitempty"` + BindingIDs []string `json:"bindingIDs,omitempty"` } // BrokerTemplateInstanceSpecApplyConfiguration constructs a declarative configuration of the BrokerTemplateInstanceSpec type for use with @@ -23,7 +23,7 @@ func BrokerTemplateInstanceSpec() *BrokerTemplateInstanceSpecApplyConfiguration // WithTemplateInstance sets the TemplateInstance field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TemplateInstance field is set to the value of the last call. -func (b *BrokerTemplateInstanceSpecApplyConfiguration) WithTemplateInstance(value v1.ObjectReference) *BrokerTemplateInstanceSpecApplyConfiguration { +func (b *BrokerTemplateInstanceSpecApplyConfiguration) WithTemplateInstance(value corev1.ObjectReference) *BrokerTemplateInstanceSpecApplyConfiguration { b.TemplateInstance = &value return b } @@ -31,7 +31,7 @@ func (b *BrokerTemplateInstanceSpecApplyConfiguration) WithTemplateInstance(valu // WithSecret sets the Secret field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Secret field is set to the value of the last call. -func (b *BrokerTemplateInstanceSpecApplyConfiguration) WithSecret(value v1.ObjectReference) *BrokerTemplateInstanceSpecApplyConfiguration { +func (b *BrokerTemplateInstanceSpecApplyConfiguration) WithSecret(value corev1.ObjectReference) *BrokerTemplateInstanceSpecApplyConfiguration { b.Secret = &value return b } diff --git a/template/applyconfigurations/template/v1/template.go b/template/applyconfigurations/template/v1/template.go index d0de68b072..8ae1ba0d56 100644 --- a/template/applyconfigurations/template/v1/template.go +++ b/template/applyconfigurations/template/v1/template.go @@ -3,24 +3,24 @@ package v1 import ( - apitemplatev1 "github.com/openshift/api/template/v1" + templatev1 "github.com/openshift/api/template/v1" internal "github.com/openshift/client-go/template/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // TemplateApplyConfiguration represents a declarative configuration of the Template type for use // with apply. type TemplateApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Message *string `json:"message,omitempty"` - Objects []runtime.RawExtension `json:"objects,omitempty"` - Parameters []ParameterApplyConfiguration `json:"parameters,omitempty"` - ObjectLabels map[string]string `json:"labels,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Message *string `json:"message,omitempty"` + Objects []runtime.RawExtension `json:"objects,omitempty"` + Parameters []ParameterApplyConfiguration `json:"parameters,omitempty"` + ObjectLabels map[string]string `json:"labels,omitempty"` } // Template constructs a declarative configuration of the Template type for use with @@ -45,18 +45,18 @@ func Template(name, namespace string) *TemplateApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractTemplate(template *apitemplatev1.Template, fieldManager string) (*TemplateApplyConfiguration, error) { +func ExtractTemplate(template *templatev1.Template, fieldManager string) (*TemplateApplyConfiguration, error) { return extractTemplate(template, fieldManager, "") } // ExtractTemplateStatus is the same as ExtractTemplate except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractTemplateStatus(template *apitemplatev1.Template, fieldManager string) (*TemplateApplyConfiguration, error) { +func ExtractTemplateStatus(template *templatev1.Template, fieldManager string) (*TemplateApplyConfiguration, error) { return extractTemplate(template, fieldManager, "status") } -func extractTemplate(template *apitemplatev1.Template, fieldManager string, subresource string) (*TemplateApplyConfiguration, error) { +func extractTemplate(template *templatev1.Template, fieldManager string, subresource string) (*TemplateApplyConfiguration, error) { b := &TemplateApplyConfiguration{} err := managedfields.ExtractInto(template, internal.Parser().Type("com.github.openshift.api.template.v1.Template"), fieldManager, b, subresource) if err != nil { @@ -74,7 +74,7 @@ func extractTemplate(template *apitemplatev1.Template, fieldManager string, subr // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithKind(value string) *TemplateApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -82,7 +82,7 @@ func (b *TemplateApplyConfiguration) WithKind(value string) *TemplateApplyConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithAPIVersion(value string) *TemplateApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -91,7 +91,7 @@ func (b *TemplateApplyConfiguration) WithAPIVersion(value string) *TemplateApply // If called multiple times, the Name field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithName(value string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -100,7 +100,7 @@ func (b *TemplateApplyConfiguration) WithName(value string) *TemplateApplyConfig // If called multiple times, the GenerateName field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithGenerateName(value string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -109,7 +109,7 @@ func (b *TemplateApplyConfiguration) WithGenerateName(value string) *TemplateApp // If called multiple times, the Namespace field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithNamespace(value string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -118,7 +118,7 @@ func (b *TemplateApplyConfiguration) WithNamespace(value string) *TemplateApplyC // If called multiple times, the UID field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithUID(value types.UID) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -127,7 +127,7 @@ func (b *TemplateApplyConfiguration) WithUID(value types.UID) *TemplateApplyConf // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithResourceVersion(value string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -136,25 +136,25 @@ func (b *TemplateApplyConfiguration) WithResourceVersion(value string) *Template // If called multiple times, the Generation field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithGeneration(value int64) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *TemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TemplateApplyConfiguration { +func (b *TemplateApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *TemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TemplateApplyConfiguration { +func (b *TemplateApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -163,7 +163,7 @@ func (b *TemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *TemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -173,11 +173,11 @@ func (b *TemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *TemplateApplyConfiguration) WithLabels(entries map[string]string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -188,11 +188,11 @@ func (b *TemplateApplyConfiguration) WithLabels(entries map[string]string) *Temp // overwriting an existing map entries in Annotations field with the same key. func (b *TemplateApplyConfiguration) WithAnnotations(entries map[string]string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -200,13 +200,13 @@ func (b *TemplateApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *TemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TemplateApplyConfiguration { +func (b *TemplateApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -217,14 +217,14 @@ func (b *TemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefe func (b *TemplateApplyConfiguration) WithFinalizers(values ...string) *TemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *TemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -276,5 +276,5 @@ func (b *TemplateApplyConfiguration) WithObjectLabels(entries map[string]string) // GetName retrieves the value of the Name field in the declarative configuration. func (b *TemplateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/template/applyconfigurations/template/v1/templateinstance.go b/template/applyconfigurations/template/v1/templateinstance.go index 422eae26e1..caea8e334c 100644 --- a/template/applyconfigurations/template/v1/templateinstance.go +++ b/template/applyconfigurations/template/v1/templateinstance.go @@ -3,21 +3,21 @@ package v1 import ( - apitemplatev1 "github.com/openshift/api/template/v1" + templatev1 "github.com/openshift/api/template/v1" internal "github.com/openshift/client-go/template/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // TemplateInstanceApplyConfiguration represents a declarative configuration of the TemplateInstance type for use // with apply. type TemplateInstanceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *TemplateInstanceSpecApplyConfiguration `json:"spec,omitempty"` - Status *TemplateInstanceStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *TemplateInstanceSpecApplyConfiguration `json:"spec,omitempty"` + Status *TemplateInstanceStatusApplyConfiguration `json:"status,omitempty"` } // TemplateInstance constructs a declarative configuration of the TemplateInstance type for use with @@ -42,18 +42,18 @@ func TemplateInstance(name, namespace string) *TemplateInstanceApplyConfiguratio // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractTemplateInstance(templateInstance *apitemplatev1.TemplateInstance, fieldManager string) (*TemplateInstanceApplyConfiguration, error) { +func ExtractTemplateInstance(templateInstance *templatev1.TemplateInstance, fieldManager string) (*TemplateInstanceApplyConfiguration, error) { return extractTemplateInstance(templateInstance, fieldManager, "") } // ExtractTemplateInstanceStatus is the same as ExtractTemplateInstance except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractTemplateInstanceStatus(templateInstance *apitemplatev1.TemplateInstance, fieldManager string) (*TemplateInstanceApplyConfiguration, error) { +func ExtractTemplateInstanceStatus(templateInstance *templatev1.TemplateInstance, fieldManager string) (*TemplateInstanceApplyConfiguration, error) { return extractTemplateInstance(templateInstance, fieldManager, "status") } -func extractTemplateInstance(templateInstance *apitemplatev1.TemplateInstance, fieldManager string, subresource string) (*TemplateInstanceApplyConfiguration, error) { +func extractTemplateInstance(templateInstance *templatev1.TemplateInstance, fieldManager string, subresource string) (*TemplateInstanceApplyConfiguration, error) { b := &TemplateInstanceApplyConfiguration{} err := managedfields.ExtractInto(templateInstance, internal.Parser().Type("com.github.openshift.api.template.v1.TemplateInstance"), fieldManager, b, subresource) if err != nil { @@ -71,7 +71,7 @@ func extractTemplateInstance(templateInstance *apitemplatev1.TemplateInstance, f // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithKind(value string) *TemplateInstanceApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -79,7 +79,7 @@ func (b *TemplateInstanceApplyConfiguration) WithKind(value string) *TemplateIns // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithAPIVersion(value string) *TemplateInstanceApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -88,7 +88,7 @@ func (b *TemplateInstanceApplyConfiguration) WithAPIVersion(value string) *Templ // If called multiple times, the Name field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithName(value string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -97,7 +97,7 @@ func (b *TemplateInstanceApplyConfiguration) WithName(value string) *TemplateIns // If called multiple times, the GenerateName field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithGenerateName(value string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -106,7 +106,7 @@ func (b *TemplateInstanceApplyConfiguration) WithGenerateName(value string) *Tem // If called multiple times, the Namespace field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithNamespace(value string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -115,7 +115,7 @@ func (b *TemplateInstanceApplyConfiguration) WithNamespace(value string) *Templa // If called multiple times, the UID field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithUID(value types.UID) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -124,7 +124,7 @@ func (b *TemplateInstanceApplyConfiguration) WithUID(value types.UID) *TemplateI // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithResourceVersion(value string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -133,25 +133,25 @@ func (b *TemplateInstanceApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithGeneration(value int64) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *TemplateInstanceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TemplateInstanceApplyConfiguration { +func (b *TemplateInstanceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *TemplateInstanceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TemplateInstanceApplyConfiguration { +func (b *TemplateInstanceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -160,7 +160,7 @@ func (b *TemplateInstanceApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *TemplateInstanceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -170,11 +170,11 @@ func (b *TemplateInstanceApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *TemplateInstanceApplyConfiguration) WithLabels(entries map[string]string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -185,11 +185,11 @@ func (b *TemplateInstanceApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *TemplateInstanceApplyConfiguration) WithAnnotations(entries map[string]string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -197,13 +197,13 @@ func (b *TemplateInstanceApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *TemplateInstanceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TemplateInstanceApplyConfiguration { +func (b *TemplateInstanceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -214,14 +214,14 @@ func (b *TemplateInstanceApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *TemplateInstanceApplyConfiguration) WithFinalizers(values ...string) *TemplateInstanceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *TemplateInstanceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -244,5 +244,5 @@ func (b *TemplateInstanceApplyConfiguration) WithStatus(value *TemplateInstanceS // GetName retrieves the value of the Name field in the declarative configuration. func (b *TemplateInstanceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/template/applyconfigurations/template/v1/templateinstancecondition.go b/template/applyconfigurations/template/v1/templateinstancecondition.go index 2b9e181d0c..564bc8023c 100644 --- a/template/applyconfigurations/template/v1/templateinstancecondition.go +++ b/template/applyconfigurations/template/v1/templateinstancecondition.go @@ -3,7 +3,7 @@ package v1 import ( - v1 "github.com/openshift/api/template/v1" + templatev1 "github.com/openshift/api/template/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -11,11 +11,11 @@ import ( // TemplateInstanceConditionApplyConfiguration represents a declarative configuration of the TemplateInstanceCondition type for use // with apply. type TemplateInstanceConditionApplyConfiguration struct { - Type *v1.TemplateInstanceConditionType `json:"type,omitempty"` - Status *corev1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *templatev1.TemplateInstanceConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // TemplateInstanceConditionApplyConfiguration constructs a declarative configuration of the TemplateInstanceCondition type for use with @@ -27,7 +27,7 @@ func TemplateInstanceCondition() *TemplateInstanceConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *TemplateInstanceConditionApplyConfiguration) WithType(value v1.TemplateInstanceConditionType) *TemplateInstanceConditionApplyConfiguration { +func (b *TemplateInstanceConditionApplyConfiguration) WithType(value templatev1.TemplateInstanceConditionType) *TemplateInstanceConditionApplyConfiguration { b.Type = &value return b } diff --git a/template/applyconfigurations/template/v1/templateinstanceobject.go b/template/applyconfigurations/template/v1/templateinstanceobject.go index 90d2bd7fae..57fd153169 100644 --- a/template/applyconfigurations/template/v1/templateinstanceobject.go +++ b/template/applyconfigurations/template/v1/templateinstanceobject.go @@ -3,13 +3,13 @@ package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // TemplateInstanceObjectApplyConfiguration represents a declarative configuration of the TemplateInstanceObject type for use // with apply. type TemplateInstanceObjectApplyConfiguration struct { - Ref *v1.ObjectReference `json:"ref,omitempty"` + Ref *corev1.ObjectReference `json:"ref,omitempty"` } // TemplateInstanceObjectApplyConfiguration constructs a declarative configuration of the TemplateInstanceObject type for use with @@ -21,7 +21,7 @@ func TemplateInstanceObject() *TemplateInstanceObjectApplyConfiguration { // WithRef sets the Ref field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Ref field is set to the value of the last call. -func (b *TemplateInstanceObjectApplyConfiguration) WithRef(value v1.ObjectReference) *TemplateInstanceObjectApplyConfiguration { +func (b *TemplateInstanceObjectApplyConfiguration) WithRef(value corev1.ObjectReference) *TemplateInstanceObjectApplyConfiguration { b.Ref = &value return b } diff --git a/template/applyconfigurations/template/v1/templateinstancerequester.go b/template/applyconfigurations/template/v1/templateinstancerequester.go index fc41dd6f14..66bd8eb1cb 100644 --- a/template/applyconfigurations/template/v1/templateinstancerequester.go +++ b/template/applyconfigurations/template/v1/templateinstancerequester.go @@ -3,16 +3,16 @@ package v1 import ( - v1 "github.com/openshift/api/template/v1" + templatev1 "github.com/openshift/api/template/v1" ) // TemplateInstanceRequesterApplyConfiguration represents a declarative configuration of the TemplateInstanceRequester type for use // with apply. type TemplateInstanceRequesterApplyConfiguration struct { - Username *string `json:"username,omitempty"` - UID *string `json:"uid,omitempty"` - Groups []string `json:"groups,omitempty"` - Extra map[string]v1.ExtraValue `json:"extra,omitempty"` + Username *string `json:"username,omitempty"` + UID *string `json:"uid,omitempty"` + Groups []string `json:"groups,omitempty"` + Extra map[string]templatev1.ExtraValue `json:"extra,omitempty"` } // TemplateInstanceRequesterApplyConfiguration constructs a declarative configuration of the TemplateInstanceRequester type for use with @@ -51,9 +51,9 @@ func (b *TemplateInstanceRequesterApplyConfiguration) WithGroups(values ...strin // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Extra field, // overwriting an existing map entries in Extra field with the same key. -func (b *TemplateInstanceRequesterApplyConfiguration) WithExtra(entries map[string]v1.ExtraValue) *TemplateInstanceRequesterApplyConfiguration { +func (b *TemplateInstanceRequesterApplyConfiguration) WithExtra(entries map[string]templatev1.ExtraValue) *TemplateInstanceRequesterApplyConfiguration { if b.Extra == nil && len(entries) > 0 { - b.Extra = make(map[string]v1.ExtraValue, len(entries)) + b.Extra = make(map[string]templatev1.ExtraValue, len(entries)) } for k, v := range entries { b.Extra[k] = v diff --git a/template/clientset/versioned/clientset.go b/template/clientset/versioned/clientset.go index 567fa20517..ca7dc6db60 100644 --- a/template/clientset/versioned/clientset.go +++ b/template/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" templatev1 "github.com/openshift/client-go/template/clientset/versioned/typed/template/v1" discovery "k8s.io/client-go/discovery" diff --git a/template/clientset/versioned/typed/template/v1/brokertemplateinstance.go b/template/clientset/versioned/typed/template/v1/brokertemplateinstance.go index 0c936ea6c4..e25f0c0ded 100644 --- a/template/clientset/versioned/typed/template/v1/brokertemplateinstance.go +++ b/template/clientset/versioned/typed/template/v1/brokertemplateinstance.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/template/v1" - templatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" + templatev1 "github.com/openshift/api/template/v1" + applyconfigurationstemplatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" scheme "github.com/openshift/client-go/template/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type BrokerTemplateInstancesGetter interface { // BrokerTemplateInstanceInterface has methods to work with BrokerTemplateInstance resources. type BrokerTemplateInstanceInterface interface { - Create(ctx context.Context, brokerTemplateInstance *v1.BrokerTemplateInstance, opts metav1.CreateOptions) (*v1.BrokerTemplateInstance, error) - Update(ctx context.Context, brokerTemplateInstance *v1.BrokerTemplateInstance, opts metav1.UpdateOptions) (*v1.BrokerTemplateInstance, error) + Create(ctx context.Context, brokerTemplateInstance *templatev1.BrokerTemplateInstance, opts metav1.CreateOptions) (*templatev1.BrokerTemplateInstance, error) + Update(ctx context.Context, brokerTemplateInstance *templatev1.BrokerTemplateInstance, opts metav1.UpdateOptions) (*templatev1.BrokerTemplateInstance, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.BrokerTemplateInstance, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.BrokerTemplateInstanceList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*templatev1.BrokerTemplateInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*templatev1.BrokerTemplateInstanceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.BrokerTemplateInstance, err error) - Apply(ctx context.Context, brokerTemplateInstance *templatev1.BrokerTemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.BrokerTemplateInstance, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *templatev1.BrokerTemplateInstance, err error) + Apply(ctx context.Context, brokerTemplateInstance *applyconfigurationstemplatev1.BrokerTemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *templatev1.BrokerTemplateInstance, err error) BrokerTemplateInstanceExpansion } // brokerTemplateInstances implements BrokerTemplateInstanceInterface type brokerTemplateInstances struct { - *gentype.ClientWithListAndApply[*v1.BrokerTemplateInstance, *v1.BrokerTemplateInstanceList, *templatev1.BrokerTemplateInstanceApplyConfiguration] + *gentype.ClientWithListAndApply[*templatev1.BrokerTemplateInstance, *templatev1.BrokerTemplateInstanceList, *applyconfigurationstemplatev1.BrokerTemplateInstanceApplyConfiguration] } // newBrokerTemplateInstances returns a BrokerTemplateInstances func newBrokerTemplateInstances(c *TemplateV1Client) *brokerTemplateInstances { return &brokerTemplateInstances{ - gentype.NewClientWithListAndApply[*v1.BrokerTemplateInstance, *v1.BrokerTemplateInstanceList, *templatev1.BrokerTemplateInstanceApplyConfiguration]( + gentype.NewClientWithListAndApply[*templatev1.BrokerTemplateInstance, *templatev1.BrokerTemplateInstanceList, *applyconfigurationstemplatev1.BrokerTemplateInstanceApplyConfiguration]( "brokertemplateinstances", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.BrokerTemplateInstance { return &v1.BrokerTemplateInstance{} }, - func() *v1.BrokerTemplateInstanceList { return &v1.BrokerTemplateInstanceList{} }), + func() *templatev1.BrokerTemplateInstance { return &templatev1.BrokerTemplateInstance{} }, + func() *templatev1.BrokerTemplateInstanceList { return &templatev1.BrokerTemplateInstanceList{} }, + ), } } diff --git a/template/clientset/versioned/typed/template/v1/fake/fake_brokertemplateinstance.go b/template/clientset/versioned/typed/template/v1/fake/fake_brokertemplateinstance.go index 62ec1f5338..226375154f 100644 --- a/template/clientset/versioned/typed/template/v1/fake/fake_brokertemplateinstance.go +++ b/template/clientset/versioned/typed/template/v1/fake/fake_brokertemplateinstance.go @@ -3,133 +3,35 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/template/v1" templatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedtemplatev1 "github.com/openshift/client-go/template/clientset/versioned/typed/template/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeBrokerTemplateInstances implements BrokerTemplateInstanceInterface -type FakeBrokerTemplateInstances struct { +// fakeBrokerTemplateInstances implements BrokerTemplateInstanceInterface +type fakeBrokerTemplateInstances struct { + *gentype.FakeClientWithListAndApply[*v1.BrokerTemplateInstance, *v1.BrokerTemplateInstanceList, *templatev1.BrokerTemplateInstanceApplyConfiguration] Fake *FakeTemplateV1 } -var brokertemplateinstancesResource = v1.SchemeGroupVersion.WithResource("brokertemplateinstances") - -var brokertemplateinstancesKind = v1.SchemeGroupVersion.WithKind("BrokerTemplateInstance") - -// Get takes name of the brokerTemplateInstance, and returns the corresponding brokerTemplateInstance object, and an error if there is any. -func (c *FakeBrokerTemplateInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.BrokerTemplateInstance, err error) { - emptyResult := &v1.BrokerTemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(brokertemplateinstancesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BrokerTemplateInstance), err -} - -// List takes label and field selectors, and returns the list of BrokerTemplateInstances that match those selectors. -func (c *FakeBrokerTemplateInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.BrokerTemplateInstanceList, err error) { - emptyResult := &v1.BrokerTemplateInstanceList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(brokertemplateinstancesResource, brokertemplateinstancesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.BrokerTemplateInstanceList{ListMeta: obj.(*v1.BrokerTemplateInstanceList).ListMeta} - for _, item := range obj.(*v1.BrokerTemplateInstanceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested brokerTemplateInstances. -func (c *FakeBrokerTemplateInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(brokertemplateinstancesResource, opts)) -} - -// Create takes the representation of a brokerTemplateInstance and creates it. Returns the server's representation of the brokerTemplateInstance, and an error, if there is any. -func (c *FakeBrokerTemplateInstances) Create(ctx context.Context, brokerTemplateInstance *v1.BrokerTemplateInstance, opts metav1.CreateOptions) (result *v1.BrokerTemplateInstance, err error) { - emptyResult := &v1.BrokerTemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(brokertemplateinstancesResource, brokerTemplateInstance, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BrokerTemplateInstance), err -} - -// Update takes the representation of a brokerTemplateInstance and updates it. Returns the server's representation of the brokerTemplateInstance, and an error, if there is any. -func (c *FakeBrokerTemplateInstances) Update(ctx context.Context, brokerTemplateInstance *v1.BrokerTemplateInstance, opts metav1.UpdateOptions) (result *v1.BrokerTemplateInstance, err error) { - emptyResult := &v1.BrokerTemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(brokertemplateinstancesResource, brokerTemplateInstance, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BrokerTemplateInstance), err -} - -// Delete takes name of the brokerTemplateInstance and deletes it. Returns an error if one occurs. -func (c *FakeBrokerTemplateInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(brokertemplateinstancesResource, name, opts), &v1.BrokerTemplateInstance{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeBrokerTemplateInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(brokertemplateinstancesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.BrokerTemplateInstanceList{}) - return err -} - -// Patch applies the patch and returns the patched brokerTemplateInstance. -func (c *FakeBrokerTemplateInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.BrokerTemplateInstance, err error) { - emptyResult := &v1.BrokerTemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(brokertemplateinstancesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.BrokerTemplateInstance), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied brokerTemplateInstance. -func (c *FakeBrokerTemplateInstances) Apply(ctx context.Context, brokerTemplateInstance *templatev1.BrokerTemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.BrokerTemplateInstance, err error) { - if brokerTemplateInstance == nil { - return nil, fmt.Errorf("brokerTemplateInstance provided to Apply must not be nil") - } - data, err := json.Marshal(brokerTemplateInstance) - if err != nil { - return nil, err - } - name := brokerTemplateInstance.Name - if name == nil { - return nil, fmt.Errorf("brokerTemplateInstance.Name must be provided to Apply") - } - emptyResult := &v1.BrokerTemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(brokertemplateinstancesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeBrokerTemplateInstances(fake *FakeTemplateV1) typedtemplatev1.BrokerTemplateInstanceInterface { + return &fakeBrokerTemplateInstances{ + gentype.NewFakeClientWithListAndApply[*v1.BrokerTemplateInstance, *v1.BrokerTemplateInstanceList, *templatev1.BrokerTemplateInstanceApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("brokertemplateinstances"), + v1.SchemeGroupVersion.WithKind("BrokerTemplateInstance"), + func() *v1.BrokerTemplateInstance { return &v1.BrokerTemplateInstance{} }, + func() *v1.BrokerTemplateInstanceList { return &v1.BrokerTemplateInstanceList{} }, + func(dst, src *v1.BrokerTemplateInstanceList) { dst.ListMeta = src.ListMeta }, + func(list *v1.BrokerTemplateInstanceList) []*v1.BrokerTemplateInstance { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.BrokerTemplateInstanceList, items []*v1.BrokerTemplateInstance) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.BrokerTemplateInstance), err } diff --git a/template/clientset/versioned/typed/template/v1/fake/fake_template.go b/template/clientset/versioned/typed/template/v1/fake/fake_template.go index a5842edcf9..58f4eedd66 100644 --- a/template/clientset/versioned/typed/template/v1/fake/fake_template.go +++ b/template/clientset/versioned/typed/template/v1/fake/fake_template.go @@ -3,142 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/template/v1" templatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedtemplatev1 "github.com/openshift/client-go/template/clientset/versioned/typed/template/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeTemplates implements TemplateInterface -type FakeTemplates struct { +// fakeTemplates implements TemplateInterface +type fakeTemplates struct { + *gentype.FakeClientWithListAndApply[*v1.Template, *v1.TemplateList, *templatev1.TemplateApplyConfiguration] Fake *FakeTemplateV1 - ns string -} - -var templatesResource = v1.SchemeGroupVersion.WithResource("templates") - -var templatesKind = v1.SchemeGroupVersion.WithKind("Template") - -// Get takes name of the template, and returns the corresponding template object, and an error if there is any. -func (c *FakeTemplates) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Template, err error) { - emptyResult := &v1.Template{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(templatesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Template), err -} - -// List takes label and field selectors, and returns the list of Templates that match those selectors. -func (c *FakeTemplates) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TemplateList, err error) { - emptyResult := &v1.TemplateList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(templatesResource, templatesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.TemplateList{ListMeta: obj.(*v1.TemplateList).ListMeta} - for _, item := range obj.(*v1.TemplateList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested templates. -func (c *FakeTemplates) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(templatesResource, c.ns, opts)) - } -// Create takes the representation of a template and creates it. Returns the server's representation of the template, and an error, if there is any. -func (c *FakeTemplates) Create(ctx context.Context, template *v1.Template, opts metav1.CreateOptions) (result *v1.Template, err error) { - emptyResult := &v1.Template{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(templatesResource, c.ns, template, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Template), err -} - -// Update takes the representation of a template and updates it. Returns the server's representation of the template, and an error, if there is any. -func (c *FakeTemplates) Update(ctx context.Context, template *v1.Template, opts metav1.UpdateOptions) (result *v1.Template, err error) { - emptyResult := &v1.Template{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(templatesResource, c.ns, template, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Template), err -} - -// Delete takes name of the template and deletes it. Returns an error if one occurs. -func (c *FakeTemplates) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(templatesResource, c.ns, name, opts), &v1.Template{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeTemplates) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(templatesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.TemplateList{}) - return err -} - -// Patch applies the patch and returns the patched template. -func (c *FakeTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Template, err error) { - emptyResult := &v1.Template{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(templatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Template), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied template. -func (c *FakeTemplates) Apply(ctx context.Context, template *templatev1.TemplateApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Template, err error) { - if template == nil { - return nil, fmt.Errorf("template provided to Apply must not be nil") - } - data, err := json.Marshal(template) - if err != nil { - return nil, err - } - name := template.Name - if name == nil { - return nil, fmt.Errorf("template.Name must be provided to Apply") - } - emptyResult := &v1.Template{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(templatesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeTemplates(fake *FakeTemplateV1, namespace string) typedtemplatev1.TemplateInterface { + return &fakeTemplates{ + gentype.NewFakeClientWithListAndApply[*v1.Template, *v1.TemplateList, *templatev1.TemplateApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("templates"), + v1.SchemeGroupVersion.WithKind("Template"), + func() *v1.Template { return &v1.Template{} }, + func() *v1.TemplateList { return &v1.TemplateList{} }, + func(dst, src *v1.TemplateList) { dst.ListMeta = src.ListMeta }, + func(list *v1.TemplateList) []*v1.Template { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.TemplateList, items []*v1.Template) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Template), err } diff --git a/template/clientset/versioned/typed/template/v1/fake/fake_template_client.go b/template/clientset/versioned/typed/template/v1/fake/fake_template_client.go index 0cc29a7c26..3bb244cb53 100644 --- a/template/clientset/versioned/typed/template/v1/fake/fake_template_client.go +++ b/template/clientset/versioned/typed/template/v1/fake/fake_template_client.go @@ -13,15 +13,15 @@ type FakeTemplateV1 struct { } func (c *FakeTemplateV1) BrokerTemplateInstances() v1.BrokerTemplateInstanceInterface { - return &FakeBrokerTemplateInstances{c} + return newFakeBrokerTemplateInstances(c) } func (c *FakeTemplateV1) Templates(namespace string) v1.TemplateInterface { - return &FakeTemplates{c, namespace} + return newFakeTemplates(c, namespace) } func (c *FakeTemplateV1) TemplateInstances(namespace string) v1.TemplateInstanceInterface { - return &FakeTemplateInstances{c, namespace} + return newFakeTemplateInstances(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/template/clientset/versioned/typed/template/v1/fake/fake_templateinstance.go b/template/clientset/versioned/typed/template/v1/fake/fake_templateinstance.go index bcc87af21a..e47e8a35af 100644 --- a/template/clientset/versioned/typed/template/v1/fake/fake_templateinstance.go +++ b/template/clientset/versioned/typed/template/v1/fake/fake_templateinstance.go @@ -3,179 +3,33 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/template/v1" templatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typedtemplatev1 "github.com/openshift/client-go/template/clientset/versioned/typed/template/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeTemplateInstances implements TemplateInstanceInterface -type FakeTemplateInstances struct { +// fakeTemplateInstances implements TemplateInstanceInterface +type fakeTemplateInstances struct { + *gentype.FakeClientWithListAndApply[*v1.TemplateInstance, *v1.TemplateInstanceList, *templatev1.TemplateInstanceApplyConfiguration] Fake *FakeTemplateV1 - ns string -} - -var templateinstancesResource = v1.SchemeGroupVersion.WithResource("templateinstances") - -var templateinstancesKind = v1.SchemeGroupVersion.WithKind("TemplateInstance") - -// Get takes name of the templateInstance, and returns the corresponding templateInstance object, and an error if there is any. -func (c *FakeTemplateInstances) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TemplateInstance, err error) { - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(templateinstancesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TemplateInstance), err -} - -// List takes label and field selectors, and returns the list of TemplateInstances that match those selectors. -func (c *FakeTemplateInstances) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TemplateInstanceList, err error) { - emptyResult := &v1.TemplateInstanceList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(templateinstancesResource, templateinstancesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.TemplateInstanceList{ListMeta: obj.(*v1.TemplateInstanceList).ListMeta} - for _, item := range obj.(*v1.TemplateInstanceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested templateInstances. -func (c *FakeTemplateInstances) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(templateinstancesResource, c.ns, opts)) - -} - -// Create takes the representation of a templateInstance and creates it. Returns the server's representation of the templateInstance, and an error, if there is any. -func (c *FakeTemplateInstances) Create(ctx context.Context, templateInstance *v1.TemplateInstance, opts metav1.CreateOptions) (result *v1.TemplateInstance, err error) { - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(templateinstancesResource, c.ns, templateInstance, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TemplateInstance), err -} - -// Update takes the representation of a templateInstance and updates it. Returns the server's representation of the templateInstance, and an error, if there is any. -func (c *FakeTemplateInstances) Update(ctx context.Context, templateInstance *v1.TemplateInstance, opts metav1.UpdateOptions) (result *v1.TemplateInstance, err error) { - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(templateinstancesResource, c.ns, templateInstance, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TemplateInstance), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTemplateInstances) UpdateStatus(ctx context.Context, templateInstance *v1.TemplateInstance, opts metav1.UpdateOptions) (result *v1.TemplateInstance, err error) { - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(templateinstancesResource, "status", c.ns, templateInstance, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TemplateInstance), err -} - -// Delete takes name of the templateInstance and deletes it. Returns an error if one occurs. -func (c *FakeTemplateInstances) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(templateinstancesResource, c.ns, name, opts), &v1.TemplateInstance{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeTemplateInstances) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(templateinstancesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.TemplateInstanceList{}) - return err -} - -// Patch applies the patch and returns the patched templateInstance. -func (c *FakeTemplateInstances) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TemplateInstance, err error) { - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(templateinstancesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TemplateInstance), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied templateInstance. -func (c *FakeTemplateInstances) Apply(ctx context.Context, templateInstance *templatev1.TemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TemplateInstance, err error) { - if templateInstance == nil { - return nil, fmt.Errorf("templateInstance provided to Apply must not be nil") - } - data, err := json.Marshal(templateInstance) - if err != nil { - return nil, err - } - name := templateInstance.Name - if name == nil { - return nil, fmt.Errorf("templateInstance.Name must be provided to Apply") - } - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(templateinstancesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1.TemplateInstance), err -} - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeTemplateInstances) ApplyStatus(ctx context.Context, templateInstance *templatev1.TemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TemplateInstance, err error) { - if templateInstance == nil { - return nil, fmt.Errorf("templateInstance provided to Apply must not be nil") - } - data, err := json.Marshal(templateInstance) - if err != nil { - return nil, err - } - name := templateInstance.Name - if name == nil { - return nil, fmt.Errorf("templateInstance.Name must be provided to Apply") - } - emptyResult := &v1.TemplateInstance{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(templateinstancesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeTemplateInstances(fake *FakeTemplateV1, namespace string) typedtemplatev1.TemplateInstanceInterface { + return &fakeTemplateInstances{ + gentype.NewFakeClientWithListAndApply[*v1.TemplateInstance, *v1.TemplateInstanceList, *templatev1.TemplateInstanceApplyConfiguration]( + fake.Fake, + namespace, + v1.SchemeGroupVersion.WithResource("templateinstances"), + v1.SchemeGroupVersion.WithKind("TemplateInstance"), + func() *v1.TemplateInstance { return &v1.TemplateInstance{} }, + func() *v1.TemplateInstanceList { return &v1.TemplateInstanceList{} }, + func(dst, src *v1.TemplateInstanceList) { dst.ListMeta = src.ListMeta }, + func(list *v1.TemplateInstanceList) []*v1.TemplateInstance { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.TemplateInstanceList, items []*v1.TemplateInstance) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1.TemplateInstance), err } diff --git a/template/clientset/versioned/typed/template/v1/template.go b/template/clientset/versioned/typed/template/v1/template.go index a9b8df0e4a..10d60cb28e 100644 --- a/template/clientset/versioned/typed/template/v1/template.go +++ b/template/clientset/versioned/typed/template/v1/template.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/template/v1" - templatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" + templatev1 "github.com/openshift/api/template/v1" + applyconfigurationstemplatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" scheme "github.com/openshift/client-go/template/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type TemplatesGetter interface { // TemplateInterface has methods to work with Template resources. type TemplateInterface interface { - Create(ctx context.Context, template *v1.Template, opts metav1.CreateOptions) (*v1.Template, error) - Update(ctx context.Context, template *v1.Template, opts metav1.UpdateOptions) (*v1.Template, error) + Create(ctx context.Context, template *templatev1.Template, opts metav1.CreateOptions) (*templatev1.Template, error) + Update(ctx context.Context, template *templatev1.Template, opts metav1.UpdateOptions) (*templatev1.Template, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Template, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.TemplateList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*templatev1.Template, error) + List(ctx context.Context, opts metav1.ListOptions) (*templatev1.TemplateList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Template, err error) - Apply(ctx context.Context, template *templatev1.TemplateApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Template, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *templatev1.Template, err error) + Apply(ctx context.Context, template *applyconfigurationstemplatev1.TemplateApplyConfiguration, opts metav1.ApplyOptions) (result *templatev1.Template, err error) TemplateExpansion } // templates implements TemplateInterface type templates struct { - *gentype.ClientWithListAndApply[*v1.Template, *v1.TemplateList, *templatev1.TemplateApplyConfiguration] + *gentype.ClientWithListAndApply[*templatev1.Template, *templatev1.TemplateList, *applyconfigurationstemplatev1.TemplateApplyConfiguration] } // newTemplates returns a Templates func newTemplates(c *TemplateV1Client, namespace string) *templates { return &templates{ - gentype.NewClientWithListAndApply[*v1.Template, *v1.TemplateList, *templatev1.TemplateApplyConfiguration]( + gentype.NewClientWithListAndApply[*templatev1.Template, *templatev1.TemplateList, *applyconfigurationstemplatev1.TemplateApplyConfiguration]( "templates", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Template { return &v1.Template{} }, - func() *v1.TemplateList { return &v1.TemplateList{} }), + func() *templatev1.Template { return &templatev1.Template{} }, + func() *templatev1.TemplateList { return &templatev1.TemplateList{} }, + ), } } diff --git a/template/clientset/versioned/typed/template/v1/template_client.go b/template/clientset/versioned/typed/template/v1/template_client.go index c462840d88..73c07f0a12 100644 --- a/template/clientset/versioned/typed/template/v1/template_client.go +++ b/template/clientset/versioned/typed/template/v1/template_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/template/v1" - "github.com/openshift/client-go/template/clientset/versioned/scheme" + templatev1 "github.com/openshift/api/template/v1" + scheme "github.com/openshift/client-go/template/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -79,10 +79,10 @@ func New(c rest.Interface) *TemplateV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := templatev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/template/clientset/versioned/typed/template/v1/templateinstance.go b/template/clientset/versioned/typed/template/v1/templateinstance.go index a53ab3a1ba..2740031039 100644 --- a/template/clientset/versioned/typed/template/v1/templateinstance.go +++ b/template/clientset/versioned/typed/template/v1/templateinstance.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/template/v1" - templatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" + templatev1 "github.com/openshift/api/template/v1" + applyconfigurationstemplatev1 "github.com/openshift/client-go/template/applyconfigurations/template/v1" scheme "github.com/openshift/client-go/template/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,36 +22,37 @@ type TemplateInstancesGetter interface { // TemplateInstanceInterface has methods to work with TemplateInstance resources. type TemplateInstanceInterface interface { - Create(ctx context.Context, templateInstance *v1.TemplateInstance, opts metav1.CreateOptions) (*v1.TemplateInstance, error) - Update(ctx context.Context, templateInstance *v1.TemplateInstance, opts metav1.UpdateOptions) (*v1.TemplateInstance, error) + Create(ctx context.Context, templateInstance *templatev1.TemplateInstance, opts metav1.CreateOptions) (*templatev1.TemplateInstance, error) + Update(ctx context.Context, templateInstance *templatev1.TemplateInstance, opts metav1.UpdateOptions) (*templatev1.TemplateInstance, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, templateInstance *v1.TemplateInstance, opts metav1.UpdateOptions) (*v1.TemplateInstance, error) + UpdateStatus(ctx context.Context, templateInstance *templatev1.TemplateInstance, opts metav1.UpdateOptions) (*templatev1.TemplateInstance, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.TemplateInstance, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.TemplateInstanceList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*templatev1.TemplateInstance, error) + List(ctx context.Context, opts metav1.ListOptions) (*templatev1.TemplateInstanceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TemplateInstance, err error) - Apply(ctx context.Context, templateInstance *templatev1.TemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TemplateInstance, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *templatev1.TemplateInstance, err error) + Apply(ctx context.Context, templateInstance *applyconfigurationstemplatev1.TemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *templatev1.TemplateInstance, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, templateInstance *templatev1.TemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TemplateInstance, err error) + ApplyStatus(ctx context.Context, templateInstance *applyconfigurationstemplatev1.TemplateInstanceApplyConfiguration, opts metav1.ApplyOptions) (result *templatev1.TemplateInstance, err error) TemplateInstanceExpansion } // templateInstances implements TemplateInstanceInterface type templateInstances struct { - *gentype.ClientWithListAndApply[*v1.TemplateInstance, *v1.TemplateInstanceList, *templatev1.TemplateInstanceApplyConfiguration] + *gentype.ClientWithListAndApply[*templatev1.TemplateInstance, *templatev1.TemplateInstanceList, *applyconfigurationstemplatev1.TemplateInstanceApplyConfiguration] } // newTemplateInstances returns a TemplateInstances func newTemplateInstances(c *TemplateV1Client, namespace string) *templateInstances { return &templateInstances{ - gentype.NewClientWithListAndApply[*v1.TemplateInstance, *v1.TemplateInstanceList, *templatev1.TemplateInstanceApplyConfiguration]( + gentype.NewClientWithListAndApply[*templatev1.TemplateInstance, *templatev1.TemplateInstanceList, *applyconfigurationstemplatev1.TemplateInstanceApplyConfiguration]( "templateinstances", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.TemplateInstance { return &v1.TemplateInstance{} }, - func() *v1.TemplateInstanceList { return &v1.TemplateInstanceList{} }), + func() *templatev1.TemplateInstance { return &templatev1.TemplateInstance{} }, + func() *templatev1.TemplateInstanceList { return &templatev1.TemplateInstanceList{} }, + ), } } diff --git a/template/informers/externalversions/generic.go b/template/informers/externalversions/generic.go index 47ac89753b..a87032f862 100644 --- a/template/informers/externalversions/generic.go +++ b/template/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/template/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/template/informers/externalversions/template/v1/brokertemplateinstance.go b/template/informers/externalversions/template/v1/brokertemplateinstance.go index 5651bafc59..5bbd9f380f 100644 --- a/template/informers/externalversions/template/v1/brokertemplateinstance.go +++ b/template/informers/externalversions/template/v1/brokertemplateinstance.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - templatev1 "github.com/openshift/api/template/v1" + apitemplatev1 "github.com/openshift/api/template/v1" versioned "github.com/openshift/client-go/template/clientset/versioned" internalinterfaces "github.com/openshift/client-go/template/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/template/listers/template/v1" + templatev1 "github.com/openshift/client-go/template/listers/template/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // BrokerTemplateInstances. type BrokerTemplateInstanceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.BrokerTemplateInstanceLister + Lister() templatev1.BrokerTemplateInstanceLister } type brokerTemplateInstanceInformer struct { @@ -54,7 +54,7 @@ func NewFilteredBrokerTemplateInstanceInformer(client versioned.Interface, resyn return client.TemplateV1().BrokerTemplateInstances().Watch(context.TODO(), options) }, }, - &templatev1.BrokerTemplateInstance{}, + &apitemplatev1.BrokerTemplateInstance{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *brokerTemplateInstanceInformer) defaultInformer(client versioned.Interf } func (f *brokerTemplateInstanceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&templatev1.BrokerTemplateInstance{}, f.defaultInformer) + return f.factory.InformerFor(&apitemplatev1.BrokerTemplateInstance{}, f.defaultInformer) } -func (f *brokerTemplateInstanceInformer) Lister() v1.BrokerTemplateInstanceLister { - return v1.NewBrokerTemplateInstanceLister(f.Informer().GetIndexer()) +func (f *brokerTemplateInstanceInformer) Lister() templatev1.BrokerTemplateInstanceLister { + return templatev1.NewBrokerTemplateInstanceLister(f.Informer().GetIndexer()) } diff --git a/template/informers/externalversions/template/v1/template.go b/template/informers/externalversions/template/v1/template.go index dcc6213891..600596951a 100644 --- a/template/informers/externalversions/template/v1/template.go +++ b/template/informers/externalversions/template/v1/template.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - templatev1 "github.com/openshift/api/template/v1" + apitemplatev1 "github.com/openshift/api/template/v1" versioned "github.com/openshift/client-go/template/clientset/versioned" internalinterfaces "github.com/openshift/client-go/template/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/template/listers/template/v1" + templatev1 "github.com/openshift/client-go/template/listers/template/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Templates. type TemplateInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.TemplateLister + Lister() templatev1.TemplateLister } type templateInformer struct { @@ -55,7 +55,7 @@ func NewFilteredTemplateInformer(client versioned.Interface, namespace string, r return client.TemplateV1().Templates(namespace).Watch(context.TODO(), options) }, }, - &templatev1.Template{}, + &apitemplatev1.Template{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *templateInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *templateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&templatev1.Template{}, f.defaultInformer) + return f.factory.InformerFor(&apitemplatev1.Template{}, f.defaultInformer) } -func (f *templateInformer) Lister() v1.TemplateLister { - return v1.NewTemplateLister(f.Informer().GetIndexer()) +func (f *templateInformer) Lister() templatev1.TemplateLister { + return templatev1.NewTemplateLister(f.Informer().GetIndexer()) } diff --git a/template/informers/externalversions/template/v1/templateinstance.go b/template/informers/externalversions/template/v1/templateinstance.go index c45181db77..cc3a5afa8a 100644 --- a/template/informers/externalversions/template/v1/templateinstance.go +++ b/template/informers/externalversions/template/v1/templateinstance.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - templatev1 "github.com/openshift/api/template/v1" + apitemplatev1 "github.com/openshift/api/template/v1" versioned "github.com/openshift/client-go/template/clientset/versioned" internalinterfaces "github.com/openshift/client-go/template/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/template/listers/template/v1" + templatev1 "github.com/openshift/client-go/template/listers/template/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // TemplateInstances. type TemplateInstanceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.TemplateInstanceLister + Lister() templatev1.TemplateInstanceLister } type templateInstanceInformer struct { @@ -55,7 +55,7 @@ func NewFilteredTemplateInstanceInformer(client versioned.Interface, namespace s return client.TemplateV1().TemplateInstances(namespace).Watch(context.TODO(), options) }, }, - &templatev1.TemplateInstance{}, + &apitemplatev1.TemplateInstance{}, resyncPeriod, indexers, ) @@ -66,9 +66,9 @@ func (f *templateInstanceInformer) defaultInformer(client versioned.Interface, r } func (f *templateInstanceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&templatev1.TemplateInstance{}, f.defaultInformer) + return f.factory.InformerFor(&apitemplatev1.TemplateInstance{}, f.defaultInformer) } -func (f *templateInstanceInformer) Lister() v1.TemplateInstanceLister { - return v1.NewTemplateInstanceLister(f.Informer().GetIndexer()) +func (f *templateInstanceInformer) Lister() templatev1.TemplateInstanceLister { + return templatev1.NewTemplateInstanceLister(f.Informer().GetIndexer()) } diff --git a/template/listers/template/v1/brokertemplateinstance.go b/template/listers/template/v1/brokertemplateinstance.go index 44cb0b0625..d854917cd7 100644 --- a/template/listers/template/v1/brokertemplateinstance.go +++ b/template/listers/template/v1/brokertemplateinstance.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/template/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + templatev1 "github.com/openshift/api/template/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // BrokerTemplateInstanceLister helps list BrokerTemplateInstances. @@ -14,19 +14,19 @@ import ( type BrokerTemplateInstanceLister interface { // List lists all BrokerTemplateInstances in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.BrokerTemplateInstance, err error) + List(selector labels.Selector) (ret []*templatev1.BrokerTemplateInstance, err error) // Get retrieves the BrokerTemplateInstance from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.BrokerTemplateInstance, error) + Get(name string) (*templatev1.BrokerTemplateInstance, error) BrokerTemplateInstanceListerExpansion } // brokerTemplateInstanceLister implements the BrokerTemplateInstanceLister interface. type brokerTemplateInstanceLister struct { - listers.ResourceIndexer[*v1.BrokerTemplateInstance] + listers.ResourceIndexer[*templatev1.BrokerTemplateInstance] } // NewBrokerTemplateInstanceLister returns a new BrokerTemplateInstanceLister. func NewBrokerTemplateInstanceLister(indexer cache.Indexer) BrokerTemplateInstanceLister { - return &brokerTemplateInstanceLister{listers.New[*v1.BrokerTemplateInstance](indexer, v1.Resource("brokertemplateinstance"))} + return &brokerTemplateInstanceLister{listers.New[*templatev1.BrokerTemplateInstance](indexer, templatev1.Resource("brokertemplateinstance"))} } diff --git a/template/listers/template/v1/template.go b/template/listers/template/v1/template.go index cfe88725c7..0f84e2d4f4 100644 --- a/template/listers/template/v1/template.go +++ b/template/listers/template/v1/template.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/template/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + templatev1 "github.com/openshift/api/template/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // TemplateLister helps list Templates. @@ -14,7 +14,7 @@ import ( type TemplateLister interface { // List lists all Templates in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Template, err error) + List(selector labels.Selector) (ret []*templatev1.Template, err error) // Templates returns an object that can list and get Templates. Templates(namespace string) TemplateNamespaceLister TemplateListerExpansion @@ -22,17 +22,17 @@ type TemplateLister interface { // templateLister implements the TemplateLister interface. type templateLister struct { - listers.ResourceIndexer[*v1.Template] + listers.ResourceIndexer[*templatev1.Template] } // NewTemplateLister returns a new TemplateLister. func NewTemplateLister(indexer cache.Indexer) TemplateLister { - return &templateLister{listers.New[*v1.Template](indexer, v1.Resource("template"))} + return &templateLister{listers.New[*templatev1.Template](indexer, templatev1.Resource("template"))} } // Templates returns an object that can list and get Templates. func (s *templateLister) Templates(namespace string) TemplateNamespaceLister { - return templateNamespaceLister{listers.NewNamespaced[*v1.Template](s.ResourceIndexer, namespace)} + return templateNamespaceLister{listers.NewNamespaced[*templatev1.Template](s.ResourceIndexer, namespace)} } // TemplateNamespaceLister helps list and get Templates. @@ -40,15 +40,15 @@ func (s *templateLister) Templates(namespace string) TemplateNamespaceLister { type TemplateNamespaceLister interface { // List lists all Templates in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Template, err error) + List(selector labels.Selector) (ret []*templatev1.Template, err error) // Get retrieves the Template from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Template, error) + Get(name string) (*templatev1.Template, error) TemplateNamespaceListerExpansion } // templateNamespaceLister implements the TemplateNamespaceLister // interface. type templateNamespaceLister struct { - listers.ResourceIndexer[*v1.Template] + listers.ResourceIndexer[*templatev1.Template] } diff --git a/template/listers/template/v1/templateinstance.go b/template/listers/template/v1/templateinstance.go index d8223a92ed..3bc83c4751 100644 --- a/template/listers/template/v1/templateinstance.go +++ b/template/listers/template/v1/templateinstance.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/template/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + templatev1 "github.com/openshift/api/template/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // TemplateInstanceLister helps list TemplateInstances. @@ -14,7 +14,7 @@ import ( type TemplateInstanceLister interface { // List lists all TemplateInstances in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.TemplateInstance, err error) + List(selector labels.Selector) (ret []*templatev1.TemplateInstance, err error) // TemplateInstances returns an object that can list and get TemplateInstances. TemplateInstances(namespace string) TemplateInstanceNamespaceLister TemplateInstanceListerExpansion @@ -22,17 +22,17 @@ type TemplateInstanceLister interface { // templateInstanceLister implements the TemplateInstanceLister interface. type templateInstanceLister struct { - listers.ResourceIndexer[*v1.TemplateInstance] + listers.ResourceIndexer[*templatev1.TemplateInstance] } // NewTemplateInstanceLister returns a new TemplateInstanceLister. func NewTemplateInstanceLister(indexer cache.Indexer) TemplateInstanceLister { - return &templateInstanceLister{listers.New[*v1.TemplateInstance](indexer, v1.Resource("templateinstance"))} + return &templateInstanceLister{listers.New[*templatev1.TemplateInstance](indexer, templatev1.Resource("templateinstance"))} } // TemplateInstances returns an object that can list and get TemplateInstances. func (s *templateInstanceLister) TemplateInstances(namespace string) TemplateInstanceNamespaceLister { - return templateInstanceNamespaceLister{listers.NewNamespaced[*v1.TemplateInstance](s.ResourceIndexer, namespace)} + return templateInstanceNamespaceLister{listers.NewNamespaced[*templatev1.TemplateInstance](s.ResourceIndexer, namespace)} } // TemplateInstanceNamespaceLister helps list and get TemplateInstances. @@ -40,15 +40,15 @@ func (s *templateInstanceLister) TemplateInstances(namespace string) TemplateIns type TemplateInstanceNamespaceLister interface { // List lists all TemplateInstances in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.TemplateInstance, err error) + List(selector labels.Selector) (ret []*templatev1.TemplateInstance, err error) // Get retrieves the TemplateInstance from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.TemplateInstance, error) + Get(name string) (*templatev1.TemplateInstance, error) TemplateInstanceNamespaceListerExpansion } // templateInstanceNamespaceLister implements the TemplateInstanceNamespaceLister // interface. type templateInstanceNamespaceLister struct { - listers.ResourceIndexer[*v1.TemplateInstance] + listers.ResourceIndexer[*templatev1.TemplateInstance] } diff --git a/user/applyconfigurations/internal/internal.go b/user/applyconfigurations/internal/internal.go index 0d01eb686a..55c7dfa0d4 100644 --- a/user/applyconfigurations/internal/internal.go +++ b/user/applyconfigurations/internal/internal.go @@ -3,8 +3,8 @@ package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/user/applyconfigurations/user/v1/group.go b/user/applyconfigurations/user/v1/group.go index 266cfb54eb..c6cdc9a09d 100644 --- a/user/applyconfigurations/user/v1/group.go +++ b/user/applyconfigurations/user/v1/group.go @@ -5,18 +5,18 @@ package v1 import ( userv1 "github.com/openshift/api/user/v1" internal "github.com/openshift/client-go/user/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // GroupApplyConfiguration represents a declarative configuration of the Group type for use // with apply. type GroupApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Users *userv1.OptionalNames `json:"users,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Users *userv1.OptionalNames `json:"users,omitempty"` } // Group constructs a declarative configuration of the Group type for use with @@ -68,7 +68,7 @@ func extractGroup(group *userv1.Group, fieldManager string, subresource string) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *GroupApplyConfiguration) WithKind(value string) *GroupApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -76,7 +76,7 @@ func (b *GroupApplyConfiguration) WithKind(value string) *GroupApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *GroupApplyConfiguration) WithAPIVersion(value string) *GroupApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -85,7 +85,7 @@ func (b *GroupApplyConfiguration) WithAPIVersion(value string) *GroupApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *GroupApplyConfiguration) WithName(value string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -94,7 +94,7 @@ func (b *GroupApplyConfiguration) WithName(value string) *GroupApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *GroupApplyConfiguration) WithGenerateName(value string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -103,7 +103,7 @@ func (b *GroupApplyConfiguration) WithGenerateName(value string) *GroupApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *GroupApplyConfiguration) WithNamespace(value string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -112,7 +112,7 @@ func (b *GroupApplyConfiguration) WithNamespace(value string) *GroupApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *GroupApplyConfiguration) WithUID(value types.UID) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -121,7 +121,7 @@ func (b *GroupApplyConfiguration) WithUID(value types.UID) *GroupApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *GroupApplyConfiguration) WithResourceVersion(value string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -130,25 +130,25 @@ func (b *GroupApplyConfiguration) WithResourceVersion(value string) *GroupApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *GroupApplyConfiguration) WithGeneration(value int64) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *GroupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *GroupApplyConfiguration { +func (b *GroupApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *GroupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *GroupApplyConfiguration { +func (b *GroupApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -157,7 +157,7 @@ func (b *GroupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Grou // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *GroupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -167,11 +167,11 @@ func (b *GroupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *G // overwriting an existing map entries in Labels field with the same key. func (b *GroupApplyConfiguration) WithLabels(entries map[string]string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -182,11 +182,11 @@ func (b *GroupApplyConfiguration) WithLabels(entries map[string]string) *GroupAp // overwriting an existing map entries in Annotations field with the same key. func (b *GroupApplyConfiguration) WithAnnotations(entries map[string]string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -194,13 +194,13 @@ func (b *GroupApplyConfiguration) WithAnnotations(entries map[string]string) *Gr // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *GroupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *GroupApplyConfiguration { +func (b *GroupApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -211,14 +211,14 @@ func (b *GroupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *GroupApplyConfiguration) WithFinalizers(values ...string) *GroupApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *GroupApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -233,5 +233,5 @@ func (b *GroupApplyConfiguration) WithUsers(value userv1.OptionalNames) *GroupAp // GetName retrieves the value of the Name field in the declarative configuration. func (b *GroupApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/user/applyconfigurations/user/v1/identity.go b/user/applyconfigurations/user/v1/identity.go index 4df5af1f2c..b957fbc175 100644 --- a/user/applyconfigurations/user/v1/identity.go +++ b/user/applyconfigurations/user/v1/identity.go @@ -6,21 +6,21 @@ import ( userv1 "github.com/openshift/api/user/v1" internal "github.com/openshift/client-go/user/applyconfigurations/internal" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // IdentityApplyConfiguration represents a declarative configuration of the Identity type for use // with apply. type IdentityApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - ProviderName *string `json:"providerName,omitempty"` - ProviderUserName *string `json:"providerUserName,omitempty"` - User *corev1.ObjectReference `json:"user,omitempty"` - Extra map[string]string `json:"extra,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + ProviderName *string `json:"providerName,omitempty"` + ProviderUserName *string `json:"providerUserName,omitempty"` + User *corev1.ObjectReference `json:"user,omitempty"` + Extra map[string]string `json:"extra,omitempty"` } // Identity constructs a declarative configuration of the Identity type for use with @@ -72,7 +72,7 @@ func extractIdentity(identity *userv1.Identity, fieldManager string, subresource // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithKind(value string) *IdentityApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -80,7 +80,7 @@ func (b *IdentityApplyConfiguration) WithKind(value string) *IdentityApplyConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithAPIVersion(value string) *IdentityApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -89,7 +89,7 @@ func (b *IdentityApplyConfiguration) WithAPIVersion(value string) *IdentityApply // If called multiple times, the Name field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithName(value string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -98,7 +98,7 @@ func (b *IdentityApplyConfiguration) WithName(value string) *IdentityApplyConfig // If called multiple times, the GenerateName field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithGenerateName(value string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -107,7 +107,7 @@ func (b *IdentityApplyConfiguration) WithGenerateName(value string) *IdentityApp // If called multiple times, the Namespace field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithNamespace(value string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -116,7 +116,7 @@ func (b *IdentityApplyConfiguration) WithNamespace(value string) *IdentityApplyC // If called multiple times, the UID field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithUID(value types.UID) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -125,7 +125,7 @@ func (b *IdentityApplyConfiguration) WithUID(value types.UID) *IdentityApplyConf // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithResourceVersion(value string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -134,25 +134,25 @@ func (b *IdentityApplyConfiguration) WithResourceVersion(value string) *Identity // If called multiple times, the Generation field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithGeneration(value int64) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *IdentityApplyConfiguration) WithCreationTimestamp(value metav1.Time) *IdentityApplyConfiguration { +func (b *IdentityApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *IdentityApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *IdentityApplyConfiguration { +func (b *IdentityApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -161,7 +161,7 @@ func (b *IdentityApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *I // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *IdentityApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -171,11 +171,11 @@ func (b *IdentityApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *IdentityApplyConfiguration) WithLabels(entries map[string]string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -186,11 +186,11 @@ func (b *IdentityApplyConfiguration) WithLabels(entries map[string]string) *Iden // overwriting an existing map entries in Annotations field with the same key. func (b *IdentityApplyConfiguration) WithAnnotations(entries map[string]string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -198,13 +198,13 @@ func (b *IdentityApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *IdentityApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *IdentityApplyConfiguration { +func (b *IdentityApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -215,14 +215,14 @@ func (b *IdentityApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefe func (b *IdentityApplyConfiguration) WithFinalizers(values ...string) *IdentityApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *IdentityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -267,5 +267,5 @@ func (b *IdentityApplyConfiguration) WithExtra(entries map[string]string) *Ident // GetName retrieves the value of the Name field in the declarative configuration. func (b *IdentityApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/user/applyconfigurations/user/v1/user.go b/user/applyconfigurations/user/v1/user.go index 8d894813d7..ad2216d9e8 100644 --- a/user/applyconfigurations/user/v1/user.go +++ b/user/applyconfigurations/user/v1/user.go @@ -5,20 +5,20 @@ package v1 import ( userv1 "github.com/openshift/api/user/v1" internal "github.com/openshift/client-go/user/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // UserApplyConfiguration represents a declarative configuration of the User type for use // with apply. type UserApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - FullName *string `json:"fullName,omitempty"` - Identities []string `json:"identities,omitempty"` - Groups []string `json:"groups,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + FullName *string `json:"fullName,omitempty"` + Identities []string `json:"identities,omitempty"` + Groups []string `json:"groups,omitempty"` } // User constructs a declarative configuration of the User type for use with @@ -70,7 +70,7 @@ func extractUser(user *userv1.User, fieldManager string, subresource string) (*U // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *UserApplyConfiguration) WithKind(value string) *UserApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -78,7 +78,7 @@ func (b *UserApplyConfiguration) WithKind(value string) *UserApplyConfiguration // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *UserApplyConfiguration) WithAPIVersion(value string) *UserApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -87,7 +87,7 @@ func (b *UserApplyConfiguration) WithAPIVersion(value string) *UserApplyConfigur // If called multiple times, the Name field is set to the value of the last call. func (b *UserApplyConfiguration) WithName(value string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -96,7 +96,7 @@ func (b *UserApplyConfiguration) WithName(value string) *UserApplyConfiguration // If called multiple times, the GenerateName field is set to the value of the last call. func (b *UserApplyConfiguration) WithGenerateName(value string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -105,7 +105,7 @@ func (b *UserApplyConfiguration) WithGenerateName(value string) *UserApplyConfig // If called multiple times, the Namespace field is set to the value of the last call. func (b *UserApplyConfiguration) WithNamespace(value string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -114,7 +114,7 @@ func (b *UserApplyConfiguration) WithNamespace(value string) *UserApplyConfigura // If called multiple times, the UID field is set to the value of the last call. func (b *UserApplyConfiguration) WithUID(value types.UID) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -123,7 +123,7 @@ func (b *UserApplyConfiguration) WithUID(value types.UID) *UserApplyConfiguratio // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *UserApplyConfiguration) WithResourceVersion(value string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -132,25 +132,25 @@ func (b *UserApplyConfiguration) WithResourceVersion(value string) *UserApplyCon // If called multiple times, the Generation field is set to the value of the last call. func (b *UserApplyConfiguration) WithGeneration(value int64) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *UserApplyConfiguration) WithCreationTimestamp(value metav1.Time) *UserApplyConfiguration { +func (b *UserApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *UserApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *UserApplyConfiguration { +func (b *UserApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -159,7 +159,7 @@ func (b *UserApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *UserA // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *UserApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -169,11 +169,11 @@ func (b *UserApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *Us // overwriting an existing map entries in Labels field with the same key. func (b *UserApplyConfiguration) WithLabels(entries map[string]string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -184,11 +184,11 @@ func (b *UserApplyConfiguration) WithLabels(entries map[string]string) *UserAppl // overwriting an existing map entries in Annotations field with the same key. func (b *UserApplyConfiguration) WithAnnotations(entries map[string]string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -196,13 +196,13 @@ func (b *UserApplyConfiguration) WithAnnotations(entries map[string]string) *Use // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *UserApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *UserApplyConfiguration { +func (b *UserApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -213,14 +213,14 @@ func (b *UserApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenc func (b *UserApplyConfiguration) WithFinalizers(values ...string) *UserApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *UserApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -255,5 +255,5 @@ func (b *UserApplyConfiguration) WithGroups(values ...string) *UserApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *UserApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/user/clientset/versioned/clientset.go b/user/clientset/versioned/clientset.go index 84ba8d5e04..bb482196b0 100644 --- a/user/clientset/versioned/clientset.go +++ b/user/clientset/versioned/clientset.go @@ -3,8 +3,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" userv1 "github.com/openshift/client-go/user/clientset/versioned/typed/user/v1" discovery "k8s.io/client-go/discovery" diff --git a/user/clientset/versioned/typed/user/v1/fake/fake_group.go b/user/clientset/versioned/typed/user/v1/fake/fake_group.go index a12ab351e0..c5d9173f5d 100644 --- a/user/clientset/versioned/typed/user/v1/fake/fake_group.go +++ b/user/clientset/versioned/typed/user/v1/fake/fake_group.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/user/v1" userv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typeduserv1 "github.com/openshift/client-go/user/clientset/versioned/typed/user/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeGroups implements GroupInterface -type FakeGroups struct { +// fakeGroups implements GroupInterface +type fakeGroups struct { + *gentype.FakeClientWithListAndApply[*v1.Group, *v1.GroupList, *userv1.GroupApplyConfiguration] Fake *FakeUserV1 } -var groupsResource = v1.SchemeGroupVersion.WithResource("groups") - -var groupsKind = v1.SchemeGroupVersion.WithKind("Group") - -// Get takes name of the group, and returns the corresponding group object, and an error if there is any. -func (c *FakeGroups) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Group, err error) { - emptyResult := &v1.Group{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(groupsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Group), err -} - -// List takes label and field selectors, and returns the list of Groups that match those selectors. -func (c *FakeGroups) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GroupList, err error) { - emptyResult := &v1.GroupList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(groupsResource, groupsKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.GroupList{ListMeta: obj.(*v1.GroupList).ListMeta} - for _, item := range obj.(*v1.GroupList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested groups. -func (c *FakeGroups) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(groupsResource, opts)) -} - -// Create takes the representation of a group and creates it. Returns the server's representation of the group, and an error, if there is any. -func (c *FakeGroups) Create(ctx context.Context, group *v1.Group, opts metav1.CreateOptions) (result *v1.Group, err error) { - emptyResult := &v1.Group{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(groupsResource, group, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Group), err -} - -// Update takes the representation of a group and updates it. Returns the server's representation of the group, and an error, if there is any. -func (c *FakeGroups) Update(ctx context.Context, group *v1.Group, opts metav1.UpdateOptions) (result *v1.Group, err error) { - emptyResult := &v1.Group{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(groupsResource, group, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Group), err -} - -// Delete takes name of the group and deletes it. Returns an error if one occurs. -func (c *FakeGroups) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(groupsResource, name, opts), &v1.Group{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeGroups) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(groupsResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.GroupList{}) - return err -} - -// Patch applies the patch and returns the patched group. -func (c *FakeGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Group, err error) { - emptyResult := &v1.Group{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(groupsResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Group), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied group. -func (c *FakeGroups) Apply(ctx context.Context, group *userv1.GroupApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Group, err error) { - if group == nil { - return nil, fmt.Errorf("group provided to Apply must not be nil") - } - data, err := json.Marshal(group) - if err != nil { - return nil, err - } - name := group.Name - if name == nil { - return nil, fmt.Errorf("group.Name must be provided to Apply") - } - emptyResult := &v1.Group{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(groupsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeGroups(fake *FakeUserV1) typeduserv1.GroupInterface { + return &fakeGroups{ + gentype.NewFakeClientWithListAndApply[*v1.Group, *v1.GroupList, *userv1.GroupApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("groups"), + v1.SchemeGroupVersion.WithKind("Group"), + func() *v1.Group { return &v1.Group{} }, + func() *v1.GroupList { return &v1.GroupList{} }, + func(dst, src *v1.GroupList) { dst.ListMeta = src.ListMeta }, + func(list *v1.GroupList) []*v1.Group { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.GroupList, items []*v1.Group) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Group), err } diff --git a/user/clientset/versioned/typed/user/v1/fake/fake_identity.go b/user/clientset/versioned/typed/user/v1/fake/fake_identity.go index b46450a8d2..6295243705 100644 --- a/user/clientset/versioned/typed/user/v1/fake/fake_identity.go +++ b/user/clientset/versioned/typed/user/v1/fake/fake_identity.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/user/v1" userv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typeduserv1 "github.com/openshift/client-go/user/clientset/versioned/typed/user/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeIdentities implements IdentityInterface -type FakeIdentities struct { +// fakeIdentities implements IdentityInterface +type fakeIdentities struct { + *gentype.FakeClientWithListAndApply[*v1.Identity, *v1.IdentityList, *userv1.IdentityApplyConfiguration] Fake *FakeUserV1 } -var identitiesResource = v1.SchemeGroupVersion.WithResource("identities") - -var identitiesKind = v1.SchemeGroupVersion.WithKind("Identity") - -// Get takes name of the identity, and returns the corresponding identity object, and an error if there is any. -func (c *FakeIdentities) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Identity, err error) { - emptyResult := &v1.Identity{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(identitiesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Identity), err -} - -// List takes label and field selectors, and returns the list of Identities that match those selectors. -func (c *FakeIdentities) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IdentityList, err error) { - emptyResult := &v1.IdentityList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(identitiesResource, identitiesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.IdentityList{ListMeta: obj.(*v1.IdentityList).ListMeta} - for _, item := range obj.(*v1.IdentityList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested identities. -func (c *FakeIdentities) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(identitiesResource, opts)) -} - -// Create takes the representation of a identity and creates it. Returns the server's representation of the identity, and an error, if there is any. -func (c *FakeIdentities) Create(ctx context.Context, identity *v1.Identity, opts metav1.CreateOptions) (result *v1.Identity, err error) { - emptyResult := &v1.Identity{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(identitiesResource, identity, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Identity), err -} - -// Update takes the representation of a identity and updates it. Returns the server's representation of the identity, and an error, if there is any. -func (c *FakeIdentities) Update(ctx context.Context, identity *v1.Identity, opts metav1.UpdateOptions) (result *v1.Identity, err error) { - emptyResult := &v1.Identity{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(identitiesResource, identity, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Identity), err -} - -// Delete takes name of the identity and deletes it. Returns an error if one occurs. -func (c *FakeIdentities) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(identitiesResource, name, opts), &v1.Identity{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeIdentities) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(identitiesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.IdentityList{}) - return err -} - -// Patch applies the patch and returns the patched identity. -func (c *FakeIdentities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Identity, err error) { - emptyResult := &v1.Identity{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(identitiesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.Identity), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied identity. -func (c *FakeIdentities) Apply(ctx context.Context, identity *userv1.IdentityApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Identity, err error) { - if identity == nil { - return nil, fmt.Errorf("identity provided to Apply must not be nil") - } - data, err := json.Marshal(identity) - if err != nil { - return nil, err - } - name := identity.Name - if name == nil { - return nil, fmt.Errorf("identity.Name must be provided to Apply") - } - emptyResult := &v1.Identity{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(identitiesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeIdentities(fake *FakeUserV1) typeduserv1.IdentityInterface { + return &fakeIdentities{ + gentype.NewFakeClientWithListAndApply[*v1.Identity, *v1.IdentityList, *userv1.IdentityApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("identities"), + v1.SchemeGroupVersion.WithKind("Identity"), + func() *v1.Identity { return &v1.Identity{} }, + func() *v1.IdentityList { return &v1.IdentityList{} }, + func(dst, src *v1.IdentityList) { dst.ListMeta = src.ListMeta }, + func(list *v1.IdentityList) []*v1.Identity { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.IdentityList, items []*v1.Identity) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.Identity), err } diff --git a/user/clientset/versioned/typed/user/v1/fake/fake_user.go b/user/clientset/versioned/typed/user/v1/fake/fake_user.go index 7ad4d5bff7..9bea614871 100644 --- a/user/clientset/versioned/typed/user/v1/fake/fake_user.go +++ b/user/clientset/versioned/typed/user/v1/fake/fake_user.go @@ -3,133 +3,31 @@ package fake import ( - "context" - json "encoding/json" - "fmt" - v1 "github.com/openshift/api/user/v1" userv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + typeduserv1 "github.com/openshift/client-go/user/clientset/versioned/typed/user/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeUsers implements UserInterface -type FakeUsers struct { +// fakeUsers implements UserInterface +type fakeUsers struct { + *gentype.FakeClientWithListAndApply[*v1.User, *v1.UserList, *userv1.UserApplyConfiguration] Fake *FakeUserV1 } -var usersResource = v1.SchemeGroupVersion.WithResource("users") - -var usersKind = v1.SchemeGroupVersion.WithKind("User") - -// Get takes name of the user, and returns the corresponding user object, and an error if there is any. -func (c *FakeUsers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.User, err error) { - emptyResult := &v1.User{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(usersResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.User), err -} - -// List takes label and field selectors, and returns the list of Users that match those selectors. -func (c *FakeUsers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.UserList, err error) { - emptyResult := &v1.UserList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(usersResource, usersKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1.UserList{ListMeta: obj.(*v1.UserList).ListMeta} - for _, item := range obj.(*v1.UserList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested users. -func (c *FakeUsers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(usersResource, opts)) -} - -// Create takes the representation of a user and creates it. Returns the server's representation of the user, and an error, if there is any. -func (c *FakeUsers) Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) (result *v1.User, err error) { - emptyResult := &v1.User{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(usersResource, user, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.User), err -} - -// Update takes the representation of a user and updates it. Returns the server's representation of the user, and an error, if there is any. -func (c *FakeUsers) Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (result *v1.User, err error) { - emptyResult := &v1.User{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(usersResource, user, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.User), err -} - -// Delete takes name of the user and deletes it. Returns an error if one occurs. -func (c *FakeUsers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(usersResource, name, opts), &v1.User{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeUsers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(usersResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1.UserList{}) - return err -} - -// Patch applies the patch and returns the patched user. -func (c *FakeUsers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.User, err error) { - emptyResult := &v1.User{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(usersResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.User), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied user. -func (c *FakeUsers) Apply(ctx context.Context, user *userv1.UserApplyConfiguration, opts metav1.ApplyOptions) (result *v1.User, err error) { - if user == nil { - return nil, fmt.Errorf("user provided to Apply must not be nil") - } - data, err := json.Marshal(user) - if err != nil { - return nil, err - } - name := user.Name - if name == nil { - return nil, fmt.Errorf("user.Name must be provided to Apply") - } - emptyResult := &v1.User{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(usersResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeUsers(fake *FakeUserV1) typeduserv1.UserInterface { + return &fakeUsers{ + gentype.NewFakeClientWithListAndApply[*v1.User, *v1.UserList, *userv1.UserApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("users"), + v1.SchemeGroupVersion.WithKind("User"), + func() *v1.User { return &v1.User{} }, + func() *v1.UserList { return &v1.UserList{} }, + func(dst, src *v1.UserList) { dst.ListMeta = src.ListMeta }, + func(list *v1.UserList) []*v1.User { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.UserList, items []*v1.User) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1.User), err } diff --git a/user/clientset/versioned/typed/user/v1/fake/fake_user_client.go b/user/clientset/versioned/typed/user/v1/fake/fake_user_client.go index bd16882dc9..4a7f8189c9 100644 --- a/user/clientset/versioned/typed/user/v1/fake/fake_user_client.go +++ b/user/clientset/versioned/typed/user/v1/fake/fake_user_client.go @@ -13,19 +13,19 @@ type FakeUserV1 struct { } func (c *FakeUserV1) Groups() v1.GroupInterface { - return &FakeGroups{c} + return newFakeGroups(c) } func (c *FakeUserV1) Identities() v1.IdentityInterface { - return &FakeIdentities{c} + return newFakeIdentities(c) } func (c *FakeUserV1) Users() v1.UserInterface { - return &FakeUsers{c} + return newFakeUsers(c) } func (c *FakeUserV1) UserIdentityMappings() v1.UserIdentityMappingInterface { - return &FakeUserIdentityMappings{c} + return newFakeUserIdentityMappings(c) } // RESTClient returns a RESTClient that is used to communicate diff --git a/user/clientset/versioned/typed/user/v1/fake/fake_useridentitymapping.go b/user/clientset/versioned/typed/user/v1/fake/fake_useridentitymapping.go index b157322b56..453f876b10 100644 --- a/user/clientset/versioned/typed/user/v1/fake/fake_useridentitymapping.go +++ b/user/clientset/versioned/typed/user/v1/fake/fake_useridentitymapping.go @@ -3,58 +3,26 @@ package fake import ( - "context" - v1 "github.com/openshift/api/user/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - testing "k8s.io/client-go/testing" + userv1 "github.com/openshift/client-go/user/clientset/versioned/typed/user/v1" + gentype "k8s.io/client-go/gentype" ) -// FakeUserIdentityMappings implements UserIdentityMappingInterface -type FakeUserIdentityMappings struct { +// fakeUserIdentityMappings implements UserIdentityMappingInterface +type fakeUserIdentityMappings struct { + *gentype.FakeClient[*v1.UserIdentityMapping] Fake *FakeUserV1 } -var useridentitymappingsResource = v1.SchemeGroupVersion.WithResource("useridentitymappings") - -var useridentitymappingsKind = v1.SchemeGroupVersion.WithKind("UserIdentityMapping") - -// Get takes name of the userIdentityMapping, and returns the corresponding userIdentityMapping object, and an error if there is any. -func (c *FakeUserIdentityMappings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.UserIdentityMapping, err error) { - emptyResult := &v1.UserIdentityMapping{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(useridentitymappingsResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.UserIdentityMapping), err -} - -// Create takes the representation of a userIdentityMapping and creates it. Returns the server's representation of the userIdentityMapping, and an error, if there is any. -func (c *FakeUserIdentityMappings) Create(ctx context.Context, userIdentityMapping *v1.UserIdentityMapping, opts metav1.CreateOptions) (result *v1.UserIdentityMapping, err error) { - emptyResult := &v1.UserIdentityMapping{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(useridentitymappingsResource, userIdentityMapping, opts), emptyResult) - if obj == nil { - return emptyResult, err +func newFakeUserIdentityMappings(fake *FakeUserV1) userv1.UserIdentityMappingInterface { + return &fakeUserIdentityMappings{ + gentype.NewFakeClient[*v1.UserIdentityMapping]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("useridentitymappings"), + v1.SchemeGroupVersion.WithKind("UserIdentityMapping"), + func() *v1.UserIdentityMapping { return &v1.UserIdentityMapping{} }, + ), + fake, } - return obj.(*v1.UserIdentityMapping), err -} - -// Update takes the representation of a userIdentityMapping and updates it. Returns the server's representation of the userIdentityMapping, and an error, if there is any. -func (c *FakeUserIdentityMappings) Update(ctx context.Context, userIdentityMapping *v1.UserIdentityMapping, opts metav1.UpdateOptions) (result *v1.UserIdentityMapping, err error) { - emptyResult := &v1.UserIdentityMapping{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(useridentitymappingsResource, userIdentityMapping, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1.UserIdentityMapping), err -} - -// Delete takes name of the userIdentityMapping and deletes it. Returns an error if one occurs. -func (c *FakeUserIdentityMappings) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(useridentitymappingsResource, name, opts), &v1.UserIdentityMapping{}) - return err } diff --git a/user/clientset/versioned/typed/user/v1/group.go b/user/clientset/versioned/typed/user/v1/group.go index f52cf8e95f..4b73ce61d8 100644 --- a/user/clientset/versioned/typed/user/v1/group.go +++ b/user/clientset/versioned/typed/user/v1/group.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/user/v1" - userv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" + userv1 "github.com/openshift/api/user/v1" + applyconfigurationsuserv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" scheme "github.com/openshift/client-go/user/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type GroupsGetter interface { // GroupInterface has methods to work with Group resources. type GroupInterface interface { - Create(ctx context.Context, group *v1.Group, opts metav1.CreateOptions) (*v1.Group, error) - Update(ctx context.Context, group *v1.Group, opts metav1.UpdateOptions) (*v1.Group, error) + Create(ctx context.Context, group *userv1.Group, opts metav1.CreateOptions) (*userv1.Group, error) + Update(ctx context.Context, group *userv1.Group, opts metav1.UpdateOptions) (*userv1.Group, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Group, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.GroupList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*userv1.Group, error) + List(ctx context.Context, opts metav1.ListOptions) (*userv1.GroupList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Group, err error) - Apply(ctx context.Context, group *userv1.GroupApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Group, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *userv1.Group, err error) + Apply(ctx context.Context, group *applyconfigurationsuserv1.GroupApplyConfiguration, opts metav1.ApplyOptions) (result *userv1.Group, err error) GroupExpansion } // groups implements GroupInterface type groups struct { - *gentype.ClientWithListAndApply[*v1.Group, *v1.GroupList, *userv1.GroupApplyConfiguration] + *gentype.ClientWithListAndApply[*userv1.Group, *userv1.GroupList, *applyconfigurationsuserv1.GroupApplyConfiguration] } // newGroups returns a Groups func newGroups(c *UserV1Client) *groups { return &groups{ - gentype.NewClientWithListAndApply[*v1.Group, *v1.GroupList, *userv1.GroupApplyConfiguration]( + gentype.NewClientWithListAndApply[*userv1.Group, *userv1.GroupList, *applyconfigurationsuserv1.GroupApplyConfiguration]( "groups", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Group { return &v1.Group{} }, - func() *v1.GroupList { return &v1.GroupList{} }), + func() *userv1.Group { return &userv1.Group{} }, + func() *userv1.GroupList { return &userv1.GroupList{} }, + ), } } diff --git a/user/clientset/versioned/typed/user/v1/identity.go b/user/clientset/versioned/typed/user/v1/identity.go index c03cdfaeb0..e45938efb6 100644 --- a/user/clientset/versioned/typed/user/v1/identity.go +++ b/user/clientset/versioned/typed/user/v1/identity.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/user/v1" - userv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" + userv1 "github.com/openshift/api/user/v1" + applyconfigurationsuserv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" scheme "github.com/openshift/client-go/user/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type IdentitiesGetter interface { // IdentityInterface has methods to work with Identity resources. type IdentityInterface interface { - Create(ctx context.Context, identity *v1.Identity, opts metav1.CreateOptions) (*v1.Identity, error) - Update(ctx context.Context, identity *v1.Identity, opts metav1.UpdateOptions) (*v1.Identity, error) + Create(ctx context.Context, identity *userv1.Identity, opts metav1.CreateOptions) (*userv1.Identity, error) + Update(ctx context.Context, identity *userv1.Identity, opts metav1.UpdateOptions) (*userv1.Identity, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Identity, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.IdentityList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*userv1.Identity, error) + List(ctx context.Context, opts metav1.ListOptions) (*userv1.IdentityList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Identity, err error) - Apply(ctx context.Context, identity *userv1.IdentityApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Identity, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *userv1.Identity, err error) + Apply(ctx context.Context, identity *applyconfigurationsuserv1.IdentityApplyConfiguration, opts metav1.ApplyOptions) (result *userv1.Identity, err error) IdentityExpansion } // identities implements IdentityInterface type identities struct { - *gentype.ClientWithListAndApply[*v1.Identity, *v1.IdentityList, *userv1.IdentityApplyConfiguration] + *gentype.ClientWithListAndApply[*userv1.Identity, *userv1.IdentityList, *applyconfigurationsuserv1.IdentityApplyConfiguration] } // newIdentities returns a Identities func newIdentities(c *UserV1Client) *identities { return &identities{ - gentype.NewClientWithListAndApply[*v1.Identity, *v1.IdentityList, *userv1.IdentityApplyConfiguration]( + gentype.NewClientWithListAndApply[*userv1.Identity, *userv1.IdentityList, *applyconfigurationsuserv1.IdentityApplyConfiguration]( "identities", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Identity { return &v1.Identity{} }, - func() *v1.IdentityList { return &v1.IdentityList{} }), + func() *userv1.Identity { return &userv1.Identity{} }, + func() *userv1.IdentityList { return &userv1.IdentityList{} }, + ), } } diff --git a/user/clientset/versioned/typed/user/v1/user.go b/user/clientset/versioned/typed/user/v1/user.go index 4cc9485ca9..7eabfb651e 100644 --- a/user/clientset/versioned/typed/user/v1/user.go +++ b/user/clientset/versioned/typed/user/v1/user.go @@ -3,10 +3,10 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/user/v1" - userv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" + userv1 "github.com/openshift/api/user/v1" + applyconfigurationsuserv1 "github.com/openshift/client-go/user/applyconfigurations/user/v1" scheme "github.com/openshift/client-go/user/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -22,32 +22,33 @@ type UsersGetter interface { // UserInterface has methods to work with User resources. type UserInterface interface { - Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) (*v1.User, error) - Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) (*v1.User, error) + Create(ctx context.Context, user *userv1.User, opts metav1.CreateOptions) (*userv1.User, error) + Update(ctx context.Context, user *userv1.User, opts metav1.UpdateOptions) (*userv1.User, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.User, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*userv1.User, error) + List(ctx context.Context, opts metav1.ListOptions) (*userv1.UserList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.User, err error) - Apply(ctx context.Context, user *userv1.UserApplyConfiguration, opts metav1.ApplyOptions) (result *v1.User, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *userv1.User, err error) + Apply(ctx context.Context, user *applyconfigurationsuserv1.UserApplyConfiguration, opts metav1.ApplyOptions) (result *userv1.User, err error) UserExpansion } // users implements UserInterface type users struct { - *gentype.ClientWithListAndApply[*v1.User, *v1.UserList, *userv1.UserApplyConfiguration] + *gentype.ClientWithListAndApply[*userv1.User, *userv1.UserList, *applyconfigurationsuserv1.UserApplyConfiguration] } // newUsers returns a Users func newUsers(c *UserV1Client) *users { return &users{ - gentype.NewClientWithListAndApply[*v1.User, *v1.UserList, *userv1.UserApplyConfiguration]( + gentype.NewClientWithListAndApply[*userv1.User, *userv1.UserList, *applyconfigurationsuserv1.UserApplyConfiguration]( "users", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.User { return &v1.User{} }, - func() *v1.UserList { return &v1.UserList{} }), + func() *userv1.User { return &userv1.User{} }, + func() *userv1.UserList { return &userv1.UserList{} }, + ), } } diff --git a/user/clientset/versioned/typed/user/v1/user_client.go b/user/clientset/versioned/typed/user/v1/user_client.go index ed7581c61b..fe0126d29b 100644 --- a/user/clientset/versioned/typed/user/v1/user_client.go +++ b/user/clientset/versioned/typed/user/v1/user_client.go @@ -3,10 +3,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/openshift/api/user/v1" - "github.com/openshift/client-go/user/clientset/versioned/scheme" + userv1 "github.com/openshift/api/user/v1" + scheme "github.com/openshift/client-go/user/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -84,10 +84,10 @@ func New(c rest.Interface) *UserV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := userv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/user/clientset/versioned/typed/user/v1/useridentitymapping.go b/user/clientset/versioned/typed/user/v1/useridentitymapping.go index d64983aa70..05882eb3ee 100644 --- a/user/clientset/versioned/typed/user/v1/useridentitymapping.go +++ b/user/clientset/versioned/typed/user/v1/useridentitymapping.go @@ -3,9 +3,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/openshift/api/user/v1" + userv1 "github.com/openshift/api/user/v1" scheme "github.com/openshift/client-go/user/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gentype "k8s.io/client-go/gentype" @@ -19,26 +19,27 @@ type UserIdentityMappingsGetter interface { // UserIdentityMappingInterface has methods to work with UserIdentityMapping resources. type UserIdentityMappingInterface interface { - Create(ctx context.Context, userIdentityMapping *v1.UserIdentityMapping, opts metav1.CreateOptions) (*v1.UserIdentityMapping, error) - Update(ctx context.Context, userIdentityMapping *v1.UserIdentityMapping, opts metav1.UpdateOptions) (*v1.UserIdentityMapping, error) + Create(ctx context.Context, userIdentityMapping *userv1.UserIdentityMapping, opts metav1.CreateOptions) (*userv1.UserIdentityMapping, error) + Update(ctx context.Context, userIdentityMapping *userv1.UserIdentityMapping, opts metav1.UpdateOptions) (*userv1.UserIdentityMapping, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.UserIdentityMapping, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*userv1.UserIdentityMapping, error) UserIdentityMappingExpansion } // userIdentityMappings implements UserIdentityMappingInterface type userIdentityMappings struct { - *gentype.Client[*v1.UserIdentityMapping] + *gentype.Client[*userv1.UserIdentityMapping] } // newUserIdentityMappings returns a UserIdentityMappings func newUserIdentityMappings(c *UserV1Client) *userIdentityMappings { return &userIdentityMappings{ - gentype.NewClient[*v1.UserIdentityMapping]( + gentype.NewClient[*userv1.UserIdentityMapping]( "useridentitymappings", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.UserIdentityMapping { return &v1.UserIdentityMapping{} }), + func() *userv1.UserIdentityMapping { return &userv1.UserIdentityMapping{} }, + ), } } diff --git a/user/informers/externalversions/generic.go b/user/informers/externalversions/generic.go index 6c8cb23b6e..a706e19058 100644 --- a/user/informers/externalversions/generic.go +++ b/user/informers/externalversions/generic.go @@ -3,7 +3,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/openshift/api/user/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/user/informers/externalversions/user/v1/group.go b/user/informers/externalversions/user/v1/group.go index 24df75f7c1..69c542e8f5 100644 --- a/user/informers/externalversions/user/v1/group.go +++ b/user/informers/externalversions/user/v1/group.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - userv1 "github.com/openshift/api/user/v1" + apiuserv1 "github.com/openshift/api/user/v1" versioned "github.com/openshift/client-go/user/clientset/versioned" internalinterfaces "github.com/openshift/client-go/user/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/user/listers/user/v1" + userv1 "github.com/openshift/client-go/user/listers/user/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Groups. type GroupInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.GroupLister + Lister() userv1.GroupLister } type groupInformer struct { @@ -54,7 +54,7 @@ func NewFilteredGroupInformer(client versioned.Interface, resyncPeriod time.Dura return client.UserV1().Groups().Watch(context.TODO(), options) }, }, - &userv1.Group{}, + &apiuserv1.Group{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *groupInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *groupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&userv1.Group{}, f.defaultInformer) + return f.factory.InformerFor(&apiuserv1.Group{}, f.defaultInformer) } -func (f *groupInformer) Lister() v1.GroupLister { - return v1.NewGroupLister(f.Informer().GetIndexer()) +func (f *groupInformer) Lister() userv1.GroupLister { + return userv1.NewGroupLister(f.Informer().GetIndexer()) } diff --git a/user/informers/externalversions/user/v1/identity.go b/user/informers/externalversions/user/v1/identity.go index 9a46897818..b7d4263aea 100644 --- a/user/informers/externalversions/user/v1/identity.go +++ b/user/informers/externalversions/user/v1/identity.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - userv1 "github.com/openshift/api/user/v1" + apiuserv1 "github.com/openshift/api/user/v1" versioned "github.com/openshift/client-go/user/clientset/versioned" internalinterfaces "github.com/openshift/client-go/user/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/user/listers/user/v1" + userv1 "github.com/openshift/client-go/user/listers/user/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Identities. type IdentityInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.IdentityLister + Lister() userv1.IdentityLister } type identityInformer struct { @@ -54,7 +54,7 @@ func NewFilteredIdentityInformer(client versioned.Interface, resyncPeriod time.D return client.UserV1().Identities().Watch(context.TODO(), options) }, }, - &userv1.Identity{}, + &apiuserv1.Identity{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *identityInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *identityInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&userv1.Identity{}, f.defaultInformer) + return f.factory.InformerFor(&apiuserv1.Identity{}, f.defaultInformer) } -func (f *identityInformer) Lister() v1.IdentityLister { - return v1.NewIdentityLister(f.Informer().GetIndexer()) +func (f *identityInformer) Lister() userv1.IdentityLister { + return userv1.NewIdentityLister(f.Informer().GetIndexer()) } diff --git a/user/informers/externalversions/user/v1/user.go b/user/informers/externalversions/user/v1/user.go index 57aaca1f70..1b680051fd 100644 --- a/user/informers/externalversions/user/v1/user.go +++ b/user/informers/externalversions/user/v1/user.go @@ -3,13 +3,13 @@ package v1 import ( - "context" + context "context" time "time" - userv1 "github.com/openshift/api/user/v1" + apiuserv1 "github.com/openshift/api/user/v1" versioned "github.com/openshift/client-go/user/clientset/versioned" internalinterfaces "github.com/openshift/client-go/user/informers/externalversions/internalinterfaces" - v1 "github.com/openshift/client-go/user/listers/user/v1" + userv1 "github.com/openshift/client-go/user/listers/user/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -20,7 +20,7 @@ import ( // Users. type UserInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.UserLister + Lister() userv1.UserLister } type userInformer struct { @@ -54,7 +54,7 @@ func NewFilteredUserInformer(client versioned.Interface, resyncPeriod time.Durat return client.UserV1().Users().Watch(context.TODO(), options) }, }, - &userv1.User{}, + &apiuserv1.User{}, resyncPeriod, indexers, ) @@ -65,9 +65,9 @@ func (f *userInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *userInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&userv1.User{}, f.defaultInformer) + return f.factory.InformerFor(&apiuserv1.User{}, f.defaultInformer) } -func (f *userInformer) Lister() v1.UserLister { - return v1.NewUserLister(f.Informer().GetIndexer()) +func (f *userInformer) Lister() userv1.UserLister { + return userv1.NewUserLister(f.Informer().GetIndexer()) } diff --git a/user/listers/user/v1/group.go b/user/listers/user/v1/group.go index 907a8d54bd..90349c6037 100644 --- a/user/listers/user/v1/group.go +++ b/user/listers/user/v1/group.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/user/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + userv1 "github.com/openshift/api/user/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // GroupLister helps list Groups. @@ -14,19 +14,19 @@ import ( type GroupLister interface { // List lists all Groups in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Group, err error) + List(selector labels.Selector) (ret []*userv1.Group, err error) // Get retrieves the Group from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Group, error) + Get(name string) (*userv1.Group, error) GroupListerExpansion } // groupLister implements the GroupLister interface. type groupLister struct { - listers.ResourceIndexer[*v1.Group] + listers.ResourceIndexer[*userv1.Group] } // NewGroupLister returns a new GroupLister. func NewGroupLister(indexer cache.Indexer) GroupLister { - return &groupLister{listers.New[*v1.Group](indexer, v1.Resource("group"))} + return &groupLister{listers.New[*userv1.Group](indexer, userv1.Resource("group"))} } diff --git a/user/listers/user/v1/identity.go b/user/listers/user/v1/identity.go index 32607e76d7..5b87dc2f70 100644 --- a/user/listers/user/v1/identity.go +++ b/user/listers/user/v1/identity.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/user/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + userv1 "github.com/openshift/api/user/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // IdentityLister helps list Identities. @@ -14,19 +14,19 @@ import ( type IdentityLister interface { // List lists all Identities in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Identity, err error) + List(selector labels.Selector) (ret []*userv1.Identity, err error) // Get retrieves the Identity from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Identity, error) + Get(name string) (*userv1.Identity, error) IdentityListerExpansion } // identityLister implements the IdentityLister interface. type identityLister struct { - listers.ResourceIndexer[*v1.Identity] + listers.ResourceIndexer[*userv1.Identity] } // NewIdentityLister returns a new IdentityLister. func NewIdentityLister(indexer cache.Indexer) IdentityLister { - return &identityLister{listers.New[*v1.Identity](indexer, v1.Resource("identity"))} + return &identityLister{listers.New[*userv1.Identity](indexer, userv1.Resource("identity"))} } diff --git a/user/listers/user/v1/user.go b/user/listers/user/v1/user.go index 71d1473225..d2e2a674f9 100644 --- a/user/listers/user/v1/user.go +++ b/user/listers/user/v1/user.go @@ -3,10 +3,10 @@ package v1 import ( - v1 "github.com/openshift/api/user/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + userv1 "github.com/openshift/api/user/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // UserLister helps list Users. @@ -14,19 +14,19 @@ import ( type UserLister interface { // List lists all Users in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.User, err error) + List(selector labels.Selector) (ret []*userv1.User, err error) // Get retrieves the User from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.User, error) + Get(name string) (*userv1.User, error) UserListerExpansion } // userLister implements the UserLister interface. type userLister struct { - listers.ResourceIndexer[*v1.User] + listers.ResourceIndexer[*userv1.User] } // NewUserLister returns a new UserLister. func NewUserLister(indexer cache.Indexer) UserLister { - return &userLister{listers.New[*v1.User](indexer, v1.Resource("user"))} + return &userLister{listers.New[*userv1.User](indexer, userv1.Resource("user"))} } diff --git a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml new file mode 100644 index 0000000000..22f8d21cca --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml @@ -0,0 +1,61 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 45 + maligned: + suggest-new: true + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 3 + +linters: + enable-all: true + disable: + - maligned + - unparam + - lll + - gochecknoinits + - gochecknoglobals + - funlen + - godox + - gocognit + - whitespace + - wsl + - wrapcheck + - testpackage + - nlreturn + - gomnd + - exhaustivestruct + - goerr113 + - errorlint + - nestif + - godot + - gofumpt + - paralleltest + - tparallel + - thelper + - ifshort + - exhaustruct + - varnamelen + - gci + - depguard + - errchkjson + - inamedparam + - nonamedreturns + - musttag + - ireturn + - forcetypeassert + - cyclop + # deprecated linters + - deadcode + - interfacer + - scopelint + - varcheck + - structcheck + - golint + - nosnakecase diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md index 813788aff1..0108f1d572 100644 --- a/vendor/github.com/go-openapi/jsonpointer/README.md +++ b/vendor/github.com/go-openapi/jsonpointer/README.md @@ -1,6 +1,10 @@ -# gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# gojsonpointer [![Build Status](https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonpointer/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) + +[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer.svg)](https://pkg.go.dev/github.com/go-openapi/jsonpointer) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonpointer)](https://goreportcard.com/report/github.com/go-openapi/jsonpointer) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) An implementation of JSON Pointer - Go language ## Status diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go index 7df9853def..d970c7cf44 100644 --- a/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -26,6 +26,7 @@ package jsonpointer import ( + "encoding/json" "errors" "fmt" "reflect" @@ -40,6 +41,7 @@ const ( pointerSeparator = `/` invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator + notFound = `Can't find the pointer in the document` ) var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() @@ -48,13 +50,13 @@ var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() // JSONPointable is an interface for structs to implement when they need to customize the // json pointer process type JSONPointable interface { - JSONLookup(string) (interface{}, error) + JSONLookup(string) (any, error) } // JSONSetable is an interface for structs to implement when they need to customize the // json pointer process type JSONSetable interface { - JSONSet(string, interface{}) error + JSONSet(string, any) error } // New creates a new json pointer for the given string @@ -81,9 +83,7 @@ func (p *Pointer) parse(jsonPointerString string) error { err = errors.New(invalidStart) } else { referenceTokens := strings.Split(jsonPointerString, pointerSeparator) - for _, referenceToken := range referenceTokens[1:] { - p.referenceTokens = append(p.referenceTokens, referenceToken) - } + p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) } } @@ -91,38 +91,58 @@ func (p *Pointer) parse(jsonPointerString string) error { } // Get uses the pointer to retrieve a value from a JSON document -func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) { +func (p *Pointer) Get(document any) (any, reflect.Kind, error) { return p.get(document, swag.DefaultJSONNameProvider) } // Set uses the pointer to set a value from a JSON document -func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error) { +func (p *Pointer) Set(document any, value any) (any, error) { return document, p.set(document, value, swag.DefaultJSONNameProvider) } // GetForToken gets a value for a json pointer token 1 level deep -func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) { +func GetForToken(document any, decodedToken string) (any, reflect.Kind, error) { return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider) } // SetForToken gets a value for a json pointer token 1 level deep -func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error) { +func SetForToken(document any, decodedToken string, value any) (any, error) { return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider) } -func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { +func isNil(input any) bool { + if input == nil { + return true + } + + kind := reflect.TypeOf(input).Kind() + switch kind { //nolint:exhaustive + case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: + return reflect.ValueOf(input).IsNil() + default: + return false + } +} + +func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { rValue := reflect.Indirect(reflect.ValueOf(node)) kind := rValue.Kind() + if isNil(node) { + return nil, kind, fmt.Errorf("nil value has not field %q", decodedToken) + } - if rValue.Type().Implements(jsonPointableType) { - r, err := node.(JSONPointable).JSONLookup(decodedToken) + switch typed := node.(type) { + case JSONPointable: + r, err := typed.JSONLookup(decodedToken) if err != nil { return nil, kind, err } return r, kind, nil + case *any: // case of a pointer to interface, that is not resolved by reflect.Indirect + return getSingleImpl(*typed, decodedToken, nameProvider) } - switch kind { + switch kind { //nolint:exhaustive case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { @@ -159,7 +179,7 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam } -func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error { +func setSingleImpl(node, data any, decodedToken string, nameProvider *swag.NameProvider) error { rValue := reflect.Indirect(reflect.ValueOf(node)) if ns, ok := node.(JSONSetable); ok { // pointer impl @@ -170,7 +190,7 @@ func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *sw return node.(JSONSetable).JSONSet(decodedToken, data) } - switch rValue.Kind() { + switch rValue.Kind() { //nolint:exhaustive case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { @@ -210,7 +230,7 @@ func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *sw } -func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { +func (p *Pointer) get(node any, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { if nameProvider == nil { nameProvider = swag.DefaultJSONNameProvider @@ -231,8 +251,7 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf if err != nil { return nil, knd, err } - node, kind = r, knd - + node = r } rValue := reflect.ValueOf(node) @@ -241,11 +260,11 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf return node, kind, nil } -func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) error { +func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error { knd := reflect.ValueOf(node).Kind() if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { - return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values") + return errors.New("only structs, pointers, maps and slices are supported for setting values") } if nameProvider == nil { @@ -284,7 +303,7 @@ func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) e continue } - switch kind { + switch kind { //nolint:exhaustive case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { @@ -363,6 +382,128 @@ func (p *Pointer) String() string { return pointerString } +func (p *Pointer) Offset(document string) (int64, error) { + dec := json.NewDecoder(strings.NewReader(document)) + var offset int64 + for _, ttk := range p.DecodedTokens() { + tk, err := dec.Token() + if err != nil { + return 0, err + } + switch tk := tk.(type) { + case json.Delim: + switch tk { + case '{': + offset, err = offsetSingleObject(dec, ttk) + if err != nil { + return 0, err + } + case '[': + offset, err = offsetSingleArray(dec, ttk) + if err != nil { + return 0, err + } + default: + return 0, fmt.Errorf("invalid token %#v", tk) + } + default: + return 0, fmt.Errorf("invalid token %#v", tk) + } + } + return offset, nil +} + +func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) { + for dec.More() { + offset := dec.InputOffset() + tk, err := dec.Token() + if err != nil { + return 0, err + } + switch tk := tk.(type) { + case json.Delim: + switch tk { + case '{': + if err = drainSingle(dec); err != nil { + return 0, err + } + case '[': + if err = drainSingle(dec); err != nil { + return 0, err + } + } + case string: + if tk == decodedToken { + return offset, nil + } + default: + return 0, fmt.Errorf("invalid token %#v", tk) + } + } + return 0, fmt.Errorf("token reference %q not found", decodedToken) +} + +func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { + idx, err := strconv.Atoi(decodedToken) + if err != nil { + return 0, fmt.Errorf("token reference %q is not a number: %v", decodedToken, err) + } + var i int + for i = 0; i < idx && dec.More(); i++ { + tk, err := dec.Token() + if err != nil { + return 0, err + } + + if delim, isDelim := tk.(json.Delim); isDelim { + switch delim { + case '{': + if err = drainSingle(dec); err != nil { + return 0, err + } + case '[': + if err = drainSingle(dec); err != nil { + return 0, err + } + } + } + } + + if !dec.More() { + return 0, fmt.Errorf("token reference %q not found", decodedToken) + } + return dec.InputOffset(), nil +} + +// drainSingle drains a single level of object or array. +// The decoder has to guarantee the beginning delim (i.e. '{' or '[') has been consumed. +func drainSingle(dec *json.Decoder) error { + for dec.More() { + tk, err := dec.Token() + if err != nil { + return err + } + if delim, isDelim := tk.(json.Delim); isDelim { + switch delim { + case '{': + if err = drainSingle(dec); err != nil { + return err + } + case '[': + if err = drainSingle(dec); err != nil { + return err + } + } + } + } + + // Consumes the ending delim + if _, err := dec.Token(); err != nil { + return err + } + return nil +} + // Specific JSON pointer encoding here // ~0 => ~ // ~1 => / @@ -377,14 +518,14 @@ const ( // Unescape unescapes a json pointer reference token string to the original representation func Unescape(token string) string { - step1 := strings.Replace(token, encRefTok1, decRefTok1, -1) - step2 := strings.Replace(step1, encRefTok0, decRefTok0, -1) + step1 := strings.ReplaceAll(token, encRefTok1, decRefTok1) + step2 := strings.ReplaceAll(step1, encRefTok0, decRefTok0) return step2 } // Escape escapes a pointer reference token string func Escape(token string) string { - step1 := strings.Replace(token, decRefTok0, encRefTok0, -1) - step2 := strings.Replace(step1, decRefTok1, encRefTok1, -1) + step1 := strings.ReplaceAll(token, decRefTok0, encRefTok0) + step2 := strings.ReplaceAll(step1, decRefTok1, encRefTok1) return step2 } diff --git a/vendor/github.com/go-openapi/swag/.gitignore b/vendor/github.com/go-openapi/swag/.gitignore index d69b53accc..c4b1b64f04 100644 --- a/vendor/github.com/go-openapi/swag/.gitignore +++ b/vendor/github.com/go-openapi/swag/.gitignore @@ -2,3 +2,4 @@ secrets.yml vendor Godeps .idea +*.out diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml index bf503e4000..80e2be0042 100644 --- a/vendor/github.com/go-openapi/swag/.golangci.yml +++ b/vendor/github.com/go-openapi/swag/.golangci.yml @@ -4,14 +4,14 @@ linters-settings: golint: min-confidence: 0 gocyclo: - min-complexity: 25 + min-complexity: 45 maligned: suggest-new: true dupl: - threshold: 100 + threshold: 200 goconst: min-len: 3 - min-occurrences: 2 + min-occurrences: 3 linters: enable-all: true @@ -20,35 +20,41 @@ linters: - lll - gochecknoinits - gochecknoglobals - - nlreturn - - testpackage + - funlen + - godox + - gocognit + - whitespace + - wsl - wrapcheck + - testpackage + - nlreturn - gomnd - - exhaustive - exhaustivestruct - goerr113 - - wsl - - whitespace - - gofumpt - - godot + - errorlint - nestif - - godox - - funlen - - gci - - gocognit + - godot + - gofumpt - paralleltest + - tparallel - thelper - ifshort - - gomoddirectives - - cyclop - - forcetypeassert - - ireturn - - tagliatelle - - varnamelen - - goimports - - tenv - - golint - exhaustruct - - nilnil + - varnamelen + - gci + - depguard + - errchkjson + - inamedparam - nonamedreturns + - musttag + - ireturn + - forcetypeassert + - cyclop + # deprecated linters + - deadcode + - interfacer + - scopelint + - varcheck + - structcheck + - golint - nosnakecase diff --git a/vendor/github.com/go-openapi/swag/BENCHMARK.md b/vendor/github.com/go-openapi/swag/BENCHMARK.md new file mode 100644 index 0000000000..e7f28ed6b7 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/BENCHMARK.md @@ -0,0 +1,52 @@ +# Benchmarks + +## Name mangling utilities + +```bash +go test -bench XXX -run XXX -benchtime 30s +``` + +### Benchmarks at b3e7a5386f996177e4808f11acb2aa93a0f660df + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op +BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op +BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op +``` + +### Benchmarks after PR #79 + +~ x10 performance improvement and ~ /100 memory allocations. + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op +``` + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: AMD Ryzen 7 5800X 8-Core Processor +BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op +``` diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md index 217f6fa505..a729222998 100644 --- a/vendor/github.com/go-openapi/swag/README.md +++ b/vendor/github.com/go-openapi/swag/README.md @@ -1,7 +1,8 @@ -# Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# Swag [![Build Status](https://github.com/go-openapi/swag/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/swag/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) +[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) -[![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/swag.svg)](https://pkg.go.dev/github.com/go-openapi/swag) [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag) Contains a bunch of helper functions for go-openapi and go-swagger projects. @@ -18,4 +19,5 @@ You may also use it standalone for your projects. This repo has only few dependencies outside of the standard library: -* YAML utilities depend on gopkg.in/yaml.v2 +* YAML utilities depend on `gopkg.in/yaml.v3` +* `github.com/mailru/easyjson v0.7.7` diff --git a/vendor/github.com/go-openapi/swag/initialism_index.go b/vendor/github.com/go-openapi/swag/initialism_index.go new file mode 100644 index 0000000000..20a359bb60 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/initialism_index.go @@ -0,0 +1,202 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "sort" + "strings" + "sync" +) + +var ( + // commonInitialisms are common acronyms that are kept as whole uppercased words. + commonInitialisms *indexOfInitialisms + + // initialisms is a slice of sorted initialisms + initialisms []string + + // a copy of initialisms pre-baked as []rune + initialismsRunes [][]rune + initialismsUpperCased [][]rune + + isInitialism func(string) bool + + maxAllocMatches int +) + +func init() { + // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 + configuredInitialisms := map[string]bool{ + "ACL": true, + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTPS": true, + "HTTP": true, + "ID": true, + "IP": true, + "IPv4": true, + "IPv6": true, + "JSON": true, + "LHS": true, + "OAI": true, + "QPS": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SQL": true, + "SSH": true, + "TCP": true, + "TLS": true, + "TTL": true, + "UDP": true, + "UI": true, + "UID": true, + "UUID": true, + "URI": true, + "URL": true, + "UTF8": true, + "VM": true, + "XML": true, + "XMPP": true, + "XSRF": true, + "XSS": true, + } + + // a thread-safe index of initialisms + commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) + maxAllocMatches = maxAllocHeuristic(initialismsRunes) + + // a test function + isInitialism = commonInitialisms.isInitialism +} + +func asRunes(in []string) [][]rune { + out := make([][]rune, len(in)) + for i, initialism := range in { + out[i] = []rune(initialism) + } + + return out +} + +func asUpperCased(in []string) [][]rune { + out := make([][]rune, len(in)) + + for i, initialism := range in { + out[i] = []rune(upper(trim(initialism))) + } + + return out +} + +func maxAllocHeuristic(in [][]rune) int { + heuristic := make(map[rune]int) + for _, initialism := range in { + heuristic[initialism[0]]++ + } + + var maxAlloc int + for _, val := range heuristic { + if val > maxAlloc { + maxAlloc = val + } + } + + return maxAlloc +} + +// AddInitialisms add additional initialisms +func AddInitialisms(words ...string) { + for _, word := range words { + // commonInitialisms[upper(word)] = true + commonInitialisms.add(upper(word)) + } + // sort again + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) +} + +// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. +// Since go1.9, this may be implemented with sync.Map. +type indexOfInitialisms struct { + sortMutex *sync.Mutex + index *sync.Map +} + +func newIndexOfInitialisms() *indexOfInitialisms { + return &indexOfInitialisms{ + sortMutex: new(sync.Mutex), + index: new(sync.Map), + } +} + +func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { + m.sortMutex.Lock() + defer m.sortMutex.Unlock() + for k, v := range initial { + m.index.Store(k, v) + } + return m +} + +func (m *indexOfInitialisms) isInitialism(key string) bool { + _, ok := m.index.Load(key) + return ok +} + +func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { + m.index.Store(key, true) + return m +} + +func (m *indexOfInitialisms) sorted() (result []string) { + m.sortMutex.Lock() + defer m.sortMutex.Unlock() + m.index.Range(func(key, _ interface{}) bool { + k := key.(string) + result = append(result, k) + return true + }) + sort.Sort(sort.Reverse(byInitialism(result))) + return +} + +type byInitialism []string + +func (s byInitialism) Len() int { + return len(s) +} +func (s byInitialism) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} +func (s byInitialism) Less(i, j int) bool { + if len(s[i]) != len(s[j]) { + return len(s[i]) < len(s[j]) + } + + return strings.Compare(s[i], s[j]) > 0 +} diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go index 00038c3773..783442fddf 100644 --- a/vendor/github.com/go-openapi/swag/loading.go +++ b/vendor/github.com/go-openapi/swag/loading.go @@ -21,6 +21,7 @@ import ( "net/http" "net/url" "os" + "path" "path/filepath" "runtime" "strings" @@ -40,43 +41,97 @@ var LoadHTTPBasicAuthPassword = "" var LoadHTTPCustomHeaders = map[string]string{} // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in -func LoadFromFileOrHTTP(path string) ([]byte, error) { - return LoadStrategy(path, os.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path) +func LoadFromFileOrHTTP(pth string) ([]byte, error) { + return LoadStrategy(pth, os.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(pth) } // LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in // timeout arg allows for per request overriding of the request timeout -func LoadFromFileOrHTTPWithTimeout(path string, timeout time.Duration) ([]byte, error) { - return LoadStrategy(path, os.ReadFile, loadHTTPBytes(timeout))(path) +func LoadFromFileOrHTTPWithTimeout(pth string, timeout time.Duration) ([]byte, error) { + return LoadStrategy(pth, os.ReadFile, loadHTTPBytes(timeout))(pth) } -// LoadStrategy returns a loader function for a given path or uri -func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) { - if strings.HasPrefix(path, "http") { +// LoadStrategy returns a loader function for a given path or URI. +// +// The load strategy returns the remote load for any path starting with `http`. +// So this works for any URI with a scheme `http` or `https`. +// +// The fallback strategy is to call the local loader. +// +// The local loader takes a local file system path (absolute or relative) as argument, +// or alternatively a `file://...` URI, **without host** (see also below for windows). +// +// There are a few liberalities, initially intended to be tolerant regarding the URI syntax, +// especially on windows. +// +// Before the local loader is called, the given path is transformed: +// - percent-encoded characters are unescaped +// - simple paths (e.g. `./folder/file`) are passed as-is +// - on windows, occurrences of `/` are replaced by `\`, so providing a relative path such a `folder/file` works too. +// +// For paths provided as URIs with the "file" scheme, please note that: +// - `file://` is simply stripped. +// This means that the host part of the URI is not parsed at all. +// For example, `file:///folder/file" becomes "/folder/file`, +// but `file://localhost/folder/file` becomes `localhost/folder/file` on unix systems. +// Similarly, `file://./folder/file` yields `./folder/file`. +// - on windows, `file://...` can take a host so as to specify an UNC share location. +// +// Reminder about windows-specifics: +// - `file://host/folder/file` becomes an UNC path like `\\host\folder\file` (no port specification is supported) +// - `file:///c:/folder/file` becomes `C:\folder\file` +// - `file://c:/folder/file` is tolerated (without leading `/`) and becomes `c:\folder\file` +func LoadStrategy(pth string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) { + if strings.HasPrefix(pth, "http") { return remote } - return func(pth string) ([]byte, error) { - upth, err := pathUnescape(pth) + + return func(p string) ([]byte, error) { + upth, err := url.PathUnescape(p) if err != nil { return nil, err } - if strings.HasPrefix(pth, `file://`) { - if runtime.GOOS == "windows" { - // support for canonical file URIs on windows. - // Zero tolerance here for dodgy URIs. - u, _ := url.Parse(upth) - if u.Host != "" { - // assume UNC name (volume share) - // file://host/share/folder\... ==> \\host\share\path\folder - // NOTE: UNC port not yet supported - upth = strings.Join([]string{`\`, u.Host, u.Path}, `\`) - } else { - // file:///c:/folder/... ==> just remove the leading slash - upth = strings.TrimPrefix(upth, `file:///`) - } - } else { - upth = strings.TrimPrefix(upth, `file://`) + if !strings.HasPrefix(p, `file://`) { + // regular file path provided: just normalize slashes + return local(filepath.FromSlash(upth)) + } + + if runtime.GOOS != "windows" { + // crude processing: this leaves full URIs with a host with a (mostly) unexpected result + upth = strings.TrimPrefix(upth, `file://`) + + return local(filepath.FromSlash(upth)) + } + + // windows-only pre-processing of file://... URIs + + // support for canonical file URIs on windows. + u, err := url.Parse(filepath.ToSlash(upth)) + if err != nil { + return nil, err + } + + if u.Host != "" { + // assume UNC name (volume share) + // NOTE: UNC port not yet supported + + // when the "host" segment is a drive letter: + // file://C:/folder/... => C:\folder + upth = path.Clean(strings.Join([]string{u.Host, u.Path}, `/`)) + if !strings.HasSuffix(u.Host, ":") && u.Host[0] != '.' { + // tolerance: if we have a leading dot, this can't be a host + // file://host/share/folder\... ==> \\host\share\path\folder + upth = "//" + upth + } + } else { + // no host, let's figure out if this is a drive letter + upth = strings.TrimPrefix(upth, `file://`) + first, _, _ := strings.Cut(strings.TrimPrefix(u.Path, "/"), "/") + if strings.HasSuffix(first, ":") { + // drive letter in the first segment: + // file:///c:/folder/... ==> strip the leading slash + upth = strings.TrimPrefix(upth, `/`) } } diff --git a/vendor/github.com/go-openapi/swag/name_lexem.go b/vendor/github.com/go-openapi/swag/name_lexem.go index aa7f6a9bb8..8bb64ac32f 100644 --- a/vendor/github.com/go-openapi/swag/name_lexem.go +++ b/vendor/github.com/go-openapi/swag/name_lexem.go @@ -14,74 +14,80 @@ package swag -import "unicode" +import ( + "unicode" + "unicode/utf8" +) type ( - nameLexem interface { - GetUnsafeGoName() string - GetOriginal() string - IsInitialism() bool - } + lexemKind uint8 - initialismNameLexem struct { + nameLexem struct { original string matchedInitialism string + kind lexemKind } +) - casualNameLexem struct { - original string - } +const ( + lexemKindCasualName lexemKind = iota + lexemKindInitialismName ) -func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem { - return &initialismNameLexem{ +func newInitialismNameLexem(original, matchedInitialism string) nameLexem { + return nameLexem{ + kind: lexemKindInitialismName, original: original, matchedInitialism: matchedInitialism, } } -func newCasualNameLexem(original string) *casualNameLexem { - return &casualNameLexem{ +func newCasualNameLexem(original string) nameLexem { + return nameLexem{ + kind: lexemKindCasualName, original: original, } } -func (l *initialismNameLexem) GetUnsafeGoName() string { - return l.matchedInitialism -} +func (l nameLexem) GetUnsafeGoName() string { + if l.kind == lexemKindInitialismName { + return l.matchedInitialism + } + + var ( + first rune + rest string + ) -func (l *casualNameLexem) GetUnsafeGoName() string { - var first rune - var rest string for i, orig := range l.original { if i == 0 { first = orig continue } + if i > 0 { rest = l.original[i:] break } } + if len(l.original) > 1 { - return string(unicode.ToUpper(first)) + lower(rest) + b := poolOfBuffers.BorrowBuffer(utf8.UTFMax + len(rest)) + defer func() { + poolOfBuffers.RedeemBuffer(b) + }() + b.WriteRune(unicode.ToUpper(first)) + b.WriteString(lower(rest)) + return b.String() } return l.original } -func (l *initialismNameLexem) GetOriginal() string { +func (l nameLexem) GetOriginal() string { return l.original } -func (l *casualNameLexem) GetOriginal() string { - return l.original -} - -func (l *initialismNameLexem) IsInitialism() bool { - return true -} - -func (l *casualNameLexem) IsInitialism() bool { - return false +func (l nameLexem) IsInitialism() bool { + return l.kind == lexemKindInitialismName } diff --git a/vendor/github.com/go-openapi/swag/post_go18.go b/vendor/github.com/go-openapi/swag/post_go18.go deleted file mode 100644 index f5228b82c0..0000000000 --- a/vendor/github.com/go-openapi/swag/post_go18.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build go1.8 -// +build go1.8 - -package swag - -import "net/url" - -func pathUnescape(path string) (string, error) { - return url.PathUnescape(path) -} diff --git a/vendor/github.com/go-openapi/swag/post_go19.go b/vendor/github.com/go-openapi/swag/post_go19.go deleted file mode 100644 index 7c7da9c088..0000000000 --- a/vendor/github.com/go-openapi/swag/post_go19.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build go1.9 -// +build go1.9 - -package swag - -import ( - "sort" - "sync" -) - -// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. -// Since go1.9, this may be implemented with sync.Map. -type indexOfInitialisms struct { - sortMutex *sync.Mutex - index *sync.Map -} - -func newIndexOfInitialisms() *indexOfInitialisms { - return &indexOfInitialisms{ - sortMutex: new(sync.Mutex), - index: new(sync.Map), - } -} - -func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { - m.sortMutex.Lock() - defer m.sortMutex.Unlock() - for k, v := range initial { - m.index.Store(k, v) - } - return m -} - -func (m *indexOfInitialisms) isInitialism(key string) bool { - _, ok := m.index.Load(key) - return ok -} - -func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { - m.index.Store(key, true) - return m -} - -func (m *indexOfInitialisms) sorted() (result []string) { - m.sortMutex.Lock() - defer m.sortMutex.Unlock() - m.index.Range(func(key, value interface{}) bool { - k := key.(string) - result = append(result, k) - return true - }) - sort.Sort(sort.Reverse(byInitialism(result))) - return -} diff --git a/vendor/github.com/go-openapi/swag/pre_go18.go b/vendor/github.com/go-openapi/swag/pre_go18.go deleted file mode 100644 index 2757d9b95f..0000000000 --- a/vendor/github.com/go-openapi/swag/pre_go18.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !go1.8 -// +build !go1.8 - -package swag - -import "net/url" - -func pathUnescape(path string) (string, error) { - return url.QueryUnescape(path) -} diff --git a/vendor/github.com/go-openapi/swag/pre_go19.go b/vendor/github.com/go-openapi/swag/pre_go19.go deleted file mode 100644 index 0565db377b..0000000000 --- a/vendor/github.com/go-openapi/swag/pre_go19.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !go1.9 -// +build !go1.9 - -package swag - -import ( - "sort" - "sync" -) - -// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. -// Before go1.9, this may be implemented with a mutex on the map. -type indexOfInitialisms struct { - getMutex *sync.Mutex - index map[string]bool -} - -func newIndexOfInitialisms() *indexOfInitialisms { - return &indexOfInitialisms{ - getMutex: new(sync.Mutex), - index: make(map[string]bool, 50), - } -} - -func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { - m.getMutex.Lock() - defer m.getMutex.Unlock() - for k, v := range initial { - m.index[k] = v - } - return m -} - -func (m *indexOfInitialisms) isInitialism(key string) bool { - m.getMutex.Lock() - defer m.getMutex.Unlock() - _, ok := m.index[key] - return ok -} - -func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { - m.getMutex.Lock() - defer m.getMutex.Unlock() - m.index[key] = true - return m -} - -func (m *indexOfInitialisms) sorted() (result []string) { - m.getMutex.Lock() - defer m.getMutex.Unlock() - for k := range m.index { - result = append(result, k) - } - sort.Sort(sort.Reverse(byInitialism(result))) - return -} diff --git a/vendor/github.com/go-openapi/swag/split.go b/vendor/github.com/go-openapi/swag/split.go index a1825fb7dc..274727a866 100644 --- a/vendor/github.com/go-openapi/swag/split.go +++ b/vendor/github.com/go-openapi/swag/split.go @@ -15,124 +15,269 @@ package swag import ( + "bytes" + "sync" "unicode" + "unicode/utf8" ) -var nameReplaceTable = map[rune]string{ - '@': "At ", - '&': "And ", - '|': "Pipe ", - '$': "Dollar ", - '!': "Bang ", - '-': "", - '_': "", -} - type ( splitter struct { - postSplitInitialismCheck bool initialisms []string + initialismsRunes [][]rune + initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version + postSplitInitialismCheck bool + } + + splitterOption func(*splitter) + + initialismMatch struct { + body []rune + start, end int + complete bool + } + initialismMatches []initialismMatch +) + +type ( + // memory pools of temporary objects. + // + // These are used to recycle temporarily allocated objects + // and relieve the GC from undue pressure. + + matchesPool struct { + *sync.Pool } - splitterOption func(*splitter) *splitter + buffersPool struct { + *sync.Pool + } + + lexemsPool struct { + *sync.Pool + } + + splittersPool struct { + *sync.Pool + } ) -// split calls the splitter; splitter provides more control and post options +var ( + // poolOfMatches holds temporary slices for recycling during the initialism match process + poolOfMatches = matchesPool{ + Pool: &sync.Pool{ + New: func() any { + s := make(initialismMatches, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfBuffers = buffersPool{ + Pool: &sync.Pool{ + New: func() any { + return new(bytes.Buffer) + }, + }, + } + + poolOfLexems = lexemsPool{ + Pool: &sync.Pool{ + New: func() any { + s := make([]nameLexem, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfSplitters = splittersPool{ + Pool: &sync.Pool{ + New: func() any { + s := newSplitter() + + return &s + }, + }, + } +) + +// nameReplaceTable finds a word representation for special characters. +func nameReplaceTable(r rune) (string, bool) { + switch r { + case '@': + return "At ", true + case '&': + return "And ", true + case '|': + return "Pipe ", true + case '$': + return "Dollar ", true + case '!': + return "Bang ", true + case '-': + return "", true + case '_': + return "", true + default: + return "", false + } +} + +// split calls the splitter. +// +// Use newSplitter for more control and options func split(str string) []string { - lexems := newSplitter().split(str) - result := make([]string, 0, len(lexems)) + s := poolOfSplitters.BorrowSplitter() + lexems := s.split(str) + result := make([]string, 0, len(*lexems)) - for _, lexem := range lexems { + for _, lexem := range *lexems { result = append(result, lexem.GetOriginal()) } + poolOfLexems.RedeemLexems(lexems) + poolOfSplitters.RedeemSplitter(s) return result } -func (s *splitter) split(str string) []nameLexem { - return s.toNameLexems(str) -} - -func newSplitter(options ...splitterOption) *splitter { - splitter := &splitter{ +func newSplitter(options ...splitterOption) splitter { + s := splitter{ postSplitInitialismCheck: false, initialisms: initialisms, + initialismsRunes: initialismsRunes, + initialismsUpperCased: initialismsUpperCased, } for _, option := range options { - splitter = option(splitter) + option(&s) } - return splitter + return s } // withPostSplitInitialismCheck allows to catch initialisms after main split process -func withPostSplitInitialismCheck(s *splitter) *splitter { +func withPostSplitInitialismCheck(s *splitter) { s.postSplitInitialismCheck = true +} + +func (p matchesPool) BorrowMatches() *initialismMatches { + s := p.Get().(*initialismMatches) + *s = (*s)[:0] // reset slice, keep allocated capacity + return s } -type ( - initialismMatch struct { - start, end int - body []rune - complete bool +func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer { + s := p.Get().(*bytes.Buffer) + s.Reset() + + if s.Cap() < size { + s.Grow(size) } - initialismMatches []*initialismMatch -) -func (s *splitter) toNameLexems(name string) []nameLexem { + return s +} + +func (p lexemsPool) BorrowLexems() *[]nameLexem { + s := p.Get().(*[]nameLexem) + *s = (*s)[:0] // reset slice, keep allocated capacity + + return s +} + +func (p splittersPool) BorrowSplitter(options ...splitterOption) *splitter { + s := p.Get().(*splitter) + s.postSplitInitialismCheck = false // reset options + for _, apply := range options { + apply(s) + } + + return s +} + +func (p matchesPool) RedeemMatches(s *initialismMatches) { + p.Put(s) +} + +func (p buffersPool) RedeemBuffer(s *bytes.Buffer) { + p.Put(s) +} + +func (p lexemsPool) RedeemLexems(s *[]nameLexem) { + p.Put(s) +} + +func (p splittersPool) RedeemSplitter(s *splitter) { + p.Put(s) +} + +func (m initialismMatch) isZero() bool { + return m.start == 0 && m.end == 0 +} + +func (s splitter) split(name string) *[]nameLexem { nameRunes := []rune(name) matches := s.gatherInitialismMatches(nameRunes) + if matches == nil { + return poolOfLexems.BorrowLexems() + } + return s.mapMatchesToNameLexems(nameRunes, matches) } -func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { - matches := make(initialismMatches, 0) +func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { + var matches *initialismMatches for currentRunePosition, currentRune := range nameRunes { - newMatches := make(initialismMatches, 0, len(matches)) + // recycle these allocations as we loop over runes + // with such recycling, only 2 slices should be allocated per call + // instead of o(n). + newMatches := poolOfMatches.BorrowMatches() // check current initialism matches - for _, match := range matches { - if keepCompleteMatch := match.complete; keepCompleteMatch { - newMatches = append(newMatches, match) - continue - } + if matches != nil { // skip first iteration + for _, match := range *matches { + if keepCompleteMatch := match.complete; keepCompleteMatch { + *newMatches = append(*newMatches, match) + continue + } - // drop failed match - currentMatchRune := match.body[currentRunePosition-match.start] - if !s.initialismRuneEqual(currentMatchRune, currentRune) { - continue - } + // drop failed match + currentMatchRune := match.body[currentRunePosition-match.start] + if currentMatchRune != currentRune { + continue + } - // try to complete ongoing match - if currentRunePosition-match.start == len(match.body)-1 { - // we are close; the next step is to check the symbol ahead - // if it is a small letter, then it is not the end of match - // but beginning of the next word - - if currentRunePosition < len(nameRunes)-1 { - nextRune := nameRunes[currentRunePosition+1] - if newWord := unicode.IsLower(nextRune); newWord { - // oh ok, it was the start of a new word - continue + // try to complete ongoing match + if currentRunePosition-match.start == len(match.body)-1 { + // we are close; the next step is to check the symbol ahead + // if it is a small letter, then it is not the end of match + // but beginning of the next word + + if currentRunePosition < len(nameRunes)-1 { + nextRune := nameRunes[currentRunePosition+1] + if newWord := unicode.IsLower(nextRune); newWord { + // oh ok, it was the start of a new word + continue + } } + + match.complete = true + match.end = currentRunePosition } - match.complete = true - match.end = currentRunePosition + *newMatches = append(*newMatches, match) } - - newMatches = append(newMatches, match) } // check for new initialism matches - for _, initialism := range s.initialisms { - initialismRunes := []rune(initialism) - if s.initialismRuneEqual(initialismRunes[0], currentRune) { - newMatches = append(newMatches, &initialismMatch{ + for i := range s.initialisms { + initialismRunes := s.initialismsRunes[i] + if initialismRunes[0] == currentRune { + *newMatches = append(*newMatches, initialismMatch{ start: currentRunePosition, body: initialismRunes, complete: false, @@ -140,24 +285,28 @@ func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { } } + if matches != nil { + poolOfMatches.RedeemMatches(matches) + } matches = newMatches } + // up to the caller to redeem this last slice return matches } -func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem { - nameLexems := make([]nameLexem, 0) +func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { + nameLexems := poolOfLexems.BorrowLexems() - var lastAcceptedMatch *initialismMatch - for _, match := range matches { + var lastAcceptedMatch initialismMatch + for _, match := range *matches { if !match.complete { continue } - if firstMatch := lastAcceptedMatch == nil; firstMatch { - nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + if firstMatch := lastAcceptedMatch.isZero(); firstMatch { + s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start]) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match @@ -169,63 +318,66 @@ func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMa } middle := nameRunes[lastAcceptedMatch.end+1 : match.start] - nameLexems = append(nameLexems, s.breakCasualString(middle)...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + s.appendBrokenDownCasualString(nameLexems, middle) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match } // we have not found any accepted matches - if lastAcceptedMatch == nil { - return s.breakCasualString(nameRunes) - } - - if lastAcceptedMatch.end+1 != len(nameRunes) { + if lastAcceptedMatch.isZero() { + *nameLexems = (*nameLexems)[:0] + s.appendBrokenDownCasualString(nameLexems, nameRunes) + } else if lastAcceptedMatch.end+1 != len(nameRunes) { rest := nameRunes[lastAcceptedMatch.end+1:] - nameLexems = append(nameLexems, s.breakCasualString(rest)...) + s.appendBrokenDownCasualString(nameLexems, rest) } - return nameLexems -} + poolOfMatches.RedeemMatches(matches) -func (s *splitter) initialismRuneEqual(a, b rune) bool { - return a == b + return nameLexems } -func (s *splitter) breakInitialism(original string) nameLexem { +func (s splitter) breakInitialism(original string) nameLexem { return newInitialismNameLexem(original, original) } -func (s *splitter) breakCasualString(str []rune) []nameLexem { - segments := make([]nameLexem, 0) - currentSegment := "" +func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) { + currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused + defer func() { + poolOfBuffers.RedeemBuffer(currentSegment) + }() addCasualNameLexem := func(original string) { - segments = append(segments, newCasualNameLexem(original)) + *segments = append(*segments, newCasualNameLexem(original)) } addInitialismNameLexem := func(original, match string) { - segments = append(segments, newInitialismNameLexem(original, match)) + *segments = append(*segments, newInitialismNameLexem(original, match)) } - addNameLexem := func(original string) { - if s.postSplitInitialismCheck { - for _, initialism := range s.initialisms { - if upper(initialism) == upper(original) { - addInitialismNameLexem(original, initialism) + var addNameLexem func(string) + if s.postSplitInitialismCheck { + addNameLexem = func(original string) { + for i := range s.initialisms { + if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) { + addInitialismNameLexem(original, s.initialisms[i]) + return } } - } - addCasualNameLexem(original) + addCasualNameLexem(original) + } + } else { + addNameLexem = addCasualNameLexem } - for _, rn := range string(str) { - if replace, found := nameReplaceTable[rn]; found { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + for _, rn := range str { + if replace, found := nameReplaceTable(rn); found { + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } if replace != "" { @@ -236,27 +388,121 @@ func (s *splitter) breakCasualString(str []rune) []nameLexem { } if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } continue } if unicode.IsUpper(rn) { - if currentSegment != "" { - addNameLexem(currentSegment) + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } - currentSegment = "" + currentSegment.Reset() } - currentSegment += string(rn) + currentSegment.WriteRune(rn) + } + + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } +} + +// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but +// it ignores leading and trailing blank spaces in the compared +// string. +// +// base is assumed to be composed of upper-cased runes, and be already +// trimmed. +// +// This code is heavily inspired from strings.EqualFold. +func isEqualFoldIgnoreSpace(base []rune, str string) bool { + var i, baseIndex int + // equivalent to b := []byte(str), but without data copy + b := hackStringBytes(str) + + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + break + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + break + } + i += size + } + + if i >= len(b) { + return len(base) == 0 + } + + for _, baseRune := range base { + if i >= len(b) { + break + } + + if c := b[i]; c < utf8.RuneSelf { + // single byte rune case (ASCII) + if baseRune >= utf8.RuneSelf { + return false + } + + baseChar := byte(baseRune) + if c != baseChar && + !('a' <= c && c <= 'z' && c-'a'+'A' == baseChar) { + return false + } + + baseIndex++ + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if unicode.ToUpper(r) != baseRune { + return false + } + baseIndex++ + i += size + } + + if baseIndex != len(base) { + return false + } + + // all passed: now we should only have blanks + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + return false + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + return false + } - if currentSegment != "" { - addNameLexem(currentSegment) + i += size } - return segments + return true } diff --git a/vendor/github.com/go-openapi/swag/string_bytes.go b/vendor/github.com/go-openapi/swag/string_bytes.go new file mode 100644 index 0000000000..90745d5ca9 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/string_bytes.go @@ -0,0 +1,8 @@ +package swag + +import "unsafe" + +// hackStringBytes returns the (unsafe) underlying bytes slice of a string. +func hackStringBytes(str string) []byte { + return unsafe.Slice(unsafe.StringData(str), len(str)) +} diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go index d971fbe34b..5051401c49 100644 --- a/vendor/github.com/go-openapi/swag/util.go +++ b/vendor/github.com/go-openapi/swag/util.go @@ -18,76 +18,25 @@ import ( "reflect" "strings" "unicode" + "unicode/utf8" ) -// commonInitialisms are common acronyms that are kept as whole uppercased words. -var commonInitialisms *indexOfInitialisms - -// initialisms is a slice of sorted initialisms -var initialisms []string - -var isInitialism func(string) bool - // GoNamePrefixFunc sets an optional rule to prefix go names // which do not start with a letter. // +// The prefix function is assumed to return a string that starts with an upper case letter. +// // e.g. to help convert "123" into "{prefix}123" // // The default is to prefix with "X" var GoNamePrefixFunc func(string) string -func init() { - // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 - var configuredInitialisms = map[string]bool{ - "ACL": true, - "API": true, - "ASCII": true, - "CPU": true, - "CSS": true, - "DNS": true, - "EOF": true, - "GUID": true, - "HTML": true, - "HTTPS": true, - "HTTP": true, - "ID": true, - "IP": true, - "IPv4": true, - "IPv6": true, - "JSON": true, - "LHS": true, - "OAI": true, - "QPS": true, - "RAM": true, - "RHS": true, - "RPC": true, - "SLA": true, - "SMTP": true, - "SQL": true, - "SSH": true, - "TCP": true, - "TLS": true, - "TTL": true, - "UDP": true, - "UI": true, - "UID": true, - "UUID": true, - "URI": true, - "URL": true, - "UTF8": true, - "VM": true, - "XML": true, - "XMPP": true, - "XSRF": true, - "XSS": true, +func prefixFunc(name, in string) string { + if GoNamePrefixFunc == nil { + return "X" + in } - // a thread-safe index of initialisms - commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) - initialisms = commonInitialisms.sorted() - - // a test function - isInitialism = commonInitialisms.isInitialism + return GoNamePrefixFunc(name) + in } const ( @@ -156,25 +105,9 @@ func SplitByFormat(data, format string) []string { return result } -type byInitialism []string - -func (s byInitialism) Len() int { - return len(s) -} -func (s byInitialism) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} -func (s byInitialism) Less(i, j int) bool { - if len(s[i]) != len(s[j]) { - return len(s[i]) < len(s[j]) - } - - return strings.Compare(s[i], s[j]) > 0 -} - // Removes leading whitespaces func trim(str string) string { - return strings.Trim(str, " ") + return strings.TrimSpace(str) } // Shortcut to strings.ToUpper() @@ -188,15 +121,20 @@ func lower(str string) string { } // Camelize an uppercased word -func Camelize(word string) (camelized string) { +func Camelize(word string) string { + camelized := poolOfBuffers.BorrowBuffer(len(word)) + defer func() { + poolOfBuffers.RedeemBuffer(camelized) + }() + for pos, ru := range []rune(word) { if pos > 0 { - camelized += string(unicode.ToLower(ru)) + camelized.WriteRune(unicode.ToLower(ru)) } else { - camelized += string(unicode.ToUpper(ru)) + camelized.WriteRune(unicode.ToUpper(ru)) } } - return + return camelized.String() } // ToFileName lowercases and underscores a go type name @@ -224,33 +162,40 @@ func ToCommandName(name string) string { // ToHumanNameLower represents a code name as a human series of words func ToHumanNameLower(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) - out := make([]string, 0, len(in)) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) + out := make([]string, 0, len(*in)) - for _, w := range in { + for _, w := range *in { if !w.IsInitialism() { out = append(out, lower(w.GetOriginal())) } else { - out = append(out, w.GetOriginal()) + out = append(out, trim(w.GetOriginal())) } } + poolOfLexems.RedeemLexems(in) return strings.Join(out, " ") } // ToHumanNameTitle represents a code name as a human series of words with the first letters titleized func ToHumanNameTitle(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) - out := make([]string, 0, len(in)) - for _, w := range in { - original := w.GetOriginal() + out := make([]string, 0, len(*in)) + for _, w := range *in { + original := trim(w.GetOriginal()) if !w.IsInitialism() { out = append(out, Camelize(original)) } else { out = append(out, original) } } + poolOfLexems.RedeemLexems(in) + return strings.Join(out, " ") } @@ -264,7 +209,7 @@ func ToJSONName(name string) string { out = append(out, lower(w)) continue } - out = append(out, Camelize(w)) + out = append(out, Camelize(trim(w))) } return strings.Join(out, "") } @@ -283,35 +228,70 @@ func ToVarName(name string) string { // ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes func ToGoName(name string) string { - lexems := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + lexems := s.split(name) + poolOfSplitters.RedeemSplitter(s) + defer func() { + poolOfLexems.RedeemLexems(lexems) + }() + lexemes := *lexems + + if len(lexemes) == 0 { + return "" + } + + result := poolOfBuffers.BorrowBuffer(len(name)) + defer func() { + poolOfBuffers.RedeemBuffer(result) + }() + + // check if not starting with a letter, upper case + firstPart := lexemes[0].GetUnsafeGoName() + if lexemes[0].IsInitialism() { + firstPart = upper(firstPart) + } + + if c := firstPart[0]; c < utf8.RuneSelf { + // ASCII + switch { + case 'A' <= c && c <= 'Z': + result.WriteString(firstPart) + case 'a' <= c && c <= 'z': + result.WriteByte(c - 'a' + 'A') + result.WriteString(firstPart[1:]) + default: + result.WriteString(prefixFunc(name, firstPart)) + // NOTE: no longer check if prefixFunc returns a string that starts with uppercase: + // assume this is always the case + } + } else { + // unicode + firstRune, _ := utf8.DecodeRuneInString(firstPart) + switch { + case !unicode.IsLetter(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + case !unicode.IsUpper(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + /* + result.WriteRune(unicode.ToUpper(firstRune)) + result.WriteString(firstPart[offset:]) + */ + default: + result.WriteString(firstPart) + } + } - result := "" - for _, lexem := range lexems { + for _, lexem := range lexemes[1:] { goName := lexem.GetUnsafeGoName() // to support old behavior if lexem.IsInitialism() { goName = upper(goName) } - result += goName + result.WriteString(goName) } - if len(result) > 0 { - // Only prefix with X when the first character isn't an ascii letter - first := []rune(result)[0] - if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) { - if GoNamePrefixFunc == nil { - return "X" + result - } - result = GoNamePrefixFunc(name) + result - } - first = []rune(result)[0] - if unicode.IsLetter(first) && !unicode.IsUpper(first) { - result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...)) - } - } - - return result + return result.String() } // ContainsStrings searches a slice of strings for a case-sensitive match @@ -343,7 +323,7 @@ type zeroable interface { func IsZero(data interface{}) bool { v := reflect.ValueOf(data) // check for nil data - switch v.Kind() { + switch v.Kind() { //nolint:exhaustive case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: if v.IsNil() { return true @@ -356,7 +336,7 @@ func IsZero(data interface{}) bool { } // continue with slightly more complex reflection - switch v.Kind() { + switch v.Kind() { //nolint:exhaustive case reflect.String: return v.Len() == 0 case reflect.Bool: @@ -376,16 +356,6 @@ func IsZero(data interface{}) bool { } } -// AddInitialisms add additional initialisms -func AddInitialisms(words ...string) { - for _, word := range words { - // commonInitialisms[upper(word)] = true - commonInitialisms.add(upper(word)) - } - // sort again - initialisms = commonInitialisms.sorted() -} - // CommandLineOptionsGroup represents a group of user-defined command line options type CommandLineOptionsGroup struct { ShortDescription string diff --git a/vendor/github.com/go-openapi/swag/yaml.go b/vendor/github.com/go-openapi/swag/yaml.go index f09ee609f3..f59e025932 100644 --- a/vendor/github.com/go-openapi/swag/yaml.go +++ b/vendor/github.com/go-openapi/swag/yaml.go @@ -16,8 +16,11 @@ package swag import ( "encoding/json" + "errors" "fmt" "path/filepath" + "reflect" + "sort" "strconv" "github.com/mailru/easyjson/jlexer" @@ -48,7 +51,7 @@ func BytesToYAMLDoc(data []byte) (interface{}, error) { return nil, err } if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode { - return nil, fmt.Errorf("only YAML documents that are objects are supported") + return nil, errors.New("only YAML documents that are objects are supported") } return &document, nil } @@ -147,7 +150,7 @@ func yamlScalar(node *yaml.Node) (interface{}, error) { case yamlTimestamp: return node.Value, nil case yamlNull: - return nil, nil + return nil, nil //nolint:nilnil default: return nil, fmt.Errorf("YAML tag %q is not supported", node.LongTag()) } @@ -245,7 +248,27 @@ func (s JSONMapSlice) MarshalYAML() (interface{}, error) { return yaml.Marshal(&n) } +func isNil(input interface{}) bool { + if input == nil { + return true + } + kind := reflect.TypeOf(input).Kind() + switch kind { //nolint:exhaustive + case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: + return reflect.ValueOf(input).IsNil() + default: + return false + } +} + func json2yaml(item interface{}) (*yaml.Node, error) { + if isNil(item) { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Value: "null", + }, nil + } + switch val := item.(type) { case JSONMapSlice: var n yaml.Node @@ -265,7 +288,14 @@ func json2yaml(item interface{}) (*yaml.Node, error) { case map[string]interface{}: var n yaml.Node n.Kind = yaml.MappingNode - for k, v := range val { + keys := make([]string, 0, len(val)) + for k := range val { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := val[k] childNode, err := json2yaml(v) if err != nil { return nil, err @@ -318,8 +348,9 @@ func json2yaml(item interface{}) (*yaml.Node, error) { Tag: yamlBoolScalar, Value: strconv.FormatBool(val), }, nil + default: + return nil, fmt.Errorf("unhandled type: %T", val) } - return nil, nil } // JSONMapItem represents the value of a key in a JSON object held by JSONMapSlice diff --git a/vendor/github.com/imdario/mergo/.gitignore b/vendor/github.com/imdario/mergo/.gitignore deleted file mode 100644 index 529c3412ba..0000000000 --- a/vendor/github.com/imdario/mergo/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -#### joe made this: http://goel.io/joe - -#### go #### -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - -#### vim #### -# Swap -[._]*.s[a-v][a-z] -[._]*.sw[a-p] -[._]s[a-v][a-z] -[._]sw[a-p] - -# Session -Session.vim - -# Temporary -.netrwhist -*~ -# Auto-generated tag files -tags diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml deleted file mode 100644 index b13a50ed1f..0000000000 --- a/vendor/github.com/imdario/mergo/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -install: - - go get -t - - go get golang.org/x/tools/cmd/cover - - go get github.com/mattn/goveralls -script: - - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md deleted file mode 100644 index 469b44907a..0000000000 --- a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/imdario/mergo/LICENSE b/vendor/github.com/imdario/mergo/LICENSE deleted file mode 100644 index 686680298d..0000000000 --- a/vendor/github.com/imdario/mergo/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2013 Dario Castañé. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md deleted file mode 100644 index 8b76f1fbf3..0000000000 --- a/vendor/github.com/imdario/mergo/README.md +++ /dev/null @@ -1,222 +0,0 @@ -# Mergo - -A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. - -Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. - -## Status - -It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc](https://github.com/imdario/mergo#mergo-in-the-wild). - -[![GoDoc][3]][4] -[![GoCard][5]][6] -[![Build Status][1]][2] -[![Coverage Status][7]][8] -[![Sourcegraph][9]][10] - -[1]: https://travis-ci.org/imdario/mergo.png -[2]: https://travis-ci.org/imdario/mergo -[3]: https://godoc.org/github.com/imdario/mergo?status.svg -[4]: https://godoc.org/github.com/imdario/mergo -[5]: https://goreportcard.com/badge/imdario/mergo -[6]: https://goreportcard.com/report/github.com/imdario/mergo -[7]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master -[8]: https://coveralls.io/github/imdario/mergo?branch=master -[9]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg -[10]: https://sourcegraph.com/github.com/imdario/mergo?badge - -### Latest release - -[Release v0.3.6](https://github.com/imdario/mergo/releases/tag/v0.3.6). - -### Important note - -Please keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2) Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). An optional/variadic argument has been added, so it won't break existing code. - -If you were using Mergo **before** April 6th 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause (I hope it won't!) in existing projects after the change (release 0.2.0). - -### Donations - -If Mergo is useful to you, consider buying me a coffee, a beer or making a monthly donation so I can keep building great free software. :heart_eyes: - -Buy Me a Coffee at ko-fi.com -[![Beerpay](https://beerpay.io/imdario/mergo/badge.svg)](https://beerpay.io/imdario/mergo) -[![Beerpay](https://beerpay.io/imdario/mergo/make-wish.svg)](https://beerpay.io/imdario/mergo) -Donate using Liberapay - -### Mergo in the wild - -- [moby/moby](https://github.com/moby/moby) -- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) -- [vmware/dispatch](https://github.com/vmware/dispatch) -- [Shopify/themekit](https://github.com/Shopify/themekit) -- [imdario/zas](https://github.com/imdario/zas) -- [matcornic/hermes](https://github.com/matcornic/hermes) -- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go) -- [kataras/iris](https://github.com/kataras/iris) -- [michaelsauter/crane](https://github.com/michaelsauter/crane) -- [go-task/task](https://github.com/go-task/task) -- [sensu/uchiwa](https://github.com/sensu/uchiwa) -- [ory/hydra](https://github.com/ory/hydra) -- [sisatech/vcli](https://github.com/sisatech/vcli) -- [dairycart/dairycart](https://github.com/dairycart/dairycart) -- [projectcalico/felix](https://github.com/projectcalico/felix) -- [resin-os/balena](https://github.com/resin-os/balena) -- [go-kivik/kivik](https://github.com/go-kivik/kivik) -- [Telefonica/govice](https://github.com/Telefonica/govice) -- [supergiant/supergiant](supergiant/supergiant) -- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce) -- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) -- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel) -- [EagerIO/Stout](https://github.com/EagerIO/Stout) -- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api) -- [russross/canvasassignments](https://github.com/russross/canvasassignments) -- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api) -- [casualjim/exeggutor](https://github.com/casualjim/exeggutor) -- [divshot/gitling](https://github.com/divshot/gitling) -- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) -- [andrerocker/deploy42](https://github.com/andrerocker/deploy42) -- [elwinar/rambler](https://github.com/elwinar/rambler) -- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman) -- [jfbus/impressionist](https://github.com/jfbus/impressionist) -- [Jmeyering/zealot](https://github.com/Jmeyering/zealot) -- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host) -- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go) -- [thoas/picfit](https://github.com/thoas/picfit) -- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) -- [jnuthong/item_search](https://github.com/jnuthong/item_search) -- [bukalapak/snowboard](https://github.com/bukalapak/snowboard) - -## Installation - - go get github.com/imdario/mergo - - // use in your .go code - import ( - "github.com/imdario/mergo" - ) - -## Usage - -You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are not considered zero values](https://golang.org/ref/spec#The_zero_value) either. Also maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). - -```go -if err := mergo.Merge(&dst, src); err != nil { - // ... -} -``` - -Also, you can merge overwriting values using the transformer `WithOverride`. - -```go -if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { - // ... -} -``` - -Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field. - -```go -if err := mergo.Map(&dst, srcMap); err != nil { - // ... -} -``` - -Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. - -More information and examples in [godoc documentation](http://godoc.org/github.com/imdario/mergo). - -### Nice example - -```go -package main - -import ( - "fmt" - "github.com/imdario/mergo" -) - -type Foo struct { - A string - B int64 -} - -func main() { - src := Foo{ - A: "one", - B: 2, - } - dest := Foo{ - A: "two", - } - mergo.Merge(&dest, src) - fmt.Println(dest) - // Will print - // {two 2} -} -``` - -Note: if test are failing due missing package, please execute: - - go get gopkg.in/yaml.v2 - -### Transformers - -Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`? - -```go -package main - -import ( - "fmt" - "github.com/imdario/mergo" - "reflect" - "time" -) - -type timeTransfomer struct { -} - -func (t timeTransfomer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { - if typ == reflect.TypeOf(time.Time{}) { - return func(dst, src reflect.Value) error { - if dst.CanSet() { - isZero := dst.MethodByName("IsZero") - result := isZero.Call([]reflect.Value{}) - if result[0].Bool() { - dst.Set(src) - } - } - return nil - } - } - return nil -} - -type Snapshot struct { - Time time.Time - // ... -} - -func main() { - src := Snapshot{time.Now()} - dest := Snapshot{} - mergo.Merge(&dest, src, mergo.WithTransformers(timeTransfomer{})) - fmt.Println(dest) - // Will print - // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } -} -``` - - -## Contact me - -If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario) - -## About - -Written by [Dario Castañé](http://dario.im). - -## License - -[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE). diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go deleted file mode 100644 index 6e9aa7baf3..0000000000 --- a/vendor/github.com/imdario/mergo/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -Package mergo merges same-type structs and maps by setting default values in zero-value fields. - -Mergo won't merge unexported (private) fields but will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). - -Usage - -From my own work-in-progress project: - - type networkConfig struct { - Protocol string - Address string - ServerType string `json: "server_type"` - Port uint16 - } - - type FssnConfig struct { - Network networkConfig - } - - var fssnDefault = FssnConfig { - networkConfig { - "tcp", - "127.0.0.1", - "http", - 31560, - }, - } - - // Inside a function [...] - - if err := mergo.Merge(&config, fssnDefault); err != nil { - log.Fatal(err) - } - - // More code [...] - -*/ -package mergo diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go deleted file mode 100644 index 6ea38e636b..0000000000 --- a/vendor/github.com/imdario/mergo/map.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2014 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Based on src/pkg/reflect/deepequal.go from official -// golang's stdlib. - -package mergo - -import ( - "fmt" - "reflect" - "unicode" - "unicode/utf8" -) - -func changeInitialCase(s string, mapper func(rune) rune) string { - if s == "" { - return s - } - r, n := utf8.DecodeRuneInString(s) - return string(mapper(r)) + s[n:] -} - -func isExported(field reflect.StructField) bool { - r, _ := utf8.DecodeRuneInString(field.Name) - return r >= 'A' && r <= 'Z' -} - -// Traverses recursively both values, assigning src's fields values to dst. -// The map argument tracks comparisons that have already been seen, which allows -// short circuiting on recursive types. -func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { - overwrite := config.Overwrite - if dst.CanAddr() { - addr := dst.UnsafeAddr() - h := 17 * addr - seen := visited[h] - typ := dst.Type() - for p := seen; p != nil; p = p.next { - if p.ptr == addr && p.typ == typ { - return nil - } - } - // Remember, remember... - visited[h] = &visit{addr, typ, seen} - } - zeroValue := reflect.Value{} - switch dst.Kind() { - case reflect.Map: - dstMap := dst.Interface().(map[string]interface{}) - for i, n := 0, src.NumField(); i < n; i++ { - srcType := src.Type() - field := srcType.Field(i) - if !isExported(field) { - continue - } - fieldName := field.Name - fieldName = changeInitialCase(fieldName, unicode.ToLower) - if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v)) || overwrite) { - dstMap[fieldName] = src.Field(i).Interface() - } - } - case reflect.Ptr: - if dst.IsNil() { - v := reflect.New(dst.Type().Elem()) - dst.Set(v) - } - dst = dst.Elem() - fallthrough - case reflect.Struct: - srcMap := src.Interface().(map[string]interface{}) - for key := range srcMap { - srcValue := srcMap[key] - fieldName := changeInitialCase(key, unicode.ToUpper) - dstElement := dst.FieldByName(fieldName) - if dstElement == zeroValue { - // We discard it because the field doesn't exist. - continue - } - srcElement := reflect.ValueOf(srcValue) - dstKind := dstElement.Kind() - srcKind := srcElement.Kind() - if srcKind == reflect.Ptr && dstKind != reflect.Ptr { - srcElement = srcElement.Elem() - srcKind = reflect.TypeOf(srcElement.Interface()).Kind() - } else if dstKind == reflect.Ptr { - // Can this work? I guess it can't. - if srcKind != reflect.Ptr && srcElement.CanAddr() { - srcPtr := srcElement.Addr() - srcElement = reflect.ValueOf(srcPtr) - srcKind = reflect.Ptr - } - } - - if !srcElement.IsValid() { - continue - } - if srcKind == dstKind { - if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { - if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } else if srcKind == reflect.Map { - if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } else { - return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) - } - } - } - return -} - -// Map sets fields' values in dst from src. -// src can be a map with string keys or a struct. dst must be the opposite: -// if src is a map, dst must be a valid pointer to struct. If src is a struct, -// dst must be map[string]interface{}. -// It won't merge unexported (private) fields and will do recursively -// any exported field. -// If dst is a map, keys will be src fields' names in lower camel case. -// Missing key in src that doesn't match a field in dst will be skipped. This -// doesn't apply if dst is a map. -// This is separated method from Merge because it is cleaner and it keeps sane -// semantics: merging equal types, mapping different (restricted) types. -func Map(dst, src interface{}, opts ...func(*Config)) error { - return _map(dst, src, opts...) -} - -// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by -// non-empty src attribute values. -// Deprecated: Use Map(…) with WithOverride -func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { - return _map(dst, src, append(opts, WithOverride)...) -} - -func _map(dst, src interface{}, opts ...func(*Config)) error { - var ( - vDst, vSrc reflect.Value - err error - ) - config := &Config{} - - for _, opt := range opts { - opt(config) - } - - if vDst, vSrc, err = resolveValues(dst, src); err != nil { - return err - } - // To be friction-less, we redirect equal-type arguments - // to deepMerge. Only because arguments can be anything. - if vSrc.Kind() == vDst.Kind() { - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) - } - switch vSrc.Kind() { - case reflect.Struct: - if vDst.Kind() != reflect.Map { - return ErrExpectedMapAsDestination - } - case reflect.Map: - if vDst.Kind() != reflect.Struct { - return ErrExpectedStructAsDestination - } - default: - return ErrNotSupported - } - return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config) -} diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go deleted file mode 100644 index 44f70a89d9..0000000000 --- a/vendor/github.com/imdario/mergo/merge.go +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Based on src/pkg/reflect/deepequal.go from official -// golang's stdlib. - -package mergo - -import ( - "fmt" - "reflect" -) - -func hasExportedField(dst reflect.Value) (exported bool) { - for i, n := 0, dst.NumField(); i < n; i++ { - field := dst.Type().Field(i) - if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { - exported = exported || hasExportedField(dst.Field(i)) - } else { - exported = exported || len(field.PkgPath) == 0 - } - } - return -} - -type Config struct { - Overwrite bool - AppendSlice bool - Transformers Transformers -} - -type Transformers interface { - Transformer(reflect.Type) func(dst, src reflect.Value) error -} - -// Traverses recursively both values, assigning src's fields values to dst. -// The map argument tracks comparisons that have already been seen, which allows -// short circuiting on recursive types. -func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { - overwrite := config.Overwrite - - if !src.IsValid() { - return - } - if dst.CanAddr() { - addr := dst.UnsafeAddr() - h := 17 * addr - seen := visited[h] - typ := dst.Type() - for p := seen; p != nil; p = p.next { - if p.ptr == addr && p.typ == typ { - return nil - } - } - // Remember, remember... - visited[h] = &visit{addr, typ, seen} - } - - if config.Transformers != nil && !isEmptyValue(dst) { - if fn := config.Transformers.Transformer(dst.Type()); fn != nil { - err = fn(dst, src) - return - } - } - - switch dst.Kind() { - case reflect.Struct: - if hasExportedField(dst) { - for i, n := 0, dst.NumField(); i < n; i++ { - if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { - return - } - } - } else { - if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { - dst.Set(src) - } - } - case reflect.Map: - if dst.IsNil() && !src.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - for _, key := range src.MapKeys() { - srcElement := src.MapIndex(key) - if !srcElement.IsValid() { - continue - } - dstElement := dst.MapIndex(key) - switch srcElement.Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: - if srcElement.IsNil() { - continue - } - fallthrough - default: - if !srcElement.CanInterface() { - continue - } - switch reflect.TypeOf(srcElement.Interface()).Kind() { - case reflect.Struct: - fallthrough - case reflect.Ptr: - fallthrough - case reflect.Map: - srcMapElm := srcElement - dstMapElm := dstElement - if srcMapElm.CanInterface() { - srcMapElm = reflect.ValueOf(srcMapElm.Interface()) - if dstMapElm.IsValid() { - dstMapElm = reflect.ValueOf(dstMapElm.Interface()) - } - } - if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { - return - } - case reflect.Slice: - srcSlice := reflect.ValueOf(srcElement.Interface()) - - var dstSlice reflect.Value - if !dstElement.IsValid() || dstElement.IsNil() { - dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) - } else { - dstSlice = reflect.ValueOf(dstElement.Interface()) - } - - if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { - dstSlice = srcSlice - } else if config.AppendSlice { - if srcSlice.Type() != dstSlice.Type() { - return fmt.Errorf("cannot append two slice with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) - } - dstSlice = reflect.AppendSlice(dstSlice, srcSlice) - } - dst.SetMapIndex(key, dstSlice) - } - } - if dstElement.IsValid() && reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map { - continue - } - - if srcElement.IsValid() && (overwrite || (!dstElement.IsValid() || isEmptyValue(dstElement))) { - if dst.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - dst.SetMapIndex(key, srcElement) - } - } - case reflect.Slice: - if !dst.CanSet() { - break - } - if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { - dst.Set(src) - } else if config.AppendSlice { - if src.Type() != dst.Type() { - return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) - } - dst.Set(reflect.AppendSlice(dst, src)) - } - case reflect.Ptr: - fallthrough - case reflect.Interface: - if src.IsNil() { - break - } - if src.Kind() != reflect.Interface { - if dst.IsNil() || overwrite { - if dst.CanSet() && (overwrite || isEmptyValue(dst)) { - dst.Set(src) - } - } else if src.Kind() == reflect.Ptr { - if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { - return - } - } else if dst.Elem().Type() == src.Type() { - if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { - return - } - } else { - return ErrDifferentArgumentsTypes - } - break - } - if dst.IsNil() || overwrite { - if dst.CanSet() && (overwrite || isEmptyValue(dst)) { - dst.Set(src) - } - } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { - return - } - default: - if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { - dst.Set(src) - } - } - return -} - -// Merge will fill any empty for value type attributes on the dst struct using corresponding -// src attributes if they themselves are not empty. dst and src must be valid same-type structs -// and dst must be a pointer to struct. -// It won't merge unexported (private) fields and will do recursively any exported field. -func Merge(dst, src interface{}, opts ...func(*Config)) error { - return merge(dst, src, opts...) -} - -// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overriden by -// non-empty src attribute values. -// Deprecated: use Merge(…) with WithOverride -func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { - return merge(dst, src, append(opts, WithOverride)...) -} - -// WithTransformers adds transformers to merge, allowing to customize the merging of some types. -func WithTransformers(transformers Transformers) func(*Config) { - return func(config *Config) { - config.Transformers = transformers - } -} - -// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values. -func WithOverride(config *Config) { - config.Overwrite = true -} - -// WithAppendSlice will make merge append slices instead of overwriting it -func WithAppendSlice(config *Config) { - config.AppendSlice = true -} - -func merge(dst, src interface{}, opts ...func(*Config)) error { - var ( - vDst, vSrc reflect.Value - err error - ) - - config := &Config{} - - for _, opt := range opts { - opt(config) - } - - if vDst, vSrc, err = resolveValues(dst, src); err != nil { - return err - } - if vDst.Type() != vSrc.Type() { - return ErrDifferentArgumentsTypes - } - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) -} diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go deleted file mode 100644 index a82fea2fdc..0000000000 --- a/vendor/github.com/imdario/mergo/mergo.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Based on src/pkg/reflect/deepequal.go from official -// golang's stdlib. - -package mergo - -import ( - "errors" - "reflect" -) - -// Errors reported by Mergo when it finds invalid arguments. -var ( - ErrNilArguments = errors.New("src and dst must not be nil") - ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type") - ErrNotSupported = errors.New("only structs and maps are supported") - ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") - ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") -) - -// During deepMerge, must keep track of checks that are -// in progress. The comparison algorithm assumes that all -// checks in progress are true when it reencounters them. -// Visited are stored in a map indexed by 17 * a1 + a2; -type visit struct { - ptr uintptr - typ reflect.Type - next *visit -} - -// From src/pkg/encoding/json/encode.go. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - if v.IsNil() { - return true - } - return isEmptyValue(v.Elem()) - case reflect.Func: - return v.IsNil() - case reflect.Invalid: - return true - } - return false -} - -func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { - if dst == nil || src == nil { - err = ErrNilArguments - return - } - vDst = reflect.ValueOf(dst).Elem() - if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map { - err = ErrNotSupported - return - } - vSrc = reflect.ValueOf(src) - // We check if vSrc is a pointer to dereference it. - if vSrc.Kind() == reflect.Ptr { - vSrc = vSrc.Elem() - } - return -} - -// Traverses recursively both values, assigning src's fields values to dst. -// The map argument tracks comparisons that have already been seen, which allows -// short circuiting on recursive types. -func deeper(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { - if dst.CanAddr() { - addr := dst.UnsafeAddr() - h := 17 * addr - seen := visited[h] - typ := dst.Type() - for p := seen; p != nil; p = p.next { - if p.ptr == addr && p.typ == typ { - return nil - } - } - // Remember, remember... - visited[h] = &visit{addr, typ, seen} - } - return // TODO refactor -} diff --git a/vendor/github.com/openshift/api/openapi/openapi.json b/vendor/github.com/openshift/api/openapi/openapi.json index f43d361346..662ad190d8 100644 --- a/vendor/github.com/openshift/api/openapi/openapi.json +++ b/vendor/github.com/openshift/api/openapi/openapi.json @@ -28417,7 +28417,7 @@ "type": "object", "properties": { "format": { - "description": "format specifies the format for the injected HTTP header's value. This field has no effect unless name is specified. For the HAProxy-based ingress controller implementation, this format uses the same syntax as the HTTP log format. If the field is empty, the default value is \"%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid\"; see the corresponding HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3", + "description": "format specifies the format for the injected HTTP header's value. This field has no effect unless name is specified. For the HAProxy-based ingress controller implementation, this format uses the same syntax as the HTTP log format. If the field is empty, the default value is \"%{+X}o\\\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid\"; see the corresponding HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3", "type": "string" }, "name": { @@ -30394,7 +30394,7 @@ "x-kubernetes-list-type": "atomic" }, "name": { - "description": "name represents the service name of a systemd service managed through a MachineConfig Actions specified will be applied for changes to the named service. Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", + "description": "name represents the service name of a systemd service managed through a MachineConfig Actions specified will be applied for changes to the named service. Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\\\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", "type": "string", "default": "" } @@ -30500,7 +30500,7 @@ "x-kubernetes-list-type": "atomic" }, "name": { - "description": "name represents the service name of a systemd service managed through a MachineConfig Actions specified will be applied for changes to the named service. Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", + "description": "name represents the service name of a systemd service managed through a MachineConfig Actions specified will be applied for changes to the named service. Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\\\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", "type": "string", "default": "" } @@ -31493,7 +31493,7 @@ ], "properties": { "serviceName": { - "description": "serviceName is the full name (e.g. crio.service) of the service to be reloaded Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", + "description": "serviceName is the full name (e.g. crio.service) of the service to be reloaded Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\\\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", "type": "string", "default": "" } @@ -31529,7 +31529,7 @@ ], "properties": { "serviceName": { - "description": "serviceName is the full name (e.g. crio.service) of the service to be restarted Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", + "description": "serviceName is the full name (e.g. crio.service) of the service to be restarted Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\\\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", "type": "string", "default": "" } @@ -37957,7 +37957,7 @@ } }, "io.k8s.api.core.v1.Binding": { - "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler.", "type": "object", "required": [ "target" @@ -37984,7 +37984,7 @@ } }, "io.k8s.api.core.v1.CSIPersistentVolumeSource": { - "description": "Represents storage that is managed by an external CSI volume driver (Beta feature)", + "description": "Represents storage that is managed by an external CSI volume driver", "type": "object", "required": [ "driver", @@ -39976,6 +39976,7 @@ } }, "io.k8s.api.core.v1.GRPCAction": { + "description": "GRPCAction specifies an action involving a GRPC service.", "type": "object", "required": [ "port" @@ -40384,19 +40385,19 @@ "type": "object", "properties": { "exec": { - "description": "Exec specifies the action to take.", + "description": "Exec specifies a command to execute in the container.", "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" }, "httpGet": { - "description": "HTTPGet specifies the http request to perform.", + "description": "HTTPGet specifies an HTTP GET request to perform.", "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" }, "sleep": { - "description": "Sleep represents the duration that the container should sleep before being terminated.", + "description": "Sleep represents a duration that the container should sleep.", "$ref": "#/definitions/io.k8s.api.core.v1.SleepAction" }, "tcpSocket": { - "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.", + "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.", "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" } } @@ -40638,7 +40639,7 @@ "x-kubernetes-map-type": "atomic" }, "io.k8s.api.core.v1.LocalVolumeSource": { - "description": "Local represents directly-attached storage with node affinity (Beta feature)", + "description": "Local represents directly-attached storage with node affinity", "type": "object", "required": [ "path" @@ -40740,12 +40741,15 @@ ], "properties": { "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }, "message": { + "description": "Human-readable message indicating details about last transition.", "type": "string" }, "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", "type": "string" }, "status": { @@ -41198,7 +41202,7 @@ "type": "object", "properties": { "addresses": { - "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", "type": "array", "items": { "default": {}, @@ -41226,7 +41230,7 @@ } }, "conditions": { - "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition", "type": "array", "items": { "default": {}, @@ -41262,7 +41266,7 @@ "x-kubernetes-list-type": "atomic" }, "nodeInfo": { - "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info", "default": {}, "$ref": "#/definitions/io.k8s.api.core.v1.NodeSystemInfo" }, @@ -41509,10 +41513,12 @@ "type": "string" }, "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required", "type": "string", "default": "" }, "type": { + "description": "Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about", "type": "string", "default": "" } @@ -41760,27 +41766,27 @@ "type": "object", "properties": { "awsElasticBlockStore": { - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" }, "azureDisk": { - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" }, "azureFile": { - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureFilePersistentVolumeSource" }, "cephfs": { - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.CephFSPersistentVolumeSource" }, "cinder": { - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.CinderPersistentVolumeSource" }, "csi": { - "description": "csi represents storage that is handled by an external CSI driver (Beta feature).", + "description": "csi represents storage that is handled by an external CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.CSIPersistentVolumeSource" }, "fc": { @@ -41788,19 +41794,19 @@ "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" }, "flexVolume": { - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", "$ref": "#/definitions/io.k8s.api.core.v1.FlexPersistentVolumeSource" }, "flocker": { - "description": "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", + "description": "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. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" }, "gcePersistentDisk": { - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "description": "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. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" }, "glusterfs": { - "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsPersistentVolumeSource" }, "hostPath": { @@ -41820,31 +41826,31 @@ "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" }, "photonPersistentDisk": { - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" }, "portworxVolume": { - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" }, "quobyte": { - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" }, "rbd": { - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.RBDPersistentVolumeSource" }, "scaleIO": { - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOPersistentVolumeSource" }, "storageos": { - "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" }, "vsphereVolume": { - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" } } @@ -41869,15 +41875,15 @@ "x-kubernetes-list-type": "atomic" }, "awsElasticBlockStore": { - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" }, "azureDisk": { - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" }, "azureFile": { - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureFilePersistentVolumeSource" }, "capacity": { @@ -41888,11 +41894,11 @@ } }, "cephfs": { - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.CephFSPersistentVolumeSource" }, "cinder": { - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.CinderPersistentVolumeSource" }, "claimRef": { @@ -41901,7 +41907,7 @@ "x-kubernetes-map-type": "granular" }, "csi": { - "description": "csi represents storage that is handled by an external CSI driver (Beta feature).", + "description": "csi represents storage that is handled by an external CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.CSIPersistentVolumeSource" }, "fc": { @@ -41909,19 +41915,19 @@ "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" }, "flexVolume": { - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", "$ref": "#/definitions/io.k8s.api.core.v1.FlexPersistentVolumeSource" }, "flocker": { - "description": "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", + "description": "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. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" }, "gcePersistentDisk": { - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "description": "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. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" }, "glusterfs": { - "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "description": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsPersistentVolumeSource" }, "hostPath": { @@ -41963,23 +41969,23 @@ ] }, "photonPersistentDisk": { - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" }, "portworxVolume": { - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" }, "quobyte": { - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" }, "rbd": { - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.RBDPersistentVolumeSource" }, "scaleIO": { - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOPersistentVolumeSource" }, "storageClassName": { @@ -41987,7 +41993,7 @@ "type": "string" }, "storageos": { - "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + "description": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" }, "volumeAttributesClassName": { @@ -42003,7 +42009,7 @@ ] }, "vsphereVolume": { - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" } } @@ -42289,10 +42295,11 @@ "type": "object", "properties": { "name": { - "description": "Required.", + "description": "Name is this DNS resolver option's name. Required.", "type": "string" }, "value": { + "description": "Value is this DNS resolver option's value.", "type": "string" } } @@ -42429,8 +42436,12 @@ "description": "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.", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" }, + "stream": { + "description": "Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", + "type": "string" + }, "tailLines": { - "description": "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", + "description": "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. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", "type": "integer", "format": "int64" }, @@ -42599,6 +42610,10 @@ "type": "integer", "format": "int64" }, + "seLinuxChangePolicy": { + "description": "seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\".\n\n\"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.\n\n\"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled.\n\nIf not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes.\n\nThis field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.\n\nAll Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.", + "type": "string" + }, "seLinuxOptions": { "description": "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. Note that this field cannot be set when spec.os.name is windows.", "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" @@ -42842,6 +42857,10 @@ "x-kubernetes-patch-merge-key": "name", "x-kubernetes-patch-strategy": "merge,retainKeys" }, + "resources": { + "description": "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\" and \"memory\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, "restartPolicy": { "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\nPossible enum values:\n - `\"Always\"`\n - `\"Never\"`\n - `\"OnFailure\"`", "type": "string", @@ -42886,7 +42905,7 @@ "type": "string" }, "setHostnameAsFQDN": { - "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", + "description": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", "type": "boolean" }, "shareProcessNamespace": { @@ -42961,7 +42980,7 @@ "x-kubernetes-patch-strategy": "merge" }, "containerStatuses": { - "description": "The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "description": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "type": "array", "items": { "default": {}, @@ -42970,7 +42989,7 @@ "x-kubernetes-list-type": "atomic" }, "ephemeralContainerStatuses": { - "description": "Status for any ephemeral containers that have run in this pod.", + "description": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "type": "array", "items": { "default": {}, @@ -42994,7 +43013,7 @@ "x-kubernetes-patch-strategy": "merge" }, "initContainerStatuses": { - "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "description": "Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status", "type": "array", "items": { "default": {}, @@ -43171,6 +43190,7 @@ } }, "io.k8s.api.core.v1.PortStatus": { + "description": "PortStatus represents the error condition of a service port", "type": "object", "required": [ "port", @@ -43273,7 +43293,7 @@ "type": "object", "properties": { "exec": { - "description": "Exec specifies the action to take.", + "description": "Exec specifies a command to execute in the container.", "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" }, "failureThreshold": { @@ -43282,11 +43302,11 @@ "format": "int32" }, "grpc": { - "description": "GRPC specifies an action involving a GRPC port.", + "description": "GRPC specifies a GRPC HealthCheckRequest.", "$ref": "#/definitions/io.k8s.api.core.v1.GRPCAction" }, "httpGet": { - "description": "HTTPGet specifies the http request to perform.", + "description": "HTTPGet specifies an HTTP GET request to perform.", "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" }, "initialDelaySeconds": { @@ -43305,7 +43325,7 @@ "format": "int32" }, "tcpSocket": { - "description": "TCPSocket specifies an action involving a TCP port.", + "description": "TCPSocket specifies a connection to a TCP port.", "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" }, "terminationGracePeriodSeconds": { @@ -43325,19 +43345,19 @@ "type": "object", "properties": { "exec": { - "description": "Exec specifies the action to take.", + "description": "Exec specifies a command to execute in the container.", "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" }, "grpc": { - "description": "GRPC specifies an action involving a GRPC port.", + "description": "GRPC specifies a GRPC HealthCheckRequest.", "$ref": "#/definitions/io.k8s.api.core.v1.GRPCAction" }, "httpGet": { - "description": "HTTPGet specifies the http request to perform.", + "description": "HTTPGet specifies an HTTP GET request to perform.", "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" }, "tcpSocket": { - "description": "TCPSocket specifies an action involving a TCP port.", + "description": "TCPSocket specifies a connection to a TCP port.", "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" } } @@ -43744,7 +43764,7 @@ "x-kubernetes-map-type": "atomic" }, "io.k8s.api.core.v1.ResourceHealth": { - "description": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP.", + "description": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680.", "type": "object", "required": [ "resourceID" @@ -43907,18 +43927,19 @@ } }, "io.k8s.api.core.v1.ResourceStatus": { + "description": "ResourceStatus represents the status of a single resource allocated to a Pod.", "type": "object", "required": [ "name" ], "properties": { "name": { - "description": "Name of the resource. Must be unique within the pod and match one of the resources from the pod spec.", + "description": "Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:/\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container.", "type": "string", "default": "" }, "resources": { - "description": "List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it's definition.", + "description": "List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases.", "type": "array", "items": { "default": {}, @@ -44471,7 +44492,7 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" }, "secrets": { - "description": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "description": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". The \"kubernetes.io/enforce-mountable-secrets\" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", "type": "array", "items": { "default": {}, @@ -44765,7 +44786,7 @@ "$ref": "#/definitions/io.k8s.api.core.v1.SessionAffinityConfig" }, "trafficDistribution": { - "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", + "description": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature.", "type": "string" }, "type": { @@ -45119,6 +45140,7 @@ "x-kubernetes-map-type": "atomic" }, "io.k8s.api.core.v1.TypedObjectReference": { + "description": "TypedObjectReference contains enough information to let you locate the typed referenced object", "type": "object", "required": [ "kind", @@ -45153,23 +45175,23 @@ ], "properties": { "awsElasticBlockStore": { - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" }, "azureDisk": { - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" }, "azureFile": { - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource" }, "cephfs": { - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource" }, "cinder": { - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" }, "configMap": { @@ -45177,7 +45199,7 @@ "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource" }, "csi": { - "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", "$ref": "#/definitions/io.k8s.api.core.v1.CSIVolumeSource" }, "downwardAPI": { @@ -45197,23 +45219,23 @@ "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" }, "flexVolume": { - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" }, "flocker": { - "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" }, "gcePersistentDisk": { - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" }, "gitRepo": { - "description": "gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + "description": "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource" }, "glusterfs": { - "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" }, "hostPath": { @@ -45242,11 +45264,11 @@ "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" }, "photonPersistentDisk": { - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" }, "portworxVolume": { - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" }, "projected": { @@ -45254,15 +45276,15 @@ "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource" }, "quobyte": { - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" }, "rbd": { - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" }, "scaleIO": { - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" }, "secret": { @@ -45270,11 +45292,11 @@ "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource" }, "storageos": { - "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource" }, "vsphereVolume": { - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" } } @@ -45433,23 +45455,23 @@ "type": "object", "properties": { "awsElasticBlockStore": { - "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "description": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" }, "azureDisk": { - "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "description": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" }, "azureFile": { - "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "description": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource" }, "cephfs": { - "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "description": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource" }, "cinder": { - "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "description": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" }, "configMap": { @@ -45457,7 +45479,7 @@ "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource" }, "csi": { - "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + "description": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", "$ref": "#/definitions/io.k8s.api.core.v1.CSIVolumeSource" }, "downwardAPI": { @@ -45477,23 +45499,23 @@ "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" }, "flexVolume": { - "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "description": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" }, "flocker": { - "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "description": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" }, "gcePersistentDisk": { - "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "description": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" }, "gitRepo": { - "description": "gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + "description": "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource" }, "glusterfs": { - "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "description": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" }, "hostPath": { @@ -45517,11 +45539,11 @@ "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" }, "photonPersistentDisk": { - "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "description": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" }, "portworxVolume": { - "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" }, "projected": { @@ -45529,15 +45551,15 @@ "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource" }, "quobyte": { - "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "description": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" }, "rbd": { - "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "description": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" }, "scaleIO": { - "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "description": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" }, "secret": { @@ -45545,11 +45567,11 @@ "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource" }, "storageos": { - "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "description": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource" }, "vsphereVolume": { - "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "description": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" } } @@ -46367,6 +46389,10 @@ "type": "integer", "format": "int64" }, + "ignoreStoreReadErrorWithClusterBreakingPotential": { + "description": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", + "type": "boolean" + }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" diff --git a/vendor/golang.org/x/mod/LICENSE b/vendor/golang.org/x/mod/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/mod/LICENSE +++ b/vendor/golang.org/x/mod/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. 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 + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/net/http2/config.go b/vendor/golang.org/x/net/http2/config.go new file mode 100644 index 0000000000..de58dfb8dc --- /dev/null +++ b/vendor/golang.org/x/net/http2/config.go @@ -0,0 +1,122 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "math" + "net/http" + "time" +) + +// http2Config is a package-internal version of net/http.HTTP2Config. +// +// http.HTTP2Config was added in Go 1.24. +// When running with a version of net/http that includes HTTP2Config, +// we merge the configuration with the fields in Transport or Server +// to produce an http2Config. +// +// Zero valued fields in http2Config are interpreted as in the +// net/http.HTTPConfig documentation. +// +// Precedence order for reconciling configurations is: +// +// - Use the net/http.{Server,Transport}.HTTP2Config value, when non-zero. +// - Otherwise use the http2.{Server.Transport} value. +// - If the resulting value is zero or out of range, use a default. +type http2Config struct { + MaxConcurrentStreams uint32 + MaxDecoderHeaderTableSize uint32 + MaxEncoderHeaderTableSize uint32 + MaxReadFrameSize uint32 + MaxUploadBufferPerConnection int32 + MaxUploadBufferPerStream int32 + SendPingTimeout time.Duration + PingTimeout time.Duration + WriteByteTimeout time.Duration + PermitProhibitedCipherSuites bool + CountError func(errType string) +} + +// configFromServer merges configuration settings from +// net/http.Server.HTTP2Config and http2.Server. +func configFromServer(h1 *http.Server, h2 *Server) http2Config { + conf := http2Config{ + MaxConcurrentStreams: h2.MaxConcurrentStreams, + MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize, + MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize, + MaxReadFrameSize: h2.MaxReadFrameSize, + MaxUploadBufferPerConnection: h2.MaxUploadBufferPerConnection, + MaxUploadBufferPerStream: h2.MaxUploadBufferPerStream, + SendPingTimeout: h2.ReadIdleTimeout, + PingTimeout: h2.PingTimeout, + WriteByteTimeout: h2.WriteByteTimeout, + PermitProhibitedCipherSuites: h2.PermitProhibitedCipherSuites, + CountError: h2.CountError, + } + fillNetHTTPServerConfig(&conf, h1) + setConfigDefaults(&conf, true) + return conf +} + +// configFromServer merges configuration settings from h2 and h2.t1.HTTP2 +// (the net/http Transport). +func configFromTransport(h2 *Transport) http2Config { + conf := http2Config{ + MaxEncoderHeaderTableSize: h2.MaxEncoderHeaderTableSize, + MaxDecoderHeaderTableSize: h2.MaxDecoderHeaderTableSize, + MaxReadFrameSize: h2.MaxReadFrameSize, + SendPingTimeout: h2.ReadIdleTimeout, + PingTimeout: h2.PingTimeout, + WriteByteTimeout: h2.WriteByteTimeout, + } + + // Unlike most config fields, where out-of-range values revert to the default, + // Transport.MaxReadFrameSize clips. + if conf.MaxReadFrameSize < minMaxFrameSize { + conf.MaxReadFrameSize = minMaxFrameSize + } else if conf.MaxReadFrameSize > maxFrameSize { + conf.MaxReadFrameSize = maxFrameSize + } + + if h2.t1 != nil { + fillNetHTTPTransportConfig(&conf, h2.t1) + } + setConfigDefaults(&conf, false) + return conf +} + +func setDefault[T ~int | ~int32 | ~uint32 | ~int64](v *T, minval, maxval, defval T) { + if *v < minval || *v > maxval { + *v = defval + } +} + +func setConfigDefaults(conf *http2Config, server bool) { + setDefault(&conf.MaxConcurrentStreams, 1, math.MaxUint32, defaultMaxStreams) + setDefault(&conf.MaxEncoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize) + setDefault(&conf.MaxDecoderHeaderTableSize, 1, math.MaxUint32, initialHeaderTableSize) + if server { + setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, 1<<20) + } else { + setDefault(&conf.MaxUploadBufferPerConnection, initialWindowSize, math.MaxInt32, transportDefaultConnFlow) + } + if server { + setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, 1<<20) + } else { + setDefault(&conf.MaxUploadBufferPerStream, 1, math.MaxInt32, transportDefaultStreamFlow) + } + setDefault(&conf.MaxReadFrameSize, minMaxFrameSize, maxFrameSize, defaultMaxReadFrameSize) + setDefault(&conf.PingTimeout, 1, math.MaxInt64, 15*time.Second) +} + +// adjustHTTP1MaxHeaderSize converts a limit in bytes on the size of an HTTP/1 header +// to an HTTP/2 MAX_HEADER_LIST_SIZE value. +func adjustHTTP1MaxHeaderSize(n int64) int64 { + // http2's count is in a slightly different unit and includes 32 bytes per pair. + // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. + const perFieldOverhead = 32 // per http2 spec + const typicalHeaders = 10 // conservative + return n + typicalHeaders*perFieldOverhead +} diff --git a/vendor/golang.org/x/net/http2/config_go124.go b/vendor/golang.org/x/net/http2/config_go124.go new file mode 100644 index 0000000000..e3784123c8 --- /dev/null +++ b/vendor/golang.org/x/net/http2/config_go124.go @@ -0,0 +1,61 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build go1.24 + +package http2 + +import "net/http" + +// fillNetHTTPServerConfig sets fields in conf from srv.HTTP2. +func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) { + fillNetHTTPConfig(conf, srv.HTTP2) +} + +// fillNetHTTPServerConfig sets fields in conf from tr.HTTP2. +func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) { + fillNetHTTPConfig(conf, tr.HTTP2) +} + +func fillNetHTTPConfig(conf *http2Config, h2 *http.HTTP2Config) { + if h2 == nil { + return + } + if h2.MaxConcurrentStreams != 0 { + conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams) + } + if h2.MaxEncoderHeaderTableSize != 0 { + conf.MaxEncoderHeaderTableSize = uint32(h2.MaxEncoderHeaderTableSize) + } + if h2.MaxDecoderHeaderTableSize != 0 { + conf.MaxDecoderHeaderTableSize = uint32(h2.MaxDecoderHeaderTableSize) + } + if h2.MaxConcurrentStreams != 0 { + conf.MaxConcurrentStreams = uint32(h2.MaxConcurrentStreams) + } + if h2.MaxReadFrameSize != 0 { + conf.MaxReadFrameSize = uint32(h2.MaxReadFrameSize) + } + if h2.MaxReceiveBufferPerConnection != 0 { + conf.MaxUploadBufferPerConnection = int32(h2.MaxReceiveBufferPerConnection) + } + if h2.MaxReceiveBufferPerStream != 0 { + conf.MaxUploadBufferPerStream = int32(h2.MaxReceiveBufferPerStream) + } + if h2.SendPingTimeout != 0 { + conf.SendPingTimeout = h2.SendPingTimeout + } + if h2.PingTimeout != 0 { + conf.PingTimeout = h2.PingTimeout + } + if h2.WriteByteTimeout != 0 { + conf.WriteByteTimeout = h2.WriteByteTimeout + } + if h2.PermitProhibitedCipherSuites { + conf.PermitProhibitedCipherSuites = true + } + if h2.CountError != nil { + conf.CountError = h2.CountError + } +} diff --git a/vendor/golang.org/x/net/http2/config_pre_go124.go b/vendor/golang.org/x/net/http2/config_pre_go124.go new file mode 100644 index 0000000000..060fd6c64c --- /dev/null +++ b/vendor/golang.org/x/net/http2/config_pre_go124.go @@ -0,0 +1,16 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.24 + +package http2 + +import "net/http" + +// Pre-Go 1.24 fallback. +// The Server.HTTP2 and Transport.HTTP2 config fields were added in Go 1.24. + +func fillNetHTTPServerConfig(conf *http2Config, srv *http.Server) {} + +func fillNetHTTPTransportConfig(conf *http2Config, tr *http.Transport) {} diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 003e649f30..7688c356b7 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -19,8 +19,9 @@ import ( "bufio" "context" "crypto/tls" + "errors" "fmt" - "io" + "net" "net/http" "os" "sort" @@ -237,13 +238,19 @@ func (cw closeWaiter) Wait() { // Its buffered writer is lazily allocated as needed, to minimize // idle memory usage with many connections. type bufferedWriter struct { - _ incomparable - w io.Writer // immutable - bw *bufio.Writer // non-nil when data is buffered + _ incomparable + group synctestGroupInterface // immutable + conn net.Conn // immutable + bw *bufio.Writer // non-nil when data is buffered + byteTimeout time.Duration // immutable, WriteByteTimeout } -func newBufferedWriter(w io.Writer) *bufferedWriter { - return &bufferedWriter{w: w} +func newBufferedWriter(group synctestGroupInterface, conn net.Conn, timeout time.Duration) *bufferedWriter { + return &bufferedWriter{ + group: group, + conn: conn, + byteTimeout: timeout, + } } // bufWriterPoolBufferSize is the size of bufio.Writer's @@ -270,7 +277,7 @@ func (w *bufferedWriter) Available() int { func (w *bufferedWriter) Write(p []byte) (n int, err error) { if w.bw == nil { bw := bufWriterPool.Get().(*bufio.Writer) - bw.Reset(w.w) + bw.Reset((*bufferedWriterTimeoutWriter)(w)) w.bw = bw } return w.bw.Write(p) @@ -288,6 +295,38 @@ func (w *bufferedWriter) Flush() error { return err } +type bufferedWriterTimeoutWriter bufferedWriter + +func (w *bufferedWriterTimeoutWriter) Write(p []byte) (n int, err error) { + return writeWithByteTimeout(w.group, w.conn, w.byteTimeout, p) +} + +// writeWithByteTimeout writes to conn. +// If more than timeout passes without any bytes being written to the connection, +// the write fails. +func writeWithByteTimeout(group synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) { + if timeout <= 0 { + return conn.Write(p) + } + for { + var now time.Time + if group == nil { + now = time.Now() + } else { + now = group.Now() + } + conn.SetWriteDeadline(now.Add(timeout)) + nn, err := conn.Write(p[n:]) + n += nn + if n == len(p) || nn == 0 || !errors.Is(err, os.ErrDeadlineExceeded) { + // Either we finished the write, made no progress, or hit the deadline. + // Whichever it is, we're done now. + conn.SetWriteDeadline(time.Time{}) + return n, err + } + } +} + func mustUint31(v int32) uint32 { if v < 0 || v > 2147483647 { panic("out of range") diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 6c349f3ec6..617b4a4762 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -29,6 +29,7 @@ import ( "bufio" "bytes" "context" + "crypto/rand" "crypto/tls" "errors" "fmt" @@ -52,10 +53,14 @@ import ( ) const ( - prefaceTimeout = 10 * time.Second - firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway - handlerChunkWriteSize = 4 << 10 - defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? + prefaceTimeout = 10 * time.Second + firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway + handlerChunkWriteSize = 4 << 10 + defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? + + // maxQueuedControlFrames is the maximum number of control frames like + // SETTINGS, PING and RST_STREAM that will be queued for writing before + // the connection is closed to prevent memory exhaustion attacks. maxQueuedControlFrames = 10000 ) @@ -127,6 +132,22 @@ type Server struct { // If zero or negative, there is no timeout. IdleTimeout time.Duration + // ReadIdleTimeout is the timeout after which a health check using a ping + // frame will be carried out if no frame is received on the connection. + // If zero, no health check is performed. + ReadIdleTimeout time.Duration + + // PingTimeout is the timeout after which the connection will be closed + // if a response to a ping is not received. + // If zero, a default of 15 seconds is used. + PingTimeout time.Duration + + // WriteByteTimeout is the timeout after which a connection will be + // closed if no data can be written to it. The timeout begins when data is + // available to write, and is extended whenever any bytes are written. + // If zero or negative, there is no timeout. + WriteByteTimeout time.Duration + // MaxUploadBufferPerConnection is the size of the initial flow // control window for each connections. The HTTP/2 spec does not // allow this to be smaller than 65535 or larger than 2^32-1. @@ -189,57 +210,6 @@ func (s *Server) afterFunc(d time.Duration, f func()) timer { return timeTimer{time.AfterFunc(d, f)} } -func (s *Server) initialConnRecvWindowSize() int32 { - if s.MaxUploadBufferPerConnection >= initialWindowSize { - return s.MaxUploadBufferPerConnection - } - return 1 << 20 -} - -func (s *Server) initialStreamRecvWindowSize() int32 { - if s.MaxUploadBufferPerStream > 0 { - return s.MaxUploadBufferPerStream - } - return 1 << 20 -} - -func (s *Server) maxReadFrameSize() uint32 { - if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize { - return v - } - return defaultMaxReadFrameSize -} - -func (s *Server) maxConcurrentStreams() uint32 { - if v := s.MaxConcurrentStreams; v > 0 { - return v - } - return defaultMaxStreams -} - -func (s *Server) maxDecoderHeaderTableSize() uint32 { - if v := s.MaxDecoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - -func (s *Server) maxEncoderHeaderTableSize() uint32 { - if v := s.MaxEncoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - -// maxQueuedControlFrames is the maximum number of control frames like -// SETTINGS, PING and RST_STREAM that will be queued for writing before -// the connection is closed to prevent memory exhaustion attacks. -func (s *Server) maxQueuedControlFrames() int { - // TODO: if anybody asks, add a Server field, and remember to define the - // behavior of negative values. - return maxQueuedControlFrames -} - type serverInternalState struct { mu sync.Mutex activeConns map[*serverConn]struct{} @@ -440,13 +410,15 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon baseCtx, cancel := serverConnBaseContext(c, opts) defer cancel() + http1srv := opts.baseConfig() + conf := configFromServer(http1srv, s) sc := &serverConn{ srv: s, - hs: opts.baseConfig(), + hs: http1srv, conn: c, baseCtx: baseCtx, remoteAddrStr: c.RemoteAddr().String(), - bw: newBufferedWriter(c), + bw: newBufferedWriter(s.group, c, conf.WriteByteTimeout), handler: opts.handler(), streams: make(map[uint32]*stream), readFrameCh: make(chan readFrameResult), @@ -456,9 +428,12 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way doneServing: make(chan struct{}), clientMaxStreams: math.MaxUint32, // Section 6.5.2: "Initially, there is no limit to this value" - advMaxStreams: s.maxConcurrentStreams(), + advMaxStreams: conf.MaxConcurrentStreams, initialStreamSendWindowSize: initialWindowSize, + initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream, maxFrameSize: initialMaxFrameSize, + pingTimeout: conf.PingTimeout, + countErrorFunc: conf.CountError, serveG: newGoroutineLock(), pushEnabled: true, sawClientPreface: opts.SawClientPreface, @@ -491,15 +466,15 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon sc.flow.add(initialWindowSize) sc.inflow.init(initialWindowSize) sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) - sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize()) + sc.hpackEncoder.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize) fr := NewFramer(sc.bw, c) - if s.CountError != nil { - fr.countError = s.CountError + if conf.CountError != nil { + fr.countError = conf.CountError } - fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil) + fr.ReadMetaHeaders = hpack.NewDecoder(conf.MaxDecoderHeaderTableSize, nil) fr.MaxHeaderListSize = sc.maxHeaderListSize() - fr.SetMaxReadFrameSize(s.maxReadFrameSize()) + fr.SetMaxReadFrameSize(conf.MaxReadFrameSize) sc.framer = fr if tc, ok := c.(connectionStater); ok { @@ -532,7 +507,7 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon // So for now, do nothing here again. } - if !s.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { + if !conf.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { // "Endpoints MAY choose to generate a connection error // (Section 5.4.1) of type INADEQUATE_SECURITY if one of // the prohibited cipher suites are negotiated." @@ -569,7 +544,7 @@ func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverCon opts.UpgradeRequest = nil } - sc.serve() + sc.serve(conf) } func serverConnBaseContext(c net.Conn, opts *ServeConnOpts) (ctx context.Context, cancel func()) { @@ -609,6 +584,7 @@ type serverConn struct { tlsState *tls.ConnectionState // shared by all handlers, like net/http remoteAddrStr string writeSched WriteScheduler + countErrorFunc func(errType string) // Everything following is owned by the serve loop; use serveG.check(): serveG goroutineLock // used to verify funcs are on serve() @@ -628,6 +604,7 @@ type serverConn struct { streams map[uint32]*stream unstartedHandlers []unstartedHandler initialStreamSendWindowSize int32 + initialStreamRecvWindowSize int32 maxFrameSize int32 peerMaxHeaderListSize uint32 // zero means unknown (default) canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case @@ -638,9 +615,14 @@ type serverConn struct { inGoAway bool // we've started to or sent GOAWAY inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop needToSendGoAway bool // we need to schedule a GOAWAY frame write + pingSent bool + sentPingData [8]byte goAwayCode ErrCode shutdownTimer timer // nil until used idleTimer timer // nil if unused + readIdleTimeout time.Duration + pingTimeout time.Duration + readIdleTimer timer // nil if unused // Owned by the writeFrameAsync goroutine: headerWriteBuf bytes.Buffer @@ -655,11 +637,7 @@ func (sc *serverConn) maxHeaderListSize() uint32 { if n <= 0 { n = http.DefaultMaxHeaderBytes } - // http2's count is in a slightly different unit and includes 32 bytes per pair. - // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. - const perFieldOverhead = 32 // per http2 spec - const typicalHeaders = 10 // conservative - return uint32(n + typicalHeaders*perFieldOverhead) + return uint32(adjustHTTP1MaxHeaderSize(int64(n))) } func (sc *serverConn) curOpenStreams() uint32 { @@ -923,7 +901,7 @@ func (sc *serverConn) notePanic() { } } -func (sc *serverConn) serve() { +func (sc *serverConn) serve(conf http2Config) { sc.serveG.check() defer sc.notePanic() defer sc.conn.Close() @@ -937,18 +915,18 @@ func (sc *serverConn) serve() { sc.writeFrame(FrameWriteRequest{ write: writeSettings{ - {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, + {SettingMaxFrameSize, conf.MaxReadFrameSize}, {SettingMaxConcurrentStreams, sc.advMaxStreams}, {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, - {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()}, - {SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())}, + {SettingHeaderTableSize, conf.MaxDecoderHeaderTableSize}, + {SettingInitialWindowSize, uint32(sc.initialStreamRecvWindowSize)}, }, }) sc.unackedSettings++ // Each connection starts with initialWindowSize inflow tokens. // If a higher value is configured, we add more tokens. - if diff := sc.srv.initialConnRecvWindowSize() - initialWindowSize; diff > 0 { + if diff := conf.MaxUploadBufferPerConnection - initialWindowSize; diff > 0 { sc.sendWindowUpdate(nil, int(diff)) } @@ -968,11 +946,18 @@ func (sc *serverConn) serve() { defer sc.idleTimer.Stop() } + if conf.SendPingTimeout > 0 { + sc.readIdleTimeout = conf.SendPingTimeout + sc.readIdleTimer = sc.srv.afterFunc(conf.SendPingTimeout, sc.onReadIdleTimer) + defer sc.readIdleTimer.Stop() + } + go sc.readFrames() // closed by defer sc.conn.Close above settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer) defer settingsTimer.Stop() + lastFrameTime := sc.srv.now() loopNum := 0 for { loopNum++ @@ -986,6 +971,7 @@ func (sc *serverConn) serve() { case res := <-sc.wroteFrameCh: sc.wroteFrame(res) case res := <-sc.readFrameCh: + lastFrameTime = sc.srv.now() // Process any written frames before reading new frames from the client since a // written frame could have triggered a new stream to be started. if sc.writingFrameAsync { @@ -1017,6 +1003,8 @@ func (sc *serverConn) serve() { case idleTimerMsg: sc.vlogf("connection is idle") sc.goAway(ErrCodeNo) + case readIdleTimerMsg: + sc.handlePingTimer(lastFrameTime) case shutdownTimerMsg: sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) return @@ -1039,7 +1027,7 @@ func (sc *serverConn) serve() { // If the peer is causing us to generate a lot of control frames, // but not reading them from us, assume they are trying to make us // run out of memory. - if sc.queuedControlFrames > sc.srv.maxQueuedControlFrames() { + if sc.queuedControlFrames > maxQueuedControlFrames { sc.vlogf("http2: too many control frames in send queue, closing connection") return } @@ -1055,12 +1043,39 @@ func (sc *serverConn) serve() { } } +func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { + if sc.pingSent { + sc.vlogf("timeout waiting for PING response") + sc.conn.Close() + return + } + + pingAt := lastFrameReadTime.Add(sc.readIdleTimeout) + now := sc.srv.now() + if pingAt.After(now) { + // We received frames since arming the ping timer. + // Reset it for the next possible timeout. + sc.readIdleTimer.Reset(pingAt.Sub(now)) + return + } + + sc.pingSent = true + // Ignore crypto/rand.Read errors: It generally can't fail, and worse case if it does + // is we send a PING frame containing 0s. + _, _ = rand.Read(sc.sentPingData[:]) + sc.writeFrame(FrameWriteRequest{ + write: &writePing{data: sc.sentPingData}, + }) + sc.readIdleTimer.Reset(sc.pingTimeout) +} + type serverMessage int // Message values sent to serveMsgCh. var ( settingsTimerMsg = new(serverMessage) idleTimerMsg = new(serverMessage) + readIdleTimerMsg = new(serverMessage) shutdownTimerMsg = new(serverMessage) gracefulShutdownMsg = new(serverMessage) handlerDoneMsg = new(serverMessage) @@ -1068,6 +1083,7 @@ var ( func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) } func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) } +func (sc *serverConn) onReadIdleTimer() { sc.sendServeMsg(readIdleTimerMsg) } func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) } func (sc *serverConn) sendServeMsg(msg interface{}) { @@ -1320,6 +1336,10 @@ func (sc *serverConn) wroteFrame(res frameWriteResult) { sc.writingFrame = false sc.writingFrameAsync = false + if res.err != nil { + sc.conn.Close() + } + wr := res.wr if writeEndsStream(wr.write) { @@ -1594,6 +1614,11 @@ func (sc *serverConn) processFrame(f Frame) error { func (sc *serverConn) processPing(f *PingFrame) error { sc.serveG.check() if f.IsAck() { + if sc.pingSent && sc.sentPingData == f.Data { + // This is a response to a PING we sent. + sc.pingSent = false + sc.readIdleTimer.Reset(sc.readIdleTimeout) + } // 6.7 PING: " An endpoint MUST NOT respond to PING frames // containing this flag." return nil @@ -2160,7 +2185,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.cw.Init() st.flow.conn = &sc.flow // link to conn-level counter st.flow.add(sc.initialStreamSendWindowSize) - st.inflow.init(sc.srv.initialStreamRecvWindowSize()) + st.inflow.init(sc.initialStreamRecvWindowSize) if sc.hs.WriteTimeout > 0 { st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } @@ -3301,7 +3326,7 @@ func (sc *serverConn) countError(name string, err error) error { if sc == nil || sc.srv == nil { return err } - f := sc.srv.CountError + f := sc.countErrorFunc if f == nil { return err } diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 61f511f97a..0c5f64aa8b 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -25,7 +25,6 @@ import ( "net/http" "net/http/httptrace" "net/textproto" - "os" "sort" "strconv" "strings" @@ -227,40 +226,26 @@ func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (co } func (t *Transport) maxHeaderListSize() uint32 { - if t.MaxHeaderListSize == 0 { + n := int64(t.MaxHeaderListSize) + if t.t1 != nil && t.t1.MaxResponseHeaderBytes != 0 { + n = t.t1.MaxResponseHeaderBytes + if n > 0 { + n = adjustHTTP1MaxHeaderSize(n) + } + } + if n <= 0 { return 10 << 20 } - if t.MaxHeaderListSize == 0xffffffff { + if n >= 0xffffffff { return 0 } - return t.MaxHeaderListSize -} - -func (t *Transport) maxFrameReadSize() uint32 { - if t.MaxReadFrameSize == 0 { - return 0 // use the default provided by the peer - } - if t.MaxReadFrameSize < minMaxFrameSize { - return minMaxFrameSize - } - if t.MaxReadFrameSize > maxFrameSize { - return maxFrameSize - } - return t.MaxReadFrameSize + return uint32(n) } func (t *Transport) disableCompression() bool { return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression) } -func (t *Transport) pingTimeout() time.Duration { - if t.PingTimeout == 0 { - return 15 * time.Second - } - return t.PingTimeout - -} - // ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. // It returns an error if t1 has already been HTTP/2-enabled. // @@ -370,11 +355,14 @@ type ClientConn struct { lastActive time.Time lastIdle time.Time // time last idle // Settings from peer: (also guarded by wmu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - peerMaxHeaderListSize uint64 - peerMaxHeaderTableSize uint32 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + peerMaxHeaderListSize uint64 + peerMaxHeaderTableSize uint32 + initialWindowSize uint32 + initialStreamRecvWindowSize int32 + readIdleTimeout time.Duration + pingTimeout time.Duration // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. // Write to reqHeaderMu to lock it, read from it to unlock. @@ -499,6 +487,7 @@ func (cs *clientStream) closeReqBodyLocked() { } type stickyErrWriter struct { + group synctestGroupInterface conn net.Conn timeout time.Duration err *error @@ -508,22 +497,9 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) { if *sew.err != nil { return 0, *sew.err } - for { - if sew.timeout != 0 { - sew.conn.SetWriteDeadline(time.Now().Add(sew.timeout)) - } - nn, err := sew.conn.Write(p[n:]) - n += nn - if n < len(p) && nn > 0 && errors.Is(err, os.ErrDeadlineExceeded) { - // Keep extending the deadline so long as we're making progress. - continue - } - if sew.timeout != 0 { - sew.conn.SetWriteDeadline(time.Time{}) - } - *sew.err = err - return n, err - } + n, err = writeWithByteTimeout(sew.group, sew.conn, sew.timeout, p) + *sew.err = err + return n, err } // noCachedConnError is the concrete type of ErrNoCachedConn, which @@ -758,44 +734,36 @@ func (t *Transport) expectContinueTimeout() time.Duration { return t.t1.ExpectContinueTimeout } -func (t *Transport) maxDecoderHeaderTableSize() uint32 { - if v := t.MaxDecoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - -func (t *Transport) maxEncoderHeaderTableSize() uint32 { - if v := t.MaxEncoderHeaderTableSize; v > 0 { - return v - } - return initialHeaderTableSize -} - func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { return t.newClientConn(c, t.disableKeepAlives()) } func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { + conf := configFromTransport(t) cc := &ClientConn{ - t: t, - tconn: c, - readerDone: make(chan struct{}), - nextStreamID: 1, - maxFrameSize: 16 << 10, // spec default - initialWindowSize: 65535, // spec default - maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. - peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. - streams: make(map[uint32]*clientStream), - singleUse: singleUse, - wantSettingsAck: true, - pings: make(map[[8]byte]chan struct{}), - reqHeaderMu: make(chan struct{}, 1), - } + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + initialStreamRecvWindowSize: conf.MaxUploadBufferPerStream, + maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. + peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. + streams: make(map[uint32]*clientStream), + singleUse: singleUse, + wantSettingsAck: true, + readIdleTimeout: conf.SendPingTimeout, + pingTimeout: conf.PingTimeout, + pings: make(map[[8]byte]chan struct{}), + reqHeaderMu: make(chan struct{}, 1), + } + var group synctestGroupInterface if t.transportTestHooks != nil { t.markNewGoroutine() t.transportTestHooks.newclientconn(cc) c = cc.tconn + group = t.group } if VerboseLogs { t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr()) @@ -807,24 +775,23 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro // TODO: adjust this writer size to account for frame size + // MTU + crypto/tls record padding. cc.bw = bufio.NewWriter(stickyErrWriter{ + group: group, conn: c, - timeout: t.WriteByteTimeout, + timeout: conf.WriteByteTimeout, err: &cc.werr, }) cc.br = bufio.NewReader(c) cc.fr = NewFramer(cc.bw, cc.br) - if t.maxFrameReadSize() != 0 { - cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize()) - } + cc.fr.SetMaxReadFrameSize(conf.MaxReadFrameSize) if t.CountError != nil { cc.fr.countError = t.CountError } - maxHeaderTableSize := t.maxDecoderHeaderTableSize() + maxHeaderTableSize := conf.MaxDecoderHeaderTableSize cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil) cc.fr.MaxHeaderListSize = t.maxHeaderListSize() cc.henc = hpack.NewEncoder(&cc.hbuf) - cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize()) + cc.henc.SetMaxDynamicTableSizeLimit(conf.MaxEncoderHeaderTableSize) cc.peerMaxHeaderTableSize = initialHeaderTableSize if cs, ok := c.(connectionStater); ok { @@ -834,11 +801,9 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro initialSettings := []Setting{ {ID: SettingEnablePush, Val: 0}, - {ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, - } - if max := t.maxFrameReadSize(); max != 0 { - initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max}) + {ID: SettingInitialWindowSize, Val: uint32(cc.initialStreamRecvWindowSize)}, } + initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: conf.MaxReadFrameSize}) if max := t.maxHeaderListSize(); max != 0 { initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max}) } @@ -848,8 +813,8 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro cc.bw.Write(clientPreface) cc.fr.WriteSettings(initialSettings...) - cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) - cc.inflow.init(transportDefaultConnFlow + initialWindowSize) + cc.fr.WriteWindowUpdate(0, uint32(conf.MaxUploadBufferPerConnection)) + cc.inflow.init(conf.MaxUploadBufferPerConnection + initialWindowSize) cc.bw.Flush() if cc.werr != nil { cc.Close() @@ -867,7 +832,7 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro } func (cc *ClientConn) healthCheck() { - pingTimeout := cc.t.pingTimeout() + pingTimeout := cc.pingTimeout // We don't need to periodically ping in the health check, because the readLoop of ClientConn will // trigger the healthCheck again if there is no frame received. ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout) @@ -2199,7 +2164,7 @@ type resAndError struct { func (cc *ClientConn) addStreamLocked(cs *clientStream) { cs.flow.add(int32(cc.initialWindowSize)) cs.flow.setConnFlow(&cc.flow) - cs.inflow.init(transportDefaultStreamFlow) + cs.inflow.init(cc.initialStreamRecvWindowSize) cs.ID = cc.nextStreamID cc.nextStreamID += 2 cc.streams[cs.ID] = cs @@ -2345,7 +2310,7 @@ func (cc *ClientConn) countReadFrameError(err error) { func (rl *clientConnReadLoop) run() error { cc := rl.cc gotSettings := false - readIdleTimeout := cc.t.ReadIdleTimeout + readIdleTimeout := cc.readIdleTimeout var t timer if readIdleTimeout != 0 { t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck) diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go index 33f61398a1..6ff6bee7e9 100644 --- a/vendor/golang.org/x/net/http2/write.go +++ b/vendor/golang.org/x/net/http2/write.go @@ -131,6 +131,16 @@ func (se StreamError) writeFrame(ctx writeContext) error { func (se StreamError) staysWithinBuffer(max int) bool { return frameHeaderLen+4 <= max } +type writePing struct { + data [8]byte +} + +func (w writePing) writeFrame(ctx writeContext) error { + return ctx.Framer().WritePing(false, w.data) +} + +func (w writePing) staysWithinBuffer(max int) bool { return frameHeaderLen+len(w.data) <= max } + type writePingAck struct{ pf *PingFrame } func (w writePingAck) writeFrame(ctx writeContext) error { diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/oauth2/LICENSE +++ b/vendor/golang.org/x/oauth2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. 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 + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go index 5bbb332174..109997d77c 100644 --- a/vendor/golang.org/x/oauth2/token.go +++ b/vendor/golang.org/x/oauth2/token.go @@ -49,6 +49,13 @@ type Token struct { // mechanisms for that TokenSource will not be used. Expiry time.Time `json:"expiry,omitempty"` + // ExpiresIn is the OAuth2 wire format "expires_in" field, + // which specifies how many seconds later the token expires, + // relative to an unknown time base approximately around "now". + // It is the application's responsibility to populate + // `Expiry` from `ExpiresIn` when required. + ExpiresIn int64 `json:"expires_in,omitempty"` + // raw optionally contains extra metadata from the server // when updating a token. raw interface{} diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md index 7d3c060e12..6e08a76a71 100644 --- a/vendor/golang.org/x/sys/unix/README.md +++ b/vendor/golang.org/x/sys/unix/README.md @@ -156,7 +156,7 @@ from the generated architecture-specific files listed below, and merge these into a common file for each OS. The merge is performed in the following steps: -1. Construct the set of common code that is idential in all architecture-specific files. +1. Construct the set of common code that is identical in all architecture-specific files. 2. Write this common code to the merged file. 3. Remove the common code from all architecture-specific files. diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index e14b766a32..ac54ecaba0 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -656,7 +656,7 @@ errors=$( signals=$( echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | - grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | + grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | sort ) @@ -666,7 +666,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags | sort >_error.grep echo '#include ' | $CC -x c - -E -dM $ccflags | awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | - grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | + grep -E -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' | sort >_signal.grep echo '// mkerrors.sh' "$@" diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go index 67ce6cef2d..6f15ba1eaf 100644 --- a/vendor/golang.org/x/sys/unix/syscall_aix.go +++ b/vendor/golang.org/x/sys/unix/syscall_aix.go @@ -360,7 +360,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, var status _C_int var r Pid_t err = ERESTART - // AIX wait4 may return with ERESTART errno, while the processus is still + // AIX wait4 may return with ERESTART errno, while the process is still // active. for err == ERESTART { r, err = wait4(Pid_t(pid), &status, options, rusage) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 3f1d3d4cb2..f08abd434f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1295,6 +1295,48 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { return &value, err } +// GetsockoptTCPCCVegasInfo returns algorithm specific congestion control information for a socket using the "vegas" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCVegasInfo(fd, level, opt int) (*TCPVegasInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPVegasInfo)(unsafe.Pointer(&value[0])) + return out, err +} + +// GetsockoptTCPCCDCTCPInfo returns algorithm specific congestion control information for a socket using the "dctp" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCDCTCPInfo(fd, level, opt int) (*TCPDCTCPInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPDCTCPInfo)(unsafe.Pointer(&value[0])) + return out, err +} + +// GetsockoptTCPCCBBRInfo returns algorithm specific congestion control information for a socket using the "bbr" +// algorithm. +// +// The socket's congestion control algorighm can be retrieved via [GetsockoptString] with the [TCP_CONGESTION] option: +// +// algo, err := unix.GetsockoptString(fd, unix.IPPROTO_TCP, unix.TCP_CONGESTION) +func GetsockoptTCPCCBBRInfo(fd, level, opt int) (*TCPBBRInfo, error) { + var value [SizeofTCPCCInfo / 4]uint32 // ensure proper alignment + vallen := _Socklen(SizeofTCPCCInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + out := (*TCPBBRInfo)(unsafe.Pointer(&value[0])) + return out, err +} + // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { @@ -1959,7 +2001,26 @@ func Getpgrp() (pid int) { //sysnb Getpid() (pid int) //sysnb Getppid() (ppid int) //sys Getpriority(which int, who int) (prio int, err error) -//sys Getrandom(buf []byte, flags int) (n int, err error) + +func Getrandom(buf []byte, flags int) (n int, err error) { + vdsoRet, supported := vgetrandom(buf, uint32(flags)) + if supported { + if vdsoRet < 0 { + return 0, errnoErr(syscall.Errno(-vdsoRet)) + } + return vdsoRet, nil + } + var p *byte + if len(buf) > 0 { + p = &buf[0] + } + r, _, e := Syscall(SYS_GETRANDOM, uintptr(unsafe.Pointer(p)), uintptr(len(buf)), uintptr(flags)) + if e != 0 { + return 0, errnoErr(e) + } + return int(r), nil +} + //sysnb Getrusage(who int, rusage *Rusage) (err error) //sysnb Getsid(pid int) (sid int, err error) //sysnb Gettid() (tid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go index cf2ee6c75e..745e5c7e6c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -182,3 +182,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go index 3d0e98451f..dd2262a407 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go @@ -214,3 +214,5 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go index 6f5a288944..8cf3670bda 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go @@ -187,3 +187,5 @@ func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error } return riscvHWProbe(pairs, setSize, set, flags) } + +const SYS_FSTATAT = SYS_NEWFSTATAT diff --git a/vendor/golang.org/x/sys/unix/vgetrandom_linux.go b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go new file mode 100644 index 0000000000..07ac8e09d1 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/vgetrandom_linux.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build linux && go1.24 + +package unix + +import _ "unsafe" + +//go:linkname vgetrandom runtime.vgetrandom +//go:noescape +func vgetrandom(p []byte, flags uint32) (ret int, supported bool) diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go similarity index 56% rename from vendor/golang.org/x/tools/internal/versions/toolchain_go120.go rename to vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go index 1a9efa126c..297e97bce9 100644 --- a/vendor/golang.org/x/tools/internal/versions/toolchain_go120.go +++ b/vendor/golang.org/x/sys/unix/vgetrandom_unsupported.go @@ -2,13 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.20 -// +build go1.20 +//go:build !linux || !go1.24 -package versions +package unix -func init() { - if Compare(toolchain, Go1_20) < 0 { - toolchain = Go1_20 - } +func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { + return -1, false } diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 01a70b2463..de3b462489 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -495,6 +495,7 @@ const ( BPF_F_TEST_REG_INVARIANTS = 0x80 BPF_F_TEST_RND_HI32 = 0x4 BPF_F_TEST_RUN_ON_CPU = 0x1 + BPF_F_TEST_SKB_CHECKSUM_COMPLETE = 0x4 BPF_F_TEST_STATE_FREQ = 0x8 BPF_F_TEST_XDP_LIVE_FRAMES = 0x2 BPF_F_XDP_DEV_BOUND_ONLY = 0x40 @@ -1922,6 +1923,7 @@ const ( MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 MNT_ID_REQ_SIZE_VER0 = 0x18 + MNT_ID_REQ_SIZE_VER1 = 0x20 MODULE_INIT_COMPRESSED_FILE = 0x4 MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_VERMAGIC = 0x2 @@ -2187,7 +2189,7 @@ const ( NFT_REG_SIZE = 0x10 NFT_REJECT_ICMPX_MAX = 0x3 NFT_RT_MAX = 0x4 - NFT_SECMARK_CTX_MAXLEN = 0x100 + NFT_SECMARK_CTX_MAXLEN = 0x1000 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 NFT_TABLE_F_MASK = 0x7 @@ -2356,9 +2358,11 @@ const ( PERF_MEM_LVLNUM_IO = 0xa PERF_MEM_LVLNUM_L1 = 0x1 PERF_MEM_LVLNUM_L2 = 0x2 + PERF_MEM_LVLNUM_L2_MHB = 0x5 PERF_MEM_LVLNUM_L3 = 0x3 PERF_MEM_LVLNUM_L4 = 0x4 PERF_MEM_LVLNUM_LFB = 0xc + PERF_MEM_LVLNUM_MSC = 0x6 PERF_MEM_LVLNUM_NA = 0xf PERF_MEM_LVLNUM_PMEM = 0xe PERF_MEM_LVLNUM_RAM = 0xd @@ -2431,6 +2435,7 @@ const ( PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 + PROCFS_IOCTL_MAGIC = 'f' PROC_SUPER_MAGIC = 0x9fa0 PROT_EXEC = 0x4 PROT_GROWSDOWN = 0x1000000 @@ -2933,11 +2938,12 @@ const ( RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 RWF_APPEND = 0x10 + RWF_ATOMIC = 0x40 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0x3f + RWF_SUPPORTED = 0x7f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 @@ -3210,6 +3216,7 @@ const ( STATX_ATTR_MOUNT_ROOT = 0x2000 STATX_ATTR_NODUMP = 0x40 STATX_ATTR_VERITY = 0x100000 + STATX_ATTR_WRITE_ATOMIC = 0x400000 STATX_BASIC_STATS = 0x7ff STATX_BLOCKS = 0x400 STATX_BTIME = 0x800 @@ -3226,6 +3233,7 @@ const ( STATX_SUBVOL = 0x8000 STATX_TYPE = 0x1 STATX_UID = 0x8 + STATX_WRITE_ATOMIC = 0x10000 STATX__RESERVED = 0x80000000 SYNC_FILE_RANGE_WAIT_AFTER = 0x4 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 @@ -3624,6 +3632,7 @@ const ( XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 XDP_UMEM_PGOFF_FILL_RING = 0x100000000 XDP_UMEM_REG = 0x4 + XDP_UMEM_TX_METADATA_LEN = 0x4 XDP_UMEM_TX_SW_CSUM = 0x2 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 684a5168da..8aa6d77c01 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -153,9 +153,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 61d74b592d..da428f4253 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -153,9 +153,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index a28c9e3e89..bf45bfec78 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index ab5d1fe8ea..71c67162b7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -154,9 +154,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index c523090e7c..9476628fa0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -154,9 +154,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 01e6ea7804..b9e85f3cf0 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 7aa610b1e7..a48b68a764 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 92af771b44..ea00e8522a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index b27ef5e6f1..91c6468717 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 237a2cefb3..8cbf38d639 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -152,9 +152,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 4a5c555a36..a2df734191 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -152,9 +152,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index a02fb49a5f..2479137923 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -152,9 +152,14 @@ const ( NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index e26a7c61b2..d265f146ee 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index c48f7c2103..3f2d644396 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -150,9 +150,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x8008b705 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 + NS_GET_PID_FROM_PIDNS = 0x8004b706 + NS_GET_PID_IN_PIDNS = 0x8004b708 + NS_GET_TGID_FROM_PIDNS = 0x8004b707 + NS_GET_TGID_IN_PIDNS = 0x8004b709 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index ad4b9aace7..5d8b727a1c 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -155,9 +155,14 @@ const ( NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 + NS_GET_MNTNS_ID = 0x4008b705 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 + NS_GET_PID_FROM_PIDNS = 0x4004b706 + NS_GET_PID_IN_PIDNS = 0x4004b708 + NS_GET_TGID_FROM_PIDNS = 0x4004b707 + NS_GET_TGID_IN_PIDNS = 0x4004b709 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 1bc1a5adb2..af30da5578 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -971,23 +971,6 @@ func Getpriority(which int, who int) (prio int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func Getrandom(buf []byte, flags int) (n int, err error) { - var _p0 unsafe.Pointer - if len(buf) > 0 { - _p0 = unsafe.Pointer(&buf[0]) - } else { - _p0 = unsafe.Pointer(&_zero) - } - r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index d3e38f681a..f485dbf456 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -341,6 +341,7 @@ const ( SYS_STATX = 332 SYS_IO_PGETEVENTS = 333 SYS_RSEQ = 334 + SYS_URETPROBE = 335 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 6c778c2327..1893e2fe88 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -85,7 +85,7 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 - SYS_FSTATAT = 79 + SYS_NEWFSTATAT = 79 SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index 37281cf51a..16a4017da0 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -84,6 +84,8 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 + SYS_NEWFSTATAT = 79 + SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 SYS_FDATASYNC = 83 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 9889f6a559..a5459e766f 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -84,7 +84,7 @@ const ( SYS_SPLICE = 76 SYS_TEE = 77 SYS_READLINKAT = 78 - SYS_FSTATAT = 79 + SYS_NEWFSTATAT = 79 SYS_FSTAT = 80 SYS_SYNC = 81 SYS_FSYNC = 82 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 9f2550dc31..3a69e45496 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -87,31 +87,35 @@ type StatxTimestamp struct { } type Statx_t struct { - Mask uint32 - Blksize uint32 - Attributes uint64 - Nlink uint32 - Uid uint32 - Gid uint32 - Mode uint16 - _ [1]uint16 - Ino uint64 - Size uint64 - Blocks uint64 - Attributes_mask uint64 - Atime StatxTimestamp - Btime StatxTimestamp - Ctime StatxTimestamp - Mtime StatxTimestamp - Rdev_major uint32 - Rdev_minor uint32 - Dev_major uint32 - Dev_minor uint32 - Mnt_id uint64 - Dio_mem_align uint32 - Dio_offset_align uint32 - Subvol uint64 - _ [11]uint64 + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + Mnt_id uint64 + Dio_mem_align uint32 + Dio_offset_align uint32 + Subvol uint64 + Atomic_write_unit_min uint32 + Atomic_write_unit_max uint32 + Atomic_write_segments_max uint32 + _ [1]uint32 + _ [9]uint64 } type Fsid struct { @@ -516,6 +520,29 @@ type TCPInfo struct { Total_rto_time uint32 } +type TCPVegasInfo struct { + Enabled uint32 + Rttcnt uint32 + Rtt uint32 + Minrtt uint32 +} + +type TCPDCTCPInfo struct { + Enabled uint16 + Ce_state uint16 + Alpha uint32 + Ab_ecn uint32 + Ab_tot uint32 +} + +type TCPBBRInfo struct { + Bw_lo uint32 + Bw_hi uint32 + Min_rtt uint32 + Pacing_gain uint32 + Cwnd_gain uint32 +} + type CanFilter struct { Id uint32 Mask uint32 @@ -557,6 +584,7 @@ const ( SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc SizeofTCPInfo = 0xf8 + SizeofTCPCCInfo = 0x14 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) @@ -3766,7 +3794,7 @@ const ( ETHTOOL_MSG_PSE_GET = 0x24 ETHTOOL_MSG_PSE_SET = 0x25 ETHTOOL_MSG_RSS_GET = 0x26 - ETHTOOL_MSG_USER_MAX = 0x2b + ETHTOOL_MSG_USER_MAX = 0x2c ETHTOOL_MSG_KERNEL_NONE = 0x0 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 @@ -3806,7 +3834,7 @@ const ( ETHTOOL_MSG_MODULE_NTF = 0x24 ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 - ETHTOOL_MSG_KERNEL_MAX = 0x2b + ETHTOOL_MSG_KERNEL_MAX = 0x2c ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 ETHTOOL_FLAG_OMIT_REPLY = 0x2 ETHTOOL_FLAG_STATS = 0x4 @@ -3951,7 +3979,7 @@ const ( ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19 - ETHTOOL_A_COALESCE_MAX = 0x1c + ETHTOOL_A_COALESCE_MAX = 0x1e ETHTOOL_A_PAUSE_UNSPEC = 0x0 ETHTOOL_A_PAUSE_HEADER = 0x1 ETHTOOL_A_PAUSE_AUTONEG = 0x2 @@ -4609,7 +4637,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x14a + NL80211_ATTR_MAX = 0x14c NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -5213,7 +5241,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x20 + NL80211_FREQUENCY_ATTR_MAX = 0x21 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go index 115341fba6..4e613cf633 100644 --- a/vendor/golang.org/x/sys/windows/dll_windows.go +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -65,7 +65,7 @@ func LoadDLL(name string) (dll *DLL, err error) { return d, nil } -// MustLoadDLL is like LoadDLL but panics if load operation failes. +// MustLoadDLL is like LoadDLL but panics if load operation fails. func MustLoadDLL(name string) *DLL { d, e := LoadDLL(name) if e != nil { diff --git a/vendor/golang.org/x/time/LICENSE b/vendor/golang.org/x/time/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/time/LICENSE +++ b/vendor/golang.org/x/time/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. 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 + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index f0e0cf3cb1..93a798ab63 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit { // or its associated context.Context is canceled. // // The methods AllowN, ReserveN, and WaitN consume n tokens. +// +// Limiter is safe for simultaneous use by multiple goroutines. type Limiter struct { mu sync.Mutex limit Limit @@ -97,8 +99,9 @@ func (lim *Limiter) Tokens() float64 { // bursts of at most b tokens. func NewLimiter(r Limit, b int) *Limiter { return &Limiter{ - limit: r, - burst: b, + limit: r, + burst: b, + tokens: float64(b), } } @@ -342,18 +345,6 @@ func (lim *Limiter) reserveN(t time.Time, n int, maxFutureReserve time.Duration) tokens: n, timeToAct: t, } - } else if lim.limit == 0 { - var ok bool - if lim.burst >= n { - ok = true - lim.burst -= n - } - return Reservation{ - ok: ok, - lim: lim, - tokens: lim.burst, - timeToAct: t, - } } t, tokens := lim.advance(t) diff --git a/vendor/golang.org/x/tools/LICENSE b/vendor/golang.org/x/tools/LICENSE index 6a66aea5ea..2a7cf70da6 100644 --- a/vendor/golang.org/x/tools/LICENSE +++ b/vendor/golang.org/x/tools/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. 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 + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go index 2c4c4e2328..6e34df4613 100644 --- a/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go +++ b/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go @@ -106,8 +106,21 @@ func PathEnclosingInterval(root *ast.File, start, end token.Pos) (path []ast.Nod // Does augmented child strictly contain [start, end)? if augPos <= start && end <= augEnd { - _, isToken := child.(tokenNode) - return isToken || visit(child) + if is[tokenNode](child) { + return true + } + + // childrenOf elides the FuncType node beneath FuncDecl. + // Add it back here for TypeParams, Params, Results, + // all FieldLists). But we don't add it back for the "func" token + // even though it is is the tree at FuncDecl.Type.Func. + if decl, ok := node.(*ast.FuncDecl); ok { + if fields, ok := child.(*ast.FieldList); ok && fields != decl.Recv { + path = append(path, decl.Type) + } + } + + return visit(child) } // Does [start, end) overlap multiple children? @@ -313,6 +326,8 @@ func childrenOf(n ast.Node) []ast.Node { // // As a workaround, we inline the case for FuncType // here and order things correctly. + // We also need to insert the elided FuncType just + // before the 'visit' recursion. // children = nil // discard ast.Walk(FuncDecl) info subtrees children = append(children, tok(n.Type.Func, len("func"))) @@ -632,3 +647,8 @@ func NodeDescription(n ast.Node) string { } panic(fmt.Sprintf("unexpected node type: %T", n)) } + +func is[T any](x any) bool { + _, ok := x.(T) + return ok +} diff --git a/vendor/golang.org/x/tools/go/ast/astutil/util.go b/vendor/golang.org/x/tools/go/ast/astutil/util.go index 919d5305ab..ca71e3e105 100644 --- a/vendor/golang.org/x/tools/go/ast/astutil/util.go +++ b/vendor/golang.org/x/tools/go/ast/astutil/util.go @@ -7,12 +7,5 @@ package astutil import "go/ast" // Unparen returns e with any enclosing parentheses stripped. -func Unparen(e ast.Expr) ast.Expr { - for { - p, ok := e.(*ast.ParenExpr) - if !ok { - return e - } - e = p.X - } -} +// Deprecated: use [ast.Unparen]. +func Unparen(e ast.Expr) ast.Expr { return ast.Unparen(e) } diff --git a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go b/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go deleted file mode 100644 index 333676b7cf..0000000000 --- a/vendor/golang.org/x/tools/go/internal/packagesdriver/sizes.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package packagesdriver fetches type sizes for go/packages and go/analysis. -package packagesdriver - -import ( - "context" - "fmt" - "strings" - - "golang.org/x/tools/internal/gocommand" -) - -func GetSizesForArgsGolist(ctx context.Context, inv gocommand.Invocation, gocmdRunner *gocommand.Runner) (string, string, error) { - inv.Verb = "list" - inv.Args = []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"} - stdout, stderr, friendlyErr, rawErr := gocmdRunner.RunRaw(ctx, inv) - var goarch, compiler string - if rawErr != nil { - rawErrMsg := rawErr.Error() - if strings.Contains(rawErrMsg, "cannot find main module") || - strings.Contains(rawErrMsg, "go.mod file not found") { - // User's running outside of a module. - // All bets are off. Get GOARCH and guess compiler is gc. - // TODO(matloob): Is this a problem in practice? - inv.Verb = "env" - inv.Args = []string{"GOARCH"} - envout, enverr := gocmdRunner.Run(ctx, inv) - if enverr != nil { - return "", "", enverr - } - goarch = strings.TrimSpace(envout.String()) - compiler = "gc" - } else if friendlyErr != nil { - return "", "", friendlyErr - } else { - // This should be unreachable, but be defensive - // in case RunRaw's error results are inconsistent. - return "", "", rawErr - } - } else { - fields := strings.Fields(stdout.String()) - if len(fields) < 2 { - return "", "", fmt.Errorf("could not parse GOARCH and Go compiler in format \" \":\nstdout: <<%s>>\nstderr: <<%s>>", - stdout.String(), stderr.String()) - } - goarch = fields[0] - compiler = fields[1] - } - return compiler, goarch, nil -} diff --git a/vendor/golang.org/x/tools/go/packages/doc.go b/vendor/golang.org/x/tools/go/packages/doc.go index a8d7b06ac0..f1931d10ee 100644 --- a/vendor/golang.org/x/tools/go/packages/doc.go +++ b/vendor/golang.org/x/tools/go/packages/doc.go @@ -64,7 +64,7 @@ graph using the Imports fields. The Load function can be configured by passing a pointer to a Config as the first argument. A nil Config is equivalent to the zero Config, which -causes Load to run in LoadFiles mode, collecting minimal information. +causes Load to run in [LoadFiles] mode, collecting minimal information. See the documentation for type Config for details. As noted earlier, the Config.Mode controls the amount of detail @@ -72,14 +72,14 @@ reported about the loaded packages. See the documentation for type LoadMode for details. Most tools should pass their command-line arguments (after any flags) -uninterpreted to [Load], so that it can interpret them +uninterpreted to Load, so that it can interpret them according to the conventions of the underlying build system. See the Example function for typical usage. # The driver protocol -[Load] may be used to load Go packages even in Go projects that use +Load may be used to load Go packages even in Go projects that use alternative build systems, by installing an appropriate "driver" program for the build system and specifying its location in the GOPACKAGESDRIVER environment variable. @@ -97,6 +97,15 @@ JSON-encoded [DriverRequest] message providing additional information is written to the driver's standard input. The driver must write a JSON-encoded [DriverResponse] message to its standard output. (This message differs from the JSON schema produced by 'go list'.) + +The value of the PWD environment variable seen by the driver process +is the preferred name of its working directory. (The working directory +may have other aliases due to symbolic links; see the comment on the +Dir field of [exec.Cmd] for related information.) +When the driver process emits in its response the name of a file +that is a descendant of this directory, it must use an absolute path +that has the value of PWD as a prefix, to ensure that the returned +filenames satisfy the original query. */ package packages // import "golang.org/x/tools/go/packages" @@ -198,14 +207,6 @@ Instead, ssadump no longer requests the runtime package, but seeks it among the dependencies of the user-specified packages, and emits an error if it is not found. -Overlays: The Overlay field in the Config allows providing alternate contents -for Go source files, by providing a mapping from file path to contents. -go/packages will pull in new imports added in overlay files when go/packages -is run in LoadImports mode or greater. -Overlay support for the go list driver isn't complete yet: if the file doesn't -exist on disk, it will only be recognized in an overlay if it is a non-test file -and the package would be reported even without the overlay. - Questions & Tasks - Add GOARCH/GOOS? diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go index 4335c1eb14..8f7afcb5df 100644 --- a/vendor/golang.org/x/tools/go/packages/external.go +++ b/vendor/golang.org/x/tools/go/packages/external.go @@ -34,8 +34,8 @@ type DriverRequest struct { // Tests specifies whether the patterns should also return test packages. Tests bool `json:"tests"` - // Overlay maps file paths (relative to the driver's working directory) to the byte contents - // of overlay files. + // Overlay maps file paths (relative to the driver's working directory) + // to the contents of overlay files (see Config.Overlay). Overlay map[string][]byte `json:"overlay"` } @@ -82,7 +82,7 @@ type DriverResponse struct { type driver func(cfg *Config, patterns ...string) (*DriverResponse, error) // findExternalDriver returns the file path of a tool that supplies -// the build system package structure, or "" if not found." +// the build system package structure, or "" if not found. // If GOPACKAGESDRIVER is set in the environment findExternalTool returns its // value, otherwise it searches for a binary named gopackagesdriver on the PATH. func findExternalDriver(cfg *Config) driver { @@ -119,7 +119,19 @@ func findExternalDriver(cfg *Config) driver { stderr := new(bytes.Buffer) cmd := exec.CommandContext(cfg.Context, tool, words...) cmd.Dir = cfg.Dir - cmd.Env = cfg.Env + // The cwd gets resolved to the real path. On Darwin, where + // /tmp is a symlink, this breaks anything that expects the + // working directory to keep the original path, including the + // go command when dealing with modules. + // + // os.Getwd stdlib has a special feature where if the + // cwd and the PWD are the same node then it trusts + // the PWD, so by setting it in the env for the child + // process we fix up all the paths returned by the go + // command. + // + // (See similar trick in Invocation.run in ../../internal/gocommand/invoke.go) + cmd.Env = append(slicesClip(cfg.Env), "PWD="+cfg.Dir) cmd.Stdin = bytes.NewReader(req) cmd.Stdout = buf cmd.Stderr = stderr @@ -138,3 +150,7 @@ func findExternalDriver(cfg *Config) driver { return &response, nil } } + +// slicesClip removes unused capacity from the slice, returning s[:len(s):len(s)]. +// TODO(adonovan): use go1.21 slices.Clip. +func slicesClip[S ~[]E, E any](s S) S { return s[:len(s):len(s)] } diff --git a/vendor/golang.org/x/tools/go/packages/golist.go b/vendor/golang.org/x/tools/go/packages/golist.go index 22305d9c90..1a3a5b44f5 100644 --- a/vendor/golang.org/x/tools/go/packages/golist.go +++ b/vendor/golang.org/x/tools/go/packages/golist.go @@ -21,7 +21,6 @@ import ( "sync" "unicode" - "golang.org/x/tools/go/internal/packagesdriver" "golang.org/x/tools/internal/gocommand" "golang.org/x/tools/internal/packagesinternal" ) @@ -149,7 +148,7 @@ func goListDriver(cfg *Config, patterns ...string) (_ *DriverResponse, err error if cfg.Mode&NeedTypesSizes != 0 || cfg.Mode&NeedTypes != 0 { errCh := make(chan error) go func() { - compiler, arch, err := packagesdriver.GetSizesForArgsGolist(ctx, state.cfgInvocation(), cfg.gocmdRunner) + compiler, arch, err := getSizesForArgs(ctx, state.cfgInvocation(), cfg.gocmdRunner) response.dr.Compiler = compiler response.dr.Arch = arch errCh <- err @@ -841,6 +840,7 @@ func (state *golistState) cfgInvocation() gocommand.Invocation { Env: cfg.Env, Logf: cfg.Logf, WorkingDir: cfg.Dir, + Overlay: cfg.goListOverlayFile, } } @@ -849,26 +849,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, cfg := state.cfg inv := state.cfgInvocation() - - // For Go versions 1.16 and above, `go list` accepts overlays directly via - // the -overlay flag. Set it, if it's available. - // - // The check for "list" is not necessarily required, but we should avoid - // getting the go version if possible. - if verb == "list" { - goVersion, err := state.getGoVersion() - if err != nil { - return nil, err - } - if goVersion >= 16 { - filename, cleanup, err := state.writeOverlays() - if err != nil { - return nil, err - } - defer cleanup() - inv.Overlay = filename - } - } inv.Verb = verb inv.Args = args gocmdRunner := cfg.gocmdRunner @@ -1015,67 +995,6 @@ func (state *golistState) invokeGo(verb string, args ...string) (*bytes.Buffer, return stdout, nil } -// OverlayJSON is the format overlay files are expected to be in. -// The Replace map maps from overlaid paths to replacement paths: -// the Go command will forward all reads trying to open -// each overlaid path to its replacement path, or consider the overlaid -// path not to exist if the replacement path is empty. -// -// From golang/go#39958. -type OverlayJSON struct { - Replace map[string]string `json:"replace,omitempty"` -} - -// writeOverlays writes out files for go list's -overlay flag, as described -// above. -func (state *golistState) writeOverlays() (filename string, cleanup func(), err error) { - // Do nothing if there are no overlays in the config. - if len(state.cfg.Overlay) == 0 { - return "", func() {}, nil - } - dir, err := os.MkdirTemp("", "gopackages-*") - if err != nil { - return "", nil, err - } - // The caller must clean up this directory, unless this function returns an - // error. - cleanup = func() { - os.RemoveAll(dir) - } - defer func() { - if err != nil { - cleanup() - } - }() - overlays := map[string]string{} - for k, v := range state.cfg.Overlay { - // Create a unique filename for the overlaid files, to avoid - // creating nested directories. - noSeparator := strings.Join(strings.Split(filepath.ToSlash(k), "/"), "") - f, err := os.CreateTemp(dir, fmt.Sprintf("*-%s", noSeparator)) - if err != nil { - return "", func() {}, err - } - if _, err := f.Write(v); err != nil { - return "", func() {}, err - } - if err := f.Close(); err != nil { - return "", func() {}, err - } - overlays[k] = f.Name() - } - b, err := json.Marshal(OverlayJSON{Replace: overlays}) - if err != nil { - return "", func() {}, err - } - // Write out the overlay file that contains the filepath mappings. - filename = filepath.Join(dir, "overlay.json") - if err := os.WriteFile(filename, b, 0665); err != nil { - return "", func() {}, err - } - return filename, cleanup, nil -} - func containsGoFile(s []string) bool { for _, f := range s { if strings.HasSuffix(f, ".go") { @@ -1104,3 +1023,44 @@ func cmdDebugStr(cmd *exec.Cmd) string { } return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], strings.Join(args, " ")) } + +// getSizesForArgs queries 'go list' for the appropriate +// Compiler and GOARCH arguments to pass to [types.SizesFor]. +func getSizesForArgs(ctx context.Context, inv gocommand.Invocation, gocmdRunner *gocommand.Runner) (string, string, error) { + inv.Verb = "list" + inv.Args = []string{"-f", "{{context.GOARCH}} {{context.Compiler}}", "--", "unsafe"} + stdout, stderr, friendlyErr, rawErr := gocmdRunner.RunRaw(ctx, inv) + var goarch, compiler string + if rawErr != nil { + rawErrMsg := rawErr.Error() + if strings.Contains(rawErrMsg, "cannot find main module") || + strings.Contains(rawErrMsg, "go.mod file not found") { + // User's running outside of a module. + // All bets are off. Get GOARCH and guess compiler is gc. + // TODO(matloob): Is this a problem in practice? + inv.Verb = "env" + inv.Args = []string{"GOARCH"} + envout, enverr := gocmdRunner.Run(ctx, inv) + if enverr != nil { + return "", "", enverr + } + goarch = strings.TrimSpace(envout.String()) + compiler = "gc" + } else if friendlyErr != nil { + return "", "", friendlyErr + } else { + // This should be unreachable, but be defensive + // in case RunRaw's error results are inconsistent. + return "", "", rawErr + } + } else { + fields := strings.Fields(stdout.String()) + if len(fields) < 2 { + return "", "", fmt.Errorf("could not parse GOARCH and Go compiler in format \" \":\nstdout: <<%s>>\nstderr: <<%s>>", + stdout.String(), stderr.String()) + } + goarch = fields[0] + compiler = fields[1] + } + return compiler, goarch, nil +} diff --git a/vendor/golang.org/x/tools/go/packages/loadmode_string.go b/vendor/golang.org/x/tools/go/packages/loadmode_string.go index 5c080d21b5..5fcad6ea6d 100644 --- a/vendor/golang.org/x/tools/go/packages/loadmode_string.go +++ b/vendor/golang.org/x/tools/go/packages/loadmode_string.go @@ -9,49 +9,46 @@ import ( "strings" ) -var allModes = []LoadMode{ - NeedName, - NeedFiles, - NeedCompiledGoFiles, - NeedImports, - NeedDeps, - NeedExportFile, - NeedTypes, - NeedSyntax, - NeedTypesInfo, - NeedTypesSizes, +var modes = [...]struct { + mode LoadMode + name string +}{ + {NeedName, "NeedName"}, + {NeedFiles, "NeedFiles"}, + {NeedCompiledGoFiles, "NeedCompiledGoFiles"}, + {NeedImports, "NeedImports"}, + {NeedDeps, "NeedDeps"}, + {NeedExportFile, "NeedExportFile"}, + {NeedTypes, "NeedTypes"}, + {NeedSyntax, "NeedSyntax"}, + {NeedTypesInfo, "NeedTypesInfo"}, + {NeedTypesSizes, "NeedTypesSizes"}, + {NeedModule, "NeedModule"}, + {NeedEmbedFiles, "NeedEmbedFiles"}, + {NeedEmbedPatterns, "NeedEmbedPatterns"}, } -var modeStrings = []string{ - "NeedName", - "NeedFiles", - "NeedCompiledGoFiles", - "NeedImports", - "NeedDeps", - "NeedExportFile", - "NeedTypes", - "NeedSyntax", - "NeedTypesInfo", - "NeedTypesSizes", -} - -func (mod LoadMode) String() string { - m := mod - if m == 0 { +func (mode LoadMode) String() string { + if mode == 0 { return "LoadMode(0)" } var out []string - for i, x := range allModes { - if x > m { - break + // named bits + for _, item := range modes { + if (mode & item.mode) != 0 { + mode ^= item.mode + out = append(out, item.name) } - if (m & x) != 0 { - out = append(out, modeStrings[i]) - m = m ^ x + } + // unnamed residue + if mode != 0 { + if out == nil { + return fmt.Sprintf("LoadMode(%#x)", int(mode)) } + out = append(out, fmt.Sprintf("%#x", int(mode))) } - if m != 0 { - out = append(out, "Unknown") + if len(out) == 1 { + return out[0] } - return fmt.Sprintf("LoadMode(%s)", strings.Join(out, "|")) + return "(" + strings.Join(out, "|") + ")" } diff --git a/vendor/golang.org/x/tools/go/packages/packages.go b/vendor/golang.org/x/tools/go/packages/packages.go index 3ea1b3fa46..f227f1bab1 100644 --- a/vendor/golang.org/x/tools/go/packages/packages.go +++ b/vendor/golang.org/x/tools/go/packages/packages.go @@ -37,10 +37,19 @@ import ( // A LoadMode controls the amount of detail to return when loading. // The bits below can be combined to specify which fields should be // filled in the result packages. +// // The zero value is a special case, equivalent to combining // the NeedName, NeedFiles, and NeedCompiledGoFiles bits. +// // ID and Errors (if present) will always be filled. -// Load may return more information than requested. +// [Load] may return more information than requested. +// +// Unfortunately there are a number of open bugs related to +// interactions among the LoadMode bits: +// - https://github.com/golang/go/issues/56633 +// - https://github.com/golang/go/issues/56677 +// - https://github.com/golang/go/issues/58726 +// - https://github.com/golang/go/issues/63517 type LoadMode int const ( @@ -66,7 +75,7 @@ const ( // NeedTypes adds Types, Fset, and IllTyped. NeedTypes - // NeedSyntax adds Syntax. + // NeedSyntax adds Syntax and Fset. NeedSyntax // NeedTypesInfo adds TypesInfo. @@ -94,25 +103,37 @@ const ( // NeedEmbedPatterns adds EmbedPatterns. NeedEmbedPatterns + + // Be sure to update loadmode_string.go when adding new items! ) const ( + // LoadFiles loads the name and file names for the initial packages. + // // Deprecated: LoadFiles exists for historical compatibility // and should not be used. Please directly specify the needed fields using the Need values. LoadFiles = NeedName | NeedFiles | NeedCompiledGoFiles + // LoadImports loads the name, file names, and import mapping for the initial packages. + // // Deprecated: LoadImports exists for historical compatibility // and should not be used. Please directly specify the needed fields using the Need values. LoadImports = LoadFiles | NeedImports + // LoadTypes loads exported type information for the initial packages. + // // Deprecated: LoadTypes exists for historical compatibility // and should not be used. Please directly specify the needed fields using the Need values. LoadTypes = LoadImports | NeedTypes | NeedTypesSizes + // LoadSyntax loads typed syntax for the initial packages. + // // Deprecated: LoadSyntax exists for historical compatibility // and should not be used. Please directly specify the needed fields using the Need values. LoadSyntax = LoadTypes | NeedSyntax | NeedTypesInfo + // LoadAllSyntax loads typed syntax for the initial packages and all dependencies. + // // Deprecated: LoadAllSyntax exists for historical compatibility // and should not be used. Please directly specify the needed fields using the Need values. LoadAllSyntax = LoadSyntax | NeedDeps @@ -123,7 +144,14 @@ const ( // A Config specifies details about how packages should be loaded. // The zero value is a valid configuration. +// // Calls to Load do not modify this struct. +// +// TODO(adonovan): #67702: this is currently false: in fact, +// calls to [Load] do not modify the public fields of this struct, but +// may modify hidden fields, so concurrent calls to [Load] must not +// use the same Config. But perhaps we should reestablish the +// documented invariant. type Config struct { // Mode controls the level of information returned for each package. Mode LoadMode @@ -199,19 +227,42 @@ type Config struct { // setting Tests may have no effect. Tests bool - // Overlay provides a mapping of absolute file paths to file contents. - // If the file with the given path already exists, the parser will use the - // alternative file contents provided by the map. + // Overlay is a mapping from absolute file paths to file contents. + // + // For each map entry, [Load] uses the alternative file + // contents provided by the overlay mapping instead of reading + // from the file system. This mechanism can be used to enable + // editor-integrated tools to correctly analyze the contents + // of modified but unsaved buffers, for example. // - // Overlays provide incomplete support for when a given file doesn't - // already exist on disk. See the package doc above for more details. + // The overlay mapping is passed to the build system's driver + // (see "The driver protocol") so that it too can report + // consistent package metadata about unsaved files. However, + // drivers may vary in their level of support for overlays. Overlay map[string][]byte + + // goListOverlayFile is the JSON file that encodes the Overlay + // mapping, used by 'go list -overlay=...' + goListOverlayFile string } // Load loads and returns the Go packages named by the given patterns. // -// Config specifies loading options; -// nil behaves the same as an empty Config. +// The cfg parameter specifies loading options; nil behaves the same as an empty [Config]. +// +// The [Config.Mode] field is a set of bits that determine what kinds +// of information should be computed and returned. Modes that require +// more information tend to be slower. See [LoadMode] for details +// and important caveats. Its zero value is equivalent to +// [NeedName] | [NeedFiles] | [NeedCompiledGoFiles]. +// +// Each call to Load returns a new set of [Package] instances. +// The Packages and their Imports form a directed acyclic graph. +// +// If the [NeedTypes] mode flag was set, each call to Load uses a new +// [types.Importer], so [types.Object] and [types.Type] values from +// different calls to Load must not be mixed as they will have +// inconsistent notions of type identity. // // If any of the patterns was invalid as defined by the // underlying build system, Load returns an error. @@ -220,7 +271,7 @@ type Config struct { // Errors associated with a particular package are recorded in the // corresponding Package's Errors list, and do not cause Load to // return an error. Clients may need to handle such errors before -// proceeding with further analysis. The PrintErrors function is +// proceeding with further analysis. The [PrintErrors] function is // provided for convenient display of all errors. func Load(cfg *Config, patterns ...string) ([]*Package, error) { ld := newLoader(cfg) @@ -286,6 +337,17 @@ func defaultDriver(cfg *Config, patterns ...string) (*DriverResponse, bool, erro // (fall through) } + // go list fallback + // + // Write overlays once, as there are many calls + // to 'go list' (one per chunk plus others too). + overlay, cleanupOverlay, err := gocommand.WriteOverlays(cfg.Overlay) + if err != nil { + return nil, false, err + } + defer cleanupOverlay() + cfg.goListOverlayFile = overlay + response, err := callDriverOnChunks(goListDriver, cfg, chunks) if err != nil { return nil, false, err @@ -365,6 +427,9 @@ func mergeResponses(responses ...*DriverResponse) *DriverResponse { } // A Package describes a loaded Go package. +// +// It also defines part of the JSON schema of [DriverResponse]. +// See the package documentation for an overview. type Package struct { // ID is a unique identifier for a package, // in a syntax provided by the underlying build system. @@ -423,6 +488,13 @@ type Package struct { // to corresponding loaded Packages. Imports map[string]*Package + // Module is the module information for the package if it exists. + // + // Note: it may be missing for std and cmd; see Go issue #65816. + Module *Module + + // -- The following fields are not part of the driver JSON schema. -- + // Types provides type information for the package. // The NeedTypes LoadMode bit sets this field for packages matching the // patterns; type information for dependencies may be missing or incomplete, @@ -431,15 +503,15 @@ type Package struct { // Each call to [Load] returns a consistent set of type // symbols, as defined by the comment at [types.Identical]. // Avoid mixing type information from two or more calls to [Load]. - Types *types.Package + Types *types.Package `json:"-"` // Fset provides position information for Types, TypesInfo, and Syntax. // It is set only when Types is set. - Fset *token.FileSet + Fset *token.FileSet `json:"-"` // IllTyped indicates whether the package or any dependency contains errors. // It is set only when Types is set. - IllTyped bool + IllTyped bool `json:"-"` // Syntax is the package's syntax trees, for the files listed in CompiledGoFiles. // @@ -449,26 +521,28 @@ type Package struct { // // Syntax is kept in the same order as CompiledGoFiles, with the caveat that nils are // removed. If parsing returned nil, Syntax may be shorter than CompiledGoFiles. - Syntax []*ast.File + Syntax []*ast.File `json:"-"` // TypesInfo provides type information about the package's syntax trees. // It is set only when Syntax is set. - TypesInfo *types.Info + TypesInfo *types.Info `json:"-"` // TypesSizes provides the effective size function for types in TypesInfo. - TypesSizes types.Sizes + TypesSizes types.Sizes `json:"-"` + + // -- internal -- // forTest is the package under test, if any. forTest string // depsErrors is the DepsErrors field from the go list response, if any. depsErrors []*packagesinternal.PackageError - - // module is the module information for the package if it exists. - Module *Module } // Module provides module information for a package. +// +// It also defines part of the JSON schema of [DriverResponse]. +// See the package documentation for an overview. type Module struct { Path string // module path Version string // module version @@ -601,6 +675,7 @@ func (p *Package) UnmarshalJSON(b []byte) error { OtherFiles: flat.OtherFiles, EmbedFiles: flat.EmbedFiles, EmbedPatterns: flat.EmbedPatterns, + IgnoredFiles: flat.IgnoredFiles, ExportFile: flat.ExportFile, } if len(flat.Imports) > 0 { @@ -699,6 +774,7 @@ func newLoader(cfg *Config) *loader { // because we load source if export data is missing. if ld.ParseFile == nil { ld.ParseFile = func(fset *token.FileSet, filename string, src []byte) (*ast.File, error) { + // We implicitly promise to keep doing ast.Object resolution. :( const mode = parser.AllErrors | parser.ParseComments return parser.ParseFile(fset, filename, src, mode) } @@ -896,12 +972,14 @@ func (ld *loader) refine(response *DriverResponse) ([]*Package, error) { } if ld.requestedMode&NeedTypes == 0 { ld.pkgs[i].Types = nil - ld.pkgs[i].Fset = nil ld.pkgs[i].IllTyped = false } if ld.requestedMode&NeedSyntax == 0 { ld.pkgs[i].Syntax = nil } + if ld.requestedMode&NeedTypes == 0 && ld.requestedMode&NeedSyntax == 0 { + ld.pkgs[i].Fset = nil + } if ld.requestedMode&NeedTypesInfo == 0 { ld.pkgs[i].TypesInfo = nil } @@ -1434,6 +1512,10 @@ func impliedLoadMode(loadMode LoadMode) LoadMode { // All these things require knowing the import graph. loadMode |= NeedImports } + if loadMode&NeedTypes != 0 { + // Types require the GoVersion from Module. + loadMode |= NeedModule + } return loadMode } diff --git a/vendor/golang.org/x/tools/go/packages/visit.go b/vendor/golang.org/x/tools/go/packages/visit.go index a1dcc40b72..df14ffd94d 100644 --- a/vendor/golang.org/x/tools/go/packages/visit.go +++ b/vendor/golang.org/x/tools/go/packages/visit.go @@ -49,11 +49,20 @@ func Visit(pkgs []*Package, pre func(*Package) bool, post func(*Package)) { // PrintErrors returns the number of errors printed. func PrintErrors(pkgs []*Package) int { var n int + errModules := make(map[*Module]bool) Visit(pkgs, nil, func(pkg *Package) { for _, err := range pkg.Errors { fmt.Fprintln(os.Stderr, err) n++ } + + // Print pkg.Module.Error once if present. + mod := pkg.Module + if mod != nil && mod.Error != nil && !errModules[mod] { + errModules[mod] = true + fmt.Fprintln(os.Stderr, mod.Error.Err) + n++ + } }) return n } diff --git a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go index a2386c347a..a70b727f2c 100644 --- a/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go +++ b/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go @@ -51,7 +51,7 @@ type Path string // // PO package->object Package.Scope.Lookup // OT object->type Object.Type -// TT type->type Type.{Elem,Key,Params,Results,Underlying} [EKPRU] +// TT type->type Type.{Elem,Key,{,{,Recv}Type}Params,Results,Underlying,Rhs} [EKPRUTrCa] // TO type->object Type.{At,Field,Method,Obj} [AFMO] // // All valid paths start with a package and end at an object @@ -63,8 +63,8 @@ type Path string // - The only PO operator is Package.Scope.Lookup, which requires an identifier. // - The only OT operator is Object.Type, // which we encode as '.' because dot cannot appear in an identifier. -// - The TT operators are encoded as [EKPRUTC]; -// one of these (TypeParam) requires an integer operand, +// - The TT operators are encoded as [EKPRUTrCa]; +// two of these ({,Recv}TypeParams) require an integer operand, // which is encoded as a string of decimal digits. // - The TO operators are encoded as [AFMO]; // three of these (At,Field,Method) require an integer operand, @@ -98,19 +98,21 @@ const ( opType = '.' // .Type() (Object) // type->type operators - opElem = 'E' // .Elem() (Pointer, Slice, Array, Chan, Map) - opKey = 'K' // .Key() (Map) - opParams = 'P' // .Params() (Signature) - opResults = 'R' // .Results() (Signature) - opUnderlying = 'U' // .Underlying() (Named) - opTypeParam = 'T' // .TypeParams.At(i) (Named, Signature) - opConstraint = 'C' // .Constraint() (TypeParam) + opElem = 'E' // .Elem() (Pointer, Slice, Array, Chan, Map) + opKey = 'K' // .Key() (Map) + opParams = 'P' // .Params() (Signature) + opResults = 'R' // .Results() (Signature) + opUnderlying = 'U' // .Underlying() (Named) + opTypeParam = 'T' // .TypeParams.At(i) (Named, Signature) + opRecvTypeParam = 'r' // .RecvTypeParams.At(i) (Signature) + opConstraint = 'C' // .Constraint() (TypeParam) + opRhs = 'a' // .Rhs() (Alias) // type->object operators - opAt = 'A' // .At(i) (Tuple) - opField = 'F' // .Field(i) (Struct) - opMethod = 'M' // .Method(i) (Named or Interface; not Struct: "promoted" names are ignored) - opObj = 'O' // .Obj() (Named, TypeParam) + opAt = 'A' // .At(i) (Tuple) + opField = 'F' // .Field(i) (Struct) + opMethod = 'M' // .Method(i) (Named or Interface; not Struct: "promoted" names are ignored) + opObj = 'O' // .Obj() (Named, TypeParam) ) // For is equivalent to new(Encoder).For(obj). @@ -226,7 +228,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { // Reject obviously non-viable cases. switch obj := obj.(type) { case *types.TypeName: - if _, ok := aliases.Unalias(obj.Type()).(*types.TypeParam); !ok { + if _, ok := types.Unalias(obj.Type()).(*types.TypeParam); !ok { // With the exception of type parameters, only package-level type names // have a path. return "", fmt.Errorf("no path for %v", obj) @@ -278,21 +280,26 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { path = append(path, opType) T := o.Type() + if alias, ok := T.(*types.Alias); ok { + if r := findTypeParam(obj, aliases.TypeParams(alias), path, opTypeParam, nil); r != nil { + return Path(r), nil + } + if r := find(obj, aliases.Rhs(alias), append(path, opRhs), nil); r != nil { + return Path(r), nil + } - if tname.IsAlias() { - // type alias + } else if tname.IsAlias() { + // legacy alias if r := find(obj, T, path, nil); r != nil { return Path(r), nil } - } else { - if named, _ := T.(*types.Named); named != nil { - if r := findTypeParam(obj, named.TypeParams(), path, nil); r != nil { - // generic named type - return Path(r), nil - } - } + + } else if named, ok := T.(*types.Named); ok { // defined (named) type - if r := find(obj, T.Underlying(), append(path, opUnderlying), nil); r != nil { + if r := findTypeParam(obj, named.TypeParams(), path, opTypeParam, nil); r != nil { + return Path(r), nil + } + if r := find(obj, named.Underlying(), append(path, opUnderlying), nil); r != nil { return Path(r), nil } } @@ -313,7 +320,7 @@ func (enc *Encoder) For(obj types.Object) (Path, error) { } // Inspect declared methods of defined types. - if T, ok := aliases.Unalias(o.Type()).(*types.Named); ok { + if T, ok := types.Unalias(o.Type()).(*types.Named); ok { path = append(path, opType) // The method index here is always with respect // to the underlying go/types data structures, @@ -442,8 +449,8 @@ func (enc *Encoder) concreteMethod(meth *types.Func) (Path, bool) { // nil, it will be allocated as necessary. func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName]bool) []byte { switch T := T.(type) { - case *aliases.Alias: - return find(obj, aliases.Unalias(T), path, seen) + case *types.Alias: + return find(obj, types.Unalias(T), path, seen) case *types.Basic, *types.Named: // Named types belonging to pkg were handled already, // so T must belong to another package. No path. @@ -462,7 +469,10 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName] } return find(obj, T.Elem(), append(path, opElem), seen) case *types.Signature: - if r := findTypeParam(obj, T.TypeParams(), path, seen); r != nil { + if r := findTypeParam(obj, T.RecvTypeParams(), path, opRecvTypeParam, nil); r != nil { + return r + } + if r := findTypeParam(obj, T.TypeParams(), path, opTypeParam, seen); r != nil { return r } if r := find(obj, T.Params(), append(path, opParams), seen); r != nil { @@ -525,10 +535,10 @@ func find(obj types.Object, T types.Type, path []byte, seen map[*types.TypeName] panic(T) } -func findTypeParam(obj types.Object, list *types.TypeParamList, path []byte, seen map[*types.TypeName]bool) []byte { +func findTypeParam(obj types.Object, list *types.TypeParamList, path []byte, op byte, seen map[*types.TypeName]bool) []byte { for i := 0; i < list.Len(); i++ { tparam := list.At(i) - path2 := appendOpArg(path, opTypeParam, i) + path2 := appendOpArg(path, op, i) if r := find(obj, tparam, path2, seen); r != nil { return r } @@ -580,10 +590,10 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { code := suffix[0] suffix = suffix[1:] - // Codes [AFM] have an integer operand. + // Codes [AFMTr] have an integer operand. var index int switch code { - case opAt, opField, opMethod, opTypeParam: + case opAt, opField, opMethod, opTypeParam, opRecvTypeParam: rest := strings.TrimLeft(suffix, "0123456789") numerals := suffix[:len(suffix)-len(rest)] suffix = rest @@ -616,7 +626,7 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { // Inv: t != nil, obj == nil - t = aliases.Unalias(t) + t = types.Unalias(t) switch code { case opElem: hasElem, ok := t.(hasElem) // Pointer, Slice, Array, Chan, Map @@ -653,6 +663,16 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { } t = named.Underlying() + case opRhs: + if alias, ok := t.(*types.Alias); ok { + t = aliases.Rhs(alias) + } else if false && aliases.Enabled() { + // The Enabled check is too expensive, so for now we + // simply assume that aliases are not enabled. + // TODO(adonovan): replace with "if true {" when go1.24 is assured. + return nil, fmt.Errorf("cannot apply %q to %s (got %T, want alias)", code, t, t) + } + case opTypeParam: hasTypeParams, ok := t.(hasTypeParams) // Named, Signature if !ok { @@ -664,6 +684,17 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { } t = tparams.At(index) + case opRecvTypeParam: + sig, ok := t.(*types.Signature) // Signature + if !ok { + return nil, fmt.Errorf("cannot apply %q to %s (got %T, want signature)", code, t, t) + } + rtparams := sig.RecvTypeParams() + if n := rtparams.Len(); index >= n { + return nil, fmt.Errorf("tuple index %d out of range [0-%d)", index, n) + } + t = rtparams.At(index) + case opConstraint: tparam, ok := t.(*types.TypeParam) if !ok { @@ -725,6 +756,10 @@ func Object(pkg *types.Package, p Path) (types.Object, error) { } } + if obj == nil { + panic(p) // path does not end in an object-valued operator + } + if obj.Pkg() != pkg { return nil, fmt.Errorf("path denotes %s, which belongs to a different package", obj) } diff --git a/vendor/golang.org/x/tools/go/types/typeutil/callee.go b/vendor/golang.org/x/tools/go/types/typeutil/callee.go new file mode 100644 index 0000000000..754380351e --- /dev/null +++ b/vendor/golang.org/x/tools/go/types/typeutil/callee.go @@ -0,0 +1,68 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typeutil + +import ( + "go/ast" + "go/types" + + "golang.org/x/tools/internal/typeparams" +) + +// Callee returns the named target of a function call, if any: +// a function, method, builtin, or variable. +// +// Functions and methods may potentially have type parameters. +func Callee(info *types.Info, call *ast.CallExpr) types.Object { + fun := ast.Unparen(call.Fun) + + // Look through type instantiation if necessary. + isInstance := false + switch fun.(type) { + case *ast.IndexExpr, *ast.IndexListExpr: + // When extracting the callee from an *IndexExpr, we need to check that + // it is a *types.Func and not a *types.Var. + // Example: Don't match a slice m within the expression `m[0]()`. + isInstance = true + fun, _, _, _ = typeparams.UnpackIndexExpr(fun) + } + + var obj types.Object + switch fun := fun.(type) { + case *ast.Ident: + obj = info.Uses[fun] // type, var, builtin, or declared func + case *ast.SelectorExpr: + if sel, ok := info.Selections[fun]; ok { + obj = sel.Obj() // method or field + } else { + obj = info.Uses[fun.Sel] // qualified identifier? + } + } + if _, ok := obj.(*types.TypeName); ok { + return nil // T(x) is a conversion, not a call + } + // A Func is required to match instantiations. + if _, ok := obj.(*types.Func); isInstance && !ok { + return nil // Was not a Func. + } + return obj +} + +// StaticCallee returns the target (function or method) of a static function +// call, if any. It returns nil for calls to builtins. +// +// Note: for calls of instantiated functions and methods, StaticCallee returns +// the corresponding generic function or method on the generic type. +func StaticCallee(info *types.Info, call *ast.CallExpr) *types.Func { + if f, ok := Callee(info, call).(*types.Func); ok && !interfaceMethod(f) { + return f + } + return nil +} + +func interfaceMethod(f *types.Func) bool { + recv := f.Type().(*types.Signature).Recv() + return recv != nil && types.IsInterface(recv.Type()) +} diff --git a/vendor/golang.org/x/tools/go/types/typeutil/imports.go b/vendor/golang.org/x/tools/go/types/typeutil/imports.go new file mode 100644 index 0000000000..b81ce0c330 --- /dev/null +++ b/vendor/golang.org/x/tools/go/types/typeutil/imports.go @@ -0,0 +1,30 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typeutil + +import "go/types" + +// Dependencies returns all dependencies of the specified packages. +// +// Dependent packages appear in topological order: if package P imports +// package Q, Q appears earlier than P in the result. +// The algorithm follows import statements in the order they +// appear in the source code, so the result is a total order. +func Dependencies(pkgs ...*types.Package) []*types.Package { + var result []*types.Package + seen := make(map[*types.Package]bool) + var visit func(pkgs []*types.Package) + visit = func(pkgs []*types.Package) { + for _, p := range pkgs { + if !seen[p] { + seen[p] = true + visit(p.Imports()) + result = append(result, p) + } + } + } + visit(pkgs) + return result +} diff --git a/vendor/golang.org/x/tools/go/types/typeutil/map.go b/vendor/golang.org/x/tools/go/types/typeutil/map.go new file mode 100644 index 0000000000..8d824f7140 --- /dev/null +++ b/vendor/golang.org/x/tools/go/types/typeutil/map.go @@ -0,0 +1,517 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package typeutil defines various utilities for types, such as Map, +// a mapping from types.Type to any values. +package typeutil // import "golang.org/x/tools/go/types/typeutil" + +import ( + "bytes" + "fmt" + "go/types" + "reflect" + + "golang.org/x/tools/internal/typeparams" +) + +// Map is a hash-table-based mapping from types (types.Type) to +// arbitrary any values. The concrete types that implement +// the Type interface are pointers. Since they are not canonicalized, +// == cannot be used to check for equivalence, and thus we cannot +// simply use a Go map. +// +// Just as with map[K]V, a nil *Map is a valid empty map. +// +// Not thread-safe. +type Map struct { + hasher Hasher // shared by many Maps + table map[uint32][]entry // maps hash to bucket; entry.key==nil means unused + length int // number of map entries +} + +// entry is an entry (key/value association) in a hash bucket. +type entry struct { + key types.Type + value any +} + +// SetHasher sets the hasher used by Map. +// +// All Hashers are functionally equivalent but contain internal state +// used to cache the results of hashing previously seen types. +// +// A single Hasher created by MakeHasher() may be shared among many +// Maps. This is recommended if the instances have many keys in +// common, as it will amortize the cost of hash computation. +// +// A Hasher may grow without bound as new types are seen. Even when a +// type is deleted from the map, the Hasher never shrinks, since other +// types in the map may reference the deleted type indirectly. +// +// Hashers are not thread-safe, and read-only operations such as +// Map.Lookup require updates to the hasher, so a full Mutex lock (not a +// read-lock) is require around all Map operations if a shared +// hasher is accessed from multiple threads. +// +// If SetHasher is not called, the Map will create a private hasher at +// the first call to Insert. +func (m *Map) SetHasher(hasher Hasher) { + m.hasher = hasher +} + +// Delete removes the entry with the given key, if any. +// It returns true if the entry was found. +func (m *Map) Delete(key types.Type) bool { + if m != nil && m.table != nil { + hash := m.hasher.Hash(key) + bucket := m.table[hash] + for i, e := range bucket { + if e.key != nil && types.Identical(key, e.key) { + // We can't compact the bucket as it + // would disturb iterators. + bucket[i] = entry{} + m.length-- + return true + } + } + } + return false +} + +// At returns the map entry for the given key. +// The result is nil if the entry is not present. +func (m *Map) At(key types.Type) any { + if m != nil && m.table != nil { + for _, e := range m.table[m.hasher.Hash(key)] { + if e.key != nil && types.Identical(key, e.key) { + return e.value + } + } + } + return nil +} + +// Set sets the map entry for key to val, +// and returns the previous entry, if any. +func (m *Map) Set(key types.Type, value any) (prev any) { + if m.table != nil { + hash := m.hasher.Hash(key) + bucket := m.table[hash] + var hole *entry + for i, e := range bucket { + if e.key == nil { + hole = &bucket[i] + } else if types.Identical(key, e.key) { + prev = e.value + bucket[i].value = value + return + } + } + + if hole != nil { + *hole = entry{key, value} // overwrite deleted entry + } else { + m.table[hash] = append(bucket, entry{key, value}) + } + } else { + if m.hasher.memo == nil { + m.hasher = MakeHasher() + } + hash := m.hasher.Hash(key) + m.table = map[uint32][]entry{hash: {entry{key, value}}} + } + + m.length++ + return +} + +// Len returns the number of map entries. +func (m *Map) Len() int { + if m != nil { + return m.length + } + return 0 +} + +// Iterate calls function f on each entry in the map in unspecified order. +// +// If f should mutate the map, Iterate provides the same guarantees as +// Go maps: if f deletes a map entry that Iterate has not yet reached, +// f will not be invoked for it, but if f inserts a map entry that +// Iterate has not yet reached, whether or not f will be invoked for +// it is unspecified. +func (m *Map) Iterate(f func(key types.Type, value any)) { + if m != nil { + for _, bucket := range m.table { + for _, e := range bucket { + if e.key != nil { + f(e.key, e.value) + } + } + } + } +} + +// Keys returns a new slice containing the set of map keys. +// The order is unspecified. +func (m *Map) Keys() []types.Type { + keys := make([]types.Type, 0, m.Len()) + m.Iterate(func(key types.Type, _ any) { + keys = append(keys, key) + }) + return keys +} + +func (m *Map) toString(values bool) string { + if m == nil { + return "{}" + } + var buf bytes.Buffer + fmt.Fprint(&buf, "{") + sep := "" + m.Iterate(func(key types.Type, value any) { + fmt.Fprint(&buf, sep) + sep = ", " + fmt.Fprint(&buf, key) + if values { + fmt.Fprintf(&buf, ": %q", value) + } + }) + fmt.Fprint(&buf, "}") + return buf.String() +} + +// String returns a string representation of the map's entries. +// Values are printed using fmt.Sprintf("%v", v). +// Order is unspecified. +func (m *Map) String() string { + return m.toString(true) +} + +// KeysString returns a string representation of the map's key set. +// Order is unspecified. +func (m *Map) KeysString() string { + return m.toString(false) +} + +//////////////////////////////////////////////////////////////////////// +// Hasher + +// A Hasher maps each type to its hash value. +// For efficiency, a hasher uses memoization; thus its memory +// footprint grows monotonically over time. +// Hashers are not thread-safe. +// Hashers have reference semantics. +// Call MakeHasher to create a Hasher. +type Hasher struct { + memo map[types.Type]uint32 + + // ptrMap records pointer identity. + ptrMap map[any]uint32 + + // sigTParams holds type parameters from the signature being hashed. + // Signatures are considered identical modulo renaming of type parameters, so + // within the scope of a signature type the identity of the signature's type + // parameters is just their index. + // + // Since the language does not currently support referring to uninstantiated + // generic types or functions, and instantiated signatures do not have type + // parameter lists, we should never encounter a second non-empty type + // parameter list when hashing a generic signature. + sigTParams *types.TypeParamList +} + +// MakeHasher returns a new Hasher instance. +func MakeHasher() Hasher { + return Hasher{ + memo: make(map[types.Type]uint32), + ptrMap: make(map[any]uint32), + sigTParams: nil, + } +} + +// Hash computes a hash value for the given type t such that +// Identical(t, t') => Hash(t) == Hash(t'). +func (h Hasher) Hash(t types.Type) uint32 { + hash, ok := h.memo[t] + if !ok { + hash = h.hashFor(t) + h.memo[t] = hash + } + return hash +} + +// hashString computes the Fowler–Noll–Vo hash of s. +func hashString(s string) uint32 { + var h uint32 + for i := 0; i < len(s); i++ { + h ^= uint32(s[i]) + h *= 16777619 + } + return h +} + +// hashFor computes the hash of t. +func (h Hasher) hashFor(t types.Type) uint32 { + // See Identical for rationale. + switch t := t.(type) { + case *types.Basic: + return uint32(t.Kind()) + + case *types.Alias: + return h.Hash(types.Unalias(t)) + + case *types.Array: + return 9043 + 2*uint32(t.Len()) + 3*h.Hash(t.Elem()) + + case *types.Slice: + return 9049 + 2*h.Hash(t.Elem()) + + case *types.Struct: + var hash uint32 = 9059 + for i, n := 0, t.NumFields(); i < n; i++ { + f := t.Field(i) + if f.Anonymous() { + hash += 8861 + } + hash += hashString(t.Tag(i)) + hash += hashString(f.Name()) // (ignore f.Pkg) + hash += h.Hash(f.Type()) + } + return hash + + case *types.Pointer: + return 9067 + 2*h.Hash(t.Elem()) + + case *types.Signature: + var hash uint32 = 9091 + if t.Variadic() { + hash *= 8863 + } + + // Use a separate hasher for types inside of the signature, where type + // parameter identity is modified to be (index, constraint). We must use a + // new memo for this hasher as type identity may be affected by this + // masking. For example, in func[T any](*T), the identity of *T depends on + // whether we are mapping the argument in isolation, or recursively as part + // of hashing the signature. + // + // We should never encounter a generic signature while hashing another + // generic signature, but defensively set sigTParams only if h.mask is + // unset. + tparams := t.TypeParams() + if h.sigTParams == nil && tparams.Len() != 0 { + h = Hasher{ + // There may be something more efficient than discarding the existing + // memo, but it would require detecting whether types are 'tainted' by + // references to type parameters. + memo: make(map[types.Type]uint32), + // Re-using ptrMap ensures that pointer identity is preserved in this + // hasher. + ptrMap: h.ptrMap, + sigTParams: tparams, + } + } + + for i := 0; i < tparams.Len(); i++ { + tparam := tparams.At(i) + hash += 7 * h.Hash(tparam.Constraint()) + } + + return hash + 3*h.hashTuple(t.Params()) + 5*h.hashTuple(t.Results()) + + case *types.Union: + return h.hashUnion(t) + + case *types.Interface: + // Interfaces are identical if they have the same set of methods, with + // identical names and types, and they have the same set of type + // restrictions. See go/types.identical for more details. + var hash uint32 = 9103 + + // Hash methods. + for i, n := 0, t.NumMethods(); i < n; i++ { + // Method order is not significant. + // Ignore m.Pkg(). + m := t.Method(i) + // Use shallow hash on method signature to + // avoid anonymous interface cycles. + hash += 3*hashString(m.Name()) + 5*h.shallowHash(m.Type()) + } + + // Hash type restrictions. + terms, err := typeparams.InterfaceTermSet(t) + // if err != nil t has invalid type restrictions. + if err == nil { + hash += h.hashTermSet(terms) + } + + return hash + + case *types.Map: + return 9109 + 2*h.Hash(t.Key()) + 3*h.Hash(t.Elem()) + + case *types.Chan: + return 9127 + 2*uint32(t.Dir()) + 3*h.Hash(t.Elem()) + + case *types.Named: + hash := h.hashPtr(t.Obj()) + targs := t.TypeArgs() + for i := 0; i < targs.Len(); i++ { + targ := targs.At(i) + hash += 2 * h.Hash(targ) + } + return hash + + case *types.TypeParam: + return h.hashTypeParam(t) + + case *types.Tuple: + return h.hashTuple(t) + } + + panic(fmt.Sprintf("%T: %v", t, t)) +} + +func (h Hasher) hashTuple(tuple *types.Tuple) uint32 { + // See go/types.identicalTypes for rationale. + n := tuple.Len() + hash := 9137 + 2*uint32(n) + for i := 0; i < n; i++ { + hash += 3 * h.Hash(tuple.At(i).Type()) + } + return hash +} + +func (h Hasher) hashUnion(t *types.Union) uint32 { + // Hash type restrictions. + terms, err := typeparams.UnionTermSet(t) + // if err != nil t has invalid type restrictions. Fall back on a non-zero + // hash. + if err != nil { + return 9151 + } + return h.hashTermSet(terms) +} + +func (h Hasher) hashTermSet(terms []*types.Term) uint32 { + hash := 9157 + 2*uint32(len(terms)) + for _, term := range terms { + // term order is not significant. + termHash := h.Hash(term.Type()) + if term.Tilde() { + termHash *= 9161 + } + hash += 3 * termHash + } + return hash +} + +// hashTypeParam returns a hash of the type parameter t, with a hash value +// depending on whether t is contained in h.sigTParams. +// +// If h.sigTParams is set and contains t, then we are in the process of hashing +// a signature, and the hash value of t must depend only on t's index and +// constraint: signatures are considered identical modulo type parameter +// renaming. To avoid infinite recursion, we only hash the type parameter +// index, and rely on types.Identical to handle signatures where constraints +// are not identical. +// +// Otherwise the hash of t depends only on t's pointer identity. +func (h Hasher) hashTypeParam(t *types.TypeParam) uint32 { + if h.sigTParams != nil { + i := t.Index() + if i >= 0 && i < h.sigTParams.Len() && t == h.sigTParams.At(i) { + return 9173 + 3*uint32(i) + } + } + return h.hashPtr(t.Obj()) +} + +// hashPtr hashes the pointer identity of ptr. It uses h.ptrMap to ensure that +// pointers values are not dependent on the GC. +func (h Hasher) hashPtr(ptr any) uint32 { + if hash, ok := h.ptrMap[ptr]; ok { + return hash + } + hash := uint32(reflect.ValueOf(ptr).Pointer()) + h.ptrMap[ptr] = hash + return hash +} + +// shallowHash computes a hash of t without looking at any of its +// element Types, to avoid potential anonymous cycles in the types of +// interface methods. +// +// When an unnamed non-empty interface type appears anywhere among the +// arguments or results of an interface method, there is a potential +// for endless recursion. Consider: +// +// type X interface { m() []*interface { X } } +// +// The problem is that the Methods of the interface in m's result type +// include m itself; there is no mention of the named type X that +// might help us break the cycle. +// (See comment in go/types.identical, case *Interface, for more.) +func (h Hasher) shallowHash(t types.Type) uint32 { + // t is the type of an interface method (Signature), + // its params or results (Tuples), or their immediate + // elements (mostly Slice, Pointer, Basic, Named), + // so there's no need to optimize anything else. + switch t := t.(type) { + case *types.Alias: + return h.shallowHash(types.Unalias(t)) + + case *types.Signature: + var hash uint32 = 604171 + if t.Variadic() { + hash *= 971767 + } + // The Signature/Tuple recursion is always finite + // and invariably shallow. + return hash + 1062599*h.shallowHash(t.Params()) + 1282529*h.shallowHash(t.Results()) + + case *types.Tuple: + n := t.Len() + hash := 9137 + 2*uint32(n) + for i := 0; i < n; i++ { + hash += 53471161 * h.shallowHash(t.At(i).Type()) + } + return hash + + case *types.Basic: + return 45212177 * uint32(t.Kind()) + + case *types.Array: + return 1524181 + 2*uint32(t.Len()) + + case *types.Slice: + return 2690201 + + case *types.Struct: + return 3326489 + + case *types.Pointer: + return 4393139 + + case *types.Union: + return 562448657 + + case *types.Interface: + return 2124679 // no recursion here + + case *types.Map: + return 9109 + + case *types.Chan: + return 9127 + + case *types.Named: + return h.hashPtr(t.Obj()) + + case *types.TypeParam: + return h.hashPtr(t.Obj()) + } + panic(fmt.Sprintf("shallowHash: %T: %v", t, t)) +} diff --git a/vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go b/vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go new file mode 100644 index 0000000000..f7666028fe --- /dev/null +++ b/vendor/golang.org/x/tools/go/types/typeutil/methodsetcache.go @@ -0,0 +1,71 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file implements a cache of method sets. + +package typeutil + +import ( + "go/types" + "sync" +) + +// A MethodSetCache records the method set of each type T for which +// MethodSet(T) is called so that repeat queries are fast. +// The zero value is a ready-to-use cache instance. +type MethodSetCache struct { + mu sync.Mutex + named map[*types.Named]struct{ value, pointer *types.MethodSet } // method sets for named N and *N + others map[types.Type]*types.MethodSet // all other types +} + +// MethodSet returns the method set of type T. It is thread-safe. +// +// If cache is nil, this function is equivalent to types.NewMethodSet(T). +// Utility functions can thus expose an optional *MethodSetCache +// parameter to clients that care about performance. +func (cache *MethodSetCache) MethodSet(T types.Type) *types.MethodSet { + if cache == nil { + return types.NewMethodSet(T) + } + cache.mu.Lock() + defer cache.mu.Unlock() + + switch T := types.Unalias(T).(type) { + case *types.Named: + return cache.lookupNamed(T).value + + case *types.Pointer: + if N, ok := types.Unalias(T.Elem()).(*types.Named); ok { + return cache.lookupNamed(N).pointer + } + } + + // all other types + // (The map uses pointer equivalence, not type identity.) + mset := cache.others[T] + if mset == nil { + mset = types.NewMethodSet(T) + if cache.others == nil { + cache.others = make(map[types.Type]*types.MethodSet) + } + cache.others[T] = mset + } + return mset +} + +func (cache *MethodSetCache) lookupNamed(named *types.Named) struct{ value, pointer *types.MethodSet } { + if cache.named == nil { + cache.named = make(map[*types.Named]struct{ value, pointer *types.MethodSet }) + } + // Avoid recomputing mset(*T) for each distinct Pointer + // instance whose underlying type is a named type. + msets, ok := cache.named[named] + if !ok { + msets.value = types.NewMethodSet(named) + msets.pointer = types.NewMethodSet(types.NewPointer(named)) + cache.named[named] = msets + } + return msets +} diff --git a/vendor/golang.org/x/tools/go/types/typeutil/ui.go b/vendor/golang.org/x/tools/go/types/typeutil/ui.go new file mode 100644 index 0000000000..9dda6a25df --- /dev/null +++ b/vendor/golang.org/x/tools/go/types/typeutil/ui.go @@ -0,0 +1,53 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typeutil + +// This file defines utilities for user interfaces that display types. + +import ( + "go/types" +) + +// IntuitiveMethodSet returns the intuitive method set of a type T, +// which is the set of methods you can call on an addressable value of +// that type. +// +// The result always contains MethodSet(T), and is exactly MethodSet(T) +// for interface types and for pointer-to-concrete types. +// For all other concrete types T, the result additionally +// contains each method belonging to *T if there is no identically +// named method on T itself. +// +// This corresponds to user intuition about method sets; +// this function is intended only for user interfaces. +// +// The order of the result is as for types.MethodSet(T). +func IntuitiveMethodSet(T types.Type, msets *MethodSetCache) []*types.Selection { + isPointerToConcrete := func(T types.Type) bool { + ptr, ok := types.Unalias(T).(*types.Pointer) + return ok && !types.IsInterface(ptr.Elem()) + } + + var result []*types.Selection + mset := msets.MethodSet(T) + if types.IsInterface(T) || isPointerToConcrete(T) { + for i, n := 0, mset.Len(); i < n; i++ { + result = append(result, mset.At(i)) + } + } else { + // T is some other concrete type. + // Report methods of T and *T, preferring those of T. + pmset := msets.MethodSet(types.NewPointer(T)) + for i, n := 0, pmset.Len(); i < n; i++ { + meth := pmset.At(i) + if m := mset.Lookup(meth.Obj().Pkg(), meth.Obj().Name()); m != nil { + meth = m + } + result = append(result, meth) + } + + } + return result +} diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases.go b/vendor/golang.org/x/tools/internal/aliases/aliases.go index c24c2eee45..b9425f5a20 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases.go @@ -22,11 +22,17 @@ import ( // GODEBUG=gotypesalias=... by invoking the type checker. The Enabled // function is expensive and should be called once per task (e.g. // package import), not once per call to NewAlias. -func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type) *types.TypeName { +// +// Precondition: enabled || len(tparams)==0. +// If materialized aliases are disabled, there must not be any type parameters. +func NewAlias(enabled bool, pos token.Pos, pkg *types.Package, name string, rhs types.Type, tparams []*types.TypeParam) *types.TypeName { if enabled { tname := types.NewTypeName(pos, pkg, name, nil) - newAlias(tname, rhs) + SetTypeParams(types.NewAlias(tname, rhs), tparams) return tname } + if len(tparams) > 0 { + panic("cannot create an alias with type parameters when gotypesalias is not enabled") + } return types.NewTypeName(pos, pkg, name, rhs) } diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go deleted file mode 100644 index c027b9f315..0000000000 --- a/vendor/golang.org/x/tools/internal/aliases/aliases_go121.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.22 -// +build !go1.22 - -package aliases - -import ( - "go/types" -) - -// Alias is a placeholder for a go/types.Alias for <=1.21. -// It will never be created by go/types. -type Alias struct{} - -func (*Alias) String() string { panic("unreachable") } -func (*Alias) Underlying() types.Type { panic("unreachable") } -func (*Alias) Obj() *types.TypeName { panic("unreachable") } -func Rhs(alias *Alias) types.Type { panic("unreachable") } - -// Unalias returns the type t for go <=1.21. -func Unalias(t types.Type) types.Type { return t } - -func newAlias(name *types.TypeName, rhs types.Type) *Alias { panic("unreachable") } - -// Enabled reports whether [NewAlias] should create [types.Alias] types. -// -// Before go1.22, this function always returns false. -func Enabled() bool { return false } diff --git a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go index b329954841..7716a3331d 100644 --- a/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go +++ b/vendor/golang.org/x/tools/internal/aliases/aliases_go122.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.22 -// +build go1.22 - package aliases import ( @@ -14,31 +11,51 @@ import ( "go/types" ) -// Alias is an alias of types.Alias. -type Alias = types.Alias - // Rhs returns the type on the right-hand side of the alias declaration. -func Rhs(alias *Alias) types.Type { +func Rhs(alias *types.Alias) types.Type { if alias, ok := any(alias).(interface{ Rhs() types.Type }); ok { return alias.Rhs() // go1.23+ } // go1.22's Alias didn't have the Rhs method, // so Unalias is the best we can do. - return Unalias(alias) + return types.Unalias(alias) +} + +// TypeParams returns the type parameter list of the alias. +func TypeParams(alias *types.Alias) *types.TypeParamList { + if alias, ok := any(alias).(interface{ TypeParams() *types.TypeParamList }); ok { + return alias.TypeParams() // go1.23+ + } + return nil +} + +// SetTypeParams sets the type parameters of the alias type. +func SetTypeParams(alias *types.Alias, tparams []*types.TypeParam) { + if alias, ok := any(alias).(interface { + SetTypeParams(tparams []*types.TypeParam) + }); ok { + alias.SetTypeParams(tparams) // go1.23+ + } else if len(tparams) > 0 { + panic("cannot set type parameters of an Alias type in go1.22") + } +} + +// TypeArgs returns the type arguments used to instantiate the Alias type. +func TypeArgs(alias *types.Alias) *types.TypeList { + if alias, ok := any(alias).(interface{ TypeArgs() *types.TypeList }); ok { + return alias.TypeArgs() // go1.23+ + } + return nil // empty (go1.22) } -// Unalias is a wrapper of types.Unalias. -func Unalias(t types.Type) types.Type { return types.Unalias(t) } - -// newAlias is an internal alias around types.NewAlias. -// Direct usage is discouraged as the moment. -// Try to use NewAlias instead. -func newAlias(tname *types.TypeName, rhs types.Type) *Alias { - a := types.NewAlias(tname, rhs) - // TODO(go.dev/issue/65455): Remove kludgy workaround to set a.actual as a side-effect. - Unalias(a) - return a +// Origin returns the generic Alias type of which alias is an instance. +// If alias is not an instance of a generic alias, Origin returns alias. +func Origin(alias *types.Alias) *types.Alias { + if alias, ok := any(alias).(interface{ Origin() *types.Alias }); ok { + return alias.Origin() // go1.23+ + } + return alias // not an instance of a generic alias (go1.22) } // Enabled reports whether [NewAlias] should create [types.Alias] types. @@ -56,7 +73,7 @@ func Enabled() bool { // many tests. Therefore any attempt to cache the result // is just incorrect. fset := token.NewFileSet() - f, _ := parser.ParseFile(fset, "a.go", "package p; type A = int", 0) + f, _ := parser.ParseFile(fset, "a.go", "package p; type A = int", parser.SkipObjectResolution) pkg, _ := new(types.Config).Check("p", fset, []*ast.File{f}, nil) _, enabled := pkg.Scope().Lookup("A").Type().(*types.Alias) return enabled diff --git a/vendor/golang.org/x/tools/internal/gcimporter/bimport.go b/vendor/golang.org/x/tools/internal/gcimporter/bimport.go index d98b0db2a9..d79a605ed1 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/bimport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/bimport.go @@ -87,64 +87,3 @@ func chanDir(d int) types.ChanDir { return 0 } } - -var predeclOnce sync.Once -var predecl []types.Type // initialized lazily - -func predeclared() []types.Type { - predeclOnce.Do(func() { - // initialize lazily to be sure that all - // elements have been initialized before - predecl = []types.Type{ // basic types - types.Typ[types.Bool], - types.Typ[types.Int], - types.Typ[types.Int8], - types.Typ[types.Int16], - types.Typ[types.Int32], - types.Typ[types.Int64], - types.Typ[types.Uint], - types.Typ[types.Uint8], - types.Typ[types.Uint16], - types.Typ[types.Uint32], - types.Typ[types.Uint64], - types.Typ[types.Uintptr], - types.Typ[types.Float32], - types.Typ[types.Float64], - types.Typ[types.Complex64], - types.Typ[types.Complex128], - types.Typ[types.String], - - // basic type aliases - types.Universe.Lookup("byte").Type(), - types.Universe.Lookup("rune").Type(), - - // error - types.Universe.Lookup("error").Type(), - - // untyped types - types.Typ[types.UntypedBool], - types.Typ[types.UntypedInt], - types.Typ[types.UntypedRune], - types.Typ[types.UntypedFloat], - types.Typ[types.UntypedComplex], - types.Typ[types.UntypedString], - types.Typ[types.UntypedNil], - - // package unsafe - types.Typ[types.UnsafePointer], - - // invalid type - types.Typ[types.Invalid], // only appears in packages with errors - - // used internally by gc; never used by this package or in .a files - anyType{}, - } - predecl = append(predecl, additionalPredeclared()...) - }) - return predecl -} - -type anyType struct{} - -func (t anyType) Underlying() types.Type { return t } -func (t anyType) String() string { return "any" } diff --git a/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go b/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go index 39df91124a..e6c5d51f8e 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/gcimporter.go @@ -232,14 +232,19 @@ func Import(packages map[string]*types.Package, path, srcDir string, lookup func // Select appropriate importer. if len(data) > 0 { switch data[0] { - case 'v', 'c', 'd': // binary, till go1.10 + case 'v', 'c', 'd': + // binary: emitted by cmd/compile till go1.10; obsolete. return nil, fmt.Errorf("binary (%c) import format is no longer supported", data[0]) - case 'i': // indexed, till go1.19 + case 'i': + // indexed: emitted by cmd/compile till go1.19; + // now used only for serializing go/types. + // See https://github.com/golang/go/issues/69491. _, pkg, err := IImportData(fset, packages, data[1:], id) return pkg, err - case 'u': // unified, from go1.20 + case 'u': + // unified: emitted by cmd/compile since go1.20. _, pkg, err := UImportData(fset, packages, data[1:size], id) return pkg, err diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go index deeb67f315..1e19fbed8e 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go @@ -2,9 +2,227 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Indexed binary package export. -// This file was derived from $GOROOT/src/cmd/compile/internal/gc/iexport.go; -// see that file for specification of the format. +// Indexed package export. +// +// The indexed export data format is an evolution of the previous +// binary export data format. Its chief contribution is introducing an +// index table, which allows efficient random access of individual +// declarations and inline function bodies. In turn, this allows +// avoiding unnecessary work for compilation units that import large +// packages. +// +// +// The top-level data format is structured as: +// +// Header struct { +// Tag byte // 'i' +// Version uvarint +// StringSize uvarint +// DataSize uvarint +// } +// +// Strings [StringSize]byte +// Data [DataSize]byte +// +// MainIndex []struct{ +// PkgPath stringOff +// PkgName stringOff +// PkgHeight uvarint +// +// Decls []struct{ +// Name stringOff +// Offset declOff +// } +// } +// +// Fingerprint [8]byte +// +// uvarint means a uint64 written out using uvarint encoding. +// +// []T means a uvarint followed by that many T objects. In other +// words: +// +// Len uvarint +// Elems [Len]T +// +// stringOff means a uvarint that indicates an offset within the +// Strings section. At that offset is another uvarint, followed by +// that many bytes, which form the string value. +// +// declOff means a uvarint that indicates an offset within the Data +// section where the associated declaration can be found. +// +// +// There are five kinds of declarations, distinguished by their first +// byte: +// +// type Var struct { +// Tag byte // 'V' +// Pos Pos +// Type typeOff +// } +// +// type Func struct { +// Tag byte // 'F' or 'G' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'G' +// Signature Signature +// } +// +// type Const struct { +// Tag byte // 'C' +// Pos Pos +// Value Value +// } +// +// type Type struct { +// Tag byte // 'T' or 'U' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'U' +// Underlying typeOff +// +// Methods []struct{ // omitted if Underlying is an interface type +// Pos Pos +// Name stringOff +// Recv Param +// Signature Signature +// } +// } +// +// type Alias struct { +// Tag byte // 'A' or 'B' +// Pos Pos +// TypeParams []typeOff // only present if Tag == 'B' +// Type typeOff +// } +// +// // "Automatic" declaration of each typeparam +// type TypeParam struct { +// Tag byte // 'P' +// Pos Pos +// Implicit bool +// Constraint typeOff +// } +// +// typeOff means a uvarint that either indicates a predeclared type, +// or an offset into the Data section. If the uvarint is less than +// predeclReserved, then it indicates the index into the predeclared +// types list (see predeclared in bexport.go for order). Otherwise, +// subtracting predeclReserved yields the offset of a type descriptor. +// +// Value means a type, kind, and type-specific value. See +// (*exportWriter).value for details. +// +// +// There are twelve kinds of type descriptors, distinguished by an itag: +// +// type DefinedType struct { +// Tag itag // definedType +// Name stringOff +// PkgPath stringOff +// } +// +// type PointerType struct { +// Tag itag // pointerType +// Elem typeOff +// } +// +// type SliceType struct { +// Tag itag // sliceType +// Elem typeOff +// } +// +// type ArrayType struct { +// Tag itag // arrayType +// Len uint64 +// Elem typeOff +// } +// +// type ChanType struct { +// Tag itag // chanType +// Dir uint64 // 1 RecvOnly; 2 SendOnly; 3 SendRecv +// Elem typeOff +// } +// +// type MapType struct { +// Tag itag // mapType +// Key typeOff +// Elem typeOff +// } +// +// type FuncType struct { +// Tag itag // signatureType +// PkgPath stringOff +// Signature Signature +// } +// +// type StructType struct { +// Tag itag // structType +// PkgPath stringOff +// Fields []struct { +// Pos Pos +// Name stringOff +// Type typeOff +// Embedded bool +// Note stringOff +// } +// } +// +// type InterfaceType struct { +// Tag itag // interfaceType +// PkgPath stringOff +// Embeddeds []struct { +// Pos Pos +// Type typeOff +// } +// Methods []struct { +// Pos Pos +// Name stringOff +// Signature Signature +// } +// } +// +// // Reference to a type param declaration +// type TypeParamType struct { +// Tag itag // typeParamType +// Name stringOff +// PkgPath stringOff +// } +// +// // Instantiation of a generic type (like List[T2] or List[int]) +// type InstanceType struct { +// Tag itag // instanceType +// Pos pos +// TypeArgs []typeOff +// BaseType typeOff +// } +// +// type UnionType struct { +// Tag itag // interfaceType +// Terms []struct { +// tilde bool +// Type typeOff +// } +// } +// +// +// +// type Signature struct { +// Params []Param +// Results []Param +// Variadic bool // omitted if Results is empty +// } +// +// type Param struct { +// Pos Pos +// Name stringOff +// Type typOff +// } +// +// +// Pos encodes a file:line:column triple, incorporating a simple delta +// encoding scheme within a data object. See exportWriter.pos for +// details. package gcimporter @@ -24,7 +242,6 @@ import ( "golang.org/x/tools/go/types/objectpath" "golang.org/x/tools/internal/aliases" - "golang.org/x/tools/internal/tokeninternal" ) // IExportShallow encodes "shallow" export data for the specified package. @@ -223,7 +440,7 @@ func (p *iexporter) encodeFile(w *intWriter, file *token.File, needed []uint64) // Sort the set of needed offsets. Duplicates are harmless. sort.Slice(needed, func(i, j int) bool { return needed[i] < needed[j] }) - lines := tokeninternal.GetLines(file) // byte offset of each line start + lines := file.Lines() // byte offset of each line start w.uint64(uint64(len(lines))) // Rather than record the entire array of line start offsets, @@ -507,13 +724,13 @@ func (p *iexporter) doDecl(obj types.Object) { case *types.TypeName: t := obj.Type() - if tparam, ok := aliases.Unalias(t).(*types.TypeParam); ok { + if tparam, ok := types.Unalias(t).(*types.TypeParam); ok { w.tag(typeParamTag) w.pos(obj.Pos()) constraint := tparam.Constraint() if p.version >= iexportVersionGo1_18 { implicit := false - if iface, _ := aliases.Unalias(constraint).(*types.Interface); iface != nil { + if iface, _ := types.Unalias(constraint).(*types.Interface); iface != nil { implicit = iface.IsImplicit() } w.bool(implicit) @@ -523,9 +740,22 @@ func (p *iexporter) doDecl(obj types.Object) { } if obj.IsAlias() { - w.tag(aliasTag) + alias, materialized := t.(*types.Alias) // may fail when aliases are not enabled + + var tparams *types.TypeParamList + if materialized { + tparams = aliases.TypeParams(alias) + } + if tparams.Len() == 0 { + w.tag(aliasTag) + } else { + w.tag(genericAliasTag) + } w.pos(obj.Pos()) - if alias, ok := t.(*aliases.Alias); ok { + if tparams.Len() > 0 { + w.tparamList(obj.Name(), tparams, obj.Pkg()) + } + if materialized { // Preserve materialized aliases, // even of non-exported types. t = aliases.Rhs(alias) @@ -744,8 +974,14 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { }() } switch t := t.(type) { - case *aliases.Alias: - // TODO(adonovan): support parameterized aliases, following *types.Named. + case *types.Alias: + if targs := aliases.TypeArgs(t); targs.Len() > 0 { + w.startType(instanceType) + w.pos(t.Obj().Pos()) + w.typeList(targs, pkg) + w.typ(aliases.Origin(t), pkg) + return + } w.startType(aliasType) w.qualifiedType(t.Obj()) @@ -854,7 +1090,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) { for i := 0; i < n; i++ { ft := t.EmbeddedType(i) tPkg := pkg - if named, _ := aliases.Unalias(ft).(*types.Named); named != nil { + if named, _ := types.Unalias(ft).(*types.Named); named != nil { w.pos(named.Obj().Pos()) } else { w.pos(token.NoPos) diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go index 136aa03653..21908a158b 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Indexed package import. -// See cmd/compile/internal/gc/iexport.go for the export data format. +// See iexport.go for the export data format. // This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. @@ -53,6 +53,7 @@ const ( iexportVersionPosCol = 1 iexportVersionGo1_18 = 2 iexportVersionGenerics = 2 + iexportVersion = iexportVersionGenerics iexportVersionCurrent = 2 ) @@ -540,7 +541,7 @@ func canReuse(def *types.Named, rhs types.Type) bool { if def == nil { return true } - iface, _ := aliases.Unalias(rhs).(*types.Interface) + iface, _ := types.Unalias(rhs).(*types.Interface) if iface == nil { return true } @@ -562,14 +563,14 @@ func (r *importReader) obj(name string) { pos := r.pos() switch tag { - case aliasTag: + case aliasTag, genericAliasTag: + var tparams []*types.TypeParam + if tag == genericAliasTag { + tparams = r.tparamList() + } typ := r.typ() - // TODO(adonovan): support generic aliases: - // if tag == genericAliasTag { - // tparams := r.tparamList() - // alias.SetTypeParams(tparams) - // } - r.declare(aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ)) + obj := aliases.NewAlias(r.p.aliases, pos, r.currPkg, name, typ, tparams) + r.declare(obj) case constTag: typ, val := r.value() @@ -615,7 +616,7 @@ func (r *importReader) obj(name string) { if targs.Len() > 0 { rparams = make([]*types.TypeParam, targs.Len()) for i := range rparams { - rparams[i] = aliases.Unalias(targs.At(i)).(*types.TypeParam) + rparams[i] = types.Unalias(targs.At(i)).(*types.TypeParam) } } msig := r.signature(recv, rparams, nil) @@ -645,7 +646,7 @@ func (r *importReader) obj(name string) { } constraint := r.typ() if implicit { - iface, _ := aliases.Unalias(constraint).(*types.Interface) + iface, _ := types.Unalias(constraint).(*types.Interface) if iface == nil { errorf("non-interface constraint marked implicit") } @@ -852,7 +853,7 @@ func (r *importReader) typ() types.Type { } func isInterface(t types.Type) bool { - _, ok := aliases.Unalias(t).(*types.Interface) + _, ok := types.Unalias(t).(*types.Interface) return ok } @@ -862,7 +863,7 @@ func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } func (r *importReader) doType(base *types.Named) (res types.Type) { k := r.kind() if debug { - r.p.trace("importing type %d (base: %s)", k, base) + r.p.trace("importing type %d (base: %v)", k, base) r.p.indent++ defer func() { r.p.indent-- @@ -959,7 +960,7 @@ func (r *importReader) doType(base *types.Named) (res types.Type) { methods[i] = method } - typ := newInterface(methods, embeddeds) + typ := types.NewInterfaceType(methods, embeddeds) r.p.interfaceList = append(r.p.interfaceList, typ) return typ @@ -1051,7 +1052,7 @@ func (r *importReader) tparamList() []*types.TypeParam { for i := range xs { // Note: the standard library importer is tolerant of nil types here, // though would panic in SetTypeParams. - xs[i] = aliases.Unalias(r.typ()).(*types.TypeParam) + xs[i] = types.Unalias(r.typ()).(*types.TypeParam) } return xs } diff --git a/vendor/golang.org/x/tools/internal/gcimporter/newInterface10.go b/vendor/golang.org/x/tools/internal/gcimporter/newInterface10.go deleted file mode 100644 index 8b163e3d05..0000000000 --- a/vendor/golang.org/x/tools/internal/gcimporter/newInterface10.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.11 -// +build !go1.11 - -package gcimporter - -import "go/types" - -func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { - named := make([]*types.Named, len(embeddeds)) - for i, e := range embeddeds { - var ok bool - named[i], ok = e.(*types.Named) - if !ok { - panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") - } - } - return types.NewInterface(methods, named) -} diff --git a/vendor/golang.org/x/tools/internal/gcimporter/newInterface11.go b/vendor/golang.org/x/tools/internal/gcimporter/newInterface11.go deleted file mode 100644 index 49984f40fd..0000000000 --- a/vendor/golang.org/x/tools/internal/gcimporter/newInterface11.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.11 -// +build go1.11 - -package gcimporter - -import "go/types" - -func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { - return types.NewInterfaceType(methods, embeddeds) -} diff --git a/vendor/golang.org/x/tools/internal/gcimporter/predeclared.go b/vendor/golang.org/x/tools/internal/gcimporter/predeclared.go new file mode 100644 index 0000000000..907c8557a5 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/gcimporter/predeclared.go @@ -0,0 +1,91 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gcimporter + +import ( + "go/types" + "sync" +) + +// predecl is a cache for the predeclared types in types.Universe. +// +// Cache a distinct result based on the runtime value of any. +// The pointer value of the any type varies based on GODEBUG settings. +var predeclMu sync.Mutex +var predecl map[types.Type][]types.Type + +func predeclared() []types.Type { + anyt := types.Universe.Lookup("any").Type() + + predeclMu.Lock() + defer predeclMu.Unlock() + + if pre, ok := predecl[anyt]; ok { + return pre + } + + if predecl == nil { + predecl = make(map[types.Type][]types.Type) + } + + decls := []types.Type{ // basic types + types.Typ[types.Bool], + types.Typ[types.Int], + types.Typ[types.Int8], + types.Typ[types.Int16], + types.Typ[types.Int32], + types.Typ[types.Int64], + types.Typ[types.Uint], + types.Typ[types.Uint8], + types.Typ[types.Uint16], + types.Typ[types.Uint32], + types.Typ[types.Uint64], + types.Typ[types.Uintptr], + types.Typ[types.Float32], + types.Typ[types.Float64], + types.Typ[types.Complex64], + types.Typ[types.Complex128], + types.Typ[types.String], + + // basic type aliases + types.Universe.Lookup("byte").Type(), + types.Universe.Lookup("rune").Type(), + + // error + types.Universe.Lookup("error").Type(), + + // untyped types + types.Typ[types.UntypedBool], + types.Typ[types.UntypedInt], + types.Typ[types.UntypedRune], + types.Typ[types.UntypedFloat], + types.Typ[types.UntypedComplex], + types.Typ[types.UntypedString], + types.Typ[types.UntypedNil], + + // package unsafe + types.Typ[types.UnsafePointer], + + // invalid type + types.Typ[types.Invalid], // only appears in packages with errors + + // used internally by gc; never used by this package or in .a files + anyType{}, + + // comparable + types.Universe.Lookup("comparable").Type(), + + // any + anyt, + } + + predecl[anyt] = decls + return decls +} + +type anyType struct{} + +func (t anyType) Underlying() types.Type { return t } +func (t anyType) String() string { return "any" } diff --git a/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go b/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go deleted file mode 100644 index 0cd3b91b65..0000000000 --- a/vendor/golang.org/x/tools/internal/gcimporter/support_go118.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gcimporter - -import "go/types" - -const iexportVersion = iexportVersionGenerics - -// additionalPredeclared returns additional predeclared types in go.1.18. -func additionalPredeclared() []types.Type { - return []types.Type{ - // comparable - types.Universe.Lookup("comparable").Type(), - - // any - types.Universe.Lookup("any").Type(), - } -} - -// See cmd/compile/internal/types.SplitVargenSuffix. -func splitVargenSuffix(name string) (base, suffix string) { - i := len(name) - for i > 0 && name[i-1] >= '0' && name[i-1] <= '9' { - i-- - } - const dot = "·" - if i >= len(dot) && name[i-len(dot):i] == dot { - i -= len(dot) - return name[:i], name[i:] - } - return name, "" -} diff --git a/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go b/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go deleted file mode 100644 index 38b624cada..0000000000 --- a/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !goexperiment.unified -// +build !goexperiment.unified - -package gcimporter - -const unifiedIR = false diff --git a/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go b/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go deleted file mode 100644 index b5118d0b3a..0000000000 --- a/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build goexperiment.unified -// +build goexperiment.unified - -package gcimporter - -const unifiedIR = true diff --git a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go index 2c07706887..1db408613c 100644 --- a/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go +++ b/vendor/golang.org/x/tools/internal/gcimporter/ureader_yes.go @@ -52,8 +52,7 @@ func (pr *pkgReader) later(fn func()) { // See cmd/compile/internal/noder.derivedInfo. type derivedInfo struct { - idx pkgbits.Index - needed bool + idx pkgbits.Index } // See cmd/compile/internal/noder.typeInfo. @@ -110,13 +109,17 @@ func readUnifiedPackage(fset *token.FileSet, ctxt *types.Context, imports map[st r := pr.newReader(pkgbits.RelocMeta, pkgbits.PublicRootIdx, pkgbits.SyncPublic) pkg := r.pkg() - r.Bool() // has init + if r.Version().Has(pkgbits.HasInit) { + r.Bool() + } for i, n := 0, r.Len(); i < n; i++ { // As if r.obj(), but avoiding the Scope.Lookup call, // to avoid eager loading of imports. r.Sync(pkgbits.SyncObject) - assert(!r.Bool()) + if r.Version().Has(pkgbits.DerivedFuncInstance) { + assert(!r.Bool()) + } r.p.objIdx(r.Reloc(pkgbits.RelocObj)) assert(r.Len() == 0) } @@ -165,7 +168,7 @@ type readerDict struct { // tparams is a slice of the constructed TypeParams for the element. tparams []*types.TypeParam - // devived is a slice of types derived from tparams, which may be + // derived is a slice of types derived from tparams, which may be // instantiated while reading the current element. derived []derivedInfo derivedTypes []types.Type // lazily instantiated from derived @@ -471,7 +474,9 @@ func (r *reader) param() *types.Var { func (r *reader) obj() (types.Object, []types.Type) { r.Sync(pkgbits.SyncObject) - assert(!r.Bool()) + if r.Version().Has(pkgbits.DerivedFuncInstance) { + assert(!r.Bool()) + } pkg, name := r.p.objIdx(r.Reloc(pkgbits.RelocObj)) obj := pkgScope(pkg).Lookup(name) @@ -525,8 +530,12 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) { case pkgbits.ObjAlias: pos := r.pos() + var tparams []*types.TypeParam + if r.Version().Has(pkgbits.AliasTypeParamNames) { + tparams = r.typeParamNames() + } typ := r.typ() - declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ)) + declare(aliases.NewAlias(r.p.aliases, pos, objPkg, objName, typ, tparams)) case pkgbits.ObjConst: pos := r.pos() @@ -553,7 +562,7 @@ func (pr *pkgReader) objIdx(idx pkgbits.Index) (*types.Package, string) { // If the underlying type is an interface, we need to // duplicate its methods so we can replace the receiver // parameter's type (#49906). - if iface, ok := aliases.Unalias(underlying).(*types.Interface); ok && iface.NumExplicitMethods() != 0 { + if iface, ok := types.Unalias(underlying).(*types.Interface); ok && iface.NumExplicitMethods() != 0 { methods := make([]*types.Func, iface.NumExplicitMethods()) for i := range methods { fn := iface.ExplicitMethod(i) @@ -632,7 +641,10 @@ func (pr *pkgReader) objDictIdx(idx pkgbits.Index) *readerDict { dict.derived = make([]derivedInfo, r.Len()) dict.derivedTypes = make([]types.Type, len(dict.derived)) for i := range dict.derived { - dict.derived[i] = derivedInfo{r.Reloc(pkgbits.RelocType), r.Bool()} + dict.derived[i] = derivedInfo{idx: r.Reloc(pkgbits.RelocType)} + if r.Version().Has(pkgbits.DerivedInfoNeeded) { + assert(!r.Bool()) + } } pr.retireReader(r) @@ -726,3 +738,17 @@ func pkgScope(pkg *types.Package) *types.Scope { } return types.Universe } + +// See cmd/compile/internal/types.SplitVargenSuffix. +func splitVargenSuffix(name string) (base, suffix string) { + i := len(name) + for i > 0 && name[i-1] >= '0' && name[i-1] <= '9' { + i-- + } + const dot = "·" + if i >= len(dot) && name[i-len(dot):i] == dot { + i -= len(dot) + return name[:i], name[i:] + } + return name, "" +} diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go index eb7a8282f9..e333efc87f 100644 --- a/vendor/golang.org/x/tools/internal/gocommand/invoke.go +++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go @@ -8,13 +8,14 @@ package gocommand import ( "bytes" "context" + "encoding/json" "errors" "fmt" "io" "log" "os" "os/exec" - "reflect" + "path/filepath" "regexp" "runtime" "strconv" @@ -167,7 +168,9 @@ type Invocation struct { // TODO(rfindley): remove, in favor of Args. ModFile string - // If Overlay is set, the go command is invoked with -overlay=Overlay. + // Overlay is the name of the JSON overlay file that describes + // unsaved editor buffers; see [WriteOverlays]. + // If set, the go command is invoked with -overlay=Overlay. // TODO(rfindley): remove, in favor of Args. Overlay string @@ -196,12 +199,14 @@ func (i *Invocation) runWithFriendlyError(ctx context.Context, stdout, stderr io return } -func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { - log := i.Logf - if log == nil { - log = func(string, ...interface{}) {} +// logf logs if i.Logf is non-nil. +func (i *Invocation) logf(format string, args ...any) { + if i.Logf != nil { + i.Logf(format, args...) } +} +func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { goArgs := []string{i.Verb} appendModFile := func() { @@ -244,23 +249,23 @@ func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { cmd.Stdout = stdout cmd.Stderr = stderr - // cmd.WaitDelay was added only in go1.20 (see #50436). - if waitDelay := reflect.ValueOf(cmd).Elem().FieldByName("WaitDelay"); waitDelay.IsValid() { - // https://go.dev/issue/59541: don't wait forever copying stderr - // after the command has exited. - // After CL 484741 we copy stdout manually, so we we'll stop reading that as - // soon as ctx is done. However, we also don't want to wait around forever - // for stderr. Give a much-longer-than-reasonable delay and then assume that - // something has wedged in the kernel or runtime. - waitDelay.Set(reflect.ValueOf(30 * time.Second)) - } - - // On darwin the cwd gets resolved to the real path, which breaks anything that - // expects the working directory to keep the original path, including the + // https://go.dev/issue/59541: don't wait forever copying stderr + // after the command has exited. + // After CL 484741 we copy stdout manually, so we we'll stop reading that as + // soon as ctx is done. However, we also don't want to wait around forever + // for stderr. Give a much-longer-than-reasonable delay and then assume that + // something has wedged in the kernel or runtime. + cmd.WaitDelay = 30 * time.Second + + // The cwd gets resolved to the real path. On Darwin, where + // /tmp is a symlink, this breaks anything that expects the + // working directory to keep the original path, including the // go command when dealing with modules. - // The Go stdlib has a special feature where if the cwd and the PWD are the - // same node then it trusts the PWD, so by setting it in the env for the child - // process we fix up all the paths returned by the go command. + // + // os.Getwd has a special feature where if the cwd and the PWD + // are the same node then it trusts the PWD, so by setting it + // in the env for the child process we fix up all the paths + // returned by the go command. if !i.CleanEnv { cmd.Env = os.Environ() } @@ -270,7 +275,12 @@ func (i *Invocation) run(ctx context.Context, stdout, stderr io.Writer) error { cmd.Dir = i.WorkingDir } - defer func(start time.Time) { log("%s for %v", time.Since(start), cmdDebugStr(cmd)) }(time.Now()) + debugStr := cmdDebugStr(cmd) + i.logf("starting %v", debugStr) + start := time.Now() + defer func() { + i.logf("%s for %v", time.Since(start), debugStr) + }() return runCmdContext(ctx, cmd) } @@ -351,6 +361,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { } } + startTime := time.Now() err = cmd.Start() if stdoutW != nil { // The child process has inherited the pipe file, @@ -377,7 +388,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { case err := <-resChan: return err case <-timer.C: - HandleHangingGoCommand(cmd.Process) + HandleHangingGoCommand(startTime, cmd) case <-ctx.Done(): } } else { @@ -411,7 +422,7 @@ func runCmdContext(ctx context.Context, cmd *exec.Cmd) (err error) { return <-resChan } -func HandleHangingGoCommand(proc *os.Process) { +func HandleHangingGoCommand(start time.Time, cmd *exec.Cmd) { switch runtime.GOOS { case "linux", "darwin", "freebsd", "netbsd": fmt.Fprintln(os.Stderr, `DETECTED A HANGING GO COMMAND @@ -444,7 +455,7 @@ See golang/go#54461 for more details.`) panic(fmt.Sprintf("running %s: %v", listFiles, err)) } } - panic(fmt.Sprintf("detected hanging go command (pid %d): see golang/go#54461 for more details", proc.Pid)) + panic(fmt.Sprintf("detected hanging go command (golang/go#54461); waited %s\n\tcommand:%s\n\tpid:%d", time.Since(start), cmd, cmd.Process.Pid)) } func cmdDebugStr(cmd *exec.Cmd) string { @@ -468,3 +479,73 @@ func cmdDebugStr(cmd *exec.Cmd) string { } return fmt.Sprintf("GOROOT=%v GOPATH=%v GO111MODULE=%v GOPROXY=%v PWD=%v %v", env["GOROOT"], env["GOPATH"], env["GO111MODULE"], env["GOPROXY"], env["PWD"], strings.Join(args, " ")) } + +// WriteOverlays writes each value in the overlay (see the Overlay +// field of go/packages.Config) to a temporary file and returns the name +// of a JSON file describing the mapping that is suitable for the "go +// list -overlay" flag. +// +// On success, the caller must call the cleanup function exactly once +// when the files are no longer needed. +func WriteOverlays(overlay map[string][]byte) (filename string, cleanup func(), err error) { + // Do nothing if there are no overlays in the config. + if len(overlay) == 0 { + return "", func() {}, nil + } + + dir, err := os.MkdirTemp("", "gocommand-*") + if err != nil { + return "", nil, err + } + + // The caller must clean up this directory, + // unless this function returns an error. + // (The cleanup operand of each return + // statement below is ignored.) + defer func() { + cleanup = func() { + os.RemoveAll(dir) + } + if err != nil { + cleanup() + cleanup = nil + } + }() + + // Write each map entry to a temporary file. + overlays := make(map[string]string) + for k, v := range overlay { + // Use a unique basename for each file (001-foo.go), + // to avoid creating nested directories. + base := fmt.Sprintf("%d-%s", 1+len(overlays), filepath.Base(k)) + filename := filepath.Join(dir, base) + err := os.WriteFile(filename, v, 0666) + if err != nil { + return "", nil, err + } + overlays[k] = filename + } + + // Write the JSON overlay file that maps logical file names to temp files. + // + // OverlayJSON is the format overlay files are expected to be in. + // The Replace map maps from overlaid paths to replacement paths: + // the Go command will forward all reads trying to open + // each overlaid path to its replacement path, or consider the overlaid + // path not to exist if the replacement path is empty. + // + // From golang/go#39958. + type OverlayJSON struct { + Replace map[string]string `json:"replace,omitempty"` + } + b, err := json.Marshal(OverlayJSON{Replace: overlays}) + if err != nil { + return "", nil, err + } + filename = filepath.Join(dir, "overlay.json") + if err := os.WriteFile(filename, b, 0666); err != nil { + return "", nil, err + } + + return filename, nil, nil +} diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go index 93d49a6efd..c15108178a 100644 --- a/vendor/golang.org/x/tools/internal/imports/fix.go +++ b/vendor/golang.org/x/tools/internal/imports/fix.go @@ -27,6 +27,7 @@ import ( "unicode" "unicode/utf8" + "golang.org/x/sync/errgroup" "golang.org/x/tools/go/ast/astutil" "golang.org/x/tools/internal/event" "golang.org/x/tools/internal/gocommand" @@ -104,7 +105,10 @@ type packageInfo struct { // parseOtherFiles parses all the Go files in srcDir except filename, including // test files if filename looks like a test. -func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { +// +// It returns an error only if ctx is cancelled. Files with parse errors are +// ignored. +func parseOtherFiles(ctx context.Context, fset *token.FileSet, srcDir, filename string) ([]*ast.File, error) { // This could use go/packages but it doesn't buy much, and it fails // with https://golang.org/issue/26296 in LoadFiles mode in some cases. considerTests := strings.HasSuffix(filename, "_test.go") @@ -112,11 +116,14 @@ func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { fileBase := filepath.Base(filename) packageFileInfos, err := os.ReadDir(srcDir) if err != nil { - return nil + return nil, ctx.Err() } var files []*ast.File for _, fi := range packageFileInfos { + if ctx.Err() != nil { + return nil, ctx.Err() + } if fi.Name() == fileBase || !strings.HasSuffix(fi.Name(), ".go") { continue } @@ -124,7 +131,7 @@ func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { continue } - f, err := parser.ParseFile(fset, filepath.Join(srcDir, fi.Name()), nil, 0) + f, err := parser.ParseFile(fset, filepath.Join(srcDir, fi.Name()), nil, parser.SkipObjectResolution) if err != nil { continue } @@ -132,7 +139,7 @@ func parseOtherFiles(fset *token.FileSet, srcDir, filename string) []*ast.File { files = append(files, f) } - return files + return files, ctx.Err() } // addGlobals puts the names of package vars into the provided map. @@ -359,9 +366,7 @@ func (p *pass) load() ([]*ImportFix, bool) { if p.loadRealPackageNames { err := p.loadPackageNames(append(imports, p.candidates...)) if err != nil { - if p.env.Logf != nil { - p.env.Logf("loading package names: %v", err) - } + p.env.logf("loading package names: %v", err) return nil, false } } @@ -560,6 +565,8 @@ func (p *pass) addCandidate(imp *ImportInfo, pkg *packageInfo) { // // This is declared as a variable rather than a function so goimports can // easily be extended by adding a file with an init function. +// +// DO NOT REMOVE: used internally at Google. var fixImports = fixImportsDefault func fixImportsDefault(fset *token.FileSet, f *ast.File, filename string, env *ProcessEnv) error { @@ -579,9 +586,7 @@ func getFixes(ctx context.Context, fset *token.FileSet, f *ast.File, filename st return nil, err } srcDir := filepath.Dir(abs) - if env.Logf != nil { - env.Logf("fixImports(filename=%q), abs=%q, srcDir=%q ...", filename, abs, srcDir) - } + env.logf("fixImports(filename=%q), abs=%q, srcDir=%q ...", filename, abs, srcDir) // First pass: looking only at f, and using the naive algorithm to // derive package names from import paths, see if the file is already @@ -592,7 +597,10 @@ func getFixes(ctx context.Context, fset *token.FileSet, f *ast.File, filename st return fixes, nil } - otherFiles := parseOtherFiles(fset, srcDir, filename) + otherFiles, err := parseOtherFiles(ctx, fset, srcDir, filename) + if err != nil { + return nil, err + } // Second pass: add information from other files in the same package, // like their package vars and imports. @@ -1010,16 +1018,26 @@ func (e *ProcessEnv) GetResolver() (Resolver, error) { // already know the view type. if len(e.Env["GOMOD"]) == 0 && len(e.Env["GOWORK"]) == 0 { e.resolver = newGopathResolver(e) + e.logf("created gopath resolver") } else if r, err := newModuleResolver(e, e.ModCache); err != nil { e.resolverErr = err + e.logf("failed to create module resolver: %v", err) } else { e.resolver = Resolver(r) + e.logf("created module resolver") } } return e.resolver, e.resolverErr } +// logf logs if e.Logf is non-nil. +func (e *ProcessEnv) logf(format string, args ...any) { + if e.Logf != nil { + e.Logf(format, args...) + } +} + // buildContext returns the build.Context to use for matching files. // // TODO(rfindley): support dynamic GOOS, GOARCH here, when doing cross-platform @@ -1123,8 +1141,8 @@ type Resolver interface { // scan works with callback to search for packages. See scanCallback for details. scan(ctx context.Context, callback *scanCallback) error - // loadExports returns the set of exported symbols in the package at dir. - // loadExports may be called concurrently. + // loadExports returns the package name and set of exported symbols in the + // package at dir. loadExports may be called concurrently. loadExports(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) // scoreImportPath returns the relevance for an import path. @@ -1192,7 +1210,7 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil if err != nil { return err } - if err = resolver.scan(context.Background(), callback); err != nil { + if err = resolver.scan(ctx, callback); err != nil { return err } @@ -1201,54 +1219,52 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil imp *ImportInfo pkg *packageInfo } - results := make(chan result, len(refs)) + results := make([]*result, len(refs)) - ctx, cancel := context.WithCancel(context.TODO()) - var wg sync.WaitGroup - defer func() { - cancel() - wg.Wait() - }() - var ( - firstErr error - firstErrOnce sync.Once - ) - for pkgName, symbols := range refs { - wg.Add(1) - go func(pkgName string, symbols map[string]bool) { - defer wg.Done() + g, ctx := errgroup.WithContext(ctx) + + searcher := symbolSearcher{ + logf: pass.env.logf, + srcDir: pass.srcDir, + xtest: strings.HasSuffix(pass.f.Name.Name, "_test"), + loadExports: resolver.loadExports, + } - found, err := findImport(ctx, pass, found[pkgName], pkgName, symbols) + i := 0 + for pkgName, symbols := range refs { + index := i // claim an index in results + i++ + pkgName := pkgName + symbols := symbols + g.Go(func() error { + found, err := searcher.search(ctx, found[pkgName], pkgName, symbols) if err != nil { - firstErrOnce.Do(func() { - firstErr = err - cancel() - }) - return + return err } - if found == nil { - return // No matching package. + return nil // No matching package. } imp := &ImportInfo{ ImportPath: found.importPathShort, } - pkg := &packageInfo{ name: pkgName, exports: symbols, } - results <- result{imp, pkg} - }(pkgName, symbols) + results[index] = &result{imp, pkg} + return nil + }) + } + if err := g.Wait(); err != nil { + return err } - go func() { - wg.Wait() - close(results) - }() - for result := range results { + for _, result := range results { + if result == nil { + continue + } // Don't offer completions that would shadow predeclared // names, such as github.com/coreos/etcd/error. if types.Universe.Lookup(result.pkg.name) != nil { // predeclared @@ -1262,7 +1278,7 @@ func addExternalCandidates(ctx context.Context, pass *pass, refs references, fil } pass.addCandidate(result.imp, result.pkg) } - return firstErr + return nil } // notIdentifier reports whether ch is an invalid identifier character. @@ -1604,11 +1620,10 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl } fullFile := filepath.Join(dir, fi.Name()) + // Legacy ast.Object resolution is needed here. f, err := parser.ParseFile(fset, fullFile, nil, 0) if err != nil { - if env.Logf != nil { - env.Logf("error parsing %v: %v", fullFile, err) - } + env.logf("error parsing %v: %v", fullFile, err) continue } if f.Name.Name == "documentation" { @@ -1644,9 +1659,7 @@ func loadExportsFromFiles(ctx context.Context, env *ProcessEnv, dir string, incl } sortSymbols(exports) - if env.Logf != nil { - env.Logf("loaded exports in dir %v (package %v): %v", dir, pkgName, exports) - } + env.logf("loaded exports in dir %v (package %v): %v", dir, pkgName, exports) return pkgName, exports, nil } @@ -1656,25 +1669,39 @@ func sortSymbols(syms []stdlib.Symbol) { }) } -// findImport searches for a package with the given symbols. -// If no package is found, findImport returns ("", false, nil) -func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgName string, symbols map[string]bool) (*pkg, error) { +// A symbolSearcher searches for a package with a set of symbols, among a set +// of candidates. See [symbolSearcher.search]. +// +// The search occurs within the scope of a single file, with context captured +// in srcDir and xtest. +type symbolSearcher struct { + logf func(string, ...any) + srcDir string // directory containing the file + xtest bool // if set, the file containing is an x_test file + loadExports func(ctx context.Context, pkg *pkg, includeTest bool) (string, []stdlib.Symbol, error) +} + +// search searches the provided candidates for a package containing all +// exported symbols. +// +// If successful, returns the resulting package. +func (s *symbolSearcher) search(ctx context.Context, candidates []pkgDistance, pkgName string, symbols map[string]bool) (*pkg, error) { // Sort the candidates by their import package length, // assuming that shorter package names are better than long // ones. Note that this sorts by the de-vendored name, so // there's no "penalty" for vendoring. sort.Sort(byDistanceOrImportPathShortLength(candidates)) - if pass.env.Logf != nil { + if s.logf != nil { for i, c := range candidates { - pass.env.Logf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir) + s.logf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir) } } - resolver, err := pass.env.GetResolver() - if err != nil { - return nil, err - } - // Collect exports for packages with matching names. + // Arrange rescv so that we can we can await results in order of relevance + // and exit as soon as we find the first match. + // + // Search with bounded concurrency, returning as soon as the first result + // among rescv is non-nil. rescv := make([]chan *pkg, len(candidates)) for i := range candidates { rescv[i] = make(chan *pkg, 1) @@ -1682,6 +1709,7 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa const maxConcurrentPackageImport = 4 loadExportsSem := make(chan struct{}, maxConcurrentPackageImport) + // Ensure that all work is completed at exit. ctx, cancel := context.WithCancel(ctx) var wg sync.WaitGroup defer func() { @@ -1689,6 +1717,7 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa wg.Wait() }() + // Start the search. wg.Add(1) go func() { defer wg.Done() @@ -1699,55 +1728,67 @@ func findImport(ctx context.Context, pass *pass, candidates []pkgDistance, pkgNa return } + i := i + c := c wg.Add(1) - go func(c pkgDistance, resc chan<- *pkg) { + go func() { defer func() { <-loadExportsSem wg.Done() }() - - if pass.env.Logf != nil { - pass.env.Logf("loading exports in dir %s (seeking package %s)", c.pkg.dir, pkgName) + if s.logf != nil { + s.logf("loading exports in dir %s (seeking package %s)", c.pkg.dir, pkgName) } - // If we're an x_test, load the package under test's test variant. - includeTest := strings.HasSuffix(pass.f.Name.Name, "_test") && c.pkg.dir == pass.srcDir - _, exports, err := resolver.loadExports(ctx, c.pkg, includeTest) + pkg, err := s.searchOne(ctx, c, symbols) if err != nil { - if pass.env.Logf != nil { - pass.env.Logf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err) - } - resc <- nil - return - } - - exportsMap := make(map[string]bool, len(exports)) - for _, sym := range exports { - exportsMap[sym.Name] = true - } - - // If it doesn't have the right - // symbols, send nil to mean no match. - for symbol := range symbols { - if !exportsMap[symbol] { - resc <- nil - return + if s.logf != nil && ctx.Err() == nil { + s.logf("loading exports in dir %s (seeking package %s): %v", c.pkg.dir, pkgName, err) } + pkg = nil } - resc <- c.pkg - }(c, rescv[i]) + rescv[i] <- pkg // may be nil + }() } }() + // Await the first (best) result. for _, resc := range rescv { - pkg := <-resc - if pkg == nil { - continue + select { + case r := <-resc: + if r != nil { + return r, nil + } + case <-ctx.Done(): + return nil, ctx.Err() } - return pkg, nil } return nil, nil } +func (s *symbolSearcher) searchOne(ctx context.Context, c pkgDistance, symbols map[string]bool) (*pkg, error) { + if ctx.Err() != nil { + return nil, ctx.Err() + } + // If we're considering the package under test from an x_test, load the + // test variant. + includeTest := s.xtest && c.pkg.dir == s.srcDir + _, exports, err := s.loadExports(ctx, c.pkg, includeTest) + if err != nil { + return nil, err + } + + exportsMap := make(map[string]bool, len(exports)) + for _, sym := range exports { + exportsMap[sym.Name] = true + } + for symbol := range symbols { + if !exportsMap[symbol] { + return nil, nil // no match + } + } + return c.pkg, nil +} + // pkgIsCandidate reports whether pkg is a candidate for satisfying the // finding which package pkgIdent in the file named by filename is trying // to refer to. @@ -1767,58 +1808,24 @@ func pkgIsCandidate(filename string, refs references, pkg *pkg) bool { } // Speed optimization to minimize disk I/O: - // the last two components on disk must contain the - // package name somewhere. // - // This permits mismatch naming like directory - // "go-foo" being package "foo", or "pkg.v3" being "pkg", - // or directory "google.golang.org/api/cloudbilling/v1" - // being package "cloudbilling", but doesn't - // permit a directory "foo" to be package - // "bar", which is strongly discouraged - // anyway. There's no reason goimports needs - // to be slow just to accommodate that. + // Use the matchesPath heuristic to filter to package paths that could + // reasonably match a dangling reference. + // + // This permits mismatch naming like directory "go-foo" being package "foo", + // or "pkg.v3" being "pkg", or directory + // "google.golang.org/api/cloudbilling/v1" being package "cloudbilling", but + // doesn't permit a directory "foo" to be package "bar", which is strongly + // discouraged anyway. There's no reason goimports needs to be slow just to + // accommodate that. for pkgIdent := range refs { - lastTwo := lastTwoComponents(pkg.importPathShort) - if strings.Contains(lastTwo, pkgIdent) { + if matchesPath(pkgIdent, pkg.importPathShort) { return true } - if hasHyphenOrUpperASCII(lastTwo) && !hasHyphenOrUpperASCII(pkgIdent) { - lastTwo = lowerASCIIAndRemoveHyphen(lastTwo) - if strings.Contains(lastTwo, pkgIdent) { - return true - } - } } return false } -func hasHyphenOrUpperASCII(s string) bool { - for i := 0; i < len(s); i++ { - b := s[i] - if b == '-' || ('A' <= b && b <= 'Z') { - return true - } - } - return false -} - -func lowerASCIIAndRemoveHyphen(s string) (ret string) { - buf := make([]byte, 0, len(s)) - for i := 0; i < len(s); i++ { - b := s[i] - switch { - case b == '-': - continue - case 'A' <= b && b <= 'Z': - buf = append(buf, b+('a'-'A')) - default: - buf = append(buf, b) - } - } - return string(buf) -} - // canUse reports whether the package in dir is usable from filename, // respecting the Go "internal" and "vendor" visibility rules. func canUse(filename, dir string) bool { @@ -1859,19 +1866,84 @@ func canUse(filename, dir string) bool { return !strings.Contains(relSlash, "/vendor/") && !strings.Contains(relSlash, "/internal/") && !strings.HasSuffix(relSlash, "/internal") } -// lastTwoComponents returns at most the last two path components -// of v, using either / or \ as the path separator. -func lastTwoComponents(v string) string { +// matchesPath reports whether ident may match a potential package name +// referred to by path, using heuristics to filter out unidiomatic package +// names. +// +// Specifically, it checks whether either of the last two '/'- or '\'-delimited +// path segments matches the identifier. The segment-matching heuristic must +// allow for various conventions around segment naming, including go-foo, +// foo-go, and foo.v3. To handle all of these, matching considers both (1) the +// entire segment, ignoring '-' and '.', as well as (2) the last subsegment +// separated by '-' or '.'. So the segment foo-go matches all of the following +// identifiers: foo, go, and foogo. All matches are case insensitive (for ASCII +// identifiers). +// +// See the docstring for [pkgIsCandidate] for an explanation of how this +// heuristic filters potential candidate packages. +func matchesPath(ident, path string) bool { + // Ignore case, for ASCII. + lowerIfASCII := func(b byte) byte { + if 'A' <= b && b <= 'Z' { + return b + ('a' - 'A') + } + return b + } + + // match reports whether path[start:end] matches ident, ignoring [.-]. + match := func(start, end int) bool { + ii := len(ident) - 1 // current byte in ident + pi := end - 1 // current byte in path + for ; pi >= start && ii >= 0; pi-- { + pb := path[pi] + if pb == '-' || pb == '.' { + continue + } + pb = lowerIfASCII(pb) + ib := lowerIfASCII(ident[ii]) + if pb != ib { + return false + } + ii-- + } + return ii < 0 && pi < start // all bytes matched + } + + // segmentEnd and subsegmentEnd hold the end points of the current segment + // and subsegment intervals. + segmentEnd := len(path) + subsegmentEnd := len(path) + + // Count slashes; we only care about the last two segments. nslash := 0 - for i := len(v) - 1; i >= 0; i-- { - if v[i] == '/' || v[i] == '\\' { + + for i := len(path) - 1; i >= 0; i-- { + switch b := path[i]; b { + // TODO(rfindley): we handle backlashes here only because the previous + // heuristic handled backslashes. This is perhaps overly defensive, but is + // the result of many lessons regarding Chesterton's fence and the + // goimports codebase. + // + // However, this function is only ever called with something called an + // 'importPath'. Is it possible that this is a real import path, and + // therefore we need only consider forward slashes? + case '/', '\\': + if match(i+1, segmentEnd) || match(i+1, subsegmentEnd) { + return true + } nslash++ if nslash == 2 { - return v[i:] + return false // did not match above + } + segmentEnd, subsegmentEnd = i, i // reset + case '-', '.': + if match(i+1, subsegmentEnd) { + return true } + subsegmentEnd = i } } - return v + return match(0, segmentEnd) || match(0, subsegmentEnd) } type visitFn func(node ast.Node) ast.Visitor diff --git a/vendor/golang.org/x/tools/internal/imports/imports.go b/vendor/golang.org/x/tools/internal/imports/imports.go index f83465520a..ff6b59a58a 100644 --- a/vendor/golang.org/x/tools/internal/imports/imports.go +++ b/vendor/golang.org/x/tools/internal/imports/imports.go @@ -86,7 +86,7 @@ func ApplyFixes(fixes []*ImportFix, filename string, src []byte, opt *Options, e // Don't use parse() -- we don't care about fragments or statement lists // here, and we need to work with unparseable files. fileSet := token.NewFileSet() - parserMode := parser.Mode(0) + parserMode := parser.SkipObjectResolution if opt.Comments { parserMode |= parser.ParseComments } @@ -165,7 +165,7 @@ func formatFile(fset *token.FileSet, file *ast.File, src []byte, adjust func(ori // parse parses src, which was read from filename, // as a Go source file or statement list. func parse(fset *token.FileSet, filename string, src []byte, opt *Options) (*ast.File, func(orig, src []byte) []byte, error) { - parserMode := parser.Mode(0) + var parserMode parser.Mode // legacy ast.Object resolution is required here if opt.Comments { parserMode |= parser.ParseComments } diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go index 82fe644a18..8555e3f83d 100644 --- a/vendor/golang.org/x/tools/internal/imports/mod.go +++ b/vendor/golang.org/x/tools/internal/imports/mod.go @@ -245,7 +245,10 @@ func newModuleResolver(e *ProcessEnv, moduleCacheCache *DirInfoCache) (*ModuleRe // 2. Use this to separate module cache scanning from other scanning. func gomodcacheForEnv(goenv map[string]string) string { if gmc := goenv["GOMODCACHE"]; gmc != "" { - return gmc + // golang/go#67156: ensure that the module cache is clean, since it is + // assumed as a prefix to directories scanned by gopathwalk, which are + // themselves clean. + return filepath.Clean(gmc) } gopaths := filepath.SplitList(goenv["GOPATH"]) if len(gopaths) == 0 { @@ -265,9 +268,7 @@ func (r *ModuleResolver) initAllMods() error { return err } if mod.Dir == "" { - if r.env.Logf != nil { - r.env.Logf("module %v has not been downloaded and will be ignored", mod.Path) - } + r.env.logf("module %v has not been downloaded and will be ignored", mod.Path) // Can't do anything with a module that's not downloaded. continue } @@ -742,8 +743,8 @@ func (r *ModuleResolver) loadExports(ctx context.Context, pkg *pkg, includeTest func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) directoryPackageInfo { subdir := "" - if dir != root.Path { - subdir = dir[len(root.Path)+len("/"):] + if prefix := root.Path + string(filepath.Separator); strings.HasPrefix(dir, prefix) { + subdir = dir[len(prefix):] } importPath := filepath.ToSlash(subdir) if strings.HasPrefix(importPath, "vendor/") { @@ -766,9 +767,7 @@ func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) dir } modPath, err := module.UnescapePath(filepath.ToSlash(matches[1])) if err != nil { - if r.env.Logf != nil { - r.env.Logf("decoding module cache path %q: %v", subdir, err) - } + r.env.logf("decoding module cache path %q: %v", subdir, err) return directoryPackageInfo{ status: directoryScanned, err: fmt.Errorf("decoding module cache path %q: %v", subdir, err), diff --git a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go index 2acd85851e..f6cb37c5c3 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go @@ -21,10 +21,7 @@ import ( // export data. type PkgDecoder struct { // version is the file format version. - version uint32 - - // aliases determines whether types.Aliases should be created - aliases bool + version Version // sync indicates whether the file uses sync markers. sync bool @@ -71,12 +68,9 @@ func (pr *PkgDecoder) SyncMarkers() bool { return pr.sync } // NewPkgDecoder returns a PkgDecoder initialized to read the Unified // IR export data from input. pkgPath is the package path for the // compilation unit that produced the export data. -// -// TODO(mdempsky): Remove pkgPath parameter; unneeded since CL 391014. func NewPkgDecoder(pkgPath, input string) PkgDecoder { pr := PkgDecoder{ pkgPath: pkgPath, - //aliases: aliases.Enabled(), } // TODO(mdempsky): Implement direct indexing of input string to @@ -84,14 +78,15 @@ func NewPkgDecoder(pkgPath, input string) PkgDecoder { r := strings.NewReader(input) - assert(binary.Read(r, binary.LittleEndian, &pr.version) == nil) + var ver uint32 + assert(binary.Read(r, binary.LittleEndian, &ver) == nil) + pr.version = Version(ver) - switch pr.version { - default: - panic(fmt.Errorf("unsupported version: %v", pr.version)) - case 0: - // no flags - case 1: + if pr.version >= numVersions { + panic(fmt.Errorf("cannot decode %q, export data version %d is greater than maximum supported version %d", pkgPath, pr.version, numVersions-1)) + } + + if pr.version.Has(Flags) { var flags uint32 assert(binary.Read(r, binary.LittleEndian, &flags) == nil) pr.sync = flags&flagSyncMarkers != 0 @@ -106,7 +101,9 @@ func NewPkgDecoder(pkgPath, input string) PkgDecoder { assert(err == nil) pr.elemData = input[pos:] - assert(len(pr.elemData)-8 == int(pr.elemEnds[len(pr.elemEnds)-1])) + + const fingerprintSize = 8 + assert(len(pr.elemData)-fingerprintSize == int(pr.elemEnds[len(pr.elemEnds)-1])) return pr } @@ -140,7 +137,7 @@ func (pr *PkgDecoder) AbsIdx(k RelocKind, idx Index) int { absIdx += int(pr.elemEndsEnds[k-1]) } if absIdx >= int(pr.elemEndsEnds[k]) { - errorf("%v:%v is out of bounds; %v", k, idx, pr.elemEndsEnds) + panicf("%v:%v is out of bounds; %v", k, idx, pr.elemEndsEnds) } return absIdx } @@ -197,9 +194,7 @@ func (pr *PkgDecoder) NewDecoderRaw(k RelocKind, idx Index) Decoder { Idx: idx, } - // TODO(mdempsky) r.data.Reset(...) after #44505 is resolved. - r.Data = *strings.NewReader(pr.DataIdx(k, idx)) - + r.Data.Reset(pr.DataIdx(k, idx)) r.Sync(SyncRelocs) r.Relocs = make([]RelocEnt, r.Len()) for i := range r.Relocs { @@ -248,7 +243,7 @@ type Decoder struct { func (r *Decoder) checkErr(err error) { if err != nil { - errorf("unexpected decoding error: %w", err) + panicf("unexpected decoding error: %w", err) } } @@ -519,3 +514,6 @@ func (pr *PkgDecoder) PeekObj(idx Index) (string, string, CodeObj) { return path, name, tag } + +// Version reports the version of the bitstream. +func (w *Decoder) Version() Version { return w.common.version } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/encoder.go b/vendor/golang.org/x/tools/internal/pkgbits/encoder.go index 6482617a4f..c17a12399d 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/encoder.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/encoder.go @@ -12,18 +12,15 @@ import ( "io" "math/big" "runtime" + "strings" ) -// currentVersion is the current version number. -// -// - v0: initial prototype -// -// - v1: adds the flags uint32 word -const currentVersion uint32 = 1 - // A PkgEncoder provides methods for encoding a package's Unified IR // export data. type PkgEncoder struct { + // version of the bitstream. + version Version + // elems holds the bitstream for previously encoded elements. elems [numRelocs][]string @@ -47,8 +44,9 @@ func (pw *PkgEncoder) SyncMarkers() bool { return pw.syncFrames >= 0 } // export data files, but can help diagnosing desync errors in // higher-level Unified IR reader/writer code. If syncFrames is // negative, then sync markers are omitted entirely. -func NewPkgEncoder(syncFrames int) PkgEncoder { +func NewPkgEncoder(version Version, syncFrames int) PkgEncoder { return PkgEncoder{ + version: version, stringsIdx: make(map[string]Index), syncFrames: syncFrames, } @@ -64,13 +62,15 @@ func (pw *PkgEncoder) DumpTo(out0 io.Writer) (fingerprint [8]byte) { assert(binary.Write(out, binary.LittleEndian, x) == nil) } - writeUint32(currentVersion) + writeUint32(uint32(pw.version)) - var flags uint32 - if pw.SyncMarkers() { - flags |= flagSyncMarkers + if pw.version.Has(Flags) { + var flags uint32 + if pw.SyncMarkers() { + flags |= flagSyncMarkers + } + writeUint32(flags) } - writeUint32(flags) // Write elemEndsEnds. var sum uint32 @@ -159,7 +159,7 @@ type Encoder struct { // Flush finalizes the element's bitstream and returns its Index. func (w *Encoder) Flush() Index { - var sb bytes.Buffer // TODO(mdempsky): strings.Builder after #44505 is resolved + var sb strings.Builder // Backup the data so we write the relocations at the front. var tmp bytes.Buffer @@ -189,7 +189,7 @@ func (w *Encoder) Flush() Index { func (w *Encoder) checkErr(err error) { if err != nil { - errorf("unexpected encoding error: %v", err) + panicf("unexpected encoding error: %v", err) } } @@ -320,8 +320,14 @@ func (w *Encoder) Code(c Code) { // section (if not already present), and then writing a relocation // into the element bitstream. func (w *Encoder) String(s string) { + w.StringRef(w.p.StringIdx(s)) +} + +// StringRef writes a reference to the given index, which must be a +// previously encoded string value. +func (w *Encoder) StringRef(idx Index) { w.Sync(SyncString) - w.Reloc(RelocString, w.p.StringIdx(s)) + w.Reloc(RelocString, idx) } // Strings encodes and writes a variable-length slice of strings into @@ -348,7 +354,7 @@ func (w *Encoder) Value(val constant.Value) { func (w *Encoder) scalar(val constant.Value) { switch v := constant.Val(val).(type) { default: - errorf("unhandled %v (%v)", val, val.Kind()) + panicf("unhandled %v (%v)", val, val.Kind()) case bool: w.Code(ValBool) w.Bool(v) @@ -381,3 +387,6 @@ func (w *Encoder) bigFloat(v *big.Float) { b := v.Append(nil, 'p', -1) w.String(string(b)) // TODO: More efficient encoding. } + +// Version reports the version of the bitstream. +func (w *Encoder) Version() Version { return w.p.version } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go b/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go deleted file mode 100644 index 5294f6a63e..0000000000 --- a/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.7 -// +build !go1.7 - -// TODO(mdempsky): Remove after #44505 is resolved - -package pkgbits - -import "runtime" - -func walkFrames(pcs []uintptr, visit frameVisitor) { - for _, pc := range pcs { - fn := runtime.FuncForPC(pc) - file, line := fn.FileLine(pc) - - visit(file, line, fn.Name(), pc-fn.Entry()) - } -} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go b/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go deleted file mode 100644 index 2324ae7adf..0000000000 --- a/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.7 -// +build go1.7 - -package pkgbits - -import "runtime" - -// walkFrames calls visit for each call frame represented by pcs. -// -// pcs should be a slice of PCs, as returned by runtime.Callers. -func walkFrames(pcs []uintptr, visit frameVisitor) { - if len(pcs) == 0 { - return - } - - frames := runtime.CallersFrames(pcs) - for { - frame, more := frames.Next() - visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry) - if !more { - return - } - } -} diff --git a/vendor/golang.org/x/tools/internal/pkgbits/support.go b/vendor/golang.org/x/tools/internal/pkgbits/support.go index ad26d3b28c..50534a2955 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/support.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/support.go @@ -12,6 +12,6 @@ func assert(b bool) { } } -func errorf(format string, args ...interface{}) { +func panicf(format string, args ...any) { panic(fmt.Errorf(format, args...)) } diff --git a/vendor/golang.org/x/tools/internal/pkgbits/sync.go b/vendor/golang.org/x/tools/internal/pkgbits/sync.go index 5bd51ef717..1520b73afb 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/sync.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/sync.go @@ -6,6 +6,7 @@ package pkgbits import ( "fmt" + "runtime" "strings" ) @@ -23,6 +24,24 @@ func fmtFrames(pcs ...uintptr) []string { type frameVisitor func(file string, line int, name string, offset uintptr) +// walkFrames calls visit for each call frame represented by pcs. +// +// pcs should be a slice of PCs, as returned by runtime.Callers. +func walkFrames(pcs []uintptr, visit frameVisitor) { + if len(pcs) == 0 { + return + } + + frames := runtime.CallersFrames(pcs) + for { + frame, more := frames.Next() + visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry) + if !more { + return + } + } +} + // SyncMarker is an enum type that represents markers that may be // written to export data to ensure the reader and writer stay // synchronized. @@ -110,4 +129,8 @@ const ( SyncStmtsEnd SyncLabel SyncOptLabel + + SyncMultiExpr + SyncRType + SyncConvRTTI ) diff --git a/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go b/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go index 4a5b0ca5f2..582ad56d3e 100644 --- a/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go +++ b/vendor/golang.org/x/tools/internal/pkgbits/syncmarker_string.go @@ -74,11 +74,14 @@ func _() { _ = x[SyncStmtsEnd-64] _ = x[SyncLabel-65] _ = x[SyncOptLabel-66] + _ = x[SyncMultiExpr-67] + _ = x[SyncRType-68] + _ = x[SyncConvRTTI-69] } -const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprExprTypeAssignOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabel" +const _SyncMarker_name = "EOFBoolInt64Uint64StringValueValRelocsRelocUseRelocPublicPosPosBaseObjectObject1PkgPkgDefMethodTypeTypeIdxTypeParamNamesSignatureParamsParamCodeObjSymLocalIdentSelectorPrivateFuncExtVarExtTypeExtPragmaExprListExprsExprExprTypeAssignOpFuncLitCompLitDeclFuncBodyOpenScopeCloseScopeCloseAnotherScopeDeclNamesDeclNameStmtsBlockStmtIfStmtForStmtSwitchStmtRangeStmtCaseClauseCommClauseSelectStmtDeclsLabeledStmtUseObjLocalAddLocalLinknameStmt1StmtsEndLabelOptLabelMultiExprRTypeConvRTTI" -var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 226, 232, 234, 241, 248, 252, 260, 269, 279, 296, 305, 313, 318, 327, 333, 340, 350, 359, 369, 379, 389, 394, 405, 416, 424, 432, 437, 445, 450, 458} +var _SyncMarker_index = [...]uint16{0, 3, 7, 12, 18, 24, 29, 32, 38, 43, 51, 57, 60, 67, 73, 80, 83, 89, 95, 99, 106, 120, 129, 135, 140, 147, 150, 160, 168, 175, 182, 188, 195, 201, 209, 214, 218, 226, 232, 234, 241, 248, 252, 260, 269, 279, 296, 305, 313, 318, 327, 333, 340, 350, 359, 369, 379, 389, 394, 405, 416, 424, 432, 437, 445, 450, 458, 467, 472, 480} func (i SyncMarker) String() string { i -= 1 diff --git a/vendor/golang.org/x/tools/internal/pkgbits/version.go b/vendor/golang.org/x/tools/internal/pkgbits/version.go new file mode 100644 index 0000000000..53af9df22b --- /dev/null +++ b/vendor/golang.org/x/tools/internal/pkgbits/version.go @@ -0,0 +1,85 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pkgbits + +// Version indicates a version of a unified IR bitstream. +// Each Version indicates the addition, removal, or change of +// new data in the bitstream. +// +// These are serialized to disk and the interpretation remains fixed. +type Version uint32 + +const ( + // V0: initial prototype. + // + // All data that is not assigned a Field is in version V0 + // and has not been deprecated. + V0 Version = iota + + // V1: adds the Flags uint32 word + V1 + + // V2: removes unused legacy fields and supports type parameters for aliases. + // - remove the legacy "has init" bool from the public root + // - remove obj's "derived func instance" bool + // - add a TypeParamNames field to ObjAlias + // - remove derived info "needed" bool + V2 + + numVersions = iota +) + +// Field denotes a unit of data in the serialized unified IR bitstream. +// It is conceptually a like field in a structure. +// +// We only really need Fields when the data may or may not be present +// in a stream based on the Version of the bitstream. +// +// Unlike much of pkgbits, Fields are not serialized and +// can change values as needed. +type Field int + +const ( + // Flags in a uint32 in the header of a bitstream + // that is used to indicate whether optional features are enabled. + Flags Field = iota + + // Deprecated: HasInit was a bool indicating whether a package + // has any init functions. + HasInit + + // Deprecated: DerivedFuncInstance was a bool indicating + // whether an object was a function instance. + DerivedFuncInstance + + // ObjAlias has a list of TypeParamNames. + AliasTypeParamNames + + // Deprecated: DerivedInfoNeeded was a bool indicating + // whether a type was a derived type. + DerivedInfoNeeded + + numFields = iota +) + +// introduced is the version a field was added. +var introduced = [numFields]Version{ + Flags: V1, + AliasTypeParamNames: V2, +} + +// removed is the version a field was removed in or 0 for fields +// that have not yet been deprecated. +// (So removed[f]-1 is the last version it is included in.) +var removed = [numFields]Version{ + HasInit: V2, + DerivedFuncInstance: V2, + DerivedInfoNeeded: V2, +} + +// Has reports whether field f is present in a bitstream at version v. +func (v Version) Has(f Field) bool { + return introduced[f] <= v && (v < removed[f] || removed[f] == V0) +} diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go index fd6892075e..cdaac9ab34 100644 --- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go +++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go @@ -23,6 +23,7 @@ var PackageSymbols = map[string][]Symbol{ {"ErrWriteAfterClose", Var, 0}, {"ErrWriteTooLong", Var, 0}, {"FileInfoHeader", Func, 1}, + {"FileInfoNames", Type, 23}, {"Format", Type, 10}, {"FormatGNU", Const, 10}, {"FormatPAX", Const, 10}, @@ -820,6 +821,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*ConnectionState).ExportKeyingMaterial", Method, 11}, {"(*Dialer).Dial", Method, 15}, {"(*Dialer).DialContext", Method, 15}, + {"(*ECHRejectionError).Error", Method, 23}, {"(*QUICConn).Close", Method, 21}, {"(*QUICConn).ConnectionState", Method, 21}, {"(*QUICConn).HandleData", Method, 21}, @@ -827,6 +829,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*QUICConn).SendSessionTicket", Method, 21}, {"(*QUICConn).SetTransportParameters", Method, 21}, {"(*QUICConn).Start", Method, 21}, + {"(*QUICConn).StoreSession", Method, 23}, {"(*SessionState).Bytes", Method, 21}, {"(AlertError).Error", Method, 21}, {"(ClientAuthType).String", Method, 15}, @@ -877,6 +880,8 @@ var PackageSymbols = map[string][]Symbol{ {"Config.ClientSessionCache", Field, 3}, {"Config.CurvePreferences", Field, 3}, {"Config.DynamicRecordSizingDisabled", Field, 7}, + {"Config.EncryptedClientHelloConfigList", Field, 23}, + {"Config.EncryptedClientHelloRejectionVerify", Field, 23}, {"Config.GetCertificate", Field, 4}, {"Config.GetClientCertificate", Field, 8}, {"Config.GetConfigForClient", Field, 8}, @@ -902,6 +907,7 @@ var PackageSymbols = map[string][]Symbol{ {"ConnectionState", Type, 0}, {"ConnectionState.CipherSuite", Field, 0}, {"ConnectionState.DidResume", Field, 1}, + {"ConnectionState.ECHAccepted", Field, 23}, {"ConnectionState.HandshakeComplete", Field, 0}, {"ConnectionState.NegotiatedProtocol", Field, 0}, {"ConnectionState.NegotiatedProtocolIsMutual", Field, 0}, @@ -925,6 +931,8 @@ var PackageSymbols = map[string][]Symbol{ {"ECDSAWithP384AndSHA384", Const, 8}, {"ECDSAWithP521AndSHA512", Const, 8}, {"ECDSAWithSHA1", Const, 10}, + {"ECHRejectionError", Type, 23}, + {"ECHRejectionError.RetryConfigList", Field, 23}, {"Ed25519", Const, 13}, {"InsecureCipherSuites", Func, 14}, {"Listen", Func, 0}, @@ -943,6 +951,7 @@ var PackageSymbols = map[string][]Symbol{ {"ParseSessionState", Func, 21}, {"QUICClient", Func, 21}, {"QUICConfig", Type, 21}, + {"QUICConfig.EnableSessionEvents", Field, 23}, {"QUICConfig.TLSConfig", Field, 21}, {"QUICConn", Type, 21}, {"QUICEncryptionLevel", Type, 21}, @@ -954,16 +963,20 @@ var PackageSymbols = map[string][]Symbol{ {"QUICEvent.Data", Field, 21}, {"QUICEvent.Kind", Field, 21}, {"QUICEvent.Level", Field, 21}, + {"QUICEvent.SessionState", Field, 23}, {"QUICEvent.Suite", Field, 21}, {"QUICEventKind", Type, 21}, {"QUICHandshakeDone", Const, 21}, {"QUICNoEvent", Const, 21}, {"QUICRejectedEarlyData", Const, 21}, + {"QUICResumeSession", Const, 23}, {"QUICServer", Func, 21}, {"QUICSessionTicketOptions", Type, 21}, {"QUICSessionTicketOptions.EarlyData", Field, 21}, + {"QUICSessionTicketOptions.Extra", Field, 23}, {"QUICSetReadSecret", Const, 21}, {"QUICSetWriteSecret", Const, 21}, + {"QUICStoreSession", Const, 23}, {"QUICTransportParameters", Const, 21}, {"QUICTransportParametersRequired", Const, 21}, {"QUICWriteData", Const, 21}, @@ -1036,6 +1049,8 @@ var PackageSymbols = map[string][]Symbol{ {"(*Certificate).Verify", Method, 0}, {"(*Certificate).VerifyHostname", Method, 0}, {"(*CertificateRequest).CheckSignature", Method, 5}, + {"(*OID).UnmarshalBinary", Method, 23}, + {"(*OID).UnmarshalText", Method, 23}, {"(*RevocationList).CheckSignatureFrom", Method, 19}, {"(CertificateInvalidError).Error", Method, 0}, {"(ConstraintViolationError).Error", Method, 0}, @@ -1043,6 +1058,8 @@ var PackageSymbols = map[string][]Symbol{ {"(InsecureAlgorithmError).Error", Method, 6}, {"(OID).Equal", Method, 22}, {"(OID).EqualASN1OID", Method, 22}, + {"(OID).MarshalBinary", Method, 23}, + {"(OID).MarshalText", Method, 23}, {"(OID).String", Method, 22}, {"(PublicKeyAlgorithm).String", Method, 10}, {"(SignatureAlgorithm).String", Method, 6}, @@ -1196,6 +1213,7 @@ var PackageSymbols = map[string][]Symbol{ {"ParseCertificates", Func, 0}, {"ParseDERCRL", Func, 0}, {"ParseECPrivateKey", Func, 1}, + {"ParseOID", Func, 23}, {"ParsePKCS1PrivateKey", Func, 0}, {"ParsePKCS1PublicKey", Func, 10}, {"ParsePKCS8PrivateKey", Func, 0}, @@ -2541,6 +2559,7 @@ var PackageSymbols = map[string][]Symbol{ {"PT_NOTE", Const, 0}, {"PT_NULL", Const, 0}, {"PT_OPENBSD_BOOTDATA", Const, 16}, + {"PT_OPENBSD_NOBTCFI", Const, 23}, {"PT_OPENBSD_RANDOMIZE", Const, 16}, {"PT_OPENBSD_WXNEEDED", Const, 16}, {"PT_PAX_FLAGS", Const, 16}, @@ -3620,13 +3639,16 @@ var PackageSymbols = map[string][]Symbol{ {"STT_COMMON", Const, 0}, {"STT_FILE", Const, 0}, {"STT_FUNC", Const, 0}, + {"STT_GNU_IFUNC", Const, 23}, {"STT_HIOS", Const, 0}, {"STT_HIPROC", Const, 0}, {"STT_LOOS", Const, 0}, {"STT_LOPROC", Const, 0}, {"STT_NOTYPE", Const, 0}, {"STT_OBJECT", Const, 0}, + {"STT_RELC", Const, 23}, {"STT_SECTION", Const, 0}, + {"STT_SRELC", Const, 23}, {"STT_TLS", Const, 0}, {"STV_DEFAULT", Const, 0}, {"STV_HIDDEN", Const, 0}, @@ -4544,11 +4566,14 @@ var PackageSymbols = map[string][]Symbol{ {"URLEncoding", Var, 0}, }, "encoding/binary": { + {"Append", Func, 23}, {"AppendByteOrder", Type, 19}, {"AppendUvarint", Func, 19}, {"AppendVarint", Func, 19}, {"BigEndian", Var, 0}, {"ByteOrder", Type, 0}, + {"Decode", Func, 23}, + {"Encode", Func, 23}, {"LittleEndian", Var, 0}, {"MaxVarintLen16", Const, 0}, {"MaxVarintLen32", Const, 0}, @@ -5308,6 +5333,7 @@ var PackageSymbols = map[string][]Symbol{ {"ParenExpr.Rparen", Field, 0}, {"ParenExpr.X", Field, 0}, {"Pkg", Const, 0}, + {"Preorder", Func, 23}, {"Print", Func, 0}, {"RECV", Const, 0}, {"RangeStmt", Type, 0}, @@ -5898,7 +5924,12 @@ var PackageSymbols = map[string][]Symbol{ }, "go/types": { {"(*Alias).Obj", Method, 22}, + {"(*Alias).Origin", Method, 23}, + {"(*Alias).Rhs", Method, 23}, + {"(*Alias).SetTypeParams", Method, 23}, {"(*Alias).String", Method, 22}, + {"(*Alias).TypeArgs", Method, 23}, + {"(*Alias).TypeParams", Method, 23}, {"(*Alias).Underlying", Method, 22}, {"(*ArgumentError).Error", Method, 18}, {"(*ArgumentError).Unwrap", Method, 18}, @@ -5943,6 +5974,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Func).Pkg", Method, 5}, {"(*Func).Pos", Method, 5}, {"(*Func).Scope", Method, 5}, + {"(*Func).Signature", Method, 23}, {"(*Func).String", Method, 5}, {"(*Func).Type", Method, 5}, {"(*Info).ObjectOf", Method, 5}, @@ -6992,6 +7024,12 @@ var PackageSymbols = map[string][]Symbol{ {"TempFile", Func, 0}, {"WriteFile", Func, 0}, }, + "iter": { + {"Pull", Func, 23}, + {"Pull2", Func, 23}, + {"Seq", Type, 23}, + {"Seq2", Type, 23}, + }, "log": { {"(*Logger).Fatal", Method, 0}, {"(*Logger).Fatalf", Method, 0}, @@ -7222,11 +7260,16 @@ var PackageSymbols = map[string][]Symbol{ {"Writer", Type, 0}, }, "maps": { + {"All", Func, 23}, {"Clone", Func, 21}, + {"Collect", Func, 23}, {"Copy", Func, 21}, {"DeleteFunc", Func, 21}, {"Equal", Func, 21}, {"EqualFunc", Func, 21}, + {"Insert", Func, 23}, + {"Keys", Func, 23}, + {"Values", Func, 23}, }, "math": { {"Abs", Func, 0}, @@ -7617,6 +7660,7 @@ var PackageSymbols = map[string][]Symbol{ }, "math/rand/v2": { {"(*ChaCha8).MarshalBinary", Method, 22}, + {"(*ChaCha8).Read", Method, 23}, {"(*ChaCha8).Seed", Method, 22}, {"(*ChaCha8).Uint64", Method, 22}, {"(*ChaCha8).UnmarshalBinary", Method, 22}, @@ -7636,6 +7680,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Rand).NormFloat64", Method, 22}, {"(*Rand).Perm", Method, 22}, {"(*Rand).Shuffle", Method, 22}, + {"(*Rand).Uint", Method, 23}, {"(*Rand).Uint32", Method, 22}, {"(*Rand).Uint32N", Method, 22}, {"(*Rand).Uint64", Method, 22}, @@ -7663,6 +7708,7 @@ var PackageSymbols = map[string][]Symbol{ {"Rand", Type, 22}, {"Shuffle", Func, 22}, {"Source", Type, 22}, + {"Uint", Func, 23}, {"Uint32", Func, 22}, {"Uint32N", Func, 22}, {"Uint64", Func, 22}, @@ -7743,6 +7789,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*DNSError).Error", Method, 0}, {"(*DNSError).Temporary", Method, 0}, {"(*DNSError).Timeout", Method, 0}, + {"(*DNSError).Unwrap", Method, 23}, {"(*Dialer).Dial", Method, 1}, {"(*Dialer).DialContext", Method, 7}, {"(*Dialer).MultipathTCP", Method, 21}, @@ -7809,6 +7856,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*TCPConn).RemoteAddr", Method, 0}, {"(*TCPConn).SetDeadline", Method, 0}, {"(*TCPConn).SetKeepAlive", Method, 0}, + {"(*TCPConn).SetKeepAliveConfig", Method, 23}, {"(*TCPConn).SetKeepAlivePeriod", Method, 2}, {"(*TCPConn).SetLinger", Method, 0}, {"(*TCPConn).SetNoDelay", Method, 0}, @@ -7922,6 +7970,7 @@ var PackageSymbols = map[string][]Symbol{ {"DNSError.IsTimeout", Field, 0}, {"DNSError.Name", Field, 0}, {"DNSError.Server", Field, 0}, + {"DNSError.UnwrapErr", Field, 23}, {"DefaultResolver", Var, 8}, {"Dial", Func, 0}, {"DialIP", Func, 0}, @@ -7937,6 +7986,7 @@ var PackageSymbols = map[string][]Symbol{ {"Dialer.DualStack", Field, 2}, {"Dialer.FallbackDelay", Field, 5}, {"Dialer.KeepAlive", Field, 3}, + {"Dialer.KeepAliveConfig", Field, 23}, {"Dialer.LocalAddr", Field, 1}, {"Dialer.Resolver", Field, 8}, {"Dialer.Timeout", Field, 1}, @@ -7989,10 +8039,16 @@ var PackageSymbols = map[string][]Symbol{ {"Interfaces", Func, 0}, {"InvalidAddrError", Type, 0}, {"JoinHostPort", Func, 0}, + {"KeepAliveConfig", Type, 23}, + {"KeepAliveConfig.Count", Field, 23}, + {"KeepAliveConfig.Enable", Field, 23}, + {"KeepAliveConfig.Idle", Field, 23}, + {"KeepAliveConfig.Interval", Field, 23}, {"Listen", Func, 0}, {"ListenConfig", Type, 11}, {"ListenConfig.Control", Field, 11}, {"ListenConfig.KeepAlive", Field, 13}, + {"ListenConfig.KeepAliveConfig", Field, 23}, {"ListenIP", Func, 0}, {"ListenMulticastUDP", Func, 0}, {"ListenPacket", Func, 0}, @@ -8081,6 +8137,7 @@ var PackageSymbols = map[string][]Symbol{ {"(*Request).Context", Method, 7}, {"(*Request).Cookie", Method, 0}, {"(*Request).Cookies", Method, 0}, + {"(*Request).CookiesNamed", Method, 23}, {"(*Request).FormFile", Method, 0}, {"(*Request).FormValue", Method, 0}, {"(*Request).MultipartReader", Method, 0}, @@ -8148,7 +8205,9 @@ var PackageSymbols = map[string][]Symbol{ {"Cookie.HttpOnly", Field, 0}, {"Cookie.MaxAge", Field, 0}, {"Cookie.Name", Field, 0}, + {"Cookie.Partitioned", Field, 23}, {"Cookie.Path", Field, 0}, + {"Cookie.Quoted", Field, 23}, {"Cookie.Raw", Field, 0}, {"Cookie.RawExpires", Field, 0}, {"Cookie.SameSite", Field, 11}, @@ -8225,7 +8284,9 @@ var PackageSymbols = map[string][]Symbol{ {"NoBody", Var, 8}, {"NotFound", Func, 0}, {"NotFoundHandler", Func, 0}, + {"ParseCookie", Func, 23}, {"ParseHTTPVersion", Func, 0}, + {"ParseSetCookie", Func, 23}, {"ParseTime", Func, 1}, {"Post", Func, 0}, {"PostForm", Func, 0}, @@ -8252,6 +8313,7 @@ var PackageSymbols = map[string][]Symbol{ {"Request.Host", Field, 0}, {"Request.Method", Field, 0}, {"Request.MultipartForm", Field, 0}, + {"Request.Pattern", Field, 23}, {"Request.PostForm", Field, 1}, {"Request.Proto", Field, 0}, {"Request.ProtoMajor", Field, 0}, @@ -8453,6 +8515,7 @@ var PackageSymbols = map[string][]Symbol{ {"DefaultRemoteAddr", Const, 0}, {"NewRecorder", Func, 0}, {"NewRequest", Func, 7}, + {"NewRequestWithContext", Func, 23}, {"NewServer", Func, 0}, {"NewTLSServer", Func, 0}, {"NewUnstartedServer", Func, 0}, @@ -8917,6 +8980,7 @@ var PackageSymbols = map[string][]Symbol{ {"Chown", Func, 0}, {"Chtimes", Func, 0}, {"Clearenv", Func, 0}, + {"CopyFS", Func, 23}, {"Create", Func, 0}, {"CreateTemp", Func, 16}, {"DevNull", Const, 0}, @@ -9150,6 +9214,7 @@ var PackageSymbols = map[string][]Symbol{ {"IsLocal", Func, 20}, {"Join", Func, 0}, {"ListSeparator", Const, 0}, + {"Localize", Func, 23}, {"Match", Func, 0}, {"Rel", Func, 0}, {"Separator", Const, 0}, @@ -9232,6 +9297,8 @@ var PackageSymbols = map[string][]Symbol{ {"(Value).Pointer", Method, 0}, {"(Value).Recv", Method, 0}, {"(Value).Send", Method, 0}, + {"(Value).Seq", Method, 23}, + {"(Value).Seq2", Method, 23}, {"(Value).Set", Method, 0}, {"(Value).SetBool", Method, 0}, {"(Value).SetBytes", Method, 0}, @@ -9314,6 +9381,7 @@ var PackageSymbols = map[string][]Symbol{ {"SelectSend", Const, 1}, {"SendDir", Const, 0}, {"Slice", Const, 0}, + {"SliceAt", Func, 23}, {"SliceHeader", Type, 0}, {"SliceHeader.Cap", Field, 0}, {"SliceHeader.Data", Field, 0}, @@ -9655,6 +9723,7 @@ var PackageSymbols = map[string][]Symbol{ {"BuildSetting", Type, 18}, {"BuildSetting.Key", Field, 18}, {"BuildSetting.Value", Field, 18}, + {"CrashOptions", Type, 23}, {"FreeOSMemory", Func, 1}, {"GCStats", Type, 1}, {"GCStats.LastGC", Field, 1}, @@ -9672,6 +9741,7 @@ var PackageSymbols = map[string][]Symbol{ {"PrintStack", Func, 0}, {"ReadBuildInfo", Func, 12}, {"ReadGCStats", Func, 1}, + {"SetCrashOutput", Func, 23}, {"SetGCPercent", Func, 1}, {"SetMaxStack", Func, 2}, {"SetMaxThreads", Func, 2}, @@ -9742,10 +9812,15 @@ var PackageSymbols = map[string][]Symbol{ {"WithRegion", Func, 11}, }, "slices": { + {"All", Func, 23}, + {"AppendSeq", Func, 23}, + {"Backward", Func, 23}, {"BinarySearch", Func, 21}, {"BinarySearchFunc", Func, 21}, + {"Chunk", Func, 23}, {"Clip", Func, 21}, {"Clone", Func, 21}, + {"Collect", Func, 23}, {"Compact", Func, 21}, {"CompactFunc", Func, 21}, {"Compare", Func, 21}, @@ -9767,11 +9842,16 @@ var PackageSymbols = map[string][]Symbol{ {"MaxFunc", Func, 21}, {"Min", Func, 21}, {"MinFunc", Func, 21}, + {"Repeat", Func, 23}, {"Replace", Func, 21}, {"Reverse", Func, 21}, {"Sort", Func, 21}, {"SortFunc", Func, 21}, {"SortStableFunc", Func, 21}, + {"Sorted", Func, 23}, + {"SortedFunc", Func, 23}, + {"SortedStableFunc", Func, 23}, + {"Values", Func, 23}, }, "sort": { {"(Float64Slice).Len", Method, 0}, @@ -9936,10 +10016,14 @@ var PackageSymbols = map[string][]Symbol{ {"TrimSpace", Func, 0}, {"TrimSuffix", Func, 1}, }, + "structs": { + {"HostLayout", Type, 23}, + }, "sync": { {"(*Cond).Broadcast", Method, 0}, {"(*Cond).Signal", Method, 0}, {"(*Cond).Wait", Method, 0}, + {"(*Map).Clear", Method, 23}, {"(*Map).CompareAndDelete", Method, 20}, {"(*Map).CompareAndSwap", Method, 20}, {"(*Map).Delete", Method, 9}, @@ -9986,13 +10070,17 @@ var PackageSymbols = map[string][]Symbol{ {"(*Bool).Store", Method, 19}, {"(*Bool).Swap", Method, 19}, {"(*Int32).Add", Method, 19}, + {"(*Int32).And", Method, 23}, {"(*Int32).CompareAndSwap", Method, 19}, {"(*Int32).Load", Method, 19}, + {"(*Int32).Or", Method, 23}, {"(*Int32).Store", Method, 19}, {"(*Int32).Swap", Method, 19}, {"(*Int64).Add", Method, 19}, + {"(*Int64).And", Method, 23}, {"(*Int64).CompareAndSwap", Method, 19}, {"(*Int64).Load", Method, 19}, + {"(*Int64).Or", Method, 23}, {"(*Int64).Store", Method, 19}, {"(*Int64).Swap", Method, 19}, {"(*Pointer).CompareAndSwap", Method, 19}, @@ -10000,18 +10088,24 @@ var PackageSymbols = map[string][]Symbol{ {"(*Pointer).Store", Method, 19}, {"(*Pointer).Swap", Method, 19}, {"(*Uint32).Add", Method, 19}, + {"(*Uint32).And", Method, 23}, {"(*Uint32).CompareAndSwap", Method, 19}, {"(*Uint32).Load", Method, 19}, + {"(*Uint32).Or", Method, 23}, {"(*Uint32).Store", Method, 19}, {"(*Uint32).Swap", Method, 19}, {"(*Uint64).Add", Method, 19}, + {"(*Uint64).And", Method, 23}, {"(*Uint64).CompareAndSwap", Method, 19}, {"(*Uint64).Load", Method, 19}, + {"(*Uint64).Or", Method, 23}, {"(*Uint64).Store", Method, 19}, {"(*Uint64).Swap", Method, 19}, {"(*Uintptr).Add", Method, 19}, + {"(*Uintptr).And", Method, 23}, {"(*Uintptr).CompareAndSwap", Method, 19}, {"(*Uintptr).Load", Method, 19}, + {"(*Uintptr).Or", Method, 23}, {"(*Uintptr).Store", Method, 19}, {"(*Uintptr).Swap", Method, 19}, {"(*Value).CompareAndSwap", Method, 17}, @@ -10023,6 +10117,11 @@ var PackageSymbols = map[string][]Symbol{ {"AddUint32", Func, 0}, {"AddUint64", Func, 0}, {"AddUintptr", Func, 0}, + {"AndInt32", Func, 23}, + {"AndInt64", Func, 23}, + {"AndUint32", Func, 23}, + {"AndUint64", Func, 23}, + {"AndUintptr", Func, 23}, {"Bool", Type, 19}, {"CompareAndSwapInt32", Func, 0}, {"CompareAndSwapInt64", Func, 0}, @@ -10038,6 +10137,11 @@ var PackageSymbols = map[string][]Symbol{ {"LoadUint32", Func, 0}, {"LoadUint64", Func, 0}, {"LoadUintptr", Func, 0}, + {"OrInt32", Func, 23}, + {"OrInt64", Func, 23}, + {"OrUint32", Func, 23}, + {"OrUint64", Func, 23}, + {"OrUintptr", Func, 23}, {"Pointer", Type, 19}, {"StoreInt32", Func, 0}, {"StoreInt64", Func, 0}, @@ -16200,6 +16304,7 @@ var PackageSymbols = map[string][]Symbol{ {"WSAEACCES", Const, 2}, {"WSAECONNABORTED", Const, 9}, {"WSAECONNRESET", Const, 3}, + {"WSAENOPROTOOPT", Const, 23}, {"WSAEnumProtocols", Func, 2}, {"WSAID_CONNECTEX", Var, 1}, {"WSAIoctl", Func, 0}, @@ -17284,6 +17389,7 @@ var PackageSymbols = map[string][]Symbol{ {"Encode", Func, 0}, {"EncodeRune", Func, 0}, {"IsSurrogate", Func, 0}, + {"RuneLen", Func, 23}, }, "unicode/utf8": { {"AppendRune", Func, 18}, @@ -17306,6 +17412,11 @@ var PackageSymbols = map[string][]Symbol{ {"ValidRune", Func, 1}, {"ValidString", Func, 0}, }, + "unique": { + {"(Handle).Value", Method, 23}, + {"Handle", Type, 23}, + {"Make", Func, 23}, + }, "unsafe": { {"Add", Func, 0}, {"Alignof", Func, 0}, diff --git a/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go b/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go deleted file mode 100644 index ff9437a36c..0000000000 --- a/vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// package tokeninternal provides access to some internal features of the token -// package. -package tokeninternal - -import ( - "fmt" - "go/token" - "sort" - "sync" - "unsafe" -) - -// GetLines returns the table of line-start offsets from a token.File. -func GetLines(file *token.File) []int { - // token.File has a Lines method on Go 1.21 and later. - if file, ok := (interface{})(file).(interface{ Lines() []int }); ok { - return file.Lines() - } - - // This declaration must match that of token.File. - // This creates a risk of dependency skew. - // For now we check that the size of the two - // declarations is the same, on the (fragile) assumption - // that future changes would add fields. - type tokenFile119 struct { - _ string - _ int - _ int - mu sync.Mutex // we're not complete monsters - lines []int - _ []struct{} - } - - if unsafe.Sizeof(*file) != unsafe.Sizeof(tokenFile119{}) { - panic("unexpected token.File size") - } - var ptr *tokenFile119 - type uP = unsafe.Pointer - *(*uP)(uP(&ptr)) = uP(file) - ptr.mu.Lock() - defer ptr.mu.Unlock() - return ptr.lines -} - -// AddExistingFiles adds the specified files to the FileSet if they -// are not already present. It panics if any pair of files in the -// resulting FileSet would overlap. -func AddExistingFiles(fset *token.FileSet, files []*token.File) { - // Punch through the FileSet encapsulation. - type tokenFileSet struct { - // This type remained essentially consistent from go1.16 to go1.21. - mutex sync.RWMutex - base int - files []*token.File - _ *token.File // changed to atomic.Pointer[token.File] in go1.19 - } - - // If the size of token.FileSet changes, this will fail to compile. - const delta = int64(unsafe.Sizeof(tokenFileSet{})) - int64(unsafe.Sizeof(token.FileSet{})) - var _ [-delta * delta]int - - type uP = unsafe.Pointer - var ptr *tokenFileSet - *(*uP)(uP(&ptr)) = uP(fset) - ptr.mutex.Lock() - defer ptr.mutex.Unlock() - - // Merge and sort. - newFiles := append(ptr.files, files...) - sort.Slice(newFiles, func(i, j int) bool { - return newFiles[i].Base() < newFiles[j].Base() - }) - - // Reject overlapping files. - // Discard adjacent identical files. - out := newFiles[:0] - for i, file := range newFiles { - if i > 0 { - prev := newFiles[i-1] - if file == prev { - continue - } - if prev.Base()+prev.Size()+1 > file.Base() { - panic(fmt.Sprintf("file %s (%d-%d) overlaps with file %s (%d-%d)", - prev.Name(), prev.Base(), prev.Base()+prev.Size(), - file.Name(), file.Base(), file.Base()+file.Size())) - } - } - out = append(out, file) - } - newFiles = out - - ptr.files = newFiles - - // Advance FileSet.Base(). - if len(newFiles) > 0 { - last := newFiles[len(newFiles)-1] - newBase := last.Base() + last.Size() + 1 - if ptr.base < newBase { - ptr.base = newBase - } - } -} - -// FileSetFor returns a new FileSet containing a sequence of new Files with -// the same base, size, and line as the input files, for use in APIs that -// require a FileSet. -// -// Precondition: the input files must be non-overlapping, and sorted in order -// of their Base. -func FileSetFor(files ...*token.File) *token.FileSet { - fset := token.NewFileSet() - for _, f := range files { - f2 := fset.AddFile(f.Name(), f.Base(), f.Size()) - lines := GetLines(f) - f2.SetLines(lines) - } - return fset -} - -// CloneFileSet creates a new FileSet holding all files in fset. It does not -// create copies of the token.Files in fset: they are added to the resulting -// FileSet unmodified. -func CloneFileSet(fset *token.FileSet) *token.FileSet { - var files []*token.File - fset.Iterate(func(f *token.File) bool { - files = append(files, f) - return true - }) - newFileSet := token.NewFileSet() - AddExistingFiles(newFileSet, files) - return newFileSet -} diff --git a/vendor/golang.org/x/tools/internal/typeparams/common.go b/vendor/golang.org/x/tools/internal/typeparams/common.go new file mode 100644 index 0000000000..0b84acc5c7 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typeparams/common.go @@ -0,0 +1,140 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package typeparams contains common utilities for writing tools that +// interact with generic Go code, as introduced with Go 1.18. It +// supplements the standard library APIs. Notably, the StructuralTerms +// API computes a minimal representation of the structural +// restrictions on a type parameter. +// +// An external version of these APIs is available in the +// golang.org/x/exp/typeparams module. +package typeparams + +import ( + "go/ast" + "go/token" + "go/types" +) + +// UnpackIndexExpr extracts data from AST nodes that represent index +// expressions. +// +// For an ast.IndexExpr, the resulting indices slice will contain exactly one +// index expression. For an ast.IndexListExpr (go1.18+), it may have a variable +// number of index expressions. +// +// For nodes that don't represent index expressions, the first return value of +// UnpackIndexExpr will be nil. +func UnpackIndexExpr(n ast.Node) (x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) { + switch e := n.(type) { + case *ast.IndexExpr: + return e.X, e.Lbrack, []ast.Expr{e.Index}, e.Rbrack + case *ast.IndexListExpr: + return e.X, e.Lbrack, e.Indices, e.Rbrack + } + return nil, token.NoPos, nil, token.NoPos +} + +// PackIndexExpr returns an *ast.IndexExpr or *ast.IndexListExpr, depending on +// the cardinality of indices. Calling PackIndexExpr with len(indices) == 0 +// will panic. +func PackIndexExpr(x ast.Expr, lbrack token.Pos, indices []ast.Expr, rbrack token.Pos) ast.Expr { + switch len(indices) { + case 0: + panic("empty indices") + case 1: + return &ast.IndexExpr{ + X: x, + Lbrack: lbrack, + Index: indices[0], + Rbrack: rbrack, + } + default: + return &ast.IndexListExpr{ + X: x, + Lbrack: lbrack, + Indices: indices, + Rbrack: rbrack, + } + } +} + +// IsTypeParam reports whether t is a type parameter (or an alias of one). +func IsTypeParam(t types.Type) bool { + _, ok := types.Unalias(t).(*types.TypeParam) + return ok +} + +// GenericAssignableTo is a generalization of types.AssignableTo that +// implements the following rule for uninstantiated generic types: +// +// If V and T are generic named types, then V is considered assignable to T if, +// for every possible instantiation of V[A_1, ..., A_N], the instantiation +// T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N]. +// +// If T has structural constraints, they must be satisfied by V. +// +// For example, consider the following type declarations: +// +// type Interface[T any] interface { +// Accept(T) +// } +// +// type Container[T any] struct { +// Element T +// } +// +// func (c Container[T]) Accept(t T) { c.Element = t } +// +// In this case, GenericAssignableTo reports that instantiations of Container +// are assignable to the corresponding instantiation of Interface. +func GenericAssignableTo(ctxt *types.Context, V, T types.Type) bool { + V = types.Unalias(V) + T = types.Unalias(T) + + // If V and T are not both named, or do not have matching non-empty type + // parameter lists, fall back on types.AssignableTo. + + VN, Vnamed := V.(*types.Named) + TN, Tnamed := T.(*types.Named) + if !Vnamed || !Tnamed { + return types.AssignableTo(V, T) + } + + vtparams := VN.TypeParams() + ttparams := TN.TypeParams() + if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || VN.TypeArgs().Len() != 0 || TN.TypeArgs().Len() != 0 { + return types.AssignableTo(V, T) + } + + // V and T have the same (non-zero) number of type params. Instantiate both + // with the type parameters of V. This must always succeed for V, and will + // succeed for T if and only if the type set of each type parameter of V is a + // subset of the type set of the corresponding type parameter of T, meaning + // that every instantiation of V corresponds to a valid instantiation of T. + + // Minor optimization: ensure we share a context across the two + // instantiations below. + if ctxt == nil { + ctxt = types.NewContext() + } + + var targs []types.Type + for i := 0; i < vtparams.Len(); i++ { + targs = append(targs, vtparams.At(i)) + } + + vinst, err := types.Instantiate(ctxt, V, targs, true) + if err != nil { + panic("type parameters should satisfy their own constraints") + } + + tinst, err := types.Instantiate(ctxt, T, targs, true) + if err != nil { + return false + } + + return types.AssignableTo(vinst, tinst) +} diff --git a/vendor/golang.org/x/tools/internal/typeparams/coretype.go b/vendor/golang.org/x/tools/internal/typeparams/coretype.go new file mode 100644 index 0000000000..6e83c6fb1a --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typeparams/coretype.go @@ -0,0 +1,150 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typeparams + +import ( + "fmt" + "go/types" +) + +// CoreType returns the core type of T or nil if T does not have a core type. +// +// See https://go.dev/ref/spec#Core_types for the definition of a core type. +func CoreType(T types.Type) types.Type { + U := T.Underlying() + if _, ok := U.(*types.Interface); !ok { + return U // for non-interface types, + } + + terms, err := NormalTerms(U) + if len(terms) == 0 || err != nil { + // len(terms) -> empty type set of interface. + // err != nil => U is invalid, exceeds complexity bounds, or has an empty type set. + return nil // no core type. + } + + U = terms[0].Type().Underlying() + var identical int // i in [0,identical) => Identical(U, terms[i].Type().Underlying()) + for identical = 1; identical < len(terms); identical++ { + if !types.Identical(U, terms[identical].Type().Underlying()) { + break + } + } + + if identical == len(terms) { + // https://go.dev/ref/spec#Core_types + // "There is a single type U which is the underlying type of all types in the type set of T" + return U + } + ch, ok := U.(*types.Chan) + if !ok { + return nil // no core type as identical < len(terms) and U is not a channel. + } + // https://go.dev/ref/spec#Core_types + // "the type chan E if T contains only bidirectional channels, or the type chan<- E or + // <-chan E depending on the direction of the directional channels present." + for chans := identical; chans < len(terms); chans++ { + curr, ok := terms[chans].Type().Underlying().(*types.Chan) + if !ok { + return nil + } + if !types.Identical(ch.Elem(), curr.Elem()) { + return nil // channel elements are not identical. + } + if ch.Dir() == types.SendRecv { + // ch is bidirectional. We can safely always use curr's direction. + ch = curr + } else if curr.Dir() != types.SendRecv && ch.Dir() != curr.Dir() { + // ch and curr are not bidirectional and not the same direction. + return nil + } + } + return ch +} + +// NormalTerms returns a slice of terms representing the normalized structural +// type restrictions of a type, if any. +// +// For all types other than *types.TypeParam, *types.Interface, and +// *types.Union, this is just a single term with Tilde() == false and +// Type() == typ. For *types.TypeParam, *types.Interface, and *types.Union, see +// below. +// +// Structural type restrictions of a type parameter are created via +// non-interface types embedded in its constraint interface (directly, or via a +// chain of interface embeddings). For example, in the declaration type +// T[P interface{~int; m()}] int the structural restriction of the type +// parameter P is ~int. +// +// With interface embedding and unions, the specification of structural type +// restrictions may be arbitrarily complex. For example, consider the +// following: +// +// type A interface{ ~string|~[]byte } +// +// type B interface{ int|string } +// +// type C interface { ~string|~int } +// +// type T[P interface{ A|B; C }] int +// +// In this example, the structural type restriction of P is ~string|int: A|B +// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int, +// which when intersected with C (~string|~int) yields ~string|int. +// +// NormalTerms computes these expansions and reductions, producing a +// "normalized" form of the embeddings. A structural restriction is normalized +// if it is a single union containing no interface terms, and is minimal in the +// sense that removing any term changes the set of types satisfying the +// constraint. It is left as a proof for the reader that, modulo sorting, there +// is exactly one such normalized form. +// +// Because the minimal representation always takes this form, NormalTerms +// returns a slice of tilde terms corresponding to the terms of the union in +// the normalized structural restriction. An error is returned if the type is +// invalid, exceeds complexity bounds, or has an empty type set. In the latter +// case, NormalTerms returns ErrEmptyTypeSet. +// +// NormalTerms makes no guarantees about the order of terms, except that it +// is deterministic. +func NormalTerms(typ types.Type) ([]*types.Term, error) { + switch typ := typ.Underlying().(type) { + case *types.TypeParam: + return StructuralTerms(typ) + case *types.Union: + return UnionTermSet(typ) + case *types.Interface: + return InterfaceTermSet(typ) + default: + return []*types.Term{types.NewTerm(false, typ)}, nil + } +} + +// Deref returns the type of the variable pointed to by t, +// if t's core type is a pointer; otherwise it returns t. +// +// Do not assume that Deref(T)==T implies T is not a pointer: +// consider "type T *T", for example. +// +// TODO(adonovan): ideally this would live in typesinternal, but that +// creates an import cycle. Move there when we melt this package down. +func Deref(t types.Type) types.Type { + if ptr, ok := CoreType(t).(*types.Pointer); ok { + return ptr.Elem() + } + return t +} + +// MustDeref returns the type of the variable pointed to by t. +// It panics if t's core type is not a pointer. +// +// TODO(adonovan): ideally this would live in typesinternal, but that +// creates an import cycle. Move there when we melt this package down. +func MustDeref(t types.Type) types.Type { + if ptr, ok := CoreType(t).(*types.Pointer); ok { + return ptr.Elem() + } + panic(fmt.Sprintf("%v is not a pointer", t)) +} diff --git a/vendor/golang.org/x/tools/internal/typeparams/free.go b/vendor/golang.org/x/tools/internal/typeparams/free.go new file mode 100644 index 0000000000..358108268b --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typeparams/free.go @@ -0,0 +1,118 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typeparams + +import ( + "go/types" +) + +// Free is a memoization of the set of free type parameters within a +// type. It makes a sequence of calls to [Free.Has] for overlapping +// types more efficient. The zero value is ready for use. +// +// NOTE: Adapted from go/types/infer.go. If it is later exported, factor. +type Free struct { + seen map[types.Type]bool +} + +// Has reports whether the specified type has a free type parameter. +func (w *Free) Has(typ types.Type) (res bool) { + // detect cycles + if x, ok := w.seen[typ]; ok { + return x + } + if w.seen == nil { + w.seen = make(map[types.Type]bool) + } + w.seen[typ] = false + defer func() { + w.seen[typ] = res + }() + + switch t := typ.(type) { + case nil, *types.Basic: // TODO(gri) should nil be handled here? + break + + case *types.Alias: + return w.Has(types.Unalias(t)) + + case *types.Array: + return w.Has(t.Elem()) + + case *types.Slice: + return w.Has(t.Elem()) + + case *types.Struct: + for i, n := 0, t.NumFields(); i < n; i++ { + if w.Has(t.Field(i).Type()) { + return true + } + } + + case *types.Pointer: + return w.Has(t.Elem()) + + case *types.Tuple: + n := t.Len() + for i := 0; i < n; i++ { + if w.Has(t.At(i).Type()) { + return true + } + } + + case *types.Signature: + // t.tparams may not be nil if we are looking at a signature + // of a generic function type (or an interface method) that is + // part of the type we're testing. We don't care about these type + // parameters. + // Similarly, the receiver of a method may declare (rather than + // use) type parameters, we don't care about those either. + // Thus, we only need to look at the input and result parameters. + return w.Has(t.Params()) || w.Has(t.Results()) + + case *types.Interface: + for i, n := 0, t.NumMethods(); i < n; i++ { + if w.Has(t.Method(i).Type()) { + return true + } + } + terms, err := InterfaceTermSet(t) + if err != nil { + return false // ill typed + } + for _, term := range terms { + if w.Has(term.Type()) { + return true + } + } + + case *types.Map: + return w.Has(t.Key()) || w.Has(t.Elem()) + + case *types.Chan: + return w.Has(t.Elem()) + + case *types.Named: + args := t.TypeArgs() + // TODO(taking): this does not match go/types/infer.go. Check with rfindley. + if params := t.TypeParams(); params.Len() > args.Len() { + return true + } + for i, n := 0, args.Len(); i < n; i++ { + if w.Has(args.At(i)) { + return true + } + } + return w.Has(t.Underlying()) // recurse for types local to parameterized functions + + case *types.TypeParam: + return true + + default: + panic(t) // unreachable + } + + return false +} diff --git a/vendor/golang.org/x/tools/internal/typeparams/normalize.go b/vendor/golang.org/x/tools/internal/typeparams/normalize.go new file mode 100644 index 0000000000..93c80fdc96 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typeparams/normalize.go @@ -0,0 +1,218 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typeparams + +import ( + "errors" + "fmt" + "go/types" + "os" + "strings" +) + +//go:generate go run copytermlist.go + +const debug = false + +var ErrEmptyTypeSet = errors.New("empty type set") + +// StructuralTerms returns a slice of terms representing the normalized +// structural type restrictions of a type parameter, if any. +// +// Structural type restrictions of a type parameter are created via +// non-interface types embedded in its constraint interface (directly, or via a +// chain of interface embeddings). For example, in the declaration +// +// type T[P interface{~int; m()}] int +// +// the structural restriction of the type parameter P is ~int. +// +// With interface embedding and unions, the specification of structural type +// restrictions may be arbitrarily complex. For example, consider the +// following: +// +// type A interface{ ~string|~[]byte } +// +// type B interface{ int|string } +// +// type C interface { ~string|~int } +// +// type T[P interface{ A|B; C }] int +// +// In this example, the structural type restriction of P is ~string|int: A|B +// expands to ~string|~[]byte|int|string, which reduces to ~string|~[]byte|int, +// which when intersected with C (~string|~int) yields ~string|int. +// +// StructuralTerms computes these expansions and reductions, producing a +// "normalized" form of the embeddings. A structural restriction is normalized +// if it is a single union containing no interface terms, and is minimal in the +// sense that removing any term changes the set of types satisfying the +// constraint. It is left as a proof for the reader that, modulo sorting, there +// is exactly one such normalized form. +// +// Because the minimal representation always takes this form, StructuralTerms +// returns a slice of tilde terms corresponding to the terms of the union in +// the normalized structural restriction. An error is returned if the +// constraint interface is invalid, exceeds complexity bounds, or has an empty +// type set. In the latter case, StructuralTerms returns ErrEmptyTypeSet. +// +// StructuralTerms makes no guarantees about the order of terms, except that it +// is deterministic. +func StructuralTerms(tparam *types.TypeParam) ([]*types.Term, error) { + constraint := tparam.Constraint() + if constraint == nil { + return nil, fmt.Errorf("%s has nil constraint", tparam) + } + iface, _ := constraint.Underlying().(*types.Interface) + if iface == nil { + return nil, fmt.Errorf("constraint is %T, not *types.Interface", constraint.Underlying()) + } + return InterfaceTermSet(iface) +} + +// InterfaceTermSet computes the normalized terms for a constraint interface, +// returning an error if the term set cannot be computed or is empty. In the +// latter case, the error will be ErrEmptyTypeSet. +// +// See the documentation of StructuralTerms for more information on +// normalization. +func InterfaceTermSet(iface *types.Interface) ([]*types.Term, error) { + return computeTermSet(iface) +} + +// UnionTermSet computes the normalized terms for a union, returning an error +// if the term set cannot be computed or is empty. In the latter case, the +// error will be ErrEmptyTypeSet. +// +// See the documentation of StructuralTerms for more information on +// normalization. +func UnionTermSet(union *types.Union) ([]*types.Term, error) { + return computeTermSet(union) +} + +func computeTermSet(typ types.Type) ([]*types.Term, error) { + tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0) + if err != nil { + return nil, err + } + if tset.terms.isEmpty() { + return nil, ErrEmptyTypeSet + } + if tset.terms.isAll() { + return nil, nil + } + var terms []*types.Term + for _, term := range tset.terms { + terms = append(terms, types.NewTerm(term.tilde, term.typ)) + } + return terms, nil +} + +// A termSet holds the normalized set of terms for a given type. +// +// The name termSet is intentionally distinct from 'type set': a type set is +// all types that implement a type (and includes method restrictions), whereas +// a term set just represents the structural restrictions on a type. +type termSet struct { + complete bool + terms termlist +} + +func indentf(depth int, format string, args ...interface{}) { + fmt.Fprintf(os.Stderr, strings.Repeat(".", depth)+format+"\n", args...) +} + +func computeTermSetInternal(t types.Type, seen map[types.Type]*termSet, depth int) (res *termSet, err error) { + if t == nil { + panic("nil type") + } + + if debug { + indentf(depth, "%s", t.String()) + defer func() { + if err != nil { + indentf(depth, "=> %s", err) + } else { + indentf(depth, "=> %s", res.terms.String()) + } + }() + } + + const maxTermCount = 100 + if tset, ok := seen[t]; ok { + if !tset.complete { + return nil, fmt.Errorf("cycle detected in the declaration of %s", t) + } + return tset, nil + } + + // Mark the current type as seen to avoid infinite recursion. + tset := new(termSet) + defer func() { + tset.complete = true + }() + seen[t] = tset + + switch u := t.Underlying().(type) { + case *types.Interface: + // The term set of an interface is the intersection of the term sets of its + // embedded types. + tset.terms = allTermlist + for i := 0; i < u.NumEmbeddeds(); i++ { + embedded := u.EmbeddedType(i) + if _, ok := embedded.Underlying().(*types.TypeParam); ok { + return nil, fmt.Errorf("invalid embedded type %T", embedded) + } + tset2, err := computeTermSetInternal(embedded, seen, depth+1) + if err != nil { + return nil, err + } + tset.terms = tset.terms.intersect(tset2.terms) + } + case *types.Union: + // The term set of a union is the union of term sets of its terms. + tset.terms = nil + for i := 0; i < u.Len(); i++ { + t := u.Term(i) + var terms termlist + switch t.Type().Underlying().(type) { + case *types.Interface: + tset2, err := computeTermSetInternal(t.Type(), seen, depth+1) + if err != nil { + return nil, err + } + terms = tset2.terms + case *types.TypeParam, *types.Union: + // A stand-alone type parameter or union is not permitted as union + // term. + return nil, fmt.Errorf("invalid union term %T", t) + default: + if t.Type() == types.Typ[types.Invalid] { + continue + } + terms = termlist{{t.Tilde(), t.Type()}} + } + tset.terms = tset.terms.union(terms) + if len(tset.terms) > maxTermCount { + return nil, fmt.Errorf("exceeded max term count %d", maxTermCount) + } + } + case *types.TypeParam: + panic("unreachable") + default: + // For all other types, the term set is just a single non-tilde term + // holding the type itself. + if u != types.Typ[types.Invalid] { + tset.terms = termlist{{false, t}} + } + } + return tset, nil +} + +// under is a facade for the go/types internal function of the same name. It is +// used by typeterm.go. +func under(t types.Type) types.Type { + return t.Underlying() +} diff --git a/vendor/golang.org/x/tools/internal/typeparams/termlist.go b/vendor/golang.org/x/tools/internal/typeparams/termlist.go new file mode 100644 index 0000000000..cbd12f8013 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typeparams/termlist.go @@ -0,0 +1,163 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by copytermlist.go DO NOT EDIT. + +package typeparams + +import ( + "bytes" + "go/types" +) + +// A termlist represents the type set represented by the union +// t1 ∪ y2 ∪ ... tn of the type sets of the terms t1 to tn. +// A termlist is in normal form if all terms are disjoint. +// termlist operations don't require the operands to be in +// normal form. +type termlist []*term + +// allTermlist represents the set of all types. +// It is in normal form. +var allTermlist = termlist{new(term)} + +// String prints the termlist exactly (without normalization). +func (xl termlist) String() string { + if len(xl) == 0 { + return "∅" + } + var buf bytes.Buffer + for i, x := range xl { + if i > 0 { + buf.WriteString(" | ") + } + buf.WriteString(x.String()) + } + return buf.String() +} + +// isEmpty reports whether the termlist xl represents the empty set of types. +func (xl termlist) isEmpty() bool { + // If there's a non-nil term, the entire list is not empty. + // If the termlist is in normal form, this requires at most + // one iteration. + for _, x := range xl { + if x != nil { + return false + } + } + return true +} + +// isAll reports whether the termlist xl represents the set of all types. +func (xl termlist) isAll() bool { + // If there's a 𝓤 term, the entire list is 𝓤. + // If the termlist is in normal form, this requires at most + // one iteration. + for _, x := range xl { + if x != nil && x.typ == nil { + return true + } + } + return false +} + +// norm returns the normal form of xl. +func (xl termlist) norm() termlist { + // Quadratic algorithm, but good enough for now. + // TODO(gri) fix asymptotic performance + used := make([]bool, len(xl)) + var rl termlist + for i, xi := range xl { + if xi == nil || used[i] { + continue + } + for j := i + 1; j < len(xl); j++ { + xj := xl[j] + if xj == nil || used[j] { + continue + } + if u1, u2 := xi.union(xj); u2 == nil { + // If we encounter a 𝓤 term, the entire list is 𝓤. + // Exit early. + // (Note that this is not just an optimization; + // if we continue, we may end up with a 𝓤 term + // and other terms and the result would not be + // in normal form.) + if u1.typ == nil { + return allTermlist + } + xi = u1 + used[j] = true // xj is now unioned into xi - ignore it in future iterations + } + } + rl = append(rl, xi) + } + return rl +} + +// union returns the union xl ∪ yl. +func (xl termlist) union(yl termlist) termlist { + return append(xl, yl...).norm() +} + +// intersect returns the intersection xl ∩ yl. +func (xl termlist) intersect(yl termlist) termlist { + if xl.isEmpty() || yl.isEmpty() { + return nil + } + + // Quadratic algorithm, but good enough for now. + // TODO(gri) fix asymptotic performance + var rl termlist + for _, x := range xl { + for _, y := range yl { + if r := x.intersect(y); r != nil { + rl = append(rl, r) + } + } + } + return rl.norm() +} + +// equal reports whether xl and yl represent the same type set. +func (xl termlist) equal(yl termlist) bool { + // TODO(gri) this should be more efficient + return xl.subsetOf(yl) && yl.subsetOf(xl) +} + +// includes reports whether t ∈ xl. +func (xl termlist) includes(t types.Type) bool { + for _, x := range xl { + if x.includes(t) { + return true + } + } + return false +} + +// supersetOf reports whether y ⊆ xl. +func (xl termlist) supersetOf(y *term) bool { + for _, x := range xl { + if y.subsetOf(x) { + return true + } + } + return false +} + +// subsetOf reports whether xl ⊆ yl. +func (xl termlist) subsetOf(yl termlist) bool { + if yl.isEmpty() { + return xl.isEmpty() + } + + // each term x of xl must be a subset of yl + for _, x := range xl { + if !yl.supersetOf(x) { + return false // x is not a subset yl + } + } + return true +} diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go b/vendor/golang.org/x/tools/internal/typeparams/typeterm.go new file mode 100644 index 0000000000..7350bb702a --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typeparams/typeterm.go @@ -0,0 +1,169 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by copytermlist.go DO NOT EDIT. + +package typeparams + +import "go/types" + +// A term describes elementary type sets: +// +// ∅: (*term)(nil) == ∅ // set of no types (empty set) +// 𝓤: &term{} == 𝓤 // set of all types (𝓤niverse) +// T: &term{false, T} == {T} // set of type T +// ~t: &term{true, t} == {t' | under(t') == t} // set of types with underlying type t +type term struct { + tilde bool // valid if typ != nil + typ types.Type +} + +func (x *term) String() string { + switch { + case x == nil: + return "∅" + case x.typ == nil: + return "𝓤" + case x.tilde: + return "~" + x.typ.String() + default: + return x.typ.String() + } +} + +// equal reports whether x and y represent the same type set. +func (x *term) equal(y *term) bool { + // easy cases + switch { + case x == nil || y == nil: + return x == y + case x.typ == nil || y.typ == nil: + return x.typ == y.typ + } + // ∅ ⊂ x, y ⊂ 𝓤 + + return x.tilde == y.tilde && types.Identical(x.typ, y.typ) +} + +// union returns the union x ∪ y: zero, one, or two non-nil terms. +func (x *term) union(y *term) (_, _ *term) { + // easy cases + switch { + case x == nil && y == nil: + return nil, nil // ∅ ∪ ∅ == ∅ + case x == nil: + return y, nil // ∅ ∪ y == y + case y == nil: + return x, nil // x ∪ ∅ == x + case x.typ == nil: + return x, nil // 𝓤 ∪ y == 𝓤 + case y.typ == nil: + return y, nil // x ∪ 𝓤 == 𝓤 + } + // ∅ ⊂ x, y ⊂ 𝓤 + + if x.disjoint(y) { + return x, y // x ∪ y == (x, y) if x ∩ y == ∅ + } + // x.typ == y.typ + + // ~t ∪ ~t == ~t + // ~t ∪ T == ~t + // T ∪ ~t == ~t + // T ∪ T == T + if x.tilde || !y.tilde { + return x, nil + } + return y, nil +} + +// intersect returns the intersection x ∩ y. +func (x *term) intersect(y *term) *term { + // easy cases + switch { + case x == nil || y == nil: + return nil // ∅ ∩ y == ∅ and ∩ ∅ == ∅ + case x.typ == nil: + return y // 𝓤 ∩ y == y + case y.typ == nil: + return x // x ∩ 𝓤 == x + } + // ∅ ⊂ x, y ⊂ 𝓤 + + if x.disjoint(y) { + return nil // x ∩ y == ∅ if x ∩ y == ∅ + } + // x.typ == y.typ + + // ~t ∩ ~t == ~t + // ~t ∩ T == T + // T ∩ ~t == T + // T ∩ T == T + if !x.tilde || y.tilde { + return x + } + return y +} + +// includes reports whether t ∈ x. +func (x *term) includes(t types.Type) bool { + // easy cases + switch { + case x == nil: + return false // t ∈ ∅ == false + case x.typ == nil: + return true // t ∈ 𝓤 == true + } + // ∅ ⊂ x ⊂ 𝓤 + + u := t + if x.tilde { + u = under(u) + } + return types.Identical(x.typ, u) +} + +// subsetOf reports whether x ⊆ y. +func (x *term) subsetOf(y *term) bool { + // easy cases + switch { + case x == nil: + return true // ∅ ⊆ y == true + case y == nil: + return false // x ⊆ ∅ == false since x != ∅ + case y.typ == nil: + return true // x ⊆ 𝓤 == true + case x.typ == nil: + return false // 𝓤 ⊆ y == false since y != 𝓤 + } + // ∅ ⊂ x, y ⊂ 𝓤 + + if x.disjoint(y) { + return false // x ⊆ y == false if x ∩ y == ∅ + } + // x.typ == y.typ + + // ~t ⊆ ~t == true + // ~t ⊆ T == false + // T ⊆ ~t == true + // T ⊆ T == true + return !x.tilde || y.tilde +} + +// disjoint reports whether x ∩ y == ∅. +// x.typ and y.typ must not be nil. +func (x *term) disjoint(y *term) bool { + if debug && (x.typ == nil || y.typ == nil) { + panic("invalid argument(s)") + } + ux := x.typ + if y.tilde { + ux = under(ux) + } + uy := y.typ + if x.tilde { + uy = under(uy) + } + return !types.Identical(ux, uy) +} diff --git a/vendor/golang.org/x/tools/internal/typesinternal/element.go b/vendor/golang.org/x/tools/internal/typesinternal/element.go new file mode 100644 index 0000000000..4957f02164 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/typesinternal/element.go @@ -0,0 +1,133 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package typesinternal + +import ( + "fmt" + "go/types" + + "golang.org/x/tools/go/types/typeutil" +) + +// ForEachElement calls f for type T and each type reachable from its +// type through reflection. It does this by recursively stripping off +// type constructors; in addition, for each named type N, the type *N +// is added to the result as it may have additional methods. +// +// The caller must provide an initially empty set used to de-duplicate +// identical types, potentially across multiple calls to ForEachElement. +// (Its final value holds all the elements seen, matching the arguments +// passed to f.) +// +// TODO(adonovan): share/harmonize with go/callgraph/rta. +func ForEachElement(rtypes *typeutil.Map, msets *typeutil.MethodSetCache, T types.Type, f func(types.Type)) { + var visit func(T types.Type, skip bool) + visit = func(T types.Type, skip bool) { + if !skip { + if seen, _ := rtypes.Set(T, true).(bool); seen { + return // de-dup + } + + f(T) // notify caller of new element type + } + + // Recursion over signatures of each method. + tmset := msets.MethodSet(T) + for i := 0; i < tmset.Len(); i++ { + sig := tmset.At(i).Type().(*types.Signature) + // It is tempting to call visit(sig, false) + // but, as noted in golang.org/cl/65450043, + // the Signature.Recv field is ignored by + // types.Identical and typeutil.Map, which + // is confusing at best. + // + // More importantly, the true signature rtype + // reachable from a method using reflection + // has no receiver but an extra ordinary parameter. + // For the Read method of io.Reader we want: + // func(Reader, []byte) (int, error) + // but here sig is: + // func([]byte) (int, error) + // with .Recv = Reader (though it is hard to + // notice because it doesn't affect Signature.String + // or types.Identical). + // + // TODO(adonovan): construct and visit the correct + // non-method signature with an extra parameter + // (though since unnamed func types have no methods + // there is essentially no actual demand for this). + // + // TODO(adonovan): document whether or not it is + // safe to skip non-exported methods (as RTA does). + visit(sig.Params(), true) // skip the Tuple + visit(sig.Results(), true) // skip the Tuple + } + + switch T := T.(type) { + case *types.Alias: + visit(types.Unalias(T), skip) // emulates the pre-Alias behavior + + case *types.Basic: + // nop + + case *types.Interface: + // nop---handled by recursion over method set. + + case *types.Pointer: + visit(T.Elem(), false) + + case *types.Slice: + visit(T.Elem(), false) + + case *types.Chan: + visit(T.Elem(), false) + + case *types.Map: + visit(T.Key(), false) + visit(T.Elem(), false) + + case *types.Signature: + if T.Recv() != nil { + panic(fmt.Sprintf("Signature %s has Recv %s", T, T.Recv())) + } + visit(T.Params(), true) // skip the Tuple + visit(T.Results(), true) // skip the Tuple + + case *types.Named: + // A pointer-to-named type can be derived from a named + // type via reflection. It may have methods too. + visit(types.NewPointer(T), false) + + // Consider 'type T struct{S}' where S has methods. + // Reflection provides no way to get from T to struct{S}, + // only to S, so the method set of struct{S} is unwanted, + // so set 'skip' flag during recursion. + visit(T.Underlying(), true) // skip the unnamed type + + case *types.Array: + visit(T.Elem(), false) + + case *types.Struct: + for i, n := 0, T.NumFields(); i < n; i++ { + // TODO(adonovan): document whether or not + // it is safe to skip non-exported fields. + visit(T.Field(i).Type(), false) + } + + case *types.Tuple: + for i, n := 0, T.Len(); i < n; i++ { + visit(T.At(i).Type(), false) + } + + case *types.TypeParam, *types.Union: + // forEachReachable must not be called on parameterized types. + panic(T) + + default: + panic(T) + } + } + visit(T, false) +} diff --git a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go index 834e05381c..131caab284 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go @@ -838,7 +838,7 @@ const ( // InvalidCap occurs when an argument to the cap built-in function is not of // supported type. // - // See https://golang.org/ref/spec#Lengthand_capacity for information on + // See https://golang.org/ref/spec#Length_and_capacity for information on // which underlying types are supported as arguments to cap and len. // // Example: @@ -859,7 +859,7 @@ const ( // InvalidCopy occurs when the arguments are not of slice type or do not // have compatible type. // - // See https://golang.org/ref/spec#Appendingand_copying_slices for more + // See https://golang.org/ref/spec#Appending_and_copying_slices for more // information on the type requirements for the copy built-in. // // Example: @@ -897,7 +897,7 @@ const ( // InvalidLen occurs when an argument to the len built-in function is not of // supported type. // - // See https://golang.org/ref/spec#Lengthand_capacity for information on + // See https://golang.org/ref/spec#Length_and_capacity for information on // which underlying types are supported as arguments to cap and len. // // Example: @@ -914,7 +914,7 @@ const ( // InvalidMake occurs when make is called with an unsupported type argument. // - // See https://golang.org/ref/spec#Makingslices_maps_and_channels for + // See https://golang.org/ref/spec#Making_slices_maps_and_channels for // information on the types that may be created using make. // // Example: diff --git a/vendor/golang.org/x/tools/internal/typesinternal/recv.go b/vendor/golang.org/x/tools/internal/typesinternal/recv.go index fea7c8b75e..ba6f4f4ebd 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/recv.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/recv.go @@ -6,8 +6,6 @@ package typesinternal import ( "go/types" - - "golang.org/x/tools/internal/aliases" ) // ReceiverNamed returns the named type (if any) associated with the @@ -15,11 +13,11 @@ import ( // It also reports whether a Pointer was present. func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) { t := recv.Type() - if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok { + if ptr, ok := types.Unalias(t).(*types.Pointer); ok { isPtr = true t = ptr.Elem() } - named, _ = aliases.Unalias(t).(*types.Named) + named, _ = types.Unalias(t).(*types.Named) return } @@ -36,7 +34,7 @@ func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) { // indirection from the type, regardless of named types (analogous to // a LOAD instruction). func Unpointer(t types.Type) types.Type { - if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok { + if ptr, ok := types.Unalias(t).(*types.Pointer); ok { return ptr.Elem() } return t diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go index 7c77c2fbc0..8392328612 100644 --- a/vendor/golang.org/x/tools/internal/typesinternal/types.go +++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go @@ -48,3 +48,18 @@ func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos, } return ErrorCode(data[0]), token.Pos(data[1]), token.Pos(data[2]), true } + +// NameRelativeTo returns a types.Qualifier that qualifies members of +// all packages other than pkg, using only the package name. +// (By contrast, [types.RelativeTo] uses the complete package path, +// which is often excessive.) +// +// If pkg is nil, it is equivalent to [*types.Package.Name]. +func NameRelativeTo(pkg *types.Package) types.Qualifier { + return func(other *types.Package) string { + if pkg != nil && pkg == other { + return "" // same package; unqualified + } + return other.Name() + } +} diff --git a/vendor/golang.org/x/tools/internal/versions/constraint.go b/vendor/golang.org/x/tools/internal/versions/constraint.go new file mode 100644 index 0000000000..179063d484 --- /dev/null +++ b/vendor/golang.org/x/tools/internal/versions/constraint.go @@ -0,0 +1,13 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package versions + +import "go/build/constraint" + +// ConstraintGoVersion is constraint.GoVersion (if built with go1.21+). +// Otherwise nil. +// +// Deprecate once x/tools is after go1.21. +var ConstraintGoVersion func(x constraint.Expr) string diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go b/vendor/golang.org/x/tools/internal/versions/constraint_go121.go similarity index 75% rename from vendor/golang.org/x/tools/internal/versions/toolchain_go121.go rename to vendor/golang.org/x/tools/internal/versions/constraint_go121.go index b7ef216dfe..38011407d5 100644 --- a/vendor/golang.org/x/tools/internal/versions/toolchain_go121.go +++ b/vendor/golang.org/x/tools/internal/versions/constraint_go121.go @@ -7,8 +7,8 @@ package versions +import "go/build/constraint" + func init() { - if Compare(toolchain, Go1_21) < 0 { - toolchain = Go1_21 - } + ConstraintGoVersion = constraint.GoVersion } diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain.go b/vendor/golang.org/x/tools/internal/versions/toolchain.go deleted file mode 100644 index 377bf7a53b..0000000000 --- a/vendor/golang.org/x/tools/internal/versions/toolchain.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package versions - -// toolchain is maximum version (<1.22) that the go toolchain used -// to build the current tool is known to support. -// -// When a tool is built with >=1.22, the value of toolchain is unused. -// -// x/tools does not support building with go <1.18. So we take this -// as the minimum possible maximum. -var toolchain string = Go1_18 diff --git a/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go b/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go deleted file mode 100644 index f65beed9d8..0000000000 --- a/vendor/golang.org/x/tools/internal/versions/toolchain_go119.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.19 -// +build go1.19 - -package versions - -func init() { - if Compare(toolchain, Go1_19) < 0 { - toolchain = Go1_19 - } -} diff --git a/vendor/golang.org/x/tools/internal/versions/types.go b/vendor/golang.org/x/tools/internal/versions/types.go index 562eef21fa..f0bb0d15f0 100644 --- a/vendor/golang.org/x/tools/internal/versions/types.go +++ b/vendor/golang.org/x/tools/internal/versions/types.go @@ -5,15 +5,34 @@ package versions import ( + "go/ast" "go/types" ) -// GoVersion returns the Go version of the type package. -// It returns zero if no version can be determined. -func GoVersion(pkg *types.Package) string { - // TODO(taking): x/tools can call GoVersion() [from 1.21] after 1.25. - if pkg, ok := any(pkg).(interface{ GoVersion() string }); ok { - return pkg.GoVersion() +// FileVersion returns a file's Go version. +// The reported version is an unknown Future version if a +// version cannot be determined. +func FileVersion(info *types.Info, file *ast.File) string { + // In tools built with Go >= 1.22, the Go version of a file + // follow a cascades of sources: + // 1) types.Info.FileVersion, which follows the cascade: + // 1.a) file version (ast.File.GoVersion), + // 1.b) the package version (types.Config.GoVersion), or + // 2) is some unknown Future version. + // + // File versions require a valid package version to be provided to types + // in Config.GoVersion. Config.GoVersion is either from the package's module + // or the toolchain (go run). This value should be provided by go/packages + // or unitchecker.Config.GoVersion. + if v := info.FileVersions[file]; IsValid(v) { + return v } - return "" + // Note: we could instead return runtime.Version() [if valid]. + // This would act as a max version on what a tool can support. + return Future +} + +// InitFileVersions initializes info to record Go versions for Go files. +func InitFileVersions(info *types.Info) { + info.FileVersions = make(map[*ast.File]string) } diff --git a/vendor/golang.org/x/tools/internal/versions/types_go121.go b/vendor/golang.org/x/tools/internal/versions/types_go121.go deleted file mode 100644 index b4345d3349..0000000000 --- a/vendor/golang.org/x/tools/internal/versions/types_go121.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.22 -// +build !go1.22 - -package versions - -import ( - "go/ast" - "go/types" -) - -// FileVersion returns a language version (<=1.21) derived from runtime.Version() -// or an unknown future version. -func FileVersion(info *types.Info, file *ast.File) string { - // In x/tools built with Go <= 1.21, we do not have Info.FileVersions - // available. We use a go version derived from the toolchain used to - // compile the tool by default. - // This will be <= go1.21. We take this as the maximum version that - // this tool can support. - // - // There are no features currently in x/tools that need to tell fine grained - // differences for versions <1.22. - return toolchain -} - -// InitFileVersions is a noop when compiled with this Go version. -func InitFileVersions(*types.Info) {} diff --git a/vendor/golang.org/x/tools/internal/versions/types_go122.go b/vendor/golang.org/x/tools/internal/versions/types_go122.go deleted file mode 100644 index e8180632a5..0000000000 --- a/vendor/golang.org/x/tools/internal/versions/types_go122.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2023 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.22 -// +build go1.22 - -package versions - -import ( - "go/ast" - "go/types" -) - -// FileVersions returns a file's Go version. -// The reported version is an unknown Future version if a -// version cannot be determined. -func FileVersion(info *types.Info, file *ast.File) string { - // In tools built with Go >= 1.22, the Go version of a file - // follow a cascades of sources: - // 1) types.Info.FileVersion, which follows the cascade: - // 1.a) file version (ast.File.GoVersion), - // 1.b) the package version (types.Config.GoVersion), or - // 2) is some unknown Future version. - // - // File versions require a valid package version to be provided to types - // in Config.GoVersion. Config.GoVersion is either from the package's module - // or the toolchain (go run). This value should be provided by go/packages - // or unitchecker.Config.GoVersion. - if v := info.FileVersions[file]; IsValid(v) { - return v - } - // Note: we could instead return runtime.Version() [if valid]. - // This would act as a max version on what a tool can support. - return Future -} - -// InitFileVersions initializes info to record Go versions for Go files. -func InitFileVersions(info *types.Info) { - info.FileVersions = make(map[*ast.File]string) -} diff --git a/vendor/google.golang.org/protobuf/internal/descopts/options.go b/vendor/google.golang.org/protobuf/internal/descopts/options.go index 8401be8c84..024ffebd3d 100644 --- a/vendor/google.golang.org/protobuf/internal/descopts/options.go +++ b/vendor/google.golang.org/protobuf/internal/descopts/options.go @@ -9,7 +9,7 @@ // dependency on the descriptor proto package). package descopts -import pref "google.golang.org/protobuf/reflect/protoreflect" +import "google.golang.org/protobuf/reflect/protoreflect" // These variables are set by the init function in descriptor.pb.go via logic // in internal/filetype. In other words, so long as the descriptor proto package @@ -17,13 +17,13 @@ import pref "google.golang.org/protobuf/reflect/protoreflect" // // Each variable is populated with a nil pointer to the options struct. var ( - File pref.ProtoMessage - Enum pref.ProtoMessage - EnumValue pref.ProtoMessage - Message pref.ProtoMessage - Field pref.ProtoMessage - Oneof pref.ProtoMessage - ExtensionRange pref.ProtoMessage - Service pref.ProtoMessage - Method pref.ProtoMessage + File protoreflect.ProtoMessage + Enum protoreflect.ProtoMessage + EnumValue protoreflect.ProtoMessage + Message protoreflect.ProtoMessage + Field protoreflect.ProtoMessage + Oneof protoreflect.ProtoMessage + ExtensionRange protoreflect.ProtoMessage + Service protoreflect.ProtoMessage + Method protoreflect.ProtoMessage ) diff --git a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go index 029a6a12d7..08dad7692c 100644 --- a/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go +++ b/vendor/google.golang.org/protobuf/internal/editionssupport/editions.go @@ -5,7 +5,7 @@ // Package editionssupport defines constants for editions that are supported. package editionssupport -import descriptorpb "google.golang.org/protobuf/types/descriptorpb" +import "google.golang.org/protobuf/types/descriptorpb" const ( Minimum = descriptorpb.Edition_EDITION_PROTO2 diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index df53ff40b2..fa790e0ff1 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -258,6 +258,7 @@ type ( StringName stringName IsProto3Optional bool // promoted from google.protobuf.FieldDescriptorProto IsWeak bool // promoted from google.protobuf.FieldOptions + IsLazy bool // promoted from google.protobuf.FieldOptions Default defaultValue ContainingOneof protoreflect.OneofDescriptor // must be consistent with Message.Oneofs.Fields Enum protoreflect.EnumDescriptor @@ -351,6 +352,7 @@ func (fd *Field) IsPacked() bool { } func (fd *Field) IsExtension() bool { return false } func (fd *Field) IsWeak() bool { return fd.L1.IsWeak } +func (fd *Field) IsLazy() bool { return fd.L1.IsLazy } func (fd *Field) IsList() bool { return fd.Cardinality() == protoreflect.Repeated && !fd.IsMap() } func (fd *Field) IsMap() bool { return fd.Message() != nil && fd.Message().IsMapEntry() } func (fd *Field) MapKey() protoreflect.FieldDescriptor { @@ -425,6 +427,7 @@ type ( Extendee protoreflect.MessageDescriptor Cardinality protoreflect.Cardinality Kind protoreflect.Kind + IsLazy bool EditionFeatures EditionFeatures } ExtensionL2 struct { @@ -465,6 +468,7 @@ func (xd *Extension) IsPacked() bool { } func (xd *Extension) IsExtension() bool { return true } func (xd *Extension) IsWeak() bool { return false } +func (xd *Extension) IsLazy() bool { return xd.L1.IsLazy } func (xd *Extension) IsList() bool { return xd.Cardinality() == protoreflect.Repeated } func (xd *Extension) IsMap() bool { return false } func (xd *Extension) MapKey() protoreflect.FieldDescriptor { return nil } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 8a57d60b08..d2f549497e 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -495,6 +495,8 @@ func (xd *Extension) unmarshalOptions(b []byte) { switch num { case genid.FieldOptions_Packed_field_number: xd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) + case genid.FieldOptions_Lazy_field_number: + xd.L1.IsLazy = protowire.DecodeBool(v) } case protowire.BytesType: v, m := protowire.ConsumeBytes(b) diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index e56c91a8db..67a51b327c 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -504,6 +504,8 @@ func (fd *Field) unmarshalOptions(b []byte) { fd.L1.EditionFeatures.IsPacked = protowire.DecodeBool(v) case genid.FieldOptions_Weak_field_number: fd.L1.IsWeak = protowire.DecodeBool(v) + case genid.FieldOptions_Lazy_field_number: + fd.L1.IsLazy = protowire.DecodeBool(v) case FieldOptions_EnforceUTF8: fd.L1.EditionFeatures.IsUTF8Validated = protowire.DecodeBool(v) } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go index 11f5f356b6..fd4d0c83d2 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -68,7 +68,7 @@ func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures { v, m := protowire.ConsumeBytes(b) b = b[m:] switch num { - case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number: + case genid.FeatureSet_Go_ext_number: parent = unmarshalGoFeature(v, parent) } } diff --git a/vendor/google.golang.org/protobuf/internal/genid/doc.go b/vendor/google.golang.org/protobuf/internal/genid/doc.go index 45ccd01211..d9b9d916a2 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/doc.go +++ b/vendor/google.golang.org/protobuf/internal/genid/doc.go @@ -6,6 +6,6 @@ // and the well-known types. package genid -import protoreflect "google.golang.org/protobuf/reflect/protoreflect" +import "google.golang.org/protobuf/reflect/protoreflect" const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go index 9a652a2b42..7f67cbb6e9 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -12,20 +12,25 @@ import ( const File_google_protobuf_go_features_proto = "google/protobuf/go_features.proto" -// Names for google.protobuf.GoFeatures. +// Names for pb.GoFeatures. const ( GoFeatures_message_name protoreflect.Name = "GoFeatures" - GoFeatures_message_fullname protoreflect.FullName = "google.protobuf.GoFeatures" + GoFeatures_message_fullname protoreflect.FullName = "pb.GoFeatures" ) -// Field names for google.protobuf.GoFeatures. +// Field names for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum" - GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "google.protobuf.GoFeatures.legacy_unmarshal_json_enum" + GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "pb.GoFeatures.legacy_unmarshal_json_enum" ) -// Field numbers for google.protobuf.GoFeatures. +// Field numbers for pb.GoFeatures. const ( GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1 ) + +// Extension numbers +const ( + FeatureSet_Go_ext_number protoreflect.FieldNumber = 1002 +) diff --git a/vendor/google.golang.org/protobuf/internal/genid/map_entry.go b/vendor/google.golang.org/protobuf/internal/genid/map_entry.go index 8f9ea02ff2..bef5a25fbb 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/map_entry.go +++ b/vendor/google.golang.org/protobuf/internal/genid/map_entry.go @@ -4,7 +4,7 @@ package genid -import protoreflect "google.golang.org/protobuf/reflect/protoreflect" +import "google.golang.org/protobuf/reflect/protoreflect" // Generic field names and numbers for synthetic map entry messages. const ( diff --git a/vendor/google.golang.org/protobuf/internal/genid/wrappers.go b/vendor/google.golang.org/protobuf/internal/genid/wrappers.go index 429384b85b..9404270de0 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/wrappers.go +++ b/vendor/google.golang.org/protobuf/internal/genid/wrappers.go @@ -4,7 +4,7 @@ package genid -import protoreflect "google.golang.org/protobuf/reflect/protoreflect" +import "google.golang.org/protobuf/reflect/protoreflect" // Generic field name and number for messages in wrappers.proto. const ( diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go index 4bb0a7a20c..0d5b546e0e 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go @@ -67,7 +67,6 @@ type lazyExtensionValue struct { xi *extensionFieldInfo value protoreflect.Value b []byte - fn func() protoreflect.Value } type ExtensionField struct { @@ -158,10 +157,9 @@ func (f *ExtensionField) lazyInit() { } f.lazy.value = val } else { - f.lazy.value = f.lazy.fn() + panic("No support for lazy fns for ExtensionField") } f.lazy.xi = nil - f.lazy.fn = nil f.lazy.b = nil atomic.StoreUint32(&f.lazy.atomicOnce, 1) } @@ -174,13 +172,6 @@ func (f *ExtensionField) Set(t protoreflect.ExtensionType, v protoreflect.Value) f.lazy = nil } -// SetLazy sets the type and a value that is to be lazily evaluated upon first use. -// This must not be called concurrently. -func (f *ExtensionField) SetLazy(t protoreflect.ExtensionType, fn func() protoreflect.Value) { - f.typ = t - f.lazy = &lazyExtensionValue{fn: fn} -} - // Value returns the value of the extension field. // This may be called concurrently. func (f *ExtensionField) Value() protoreflect.Value { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go index 78ee47e44b..7c1f66c8c1 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_field.go @@ -65,6 +65,9 @@ func (mi *MessageInfo) initOneofFieldCoders(od protoreflect.OneofDescriptor, si if err != nil { return out, err } + if cf.funcs.isInit == nil { + out.initialized = true + } vi.Set(vw) return out, nil } diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go index 6b2fdbb739..78be9df342 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_message.go @@ -189,6 +189,9 @@ func (mi *MessageInfo) makeCoderMethods(t reflect.Type, si structInfo) { if mi.methods.Merge == nil { mi.methods.Merge = mi.merge } + if mi.methods.Equal == nil { + mi.methods.Equal = equal + } } // getUnknownBytes returns a *[]byte for the unknown fields. diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go deleted file mode 100644 index 145c577bd6..0000000000 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build purego || appengine -// +build purego appengine - -package impl - -import ( - "reflect" - - "google.golang.org/protobuf/encoding/protowire" -) - -func sizeEnum(p pointer, f *coderFieldInfo, _ marshalOptions) (size int) { - v := p.v.Elem().Int() - return f.tagsize + protowire.SizeVarint(uint64(v)) -} - -func appendEnum(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - v := p.v.Elem().Int() - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(v)) - return b, nil -} - -func consumeEnum(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, _ unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - p.v.Elem().SetInt(int64(v)) - out.n = n - return out, nil -} - -func mergeEnum(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - dst.v.Elem().Set(src.v.Elem()) -} - -var coderEnum = pointerCoderFuncs{ - size: sizeEnum, - marshal: appendEnum, - unmarshal: consumeEnum, - merge: mergeEnum, -} - -func sizeEnumNoZero(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - if p.v.Elem().Int() == 0 { - return 0 - } - return sizeEnum(p, f, opts) -} - -func appendEnumNoZero(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - if p.v.Elem().Int() == 0 { - return b, nil - } - return appendEnum(b, p, f, opts) -} - -func mergeEnumNoZero(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - if src.v.Elem().Int() != 0 { - dst.v.Elem().Set(src.v.Elem()) - } -} - -var coderEnumNoZero = pointerCoderFuncs{ - size: sizeEnumNoZero, - marshal: appendEnumNoZero, - unmarshal: consumeEnum, - merge: mergeEnumNoZero, -} - -func sizeEnumPtr(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - return sizeEnum(pointer{p.v.Elem()}, f, opts) -} - -func appendEnumPtr(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - return appendEnum(b, pointer{p.v.Elem()}, f, opts) -} - -func consumeEnumPtr(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - if wtyp != protowire.VarintType { - return out, errUnknown - } - if p.v.Elem().IsNil() { - p.v.Elem().Set(reflect.New(p.v.Elem().Type().Elem())) - } - return consumeEnum(b, pointer{p.v.Elem()}, wtyp, f, opts) -} - -func mergeEnumPtr(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - if !src.v.Elem().IsNil() { - v := reflect.New(dst.v.Type().Elem().Elem()) - v.Elem().Set(src.v.Elem().Elem()) - dst.v.Elem().Set(v) - } -} - -var coderEnumPtr = pointerCoderFuncs{ - size: sizeEnumPtr, - marshal: appendEnumPtr, - unmarshal: consumeEnumPtr, - merge: mergeEnumPtr, -} - -func sizeEnumSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := p.v.Elem() - for i, llen := 0, s.Len(); i < llen; i++ { - size += protowire.SizeVarint(uint64(s.Index(i).Int())) + f.tagsize - } - return size -} - -func appendEnumSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.v.Elem() - for i, llen := 0, s.Len(); i < llen; i++ { - b = protowire.AppendVarint(b, f.wiretag) - b = protowire.AppendVarint(b, uint64(s.Index(i).Int())) - } - return b, nil -} - -func consumeEnumSlice(b []byte, p pointer, wtyp protowire.Type, f *coderFieldInfo, opts unmarshalOptions) (out unmarshalOutput, err error) { - s := p.v.Elem() - if wtyp == protowire.BytesType { - b, n := protowire.ConsumeBytes(b) - if n < 0 { - return out, errDecode - } - for len(b) > 0 { - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - rv := reflect.New(s.Type().Elem()).Elem() - rv.SetInt(int64(v)) - s.Set(reflect.Append(s, rv)) - b = b[n:] - } - out.n = n - return out, nil - } - if wtyp != protowire.VarintType { - return out, errUnknown - } - v, n := protowire.ConsumeVarint(b) - if n < 0 { - return out, errDecode - } - rv := reflect.New(s.Type().Elem()).Elem() - rv.SetInt(int64(v)) - s.Set(reflect.Append(s, rv)) - out.n = n - return out, nil -} - -func mergeEnumSlice(dst, src pointer, _ *coderFieldInfo, _ mergeOptions) { - dst.v.Elem().Set(reflect.AppendSlice(dst.v.Elem(), src.v.Elem())) -} - -var coderEnumSlice = pointerCoderFuncs{ - size: sizeEnumSlice, - marshal: appendEnumSlice, - unmarshal: consumeEnumSlice, - merge: mergeEnumSlice, -} - -func sizeEnumPackedSlice(p pointer, f *coderFieldInfo, opts marshalOptions) (size int) { - s := p.v.Elem() - llen := s.Len() - if llen == 0 { - return 0 - } - n := 0 - for i := 0; i < llen; i++ { - n += protowire.SizeVarint(uint64(s.Index(i).Int())) - } - return f.tagsize + protowire.SizeBytes(n) -} - -func appendEnumPackedSlice(b []byte, p pointer, f *coderFieldInfo, opts marshalOptions) ([]byte, error) { - s := p.v.Elem() - llen := s.Len() - if llen == 0 { - return b, nil - } - b = protowire.AppendVarint(b, f.wiretag) - n := 0 - for i := 0; i < llen; i++ { - n += protowire.SizeVarint(uint64(s.Index(i).Int())) - } - b = protowire.AppendVarint(b, uint64(n)) - for i := 0; i < llen; i++ { - b = protowire.AppendVarint(b, uint64(s.Index(i).Int())) - } - return b, nil -} - -var coderEnumPackedSlice = pointerCoderFuncs{ - size: sizeEnumPackedSlice, - marshal: appendEnumPackedSlice, - unmarshal: consumeEnumSlice, - merge: mergeEnumSlice, -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go index 757642e23c..077712c2c5 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine -// +build !purego,!appengine - package impl // When using unsafe pointers, we can just treat enum values as int32s. diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go index e06ece55a2..f72ddd882f 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go @@ -322,7 +322,7 @@ func (c *stringConverter) PBValueOf(v reflect.Value) protoreflect.Value { return protoreflect.ValueOfString(v.Convert(stringType).String()) } func (c *stringConverter) GoValueOf(v protoreflect.Value) reflect.Value { - // pref.Value.String never panics, so we go through an interface + // protoreflect.Value.String never panics, so we go through an interface // conversion here to check the type. s := v.Interface().(string) if c.goType.Kind() == reflect.Slice && s == "" { diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go index febd212247..6254f5de41 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -10,7 +10,7 @@ import ( "sync/atomic" "google.golang.org/protobuf/internal/flags" - proto "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/proto" piface "google.golang.org/protobuf/runtime/protoiface" ) diff --git a/vendor/google.golang.org/protobuf/internal/impl/equal.go b/vendor/google.golang.org/protobuf/internal/impl/equal.go new file mode 100644 index 0000000000..9f6c32a7d8 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/impl/equal.go @@ -0,0 +1,224 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package impl + +import ( + "bytes" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" +) + +func equal(in protoiface.EqualInput) protoiface.EqualOutput { + return protoiface.EqualOutput{Equal: equalMessage(in.MessageA, in.MessageB)} +} + +// equalMessage is a fast-path variant of protoreflect.equalMessage. +// It takes advantage of the internal messageState type to avoid +// unnecessary allocations, type assertions. +func equalMessage(mx, my protoreflect.Message) bool { + if mx == nil || my == nil { + return mx == my + } + if mx.Descriptor() != my.Descriptor() { + return false + } + + msx, ok := mx.(*messageState) + if !ok { + return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my)) + } + msy, ok := my.(*messageState) + if !ok { + return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my)) + } + + mi := msx.messageInfo() + miy := msy.messageInfo() + if mi != miy { + return protoreflect.ValueOfMessage(mx).Equal(protoreflect.ValueOfMessage(my)) + } + mi.init() + // Compares regular fields + // Modified Message.Range code that compares two messages of the same type + // while going over the fields. + for _, ri := range mi.rangeInfos { + var fd protoreflect.FieldDescriptor + var vx, vy protoreflect.Value + + switch ri := ri.(type) { + case *fieldInfo: + hx := ri.has(msx.pointer()) + hy := ri.has(msy.pointer()) + if hx != hy { + return false + } + if !hx { + continue + } + fd = ri.fieldDesc + vx = ri.get(msx.pointer()) + vy = ri.get(msy.pointer()) + case *oneofInfo: + fnx := ri.which(msx.pointer()) + fny := ri.which(msy.pointer()) + if fnx != fny { + return false + } + if fnx <= 0 { + continue + } + fi := mi.fields[fnx] + fd = fi.fieldDesc + vx = fi.get(msx.pointer()) + vy = fi.get(msy.pointer()) + } + + if !equalValue(fd, vx, vy) { + return false + } + } + + // Compare extensions. + // This is more complicated because mx or my could have empty/nil extension maps, + // however some populated extension map values are equal to nil extension maps. + emx := mi.extensionMap(msx.pointer()) + emy := mi.extensionMap(msy.pointer()) + if emx != nil { + for k, x := range *emx { + xd := x.Type().TypeDescriptor() + xv := x.Value() + var y ExtensionField + ok := false + if emy != nil { + y, ok = (*emy)[k] + } + // We need to treat empty lists as equal to nil values + if emy == nil || !ok { + if xd.IsList() && xv.List().Len() == 0 { + continue + } + return false + } + + if !equalValue(xd, xv, y.Value()) { + return false + } + } + } + if emy != nil { + // emy may have extensions emx does not have, need to check them as well + for k, y := range *emy { + if emx != nil { + // emx has the field, so we already checked it + if _, ok := (*emx)[k]; ok { + continue + } + } + // Empty lists are equal to nil + if y.Type().TypeDescriptor().IsList() && y.Value().List().Len() == 0 { + continue + } + + // Cant be equal if the extension is populated + return false + } + } + + return equalUnknown(mx.GetUnknown(), my.GetUnknown()) +} + +func equalValue(fd protoreflect.FieldDescriptor, vx, vy protoreflect.Value) bool { + // slow path + if fd.Kind() != protoreflect.MessageKind { + return vx.Equal(vy) + } + + // fast path special cases + if fd.IsMap() { + if fd.MapValue().Kind() == protoreflect.MessageKind { + return equalMessageMap(vx.Map(), vy.Map()) + } + return vx.Equal(vy) + } + + if fd.IsList() { + return equalMessageList(vx.List(), vy.List()) + } + + return equalMessage(vx.Message(), vy.Message()) +} + +// Mostly copied from protoreflect.equalMap. +// This variant only works for messages as map types. +// All other map types should be handled via Value.Equal. +func equalMessageMap(mx, my protoreflect.Map) bool { + if mx.Len() != my.Len() { + return false + } + equal := true + mx.Range(func(k protoreflect.MapKey, vx protoreflect.Value) bool { + if !my.Has(k) { + equal = false + return false + } + vy := my.Get(k) + equal = equalMessage(vx.Message(), vy.Message()) + return equal + }) + return equal +} + +// Mostly copied from protoreflect.equalList. +// The only change is the usage of equalImpl instead of protoreflect.equalValue. +func equalMessageList(lx, ly protoreflect.List) bool { + if lx.Len() != ly.Len() { + return false + } + for i := 0; i < lx.Len(); i++ { + // We only operate on messages here since equalImpl will not call us in any other case. + if !equalMessage(lx.Get(i).Message(), ly.Get(i).Message()) { + return false + } + } + return true +} + +// equalUnknown compares unknown fields by direct comparison on the raw bytes +// of each individual field number. +// Copied from protoreflect.equalUnknown. +func equalUnknown(x, y protoreflect.RawFields) bool { + if len(x) != len(y) { + return false + } + if bytes.Equal([]byte(x), []byte(y)) { + return true + } + + mx := make(map[protoreflect.FieldNumber]protoreflect.RawFields) + my := make(map[protoreflect.FieldNumber]protoreflect.RawFields) + for len(x) > 0 { + fnum, _, n := protowire.ConsumeField(x) + mx[fnum] = append(mx[fnum], x[:n]...) + x = x[n:] + } + for len(y) > 0 { + fnum, _, n := protowire.ConsumeField(y) + my[fnum] = append(my[fnum], y[:n]...) + y = y[n:] + } + if len(mx) != len(my) { + return false + } + + for k, v1 := range mx { + if v2, ok := my[k]; !ok || !bytes.Equal([]byte(v1), []byte(v2)) { + return false + } + } + + return true +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go index 6e8677ee63..b6849d6692 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_extension.go @@ -160,6 +160,7 @@ func (x placeholderExtension) HasPresence() bool func (x placeholderExtension) HasOptionalKeyword() bool { return false } func (x placeholderExtension) IsExtension() bool { return true } func (x placeholderExtension) IsWeak() bool { return false } +func (x placeholderExtension) IsLazy() bool { return false } func (x placeholderExtension) IsPacked() bool { return false } func (x placeholderExtension) IsList() bool { return false } func (x placeholderExtension) IsMap() bool { return false } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index 019399d454..741b5ed29c 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -30,8 +30,8 @@ type MessageInfo struct { // Desc is the underlying message descriptor type and must be populated. Desc protoreflect.MessageDescriptor - // Exporter must be provided in a purego environment in order to provide - // access to unexported fields. + // Deprecated: Exporter will be removed the next time we bump + // protoimpl.GenVersion. See https://github.com/golang/protobuf/issues/1640 Exporter exporter // OneofWrappers is list of pointers to oneof wrapper struct types. diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go deleted file mode 100644 index da685e8a29..0000000000 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build purego || appengine -// +build purego appengine - -package impl - -import ( - "fmt" - "reflect" - "sync" -) - -const UnsafeEnabled = false - -// Pointer is an opaque pointer type. -type Pointer any - -// offset represents the offset to a struct field, accessible from a pointer. -// The offset is the field index into a struct. -type offset struct { - index int - export exporter -} - -// offsetOf returns a field offset for the struct field. -func offsetOf(f reflect.StructField, x exporter) offset { - if len(f.Index) != 1 { - panic("embedded structs are not supported") - } - if f.PkgPath == "" { - return offset{index: f.Index[0]} // field is already exported - } - if x == nil { - panic("exporter must be provided for unexported field") - } - return offset{index: f.Index[0], export: x} -} - -// IsValid reports whether the offset is valid. -func (f offset) IsValid() bool { return f.index >= 0 } - -// invalidOffset is an invalid field offset. -var invalidOffset = offset{index: -1} - -// zeroOffset is a noop when calling pointer.Apply. -var zeroOffset = offset{index: 0} - -// pointer is an abstract representation of a pointer to a struct or field. -type pointer struct{ v reflect.Value } - -// pointerOf returns p as a pointer. -func pointerOf(p Pointer) pointer { - return pointerOfIface(p) -} - -// pointerOfValue returns v as a pointer. -func pointerOfValue(v reflect.Value) pointer { - return pointer{v: v} -} - -// pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v any) pointer { - return pointer{v: reflect.ValueOf(v)} -} - -// IsNil reports whether the pointer is nil. -func (p pointer) IsNil() bool { - return p.v.IsNil() -} - -// Apply adds an offset to the pointer to derive a new pointer -// to a specified field. The current pointer must be pointing at a struct. -func (p pointer) Apply(f offset) pointer { - if f.export != nil { - if v := reflect.ValueOf(f.export(p.v.Interface(), f.index)); v.IsValid() { - return pointer{v: v} - } - } - return pointer{v: p.v.Elem().Field(f.index).Addr()} -} - -// AsValueOf treats p as a pointer to an object of type t and returns the value. -// It is equivalent to reflect.ValueOf(p.AsIfaceOf(t)) -func (p pointer) AsValueOf(t reflect.Type) reflect.Value { - if got := p.v.Type().Elem(); got != t { - panic(fmt.Sprintf("invalid type: got %v, want %v", got, t)) - } - return p.v -} - -// AsIfaceOf treats p as a pointer to an object of type t and returns the value. -// It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) any { - return p.AsValueOf(t).Interface() -} - -func (p pointer) Bool() *bool { return p.v.Interface().(*bool) } -func (p pointer) BoolPtr() **bool { return p.v.Interface().(**bool) } -func (p pointer) BoolSlice() *[]bool { return p.v.Interface().(*[]bool) } -func (p pointer) Int32() *int32 { return p.v.Interface().(*int32) } -func (p pointer) Int32Ptr() **int32 { return p.v.Interface().(**int32) } -func (p pointer) Int32Slice() *[]int32 { return p.v.Interface().(*[]int32) } -func (p pointer) Int64() *int64 { return p.v.Interface().(*int64) } -func (p pointer) Int64Ptr() **int64 { return p.v.Interface().(**int64) } -func (p pointer) Int64Slice() *[]int64 { return p.v.Interface().(*[]int64) } -func (p pointer) Uint32() *uint32 { return p.v.Interface().(*uint32) } -func (p pointer) Uint32Ptr() **uint32 { return p.v.Interface().(**uint32) } -func (p pointer) Uint32Slice() *[]uint32 { return p.v.Interface().(*[]uint32) } -func (p pointer) Uint64() *uint64 { return p.v.Interface().(*uint64) } -func (p pointer) Uint64Ptr() **uint64 { return p.v.Interface().(**uint64) } -func (p pointer) Uint64Slice() *[]uint64 { return p.v.Interface().(*[]uint64) } -func (p pointer) Float32() *float32 { return p.v.Interface().(*float32) } -func (p pointer) Float32Ptr() **float32 { return p.v.Interface().(**float32) } -func (p pointer) Float32Slice() *[]float32 { return p.v.Interface().(*[]float32) } -func (p pointer) Float64() *float64 { return p.v.Interface().(*float64) } -func (p pointer) Float64Ptr() **float64 { return p.v.Interface().(**float64) } -func (p pointer) Float64Slice() *[]float64 { return p.v.Interface().(*[]float64) } -func (p pointer) String() *string { return p.v.Interface().(*string) } -func (p pointer) StringPtr() **string { return p.v.Interface().(**string) } -func (p pointer) StringSlice() *[]string { return p.v.Interface().(*[]string) } -func (p pointer) Bytes() *[]byte { return p.v.Interface().(*[]byte) } -func (p pointer) BytesPtr() **[]byte { return p.v.Interface().(**[]byte) } -func (p pointer) BytesSlice() *[][]byte { return p.v.Interface().(*[][]byte) } -func (p pointer) WeakFields() *weakFields { return (*weakFields)(p.v.Interface().(*WeakFields)) } -func (p pointer) Extensions() *map[int32]ExtensionField { - return p.v.Interface().(*map[int32]ExtensionField) -} - -func (p pointer) Elem() pointer { - return pointer{v: p.v.Elem()} -} - -// PointerSlice copies []*T from p as a new []pointer. -// This behavior differs from the implementation in pointer_unsafe.go. -func (p pointer) PointerSlice() []pointer { - // TODO: reconsider this - if p.v.IsNil() { - return nil - } - n := p.v.Elem().Len() - s := make([]pointer, n) - for i := 0; i < n; i++ { - s[i] = pointer{v: p.v.Elem().Index(i)} - } - return s -} - -// AppendPointerSlice appends v to p, which must be a []*T. -func (p pointer) AppendPointerSlice(v pointer) { - sp := p.v.Elem() - sp.Set(reflect.Append(sp, v.v)) -} - -// SetPointer sets *p to v. -func (p pointer) SetPointer(v pointer) { - p.v.Elem().Set(v.v) -} - -func growSlice(p pointer, addCap int) { - // TODO: Once we only support Go 1.20 and newer, use reflect.Grow. - in := p.v.Elem() - out := reflect.MakeSlice(in.Type(), in.Len(), in.Len()+addCap) - reflect.Copy(out, in) - p.v.Elem().Set(out) -} - -func (p pointer) growBoolSlice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growInt32Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growUint32Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growInt64Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growUint64Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growFloat64Slice(addCap int) { - growSlice(p, addCap) -} - -func (p pointer) growFloat32Slice(addCap int) { - growSlice(p, addCap) -} - -func (Export) MessageStateOf(p Pointer) *messageState { panic("not supported") } -func (ms *messageState) pointer() pointer { panic("not supported") } -func (ms *messageState) messageInfo() *MessageInfo { panic("not supported") } -func (ms *messageState) LoadMessageInfo() *MessageInfo { panic("not supported") } -func (ms *messageState) StoreMessageInfo(mi *MessageInfo) { panic("not supported") } - -type atomicNilMessage struct { - once sync.Once - m messageReflectWrapper -} - -func (m *atomicNilMessage) Init(mi *MessageInfo) *messageReflectWrapper { - m.once.Do(func() { - m.m.p = pointerOfIface(reflect.Zero(mi.GoReflectType).Interface()) - m.m.mi = mi - }) - return &m.m -} diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 5f20ca5d8a..79e186667b 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine -// +build !purego,!appengine - package impl import ( diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go deleted file mode 100644 index a1f6f33386..0000000000 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build purego || appengine -// +build purego appengine - -package strs - -import pref "google.golang.org/protobuf/reflect/protoreflect" - -func UnsafeString(b []byte) string { - return string(b) -} - -func UnsafeBytes(s string) []byte { - return []byte(s) -} - -type Builder struct{} - -func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { - return prefix.Append(name) -} - -func (*Builder) MakeString(b []byte) string { - return string(b) -} diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go index a008acd090..832a7988f1 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine && !go1.21 -// +build !purego,!appengine,!go1.21 +//go:build !go1.21 package strs diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go index 60166f2ba3..1ffddf6877 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go121.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine && go1.21 -// +build !purego,!appengine,go1.21 +//go:build go1.21 package strs diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index dbbf1f6862..fb8e15e8da 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,8 +51,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 34 - Patch = 2 + Minor = 35 + Patch = 1 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/equal.go b/vendor/google.golang.org/protobuf/proto/equal.go index 1a0be1b03c..c36d4a9cd7 100644 --- a/vendor/google.golang.org/protobuf/proto/equal.go +++ b/vendor/google.golang.org/protobuf/proto/equal.go @@ -8,6 +8,7 @@ import ( "reflect" "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/runtime/protoiface" ) // Equal reports whether two messages are equal, @@ -51,6 +52,14 @@ func Equal(x, y Message) bool { if mx.IsValid() != my.IsValid() { return false } + + // Only one of the messages needs to implement the fast-path for it to work. + pmx := protoMethods(mx) + pmy := protoMethods(my) + if pmx != nil && pmy != nil && pmx.Equal != nil && pmy.Equal != nil { + return pmx.Equal(protoiface.EqualInput{MessageA: mx, MessageB: my}).Equal + } + vx := protoreflect.ValueOfMessage(mx) vy := protoreflect.ValueOfMessage(my) return vx.Equal(vy) diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go index d248f29284..78445d116f 100644 --- a/vendor/google.golang.org/protobuf/proto/extension.go +++ b/vendor/google.golang.org/protobuf/proto/extension.go @@ -39,6 +39,48 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) { // If the field is unpopulated, it returns the default value for // scalars and an immutable, empty value for lists or messages. // It panics if xt does not extend m. +// +// The type of the value is dependent on the field type of the extension. +// For extensions generated by protoc-gen-go, the Go type is as follows: +// +// ╔═══════════════════╤═════════════════════════╗ +// ║ Go type │ Protobuf kind ║ +// ╠═══════════════════╪═════════════════════════╣ +// ║ bool │ bool ║ +// ║ int32 │ int32, sint32, sfixed32 ║ +// ║ int64 │ int64, sint64, sfixed64 ║ +// ║ uint32 │ uint32, fixed32 ║ +// ║ uint64 │ uint64, fixed64 ║ +// ║ float32 │ float ║ +// ║ float64 │ double ║ +// ║ string │ string ║ +// ║ []byte │ bytes ║ +// ║ protoreflect.Enum │ enum ║ +// ║ proto.Message │ message, group ║ +// ╚═══════════════════╧═════════════════════════╝ +// +// The protoreflect.Enum and proto.Message types are the concrete Go type +// associated with the named enum or message. Repeated fields are represented +// using a Go slice of the base element type. +// +// If a generated extension descriptor variable is directly passed to +// GetExtension, then the call should be followed immediately by a +// type assertion to the expected output value. For example: +// +// mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage) +// +// This pattern enables static analysis tools to verify that the asserted type +// matches the Go type associated with the extension field and +// also enables a possible future migration to a type-safe extension API. +// +// Since singular messages are the most common extension type, the pattern of +// calling HasExtension followed by GetExtension may be simplified to: +// +// if mm := proto.GetExtension(m, foopb.E_MyExtension).(*foopb.MyMessage); mm != nil { +// ... // make use of mm +// } +// +// The mm variable is non-nil if and only if HasExtension reports true. func GetExtension(m Message, xt protoreflect.ExtensionType) any { // Treat nil message interface as an empty message; return the default. if m == nil { @@ -51,6 +93,35 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) any { // SetExtension stores the value of an extension field. // It panics if m is invalid, xt does not extend m, or if type of v // is invalid for the specified extension field. +// +// The type of the value is dependent on the field type of the extension. +// For extensions generated by protoc-gen-go, the Go type is as follows: +// +// ╔═══════════════════╤═════════════════════════╗ +// ║ Go type │ Protobuf kind ║ +// ╠═══════════════════╪═════════════════════════╣ +// ║ bool │ bool ║ +// ║ int32 │ int32, sint32, sfixed32 ║ +// ║ int64 │ int64, sint64, sfixed64 ║ +// ║ uint32 │ uint32, fixed32 ║ +// ║ uint64 │ uint64, fixed64 ║ +// ║ float32 │ float ║ +// ║ float64 │ double ║ +// ║ string │ string ║ +// ║ []byte │ bytes ║ +// ║ protoreflect.Enum │ enum ║ +// ║ proto.Message │ message, group ║ +// ╚═══════════════════╧═════════════════════════╝ +// +// The protoreflect.Enum and proto.Message types are the concrete Go type +// associated with the named enum or message. Repeated fields are represented +// using a Go slice of the base element type. +// +// If a generated extension descriptor variable is directly passed to +// SetExtension (e.g., foopb.E_MyExtension), then the value should be a +// concrete type that matches the expected Go type for the extension descriptor +// so that static analysis tools can verify type correctness. +// This also enables a possible future migration to a type-safe extension API. func SetExtension(m Message, xt protoreflect.ExtensionType, v any) { xd := xt.TypeDescriptor() pv := xt.ValueOf(v) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go index 8561755427..ebcb4a8ab1 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -150,6 +150,7 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc opts = proto.Clone(opts).(*descriptorpb.FieldOptions) f.L1.Options = func() protoreflect.ProtoMessage { return opts } f.L1.IsWeak = opts.GetWeak() + f.L1.IsLazy = opts.GetLazy() if opts.Packed != nil { f.L1.EditionFeatures.IsPacked = opts.GetPacked() } @@ -214,6 +215,9 @@ func (r descsByName) initExtensionDeclarations(xds []*descriptorpb.FieldDescript if xd.JsonName != nil { x.L2.StringName.InitJSON(xd.GetJsonName()) } + if x.L1.Kind == protoreflect.MessageKind && x.L1.EditionFeatures.IsDelimitedEncoded { + x.L1.Kind = protoreflect.GroupKind + } } return xs, nil } diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 804830eda3..002e0047ae 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -14,7 +14,7 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" - gofeaturespb "google.golang.org/protobuf/types/gofeaturespb" + "google.golang.org/protobuf/types/gofeaturespb" ) var defaults = &descriptorpb.FeatureSetDefaults{} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go index d5d5af6ebe..742cb518c4 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go @@ -23,6 +23,7 @@ type ( Unmarshal func(unmarshalInput) (unmarshalOutput, error) Merge func(mergeInput) mergeOutput CheckInitialized func(checkInitializedInput) (checkInitializedOutput, error) + Equal func(equalInput) equalOutput } supportFlags = uint64 sizeInput = struct { @@ -75,4 +76,13 @@ type ( checkInitializedOutput = struct { pragma.NoUnkeyedLiterals } + equalInput = struct { + pragma.NoUnkeyedLiterals + MessageA Message + MessageB Message + } + equalOutput = struct { + pragma.NoUnkeyedLiterals + Equal bool + } ) diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go deleted file mode 100644 index 75f83a2af0..0000000000 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build purego || appengine -// +build purego appengine - -package protoreflect - -import "google.golang.org/protobuf/internal/pragma" - -type valueType int - -const ( - nilType valueType = iota - boolType - int32Type - int64Type - uint32Type - uint64Type - float32Type - float64Type - stringType - bytesType - enumType - ifaceType -) - -// value is a union where only one type can be represented at a time. -// This uses a distinct field for each type. This is type safe in Go, but -// occupies more memory than necessary (72B). -type value struct { - pragma.DoNotCompare // 0B - - typ valueType // 8B - num uint64 // 8B - str string // 16B - bin []byte // 24B - iface any // 16B -} - -func valueOfString(v string) Value { - return Value{typ: stringType, str: v} -} -func valueOfBytes(v []byte) Value { - return Value{typ: bytesType, bin: v} -} -func valueOfIface(v any) Value { - return Value{typ: ifaceType, iface: v} -} - -func (v Value) getString() string { - return v.str -} -func (v Value) getBytes() []byte { - return v.bin -} -func (v Value) getIface() any { - return v.iface -} diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go index 7f3583ead8..0015fcb35d 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine && !go1.21 -// +build !purego,!appengine,!go1.21 +//go:build !go1.21 package protoreflect diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go index f7d386990a..479527b58d 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego && !appengine && go1.21 -// +build !purego,!appengine,go1.21 +//go:build go1.21 package protoreflect diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go index 44cf467d88..246156561c 100644 --- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go @@ -39,6 +39,9 @@ type Methods = struct { // CheckInitialized returns an error if any required fields in the message are not set. CheckInitialized func(CheckInitializedInput) (CheckInitializedOutput, error) + + // Equal compares two messages and returns EqualOutput.Equal == true if they are equal. + Equal func(EqualInput) EqualOutput } // SupportFlags indicate support for optional features. @@ -166,3 +169,18 @@ type CheckInitializedInput = struct { type CheckInitializedOutput = struct { pragma.NoUnkeyedLiterals } + +// EqualInput is input to the Equal method. +type EqualInput = struct { + pragma.NoUnkeyedLiterals + + MessageA protoreflect.Message + MessageB protoreflect.Message +} + +// EqualOutput is output from the Equal method. +type EqualOutput = struct { + pragma.NoUnkeyedLiterals + + Equal bool +} diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 9403eb0750..6dea75cd5b 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -1217,11 +1217,9 @@ type FileDescriptorSet struct { func (x *FileDescriptorSet) Reset() { *x = FileDescriptorSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileDescriptorSet) String() string { @@ -1232,7 +1230,7 @@ func (*FileDescriptorSet) ProtoMessage() {} func (x *FileDescriptorSet) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1291,11 +1289,9 @@ type FileDescriptorProto struct { func (x *FileDescriptorProto) Reset() { *x = FileDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileDescriptorProto) String() string { @@ -1306,7 +1302,7 @@ func (*FileDescriptorProto) ProtoMessage() {} func (x *FileDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,11 +1430,9 @@ type DescriptorProto struct { func (x *DescriptorProto) Reset() { *x = DescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescriptorProto) String() string { @@ -1449,7 +1443,7 @@ func (*DescriptorProto) ProtoMessage() {} func (x *DescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1561,11 +1555,9 @@ const ( func (x *ExtensionRangeOptions) Reset() { *x = ExtensionRangeOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionRangeOptions) String() string { @@ -1576,7 +1568,7 @@ func (*ExtensionRangeOptions) ProtoMessage() {} func (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1680,11 +1672,9 @@ type FieldDescriptorProto struct { func (x *FieldDescriptorProto) Reset() { *x = FieldDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldDescriptorProto) String() string { @@ -1695,7 +1685,7 @@ func (*FieldDescriptorProto) ProtoMessage() {} func (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1799,11 +1789,9 @@ type OneofDescriptorProto struct { func (x *OneofDescriptorProto) Reset() { *x = OneofDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OneofDescriptorProto) String() string { @@ -1814,7 +1802,7 @@ func (*OneofDescriptorProto) ProtoMessage() {} func (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1863,11 +1851,9 @@ type EnumDescriptorProto struct { func (x *EnumDescriptorProto) Reset() { *x = EnumDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumDescriptorProto) String() string { @@ -1878,7 +1864,7 @@ func (*EnumDescriptorProto) ProtoMessage() {} func (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1941,11 +1927,9 @@ type EnumValueDescriptorProto struct { func (x *EnumValueDescriptorProto) Reset() { *x = EnumValueDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumValueDescriptorProto) String() string { @@ -1956,7 +1940,7 @@ func (*EnumValueDescriptorProto) ProtoMessage() {} func (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2005,11 +1989,9 @@ type ServiceDescriptorProto struct { func (x *ServiceDescriptorProto) Reset() { *x = ServiceDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceDescriptorProto) String() string { @@ -2020,7 +2002,7 @@ func (*ServiceDescriptorProto) ProtoMessage() {} func (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2082,11 +2064,9 @@ const ( func (x *MethodDescriptorProto) Reset() { *x = MethodDescriptorProto{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MethodDescriptorProto) String() string { @@ -2097,7 +2077,7 @@ func (*MethodDescriptorProto) ProtoMessage() {} func (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2267,11 +2247,9 @@ const ( func (x *FileOptions) Reset() { *x = FileOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FileOptions) String() string { @@ -2282,7 +2260,7 @@ func (*FileOptions) ProtoMessage() {} func (x *FileOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2534,11 +2512,9 @@ const ( func (x *MessageOptions) Reset() { *x = MessageOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MessageOptions) String() string { @@ -2549,7 +2525,7 @@ func (*MessageOptions) ProtoMessage() {} func (x *MessageOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2707,11 +2683,9 @@ const ( func (x *FieldOptions) Reset() { *x = FieldOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldOptions) String() string { @@ -2722,7 +2696,7 @@ func (*FieldOptions) ProtoMessage() {} func (x *FieldOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2849,11 +2823,9 @@ type OneofOptions struct { func (x *OneofOptions) Reset() { *x = OneofOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OneofOptions) String() string { @@ -2864,7 +2836,7 @@ func (*OneofOptions) ProtoMessage() {} func (x *OneofOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2929,11 +2901,9 @@ const ( func (x *EnumOptions) Reset() { *x = EnumOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumOptions) String() string { @@ -2944,7 +2914,7 @@ func (*EnumOptions) ProtoMessage() {} func (x *EnumOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3026,11 +2996,9 @@ const ( func (x *EnumValueOptions) Reset() { *x = EnumValueOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumValueOptions) String() string { @@ -3041,7 +3009,7 @@ func (*EnumValueOptions) ProtoMessage() {} func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3115,11 +3083,9 @@ const ( func (x *ServiceOptions) Reset() { *x = ServiceOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ServiceOptions) String() string { @@ -3130,7 +3096,7 @@ func (*ServiceOptions) ProtoMessage() {} func (x *ServiceOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3192,11 +3158,9 @@ const ( func (x *MethodOptions) Reset() { *x = MethodOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *MethodOptions) String() string { @@ -3207,7 +3171,7 @@ func (*MethodOptions) ProtoMessage() {} func (x *MethodOptions) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3274,11 +3238,9 @@ type UninterpretedOption struct { func (x *UninterpretedOption) Reset() { *x = UninterpretedOption{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UninterpretedOption) String() string { @@ -3289,7 +3251,7 @@ func (*UninterpretedOption) ProtoMessage() {} func (x *UninterpretedOption) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3375,11 +3337,9 @@ type FeatureSet struct { func (x *FeatureSet) Reset() { *x = FeatureSet{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSet) String() string { @@ -3390,7 +3350,7 @@ func (*FeatureSet) ProtoMessage() {} func (x *FeatureSet) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3467,11 +3427,9 @@ type FeatureSetDefaults struct { func (x *FeatureSetDefaults) Reset() { *x = FeatureSetDefaults{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSetDefaults) String() string { @@ -3482,7 +3440,7 @@ func (*FeatureSetDefaults) ProtoMessage() {} func (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3578,11 +3536,9 @@ type SourceCodeInfo struct { func (x *SourceCodeInfo) Reset() { *x = SourceCodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceCodeInfo) String() string { @@ -3593,7 +3549,7 @@ func (*SourceCodeInfo) ProtoMessage() {} func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3630,11 +3586,9 @@ type GeneratedCodeInfo struct { func (x *GeneratedCodeInfo) Reset() { *x = GeneratedCodeInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeneratedCodeInfo) String() string { @@ -3645,7 +3599,7 @@ func (*GeneratedCodeInfo) ProtoMessage() {} func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3679,11 +3633,9 @@ type DescriptorProto_ExtensionRange struct { func (x *DescriptorProto_ExtensionRange) Reset() { *x = DescriptorProto_ExtensionRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescriptorProto_ExtensionRange) String() string { @@ -3694,7 +3646,7 @@ func (*DescriptorProto_ExtensionRange) ProtoMessage() {} func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3744,11 +3696,9 @@ type DescriptorProto_ReservedRange struct { func (x *DescriptorProto_ReservedRange) Reset() { *x = DescriptorProto_ReservedRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DescriptorProto_ReservedRange) String() string { @@ -3759,7 +3709,7 @@ func (*DescriptorProto_ReservedRange) ProtoMessage() {} func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3813,11 +3763,9 @@ type ExtensionRangeOptions_Declaration struct { func (x *ExtensionRangeOptions_Declaration) Reset() { *x = ExtensionRangeOptions_Declaration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExtensionRangeOptions_Declaration) String() string { @@ -3828,7 +3776,7 @@ func (*ExtensionRangeOptions_Declaration) ProtoMessage() {} func (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3895,11 +3843,9 @@ type EnumDescriptorProto_EnumReservedRange struct { func (x *EnumDescriptorProto_EnumReservedRange) Reset() { *x = EnumDescriptorProto_EnumReservedRange{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *EnumDescriptorProto_EnumReservedRange) String() string { @@ -3910,7 +3856,7 @@ func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3950,11 +3896,9 @@ type FieldOptions_EditionDefault struct { func (x *FieldOptions_EditionDefault) Reset() { *x = FieldOptions_EditionDefault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldOptions_EditionDefault) String() string { @@ -3965,7 +3909,7 @@ func (*FieldOptions_EditionDefault) ProtoMessage() {} func (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4018,11 +3962,9 @@ type FieldOptions_FeatureSupport struct { func (x *FieldOptions_FeatureSupport) Reset() { *x = FieldOptions_FeatureSupport{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FieldOptions_FeatureSupport) String() string { @@ -4033,7 +3975,7 @@ func (*FieldOptions_FeatureSupport) ProtoMessage() {} func (x *FieldOptions_FeatureSupport) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4092,11 +4034,9 @@ type UninterpretedOption_NamePart struct { func (x *UninterpretedOption_NamePart) Reset() { *x = UninterpretedOption_NamePart{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *UninterpretedOption_NamePart) String() string { @@ -4107,7 +4047,7 @@ func (*UninterpretedOption_NamePart) ProtoMessage() {} func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4154,11 +4094,9 @@ type FeatureSetDefaults_FeatureSetEditionDefault struct { func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { *x = FeatureSetDefaults_FeatureSetEditionDefault{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { @@ -4169,7 +4107,7 @@ func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {} func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4305,11 +4243,9 @@ type SourceCodeInfo_Location struct { func (x *SourceCodeInfo_Location) Reset() { *x = SourceCodeInfo_Location{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourceCodeInfo_Location) String() string { @@ -4320,7 +4256,7 @@ func (*SourceCodeInfo_Location) ProtoMessage() {} func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4392,11 +4328,9 @@ type GeneratedCodeInfo_Annotation struct { func (x *GeneratedCodeInfo_Annotation) Reset() { *x = GeneratedCodeInfo_Annotation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_descriptor_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_descriptor_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GeneratedCodeInfo_Annotation) String() string { @@ -4407,7 +4341,7 @@ func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_descriptor_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5385,424 +5319,6 @@ func file_google_protobuf_descriptor_proto_init() { if File_google_protobuf_descriptor_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*FileDescriptorSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*FileDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionRangeOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*FieldDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OneofDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*EnumDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*EnumValueDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ServiceDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*MethodDescriptorProto); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*FileOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*MessageOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*FieldOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*OneofOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*EnumOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*EnumValueOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ServiceOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*MethodOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*UninterpretedOption); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - case 3: - return &v.extensionFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSetDefaults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SourceCodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*GeneratedCodeInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*DescriptorProto_ExtensionRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*DescriptorProto_ReservedRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*ExtensionRangeOptions_Declaration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*FieldOptions_EditionDefault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v any, i int) any { - switch v := v.(*FieldOptions_FeatureSupport); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v any, i int) any { - switch v := v.(*UninterpretedOption_NamePart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v any, i int) any { - switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v any, i int) any { - switch v := v.(*SourceCodeInfo_Location); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v any, i int) any { - switch v := v.(*GeneratedCodeInfo_Annotation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index a2ca940c50..c7e860fcd6 100644 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -29,11 +29,9 @@ type GoFeatures struct { func (x *GoFeatures) Reset() { *x = GoFeatures{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_go_features_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_go_features_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GoFeatures) String() string { @@ -44,7 +42,7 @@ func (*GoFeatures) ProtoMessage() {} func (x *GoFeatures) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_go_features_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -145,20 +143,6 @@ func file_google_protobuf_go_features_proto_init() { if File_google_protobuf_go_features_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GoFeatures); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 7172b43d38..87da199a38 100644 --- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -368,11 +368,9 @@ func (x *Any) UnmarshalNew() (proto.Message, error) { func (x *Any) Reset() { *x = Any{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_any_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_any_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Any) String() string { @@ -383,7 +381,7 @@ func (*Any) ProtoMessage() {} func (x *Any) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_any_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -461,20 +459,6 @@ func file_google_protobuf_any_proto_init() { if File_google_protobuf_any_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Any); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index 1b71bcd910..b99d4d2410 100644 --- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -245,11 +245,9 @@ func (x *Duration) check() uint { func (x *Duration) Reset() { *x = Duration{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_duration_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_duration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Duration) String() string { @@ -260,7 +258,7 @@ func (*Duration) ProtoMessage() {} func (x *Duration) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_duration_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -339,20 +337,6 @@ func file_google_protobuf_duration_proto_init() { if File_google_protobuf_duration_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Duration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 83a5a645b0..0d20722d70 100644 --- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -254,11 +254,9 @@ func (x *Timestamp) check() uint { func (x *Timestamp) Reset() { *x = Timestamp{} - if protoimpl.UnsafeEnabled { - mi := &file_google_protobuf_timestamp_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_protobuf_timestamp_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Timestamp) String() string { @@ -269,7 +267,7 @@ func (*Timestamp) ProtoMessage() {} func (x *Timestamp) ProtoReflect() protoreflect.Message { mi := &file_google_protobuf_timestamp_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -348,20 +346,6 @@ func file_google_protobuf_timestamp_proto_init() { if File_google_protobuf_timestamp_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Timestamp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/gopkg.in/yaml.v2/.travis.yml b/vendor/gopkg.in/yaml.v2/.travis.yml deleted file mode 100644 index 7348c50c0c..0000000000 --- a/vendor/gopkg.in/yaml.v2/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: go - -go: - - "1.4.x" - - "1.5.x" - - "1.6.x" - - "1.7.x" - - "1.8.x" - - "1.9.x" - - "1.10.x" - - "1.11.x" - - "1.12.x" - - "1.13.x" - - "1.14.x" - - "tip" - -go_import_path: gopkg.in/yaml.v2 diff --git a/vendor/gopkg.in/yaml.v2/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/vendor/gopkg.in/yaml.v2/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/gopkg.in/yaml.v2/LICENSE.libyaml b/vendor/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fbf6f..0000000000 --- a/vendor/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -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/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md deleted file mode 100644 index b50c6e8775..0000000000 --- a/vendor/gopkg.in/yaml.v2/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# YAML support for the Go language - -Introduction ------------- - -The yaml package enables Go programs to comfortably encode and decode YAML -values. It was developed within [Canonical](https://www.canonical.com) as -part of the [juju](https://juju.ubuntu.com) project, and is based on a -pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) -C library to parse and generate YAML data quickly and reliably. - -Compatibility -------------- - -The yaml package supports most of YAML 1.1 and 1.2, including support for -anchors, tags, map merging, etc. Multi-document unmarshalling is not yet -implemented, and base-60 floats from YAML 1.1 are purposefully not -supported since they're a poor design and are gone in YAML 1.2. - -Installation and usage ----------------------- - -The import path for the package is *gopkg.in/yaml.v2*. - -To install it, run: - - go get gopkg.in/yaml.v2 - -API documentation ------------------ - -If opened in a browser, the import path itself leads to the API documentation: - - * [https://gopkg.in/yaml.v2](https://gopkg.in/yaml.v2) - -API stability -------------- - -The package API for yaml v2 will remain stable as described in [gopkg.in](https://gopkg.in). - - -License -------- - -The yaml package is licensed under the Apache License 2.0. Please see the LICENSE file for details. - - -Example -------- - -```Go -package main - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v2" -) - -var data = ` -a: Easy! -b: - c: 2 - d: [3, 4] -` - -// Note: struct fields must be public in order for unmarshal to -// correctly populate the data. -type T struct { - A string - B struct { - RenamedC int `yaml:"c"` - D []int `yaml:",flow"` - } -} - -func main() { - t := T{} - - err := yaml.Unmarshal([]byte(data), &t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t:\n%v\n\n", t) - - d, err := yaml.Marshal(&t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t dump:\n%s\n\n", string(d)) - - m := make(map[interface{}]interface{}) - - err = yaml.Unmarshal([]byte(data), &m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m:\n%v\n\n", m) - - d, err = yaml.Marshal(&m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m dump:\n%s\n\n", string(d)) -} -``` - -This example will generate the following output: - -``` ---- t: -{Easy! {2 [3 4]}} - ---- t dump: -a: Easy! -b: - c: 2 - d: [3, 4] - - ---- m: -map[a:Easy! b:map[c:2 d:[3 4]]] - ---- m dump: -a: Easy! -b: - c: 2 - d: - - 3 - - 4 -``` - diff --git a/vendor/gopkg.in/yaml.v2/apic.go b/vendor/gopkg.in/yaml.v2/apic.go deleted file mode 100644 index acf71402cf..0000000000 --- a/vendor/gopkg.in/yaml.v2/apic.go +++ /dev/null @@ -1,744 +0,0 @@ -package yaml - -import ( - "io" -) - -func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { - //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) - - // Check if we can move the queue at the beginning of the buffer. - if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { - if parser.tokens_head != len(parser.tokens) { - copy(parser.tokens, parser.tokens[parser.tokens_head:]) - } - parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] - parser.tokens_head = 0 - } - parser.tokens = append(parser.tokens, *token) - if pos < 0 { - return - } - copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) - parser.tokens[parser.tokens_head+pos] = *token -} - -// Create a new parser object. -func yaml_parser_initialize(parser *yaml_parser_t) bool { - *parser = yaml_parser_t{ - raw_buffer: make([]byte, 0, input_raw_buffer_size), - buffer: make([]byte, 0, input_buffer_size), - } - return true -} - -// Destroy a parser object. -func yaml_parser_delete(parser *yaml_parser_t) { - *parser = yaml_parser_t{} -} - -// String read handler. -func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - if parser.input_pos == len(parser.input) { - return 0, io.EOF - } - n = copy(buffer, parser.input[parser.input_pos:]) - parser.input_pos += n - return n, nil -} - -// Reader read handler. -func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - return parser.input_reader.Read(buffer) -} - -// Set a string input. -func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_string_read_handler - parser.input = input - parser.input_pos = 0 -} - -// Set a file input. -func yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_reader_read_handler - parser.input_reader = r -} - -// Set the source encoding. -func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { - if parser.encoding != yaml_ANY_ENCODING { - panic("must set the encoding only once") - } - parser.encoding = encoding -} - -var disableLineWrapping = false - -// Create a new emitter object. -func yaml_emitter_initialize(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{ - buffer: make([]byte, output_buffer_size), - raw_buffer: make([]byte, 0, output_raw_buffer_size), - states: make([]yaml_emitter_state_t, 0, initial_stack_size), - events: make([]yaml_event_t, 0, initial_queue_size), - } - if disableLineWrapping { - emitter.best_width = -1 - } -} - -// Destroy an emitter object. -func yaml_emitter_delete(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{} -} - -// String write handler. -func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - *emitter.output_buffer = append(*emitter.output_buffer, buffer...) - return nil -} - -// yaml_writer_write_handler uses emitter.output_writer to write the -// emitted text. -func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - _, err := emitter.output_writer.Write(buffer) - return err -} - -// Set a string output. -func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_string_write_handler - emitter.output_buffer = output_buffer -} - -// Set a file output. -func yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_writer_write_handler - emitter.output_writer = w -} - -// Set the output encoding. -func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { - if emitter.encoding != yaml_ANY_ENCODING { - panic("must set the output encoding only once") - } - emitter.encoding = encoding -} - -// Set the canonical output style. -func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { - emitter.canonical = canonical -} - -//// Set the indentation increment. -func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { - if indent < 2 || indent > 9 { - indent = 2 - } - emitter.best_indent = indent -} - -// Set the preferred line width. -func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { - if width < 0 { - width = -1 - } - emitter.best_width = width -} - -// Set if unescaped non-ASCII characters are allowed. -func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { - emitter.unicode = unicode -} - -// Set the preferred line break character. -func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { - emitter.line_break = line_break -} - -///* -// * Destroy a token object. -// */ -// -//YAML_DECLARE(void) -//yaml_token_delete(yaml_token_t *token) -//{ -// assert(token); // Non-NULL token object expected. -// -// switch (token.type) -// { -// case YAML_TAG_DIRECTIVE_TOKEN: -// yaml_free(token.data.tag_directive.handle); -// yaml_free(token.data.tag_directive.prefix); -// break; -// -// case YAML_ALIAS_TOKEN: -// yaml_free(token.data.alias.value); -// break; -// -// case YAML_ANCHOR_TOKEN: -// yaml_free(token.data.anchor.value); -// break; -// -// case YAML_TAG_TOKEN: -// yaml_free(token.data.tag.handle); -// yaml_free(token.data.tag.suffix); -// break; -// -// case YAML_SCALAR_TOKEN: -// yaml_free(token.data.scalar.value); -// break; -// -// default: -// break; -// } -// -// memset(token, 0, sizeof(yaml_token_t)); -//} -// -///* -// * Check if a string is a valid UTF-8 sequence. -// * -// * Check 'reader.c' for more details on UTF-8 encoding. -// */ -// -//static int -//yaml_check_utf8(yaml_char_t *start, size_t length) -//{ -// yaml_char_t *end = start+length; -// yaml_char_t *pointer = start; -// -// while (pointer < end) { -// unsigned char octet; -// unsigned int width; -// unsigned int value; -// size_t k; -// -// octet = pointer[0]; -// width = (octet & 0x80) == 0x00 ? 1 : -// (octet & 0xE0) == 0xC0 ? 2 : -// (octet & 0xF0) == 0xE0 ? 3 : -// (octet & 0xF8) == 0xF0 ? 4 : 0; -// value = (octet & 0x80) == 0x00 ? octet & 0x7F : -// (octet & 0xE0) == 0xC0 ? octet & 0x1F : -// (octet & 0xF0) == 0xE0 ? octet & 0x0F : -// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; -// if (!width) return 0; -// if (pointer+width > end) return 0; -// for (k = 1; k < width; k ++) { -// octet = pointer[k]; -// if ((octet & 0xC0) != 0x80) return 0; -// value = (value << 6) + (octet & 0x3F); -// } -// if (!((width == 1) || -// (width == 2 && value >= 0x80) || -// (width == 3 && value >= 0x800) || -// (width == 4 && value >= 0x10000))) return 0; -// -// pointer += width; -// } -// -// return 1; -//} -// - -// Create STREAM-START. -func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) { - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - encoding: encoding, - } -} - -// Create STREAM-END. -func yaml_stream_end_event_initialize(event *yaml_event_t) { - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - } -} - -// Create DOCUMENT-START. -func yaml_document_start_event_initialize( - event *yaml_event_t, - version_directive *yaml_version_directive_t, - tag_directives []yaml_tag_directive_t, - implicit bool, -) { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: implicit, - } -} - -// Create DOCUMENT-END. -func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - implicit: implicit, - } -} - -///* -// * Create ALIAS. -// */ -// -//YAML_DECLARE(int) -//yaml_alias_event_initialize(event *yaml_event_t, anchor *yaml_char_t) -//{ -// mark yaml_mark_t = { 0, 0, 0 } -// anchor_copy *yaml_char_t = NULL -// -// assert(event) // Non-NULL event object is expected. -// assert(anchor) // Non-NULL anchor is expected. -// -// if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0 -// -// anchor_copy = yaml_strdup(anchor) -// if (!anchor_copy) -// return 0 -// -// ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark) -// -// return 1 -//} - -// Create SCALAR. -func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - anchor: anchor, - tag: tag, - value: value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-START. -func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-END. -func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - } - return true -} - -// Create MAPPING-START. -func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) { - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } -} - -// Create MAPPING-END. -func yaml_mapping_end_event_initialize(event *yaml_event_t) { - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - } -} - -// Destroy an event object. -func yaml_event_delete(event *yaml_event_t) { - *event = yaml_event_t{} -} - -///* -// * Create a document object. -// */ -// -//YAML_DECLARE(int) -//yaml_document_initialize(document *yaml_document_t, -// version_directive *yaml_version_directive_t, -// tag_directives_start *yaml_tag_directive_t, -// tag_directives_end *yaml_tag_directive_t, -// start_implicit int, end_implicit int) -//{ -// struct { -// error yaml_error_type_t -// } context -// struct { -// start *yaml_node_t -// end *yaml_node_t -// top *yaml_node_t -// } nodes = { NULL, NULL, NULL } -// version_directive_copy *yaml_version_directive_t = NULL -// struct { -// start *yaml_tag_directive_t -// end *yaml_tag_directive_t -// top *yaml_tag_directive_t -// } tag_directives_copy = { NULL, NULL, NULL } -// value yaml_tag_directive_t = { NULL, NULL } -// mark yaml_mark_t = { 0, 0, 0 } -// -// assert(document) // Non-NULL document object is expected. -// assert((tag_directives_start && tag_directives_end) || -// (tag_directives_start == tag_directives_end)) -// // Valid tag directives are expected. -// -// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error -// -// if (version_directive) { -// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) -// if (!version_directive_copy) goto error -// version_directive_copy.major = version_directive.major -// version_directive_copy.minor = version_directive.minor -// } -// -// if (tag_directives_start != tag_directives_end) { -// tag_directive *yaml_tag_directive_t -// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) -// goto error -// for (tag_directive = tag_directives_start -// tag_directive != tag_directives_end; tag_directive ++) { -// assert(tag_directive.handle) -// assert(tag_directive.prefix) -// if (!yaml_check_utf8(tag_directive.handle, -// strlen((char *)tag_directive.handle))) -// goto error -// if (!yaml_check_utf8(tag_directive.prefix, -// strlen((char *)tag_directive.prefix))) -// goto error -// value.handle = yaml_strdup(tag_directive.handle) -// value.prefix = yaml_strdup(tag_directive.prefix) -// if (!value.handle || !value.prefix) goto error -// if (!PUSH(&context, tag_directives_copy, value)) -// goto error -// value.handle = NULL -// value.prefix = NULL -// } -// } -// -// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, -// tag_directives_copy.start, tag_directives_copy.top, -// start_implicit, end_implicit, mark, mark) -// -// return 1 -// -//error: -// STACK_DEL(&context, nodes) -// yaml_free(version_directive_copy) -// while (!STACK_EMPTY(&context, tag_directives_copy)) { -// value yaml_tag_directive_t = POP(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// } -// STACK_DEL(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// -// return 0 -//} -// -///* -// * Destroy a document object. -// */ -// -//YAML_DECLARE(void) -//yaml_document_delete(document *yaml_document_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// tag_directive *yaml_tag_directive_t -// -// context.error = YAML_NO_ERROR // Eliminate a compiler warning. -// -// assert(document) // Non-NULL document object is expected. -// -// while (!STACK_EMPTY(&context, document.nodes)) { -// node yaml_node_t = POP(&context, document.nodes) -// yaml_free(node.tag) -// switch (node.type) { -// case YAML_SCALAR_NODE: -// yaml_free(node.data.scalar.value) -// break -// case YAML_SEQUENCE_NODE: -// STACK_DEL(&context, node.data.sequence.items) -// break -// case YAML_MAPPING_NODE: -// STACK_DEL(&context, node.data.mapping.pairs) -// break -// default: -// assert(0) // Should not happen. -// } -// } -// STACK_DEL(&context, document.nodes) -// -// yaml_free(document.version_directive) -// for (tag_directive = document.tag_directives.start -// tag_directive != document.tag_directives.end -// tag_directive++) { -// yaml_free(tag_directive.handle) -// yaml_free(tag_directive.prefix) -// } -// yaml_free(document.tag_directives.start) -// -// memset(document, 0, sizeof(yaml_document_t)) -//} -// -///** -// * Get a document node. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_node(document *yaml_document_t, index int) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (index > 0 && document.nodes.start + index <= document.nodes.top) { -// return document.nodes.start + index - 1 -// } -// return NULL -//} -// -///** -// * Get the root object. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_root_node(document *yaml_document_t) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (document.nodes.top != document.nodes.start) { -// return document.nodes.start -// } -// return NULL -//} -// -///* -// * Add a scalar node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_scalar(document *yaml_document_t, -// tag *yaml_char_t, value *yaml_char_t, length int, -// style yaml_scalar_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// value_copy *yaml_char_t = NULL -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// assert(value) // Non-NULL value is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (length < 0) { -// length = strlen((char *)value) -// } -// -// if (!yaml_check_utf8(value, length)) goto error -// value_copy = yaml_malloc(length+1) -// if (!value_copy) goto error -// memcpy(value_copy, value, length) -// value_copy[length] = '\0' -// -// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// yaml_free(tag_copy) -// yaml_free(value_copy) -// -// return 0 -//} -// -///* -// * Add a sequence node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_sequence(document *yaml_document_t, -// tag *yaml_char_t, style yaml_sequence_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_item_t -// end *yaml_node_item_t -// top *yaml_node_item_t -// } items = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error -// -// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, items) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Add a mapping node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_mapping(document *yaml_document_t, -// tag *yaml_char_t, style yaml_mapping_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_pair_t -// end *yaml_node_pair_t -// top *yaml_node_pair_t -// } pairs = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error -// -// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, pairs) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Append an item to a sequence node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_sequence_item(document *yaml_document_t, -// sequence int, item int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// assert(document) // Non-NULL document is required. -// assert(sequence > 0 -// && document.nodes.start + sequence <= document.nodes.top) -// // Valid sequence id is required. -// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) -// // A sequence node is required. -// assert(item > 0 && document.nodes.start + item <= document.nodes.top) -// // Valid item id is required. -// -// if (!PUSH(&context, -// document.nodes.start[sequence-1].data.sequence.items, item)) -// return 0 -// -// return 1 -//} -// -///* -// * Append a pair of a key and a value to a mapping node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_mapping_pair(document *yaml_document_t, -// mapping int, key int, value int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// pair yaml_node_pair_t -// -// assert(document) // Non-NULL document is required. -// assert(mapping > 0 -// && document.nodes.start + mapping <= document.nodes.top) -// // Valid mapping id is required. -// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) -// // A mapping node is required. -// assert(key > 0 && document.nodes.start + key <= document.nodes.top) -// // Valid key id is required. -// assert(value > 0 && document.nodes.start + value <= document.nodes.top) -// // Valid value id is required. -// -// pair.key = key -// pair.value = value -// -// if (!PUSH(&context, -// document.nodes.start[mapping-1].data.mapping.pairs, pair)) -// return 0 -// -// return 1 -//} -// -// diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go deleted file mode 100644 index 129bc2a97d..0000000000 --- a/vendor/gopkg.in/yaml.v2/decode.go +++ /dev/null @@ -1,815 +0,0 @@ -package yaml - -import ( - "encoding" - "encoding/base64" - "fmt" - "io" - "math" - "reflect" - "strconv" - "time" -) - -const ( - documentNode = 1 << iota - mappingNode - sequenceNode - scalarNode - aliasNode -) - -type node struct { - kind int - line, column int - tag string - // For an alias node, alias holds the resolved alias. - alias *node - value string - implicit bool - children []*node - anchors map[string]*node -} - -// ---------------------------------------------------------------------------- -// Parser, produces a node tree out of a libyaml event stream. - -type parser struct { - parser yaml_parser_t - event yaml_event_t - doc *node - doneInit bool -} - -func newParser(b []byte) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - if len(b) == 0 { - b = []byte{'\n'} - } - yaml_parser_set_input_string(&p.parser, b) - return &p -} - -func newParserFromReader(r io.Reader) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - yaml_parser_set_input_reader(&p.parser, r) - return &p -} - -func (p *parser) init() { - if p.doneInit { - return - } - p.expect(yaml_STREAM_START_EVENT) - p.doneInit = true -} - -func (p *parser) destroy() { - if p.event.typ != yaml_NO_EVENT { - yaml_event_delete(&p.event) - } - yaml_parser_delete(&p.parser) -} - -// expect consumes an event from the event stream and -// checks that it's of the expected type. -func (p *parser) expect(e yaml_event_type_t) { - if p.event.typ == yaml_NO_EVENT { - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } - } - if p.event.typ == yaml_STREAM_END_EVENT { - failf("attempted to go past the end of stream; corrupted value?") - } - if p.event.typ != e { - p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) - p.fail() - } - yaml_event_delete(&p.event) - p.event.typ = yaml_NO_EVENT -} - -// peek peeks at the next event in the event stream, -// puts the results into p.event and returns the event type. -func (p *parser) peek() yaml_event_type_t { - if p.event.typ != yaml_NO_EVENT { - return p.event.typ - } - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } - return p.event.typ -} - -func (p *parser) fail() { - var where string - var line int - if p.parser.problem_mark.line != 0 { - line = p.parser.problem_mark.line - // Scanner errors don't iterate line before returning error - if p.parser.error == yaml_SCANNER_ERROR { - line++ - } - } else if p.parser.context_mark.line != 0 { - line = p.parser.context_mark.line - } - if line != 0 { - where = "line " + strconv.Itoa(line) + ": " - } - var msg string - if len(p.parser.problem) > 0 { - msg = p.parser.problem - } else { - msg = "unknown problem parsing YAML content" - } - failf("%s%s", where, msg) -} - -func (p *parser) anchor(n *node, anchor []byte) { - if anchor != nil { - p.doc.anchors[string(anchor)] = n - } -} - -func (p *parser) parse() *node { - p.init() - switch p.peek() { - case yaml_SCALAR_EVENT: - return p.scalar() - case yaml_ALIAS_EVENT: - return p.alias() - case yaml_MAPPING_START_EVENT: - return p.mapping() - case yaml_SEQUENCE_START_EVENT: - return p.sequence() - case yaml_DOCUMENT_START_EVENT: - return p.document() - case yaml_STREAM_END_EVENT: - // Happens when attempting to decode an empty buffer. - return nil - default: - panic("attempted to parse unknown event: " + p.event.typ.String()) - } -} - -func (p *parser) node(kind int) *node { - return &node{ - kind: kind, - line: p.event.start_mark.line, - column: p.event.start_mark.column, - } -} - -func (p *parser) document() *node { - n := p.node(documentNode) - n.anchors = make(map[string]*node) - p.doc = n - p.expect(yaml_DOCUMENT_START_EVENT) - n.children = append(n.children, p.parse()) - p.expect(yaml_DOCUMENT_END_EVENT) - return n -} - -func (p *parser) alias() *node { - n := p.node(aliasNode) - n.value = string(p.event.anchor) - n.alias = p.doc.anchors[n.value] - if n.alias == nil { - failf("unknown anchor '%s' referenced", n.value) - } - p.expect(yaml_ALIAS_EVENT) - return n -} - -func (p *parser) scalar() *node { - n := p.node(scalarNode) - n.value = string(p.event.value) - n.tag = string(p.event.tag) - n.implicit = p.event.implicit - p.anchor(n, p.event.anchor) - p.expect(yaml_SCALAR_EVENT) - return n -} - -func (p *parser) sequence() *node { - n := p.node(sequenceNode) - p.anchor(n, p.event.anchor) - p.expect(yaml_SEQUENCE_START_EVENT) - for p.peek() != yaml_SEQUENCE_END_EVENT { - n.children = append(n.children, p.parse()) - } - p.expect(yaml_SEQUENCE_END_EVENT) - return n -} - -func (p *parser) mapping() *node { - n := p.node(mappingNode) - p.anchor(n, p.event.anchor) - p.expect(yaml_MAPPING_START_EVENT) - for p.peek() != yaml_MAPPING_END_EVENT { - n.children = append(n.children, p.parse(), p.parse()) - } - p.expect(yaml_MAPPING_END_EVENT) - return n -} - -// ---------------------------------------------------------------------------- -// Decoder, unmarshals a node into a provided value. - -type decoder struct { - doc *node - aliases map[*node]bool - mapType reflect.Type - terrors []string - strict bool - - decodeCount int - aliasCount int - aliasDepth int -} - -var ( - mapItemType = reflect.TypeOf(MapItem{}) - durationType = reflect.TypeOf(time.Duration(0)) - defaultMapType = reflect.TypeOf(map[interface{}]interface{}{}) - ifaceType = defaultMapType.Elem() - timeType = reflect.TypeOf(time.Time{}) - ptrTimeType = reflect.TypeOf(&time.Time{}) -) - -func newDecoder(strict bool) *decoder { - d := &decoder{mapType: defaultMapType, strict: strict} - d.aliases = make(map[*node]bool) - return d -} - -func (d *decoder) terror(n *node, tag string, out reflect.Value) { - if n.tag != "" { - tag = n.tag - } - value := n.value - if tag != yaml_SEQ_TAG && tag != yaml_MAP_TAG { - if len(value) > 10 { - value = " `" + value[:7] + "...`" - } else { - value = " `" + value + "`" - } - } - d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.line+1, shortTag(tag), value, out.Type())) -} - -func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { - terrlen := len(d.terrors) - err := u.UnmarshalYAML(func(v interface{}) (err error) { - defer handleErr(&err) - d.unmarshal(n, reflect.ValueOf(v)) - if len(d.terrors) > terrlen { - issues := d.terrors[terrlen:] - d.terrors = d.terrors[:terrlen] - return &TypeError{issues} - } - return nil - }) - if e, ok := err.(*TypeError); ok { - d.terrors = append(d.terrors, e.Errors...) - return false - } - if err != nil { - fail(err) - } - return true -} - -// d.prepare initializes and dereferences pointers and calls UnmarshalYAML -// if a value is found to implement it. -// It returns the initialized and dereferenced out value, whether -// unmarshalling was already done by UnmarshalYAML, and if so whether -// its types unmarshalled appropriately. -// -// If n holds a null value, prepare returns before doing anything. -func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { - if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "~" || n.value == "" && n.implicit) { - return out, false, false - } - again := true - for again { - again = false - if out.Kind() == reflect.Ptr { - if out.IsNil() { - out.Set(reflect.New(out.Type().Elem())) - } - out = out.Elem() - again = true - } - if out.CanAddr() { - if u, ok := out.Addr().Interface().(Unmarshaler); ok { - good = d.callUnmarshaler(n, u) - return out, true, good - } - } - } - return out, false, false -} - -const ( - // 400,000 decode operations is ~500kb of dense object declarations, or - // ~5kb of dense object declarations with 10000% alias expansion - alias_ratio_range_low = 400000 - - // 4,000,000 decode operations is ~5MB of dense object declarations, or - // ~4.5MB of dense object declarations with 10% alias expansion - alias_ratio_range_high = 4000000 - - // alias_ratio_range is the range over which we scale allowed alias ratios - alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) -) - -func allowedAliasRatio(decodeCount int) float64 { - switch { - case decodeCount <= alias_ratio_range_low: - // allow 99% to come from alias expansion for small-to-medium documents - return 0.99 - case decodeCount >= alias_ratio_range_high: - // allow 10% to come from alias expansion for very large documents - return 0.10 - default: - // scale smoothly from 99% down to 10% over the range. - // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. - // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). - return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) - } -} - -func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) { - d.decodeCount++ - if d.aliasDepth > 0 { - d.aliasCount++ - } - if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { - failf("document contains excessive aliasing") - } - switch n.kind { - case documentNode: - return d.document(n, out) - case aliasNode: - return d.alias(n, out) - } - out, unmarshaled, good := d.prepare(n, out) - if unmarshaled { - return good - } - switch n.kind { - case scalarNode: - good = d.scalar(n, out) - case mappingNode: - good = d.mapping(n, out) - case sequenceNode: - good = d.sequence(n, out) - default: - panic("internal error: unknown node kind: " + strconv.Itoa(n.kind)) - } - return good -} - -func (d *decoder) document(n *node, out reflect.Value) (good bool) { - if len(n.children) == 1 { - d.doc = n - d.unmarshal(n.children[0], out) - return true - } - return false -} - -func (d *decoder) alias(n *node, out reflect.Value) (good bool) { - if d.aliases[n] { - // TODO this could actually be allowed in some circumstances. - failf("anchor '%s' value contains itself", n.value) - } - d.aliases[n] = true - d.aliasDepth++ - good = d.unmarshal(n.alias, out) - d.aliasDepth-- - delete(d.aliases, n) - return good -} - -var zeroValue reflect.Value - -func resetMap(out reflect.Value) { - for _, k := range out.MapKeys() { - out.SetMapIndex(k, zeroValue) - } -} - -func (d *decoder) scalar(n *node, out reflect.Value) bool { - var tag string - var resolved interface{} - if n.tag == "" && !n.implicit { - tag = yaml_STR_TAG - resolved = n.value - } else { - tag, resolved = resolve(n.tag, n.value) - if tag == yaml_BINARY_TAG { - data, err := base64.StdEncoding.DecodeString(resolved.(string)) - if err != nil { - failf("!!binary value contains invalid base64 data") - } - resolved = string(data) - } - } - if resolved == nil { - if out.Kind() == reflect.Map && !out.CanAddr() { - resetMap(out) - } else { - out.Set(reflect.Zero(out.Type())) - } - return true - } - if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { - // We've resolved to exactly the type we want, so use that. - out.Set(resolvedv) - return true - } - // Perhaps we can use the value as a TextUnmarshaler to - // set its value. - if out.CanAddr() { - u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) - if ok { - var text []byte - if tag == yaml_BINARY_TAG { - text = []byte(resolved.(string)) - } else { - // We let any value be unmarshaled into TextUnmarshaler. - // That might be more lax than we'd like, but the - // TextUnmarshaler itself should bowl out any dubious values. - text = []byte(n.value) - } - err := u.UnmarshalText(text) - if err != nil { - fail(err) - } - return true - } - } - switch out.Kind() { - case reflect.String: - if tag == yaml_BINARY_TAG { - out.SetString(resolved.(string)) - return true - } - if resolved != nil { - out.SetString(n.value) - return true - } - case reflect.Interface: - if resolved == nil { - out.Set(reflect.Zero(out.Type())) - } else if tag == yaml_TIMESTAMP_TAG { - // It looks like a timestamp but for backward compatibility - // reasons we set it as a string, so that code that unmarshals - // timestamp-like values into interface{} will continue to - // see a string and not a time.Time. - // TODO(v3) Drop this. - out.Set(reflect.ValueOf(n.value)) - } else { - out.Set(reflect.ValueOf(resolved)) - } - return true - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch resolved := resolved.(type) { - case int: - if !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case int64: - if !out.OverflowInt(resolved) { - out.SetInt(resolved) - return true - } - case uint64: - if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case float64: - if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - return true - } - case string: - if out.Type() == durationType { - d, err := time.ParseDuration(resolved) - if err == nil { - out.SetInt(int64(d)) - return true - } - } - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch resolved := resolved.(type) { - case int: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case int64: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case uint64: - if !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - case float64: - if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - return true - } - } - case reflect.Bool: - switch resolved := resolved.(type) { - case bool: - out.SetBool(resolved) - return true - } - case reflect.Float32, reflect.Float64: - switch resolved := resolved.(type) { - case int: - out.SetFloat(float64(resolved)) - return true - case int64: - out.SetFloat(float64(resolved)) - return true - case uint64: - out.SetFloat(float64(resolved)) - return true - case float64: - out.SetFloat(resolved) - return true - } - case reflect.Struct: - if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { - out.Set(resolvedv) - return true - } - case reflect.Ptr: - if out.Type().Elem() == reflect.TypeOf(resolved) { - // TODO DOes this make sense? When is out a Ptr except when decoding a nil value? - elem := reflect.New(out.Type().Elem()) - elem.Elem().Set(reflect.ValueOf(resolved)) - out.Set(elem) - return true - } - } - d.terror(n, tag, out) - return false -} - -func settableValueOf(i interface{}) reflect.Value { - v := reflect.ValueOf(i) - sv := reflect.New(v.Type()).Elem() - sv.Set(v) - return sv -} - -func (d *decoder) sequence(n *node, out reflect.Value) (good bool) { - l := len(n.children) - - var iface reflect.Value - switch out.Kind() { - case reflect.Slice: - out.Set(reflect.MakeSlice(out.Type(), l, l)) - case reflect.Array: - if l != out.Len() { - failf("invalid array: want %d elements but got %d", out.Len(), l) - } - case reflect.Interface: - // No type hints. Will have to use a generic sequence. - iface = out - out = settableValueOf(make([]interface{}, l)) - default: - d.terror(n, yaml_SEQ_TAG, out) - return false - } - et := out.Type().Elem() - - j := 0 - for i := 0; i < l; i++ { - e := reflect.New(et).Elem() - if ok := d.unmarshal(n.children[i], e); ok { - out.Index(j).Set(e) - j++ - } - } - if out.Kind() != reflect.Array { - out.Set(out.Slice(0, j)) - } - if iface.IsValid() { - iface.Set(out) - } - return true -} - -func (d *decoder) mapping(n *node, out reflect.Value) (good bool) { - switch out.Kind() { - case reflect.Struct: - return d.mappingStruct(n, out) - case reflect.Slice: - return d.mappingSlice(n, out) - case reflect.Map: - // okay - case reflect.Interface: - if d.mapType.Kind() == reflect.Map { - iface := out - out = reflect.MakeMap(d.mapType) - iface.Set(out) - } else { - slicev := reflect.New(d.mapType).Elem() - if !d.mappingSlice(n, slicev) { - return false - } - out.Set(slicev) - return true - } - default: - d.terror(n, yaml_MAP_TAG, out) - return false - } - outt := out.Type() - kt := outt.Key() - et := outt.Elem() - - mapType := d.mapType - if outt.Key() == ifaceType && outt.Elem() == ifaceType { - d.mapType = outt - } - - if out.IsNil() { - out.Set(reflect.MakeMap(outt)) - } - l := len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - k := reflect.New(kt).Elem() - if d.unmarshal(n.children[i], k) { - kkind := k.Kind() - if kkind == reflect.Interface { - kkind = k.Elem().Kind() - } - if kkind == reflect.Map || kkind == reflect.Slice { - failf("invalid map key: %#v", k.Interface()) - } - e := reflect.New(et).Elem() - if d.unmarshal(n.children[i+1], e) { - d.setMapIndex(n.children[i+1], out, k, e) - } - } - } - d.mapType = mapType - return true -} - -func (d *decoder) setMapIndex(n *node, out, k, v reflect.Value) { - if d.strict && out.MapIndex(k) != zeroValue { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: key %#v already set in map", n.line+1, k.Interface())) - return - } - out.SetMapIndex(k, v) -} - -func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) { - outt := out.Type() - if outt.Elem() != mapItemType { - d.terror(n, yaml_MAP_TAG, out) - return false - } - - mapType := d.mapType - d.mapType = outt - - var slice []MapItem - var l = len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - item := MapItem{} - k := reflect.ValueOf(&item.Key).Elem() - if d.unmarshal(n.children[i], k) { - v := reflect.ValueOf(&item.Value).Elem() - if d.unmarshal(n.children[i+1], v) { - slice = append(slice, item) - } - } - } - out.Set(reflect.ValueOf(slice)) - d.mapType = mapType - return true -} - -func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { - sinfo, err := getStructInfo(out.Type()) - if err != nil { - panic(err) - } - name := settableValueOf("") - l := len(n.children) - - var inlineMap reflect.Value - var elemType reflect.Type - if sinfo.InlineMap != -1 { - inlineMap = out.Field(sinfo.InlineMap) - inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) - elemType = inlineMap.Type().Elem() - } - - var doneFields []bool - if d.strict { - doneFields = make([]bool, len(sinfo.FieldsList)) - } - for i := 0; i < l; i += 2 { - ni := n.children[i] - if isMerge(ni) { - d.merge(n.children[i+1], out) - continue - } - if !d.unmarshal(ni, name) { - continue - } - if info, ok := sinfo.FieldsMap[name.String()]; ok { - if d.strict { - if doneFields[info.Id] { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.line+1, name.String(), out.Type())) - continue - } - doneFields[info.Id] = true - } - var field reflect.Value - if info.Inline == nil { - field = out.Field(info.Num) - } else { - field = out.FieldByIndex(info.Inline) - } - d.unmarshal(n.children[i+1], field) - } else if sinfo.InlineMap != -1 { - if inlineMap.IsNil() { - inlineMap.Set(reflect.MakeMap(inlineMap.Type())) - } - value := reflect.New(elemType).Elem() - d.unmarshal(n.children[i+1], value) - d.setMapIndex(n.children[i+1], inlineMap, name, value) - } else if d.strict { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.line+1, name.String(), out.Type())) - } - } - return true -} - -func failWantMap() { - failf("map merge requires map or sequence of maps as the value") -} - -func (d *decoder) merge(n *node, out reflect.Value) { - switch n.kind { - case mappingNode: - d.unmarshal(n, out) - case aliasNode: - if n.alias != nil && n.alias.kind != mappingNode { - failWantMap() - } - d.unmarshal(n, out) - case sequenceNode: - // Step backwards as earlier nodes take precedence. - for i := len(n.children) - 1; i >= 0; i-- { - ni := n.children[i] - if ni.kind == aliasNode { - if ni.alias != nil && ni.alias.kind != mappingNode { - failWantMap() - } - } else if ni.kind != mappingNode { - failWantMap() - } - d.unmarshal(ni, out) - } - default: - failWantMap() - } -} - -func isMerge(n *node) bool { - return n.kind == scalarNode && n.value == "<<" && (n.implicit == true || n.tag == yaml_MERGE_TAG) -} diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go deleted file mode 100644 index a1c2cc5262..0000000000 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ /dev/null @@ -1,1685 +0,0 @@ -package yaml - -import ( - "bytes" - "fmt" -) - -// Flush the buffer if needed. -func flush(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) { - return yaml_emitter_flush(emitter) - } - return true -} - -// Put a character to the output buffer. -func put(emitter *yaml_emitter_t, value byte) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - emitter.buffer[emitter.buffer_pos] = value - emitter.buffer_pos++ - emitter.column++ - return true -} - -// Put a line break to the output buffer. -func put_break(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - switch emitter.line_break { - case yaml_CR_BREAK: - emitter.buffer[emitter.buffer_pos] = '\r' - emitter.buffer_pos += 1 - case yaml_LN_BREAK: - emitter.buffer[emitter.buffer_pos] = '\n' - emitter.buffer_pos += 1 - case yaml_CRLN_BREAK: - emitter.buffer[emitter.buffer_pos+0] = '\r' - emitter.buffer[emitter.buffer_pos+1] = '\n' - emitter.buffer_pos += 2 - default: - panic("unknown line break setting") - } - emitter.column = 0 - emitter.line++ - return true -} - -// Copy a character from a string into buffer. -func write(emitter *yaml_emitter_t, s []byte, i *int) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - p := emitter.buffer_pos - w := width(s[*i]) - switch w { - case 4: - emitter.buffer[p+3] = s[*i+3] - fallthrough - case 3: - emitter.buffer[p+2] = s[*i+2] - fallthrough - case 2: - emitter.buffer[p+1] = s[*i+1] - fallthrough - case 1: - emitter.buffer[p+0] = s[*i+0] - default: - panic("unknown character width") - } - emitter.column++ - emitter.buffer_pos += w - *i += w - return true -} - -// Write a whole string into buffer. -func write_all(emitter *yaml_emitter_t, s []byte) bool { - for i := 0; i < len(s); { - if !write(emitter, s, &i) { - return false - } - } - return true -} - -// Copy a line break character from a string into buffer. -func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { - if s[*i] == '\n' { - if !put_break(emitter) { - return false - } - *i++ - } else { - if !write(emitter, s, i) { - return false - } - emitter.column = 0 - emitter.line++ - } - return true -} - -// Set an emitter error and return false. -func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_EMITTER_ERROR - emitter.problem = problem - return false -} - -// Emit an event. -func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.events = append(emitter.events, *event) - for !yaml_emitter_need_more_events(emitter) { - event := &emitter.events[emitter.events_head] - if !yaml_emitter_analyze_event(emitter, event) { - return false - } - if !yaml_emitter_state_machine(emitter, event) { - return false - } - yaml_event_delete(event) - emitter.events_head++ - } - return true -} - -// Check if we need to accumulate more events before emitting. -// -// We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// -func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { - if emitter.events_head == len(emitter.events) { - return true - } - var accumulate int - switch emitter.events[emitter.events_head].typ { - case yaml_DOCUMENT_START_EVENT: - accumulate = 1 - break - case yaml_SEQUENCE_START_EVENT: - accumulate = 2 - break - case yaml_MAPPING_START_EVENT: - accumulate = 3 - break - default: - return false - } - if len(emitter.events)-emitter.events_head > accumulate { - return false - } - var level int - for i := emitter.events_head; i < len(emitter.events); i++ { - switch emitter.events[i].typ { - case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: - level++ - case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: - level-- - } - if level == 0 { - return false - } - } - return true -} - -// Append a directive to the directives stack. -func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { - for i := 0; i < len(emitter.tag_directives); i++ { - if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") - } - } - - // [Go] Do we actually need to copy this given garbage collection - // and the lack of deallocating destructors? - tag_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(tag_copy.handle, value.handle) - copy(tag_copy.prefix, value.prefix) - emitter.tag_directives = append(emitter.tag_directives, tag_copy) - return true -} - -// Increase the indentation level. -func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { - emitter.indents = append(emitter.indents, emitter.indent) - if emitter.indent < 0 { - if flow { - emitter.indent = emitter.best_indent - } else { - emitter.indent = 0 - } - } else if !indentless { - emitter.indent += emitter.best_indent - } - return true -} - -// State dispatcher. -func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { - switch emitter.state { - default: - case yaml_EMIT_STREAM_START_STATE: - return yaml_emitter_emit_stream_start(emitter, event) - - case yaml_EMIT_FIRST_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, true) - - case yaml_EMIT_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, false) - - case yaml_EMIT_DOCUMENT_CONTENT_STATE: - return yaml_emitter_emit_document_content(emitter, event) - - case yaml_EMIT_DOCUMENT_END_STATE: - return yaml_emitter_emit_document_end(emitter, event) - - case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, true) - - case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, false) - - case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, true) - - case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, false) - - case yaml_EMIT_END_STATE: - return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") - } - panic("invalid emitter state") -} - -// Expect STREAM-START. -func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_STREAM_START_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") - } - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = event.encoding - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = yaml_UTF8_ENCODING - } - } - if emitter.best_indent < 2 || emitter.best_indent > 9 { - emitter.best_indent = 2 - } - if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { - emitter.best_width = 80 - } - if emitter.best_width < 0 { - emitter.best_width = 1<<31 - 1 - } - if emitter.line_break == yaml_ANY_BREAK { - emitter.line_break = yaml_LN_BREAK - } - - emitter.indent = -1 - emitter.line = 0 - emitter.column = 0 - emitter.whitespace = true - emitter.indention = true - - if emitter.encoding != yaml_UTF8_ENCODING { - if !yaml_emitter_write_bom(emitter) { - return false - } - } - emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE - return true -} - -// Expect DOCUMENT-START or STREAM-END. -func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - - if event.typ == yaml_DOCUMENT_START_EVENT { - - if event.version_directive != nil { - if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { - return false - } - } - - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { - return false - } - if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { - return false - } - } - - for i := 0; i < len(default_tag_directives); i++ { - tag_directive := &default_tag_directives[i] - if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { - return false - } - } - - implicit := event.implicit - if !first || emitter.canonical { - implicit = false - } - - if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if event.version_directive != nil { - implicit = false - if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if len(event.tag_directives) > 0 { - implicit = false - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { - return false - } - if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - if yaml_emitter_check_empty_document(emitter) { - implicit = false - } - if !implicit { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { - return false - } - if emitter.canonical { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE - return true - } - - if event.typ == yaml_STREAM_END_EVENT { - if emitter.open_ended { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_END_STATE - return true - } - - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") -} - -// Expect the root node. -func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) - return yaml_emitter_emit_node(emitter, event, true, false, false, false) -} - -// Expect DOCUMENT-END. -func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_DOCUMENT_END_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !event.implicit { - // [Go] Allocate the slice elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_DOCUMENT_START_STATE - emitter.tag_directives = emitter.tag_directives[:0] - return true -} - -// Expect a flow item node. -func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a flow key node. -func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_MAPPING_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a flow value node. -func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block item node. -func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, emitter.mapping_context && !emitter.indention) { - return false - } - } - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a block key node. -func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, false) { - return false - } - } - if event.typ == yaml_MAPPING_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block value node. -func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a node. -func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, - root bool, sequence bool, mapping bool, simple_key bool) bool { - - emitter.root_context = root - emitter.sequence_context = sequence - emitter.mapping_context = mapping - emitter.simple_key_context = simple_key - - switch event.typ { - case yaml_ALIAS_EVENT: - return yaml_emitter_emit_alias(emitter, event) - case yaml_SCALAR_EVENT: - return yaml_emitter_emit_scalar(emitter, event) - case yaml_SEQUENCE_START_EVENT: - return yaml_emitter_emit_sequence_start(emitter, event) - case yaml_MAPPING_START_EVENT: - return yaml_emitter_emit_mapping_start(emitter, event) - default: - return yaml_emitter_set_emitter_error(emitter, - fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) - } -} - -// Expect ALIAS. -func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SCALAR. -func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_select_scalar_style(emitter, event) { - return false - } - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - if !yaml_emitter_process_scalar(emitter) { - return false - } - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SEQUENCE-START. -func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || - yaml_emitter_check_empty_sequence(emitter) { - emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE - } - return true -} - -// Expect MAPPING-START. -func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || - yaml_emitter_check_empty_mapping(emitter) { - emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE - } - return true -} - -// Check if the document content is an empty scalar. -func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { - return false // [Go] Huh? -} - -// Check if the next events represent an empty sequence. -func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT -} - -// Check if the next events represent an empty mapping. -func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT -} - -// Check if the next node can be expressed as a simple key. -func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { - length := 0 - switch emitter.events[emitter.events_head].typ { - case yaml_ALIAS_EVENT: - length += len(emitter.anchor_data.anchor) - case yaml_SCALAR_EVENT: - if emitter.scalar_data.multiline { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) + - len(emitter.scalar_data.value) - case yaml_SEQUENCE_START_EVENT: - if !yaml_emitter_check_empty_sequence(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - case yaml_MAPPING_START_EVENT: - if !yaml_emitter_check_empty_mapping(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - default: - return false - } - return length <= 128 -} - -// Determine an acceptable scalar style. -func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 - if no_tag && !event.implicit && !event.quoted_implicit { - return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") - } - - style := event.scalar_style() - if style == yaml_ANY_SCALAR_STYLE { - style = yaml_PLAIN_SCALAR_STYLE - } - if emitter.canonical { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - if emitter.simple_key_context && emitter.scalar_data.multiline { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - - if style == yaml_PLAIN_SCALAR_STYLE { - if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || - emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if no_tag && !event.implicit { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { - if !emitter.scalar_data.single_quoted_allowed { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { - if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - - if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { - emitter.tag_data.handle = []byte{'!'} - } - emitter.scalar_data.style = style - return true -} - -// Write an anchor. -func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { - if emitter.anchor_data.anchor == nil { - return true - } - c := []byte{'&'} - if emitter.anchor_data.alias { - c[0] = '*' - } - if !yaml_emitter_write_indicator(emitter, c, true, false, false) { - return false - } - return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) -} - -// Write a tag. -func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { - if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { - return true - } - if len(emitter.tag_data.handle) > 0 { - if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { - return false - } - if len(emitter.tag_data.suffix) > 0 { - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - } - } else { - // [Go] Allocate these slices elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { - return false - } - } - return true -} - -// Write a scalar. -func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { - switch emitter.scalar_data.style { - case yaml_PLAIN_SCALAR_STYLE: - return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_SINGLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_DOUBLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_LITERAL_SCALAR_STYLE: - return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) - - case yaml_FOLDED_SCALAR_STYLE: - return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) - } - panic("unknown scalar style") -} - -// Check if a %YAML directive is valid. -func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { - if version_directive.major != 1 || version_directive.minor != 1 { - return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") - } - return true -} - -// Check if a %TAG directive is valid. -func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { - handle := tag_directive.handle - prefix := tag_directive.prefix - if len(handle) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") - } - if handle[0] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") - } - if handle[len(handle)-1] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") - } - for i := 1; i < len(handle)-1; i += width(handle[i]) { - if !is_alpha(handle, i) { - return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") - } - } - if len(prefix) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") - } - return true -} - -// Check if an anchor is valid. -func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { - if len(anchor) == 0 { - problem := "anchor value must not be empty" - if alias { - problem = "alias value must not be empty" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - for i := 0; i < len(anchor); i += width(anchor[i]) { - if !is_alpha(anchor, i) { - problem := "anchor value must contain alphanumerical characters only" - if alias { - problem = "alias value must contain alphanumerical characters only" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - } - emitter.anchor_data.anchor = anchor - emitter.anchor_data.alias = alias - return true -} - -// Check if a tag is valid. -func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { - if len(tag) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") - } - for i := 0; i < len(emitter.tag_directives); i++ { - tag_directive := &emitter.tag_directives[i] - if bytes.HasPrefix(tag, tag_directive.prefix) { - emitter.tag_data.handle = tag_directive.handle - emitter.tag_data.suffix = tag[len(tag_directive.prefix):] - return true - } - } - emitter.tag_data.suffix = tag - return true -} - -// Check if a scalar is valid. -func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { - var ( - block_indicators = false - flow_indicators = false - line_breaks = false - special_characters = false - - leading_space = false - leading_break = false - trailing_space = false - trailing_break = false - break_space = false - space_break = false - - preceded_by_whitespace = false - followed_by_whitespace = false - previous_space = false - previous_break = false - ) - - emitter.scalar_data.value = value - - if len(value) == 0 { - emitter.scalar_data.multiline = false - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = false - return true - } - - if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { - block_indicators = true - flow_indicators = true - } - - preceded_by_whitespace = true - for i, w := 0, 0; i < len(value); i += w { - w = width(value[i]) - followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) - - if i == 0 { - switch value[i] { - case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': - flow_indicators = true - block_indicators = true - case '?', ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '-': - if followed_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } else { - switch value[i] { - case ',', '?', '[', ']', '{', '}': - flow_indicators = true - case ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '#': - if preceded_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } - - if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { - special_characters = true - } - if is_space(value, i) { - if i == 0 { - leading_space = true - } - if i+width(value[i]) == len(value) { - trailing_space = true - } - if previous_break { - break_space = true - } - previous_space = true - previous_break = false - } else if is_break(value, i) { - line_breaks = true - if i == 0 { - leading_break = true - } - if i+width(value[i]) == len(value) { - trailing_break = true - } - if previous_space { - space_break = true - } - previous_space = false - previous_break = true - } else { - previous_space = false - previous_break = false - } - - // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceded_by_whitespace = is_blankz(value, i) - } - - emitter.scalar_data.multiline = line_breaks - emitter.scalar_data.flow_plain_allowed = true - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = true - - if leading_space || leading_break || trailing_space || trailing_break { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if trailing_space { - emitter.scalar_data.block_allowed = false - } - if break_space { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - } - if space_break || special_characters { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - emitter.scalar_data.block_allowed = false - } - if line_breaks { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if flow_indicators { - emitter.scalar_data.flow_plain_allowed = false - } - if block_indicators { - emitter.scalar_data.block_plain_allowed = false - } - return true -} - -// Check if the event data is valid. -func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - emitter.anchor_data.anchor = nil - emitter.tag_data.handle = nil - emitter.tag_data.suffix = nil - emitter.scalar_data.value = nil - - switch event.typ { - case yaml_ALIAS_EVENT: - if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { - return false - } - - case yaml_SCALAR_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - if !yaml_emitter_analyze_scalar(emitter, event.value) { - return false - } - - case yaml_SEQUENCE_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - - case yaml_MAPPING_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - } - return true -} - -// Write the BOM character. -func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { - if !flush(emitter) { - return false - } - pos := emitter.buffer_pos - emitter.buffer[pos+0] = '\xEF' - emitter.buffer[pos+1] = '\xBB' - emitter.buffer[pos+2] = '\xBF' - emitter.buffer_pos += 3 - return true -} - -func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { - indent := emitter.indent - if indent < 0 { - indent = 0 - } - if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { - if !put_break(emitter) { - return false - } - } - for emitter.column < indent { - if !put(emitter, ' ') { - return false - } - } - emitter.whitespace = true - emitter.indention = true - return true -} - -func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, indicator) { - return false - } - emitter.whitespace = is_whitespace - emitter.indention = (emitter.indention && is_indention) - emitter.open_ended = false - return true -} - -func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - for i := 0; i < len(value); { - var must_write bool - switch value[i] { - case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': - must_write = true - default: - must_write = is_alpha(value, i) - } - if must_write { - if !write(emitter, value, &i) { - return false - } - } else { - w := width(value[i]) - for k := 0; k < w; k++ { - octet := value[i] - i++ - if !put(emitter, '%') { - return false - } - - c := octet >> 4 - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - - c = octet & 0x0f - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - } - } - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - - emitter.whitespace = false - emitter.indention = false - if emitter.root_context { - emitter.open_ended = true - } - - return true -} - -func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { - return false - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if value[i] == '\'' { - if !put(emitter, '\'') { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - spaces := false - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { - return false - } - - for i := 0; i < len(value); { - if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || - is_bom(value, i) || is_break(value, i) || - value[i] == '"' || value[i] == '\\' { - - octet := value[i] - - var w int - var v rune - switch { - case octet&0x80 == 0x00: - w, v = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, v = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, v = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, v = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = value[i+k] - v = (v << 6) + (rune(octet) & 0x3F) - } - i += w - - if !put(emitter, '\\') { - return false - } - - var ok bool - switch v { - case 0x00: - ok = put(emitter, '0') - case 0x07: - ok = put(emitter, 'a') - case 0x08: - ok = put(emitter, 'b') - case 0x09: - ok = put(emitter, 't') - case 0x0A: - ok = put(emitter, 'n') - case 0x0b: - ok = put(emitter, 'v') - case 0x0c: - ok = put(emitter, 'f') - case 0x0d: - ok = put(emitter, 'r') - case 0x1b: - ok = put(emitter, 'e') - case 0x22: - ok = put(emitter, '"') - case 0x5c: - ok = put(emitter, '\\') - case 0x85: - ok = put(emitter, 'N') - case 0xA0: - ok = put(emitter, '_') - case 0x2028: - ok = put(emitter, 'L') - case 0x2029: - ok = put(emitter, 'P') - default: - if v <= 0xFF { - ok = put(emitter, 'x') - w = 2 - } else if v <= 0xFFFF { - ok = put(emitter, 'u') - w = 4 - } else { - ok = put(emitter, 'U') - w = 8 - } - for k := (w - 1) * 4; ok && k >= 0; k -= 4 { - digit := byte((v >> uint(k)) & 0x0F) - if digit < 10 { - ok = put(emitter, digit+'0') - } else { - ok = put(emitter, digit+'A'-10) - } - } - } - if !ok { - return false - } - spaces = false - } else if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { - if !yaml_emitter_write_indent(emitter) { - return false - } - if is_space(value, i+1) { - if !put(emitter, '\\') { - return false - } - } - i += width(value[i]) - } else if !write(emitter, value, &i) { - return false - } - spaces = true - } else { - if !write(emitter, value, &i) { - return false - } - spaces = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { - if is_space(value, 0) || is_break(value, 0) { - indent_hint := []byte{'0' + byte(emitter.best_indent)} - if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { - return false - } - } - - emitter.open_ended = false - - var chomp_hint [1]byte - if len(value) == 0 { - chomp_hint[0] = '-' - } else { - i := len(value) - 1 - for value[i]&0xC0 == 0x80 { - i-- - } - if !is_break(value, i) { - chomp_hint[0] = '-' - } else if i == 0 { - chomp_hint[0] = '+' - emitter.open_ended = true - } else { - i-- - for value[i]&0xC0 == 0x80 { - i-- - } - if is_break(value, i) { - chomp_hint[0] = '+' - emitter.open_ended = true - } - } - } - if chomp_hint[0] != 0 { - if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { - return false - } - } - return true -} - -func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - breaks := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - breaks = false - } - } - - return true -} - -func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - - breaks := true - leading_spaces := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !breaks && !leading_spaces && value[i] == '\n' { - k := 0 - for is_break(value, k) { - k += width(value[k]) - } - if !is_blankz(value, k) { - if !put_break(emitter) { - return false - } - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - leading_spaces = is_blank(value, i) - } - if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - emitter.indention = false - breaks = false - } - } - return true -} diff --git a/vendor/gopkg.in/yaml.v2/encode.go b/vendor/gopkg.in/yaml.v2/encode.go deleted file mode 100644 index 0ee738e11b..0000000000 --- a/vendor/gopkg.in/yaml.v2/encode.go +++ /dev/null @@ -1,390 +0,0 @@ -package yaml - -import ( - "encoding" - "fmt" - "io" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" - "unicode/utf8" -) - -// jsonNumber is the interface of the encoding/json.Number datatype. -// Repeating the interface here avoids a dependency on encoding/json, and also -// supports other libraries like jsoniter, which use a similar datatype with -// the same interface. Detecting this interface is useful when dealing with -// structures containing json.Number, which is a string under the hood. The -// encoder should prefer the use of Int64(), Float64() and string(), in that -// order, when encoding this type. -type jsonNumber interface { - Float64() (float64, error) - Int64() (int64, error) - String() string -} - -type encoder struct { - emitter yaml_emitter_t - event yaml_event_t - out []byte - flow bool - // doneInit holds whether the initial stream_start_event has been - // emitted. - doneInit bool -} - -func newEncoder() *encoder { - e := &encoder{} - yaml_emitter_initialize(&e.emitter) - yaml_emitter_set_output_string(&e.emitter, &e.out) - yaml_emitter_set_unicode(&e.emitter, true) - return e -} - -func newEncoderWithWriter(w io.Writer) *encoder { - e := &encoder{} - yaml_emitter_initialize(&e.emitter) - yaml_emitter_set_output_writer(&e.emitter, w) - yaml_emitter_set_unicode(&e.emitter, true) - return e -} - -func (e *encoder) init() { - if e.doneInit { - return - } - yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) - e.emit() - e.doneInit = true -} - -func (e *encoder) finish() { - e.emitter.open_ended = false - yaml_stream_end_event_initialize(&e.event) - e.emit() -} - -func (e *encoder) destroy() { - yaml_emitter_delete(&e.emitter) -} - -func (e *encoder) emit() { - // This will internally delete the e.event value. - e.must(yaml_emitter_emit(&e.emitter, &e.event)) -} - -func (e *encoder) must(ok bool) { - if !ok { - msg := e.emitter.problem - if msg == "" { - msg = "unknown problem generating YAML content" - } - failf("%s", msg) - } -} - -func (e *encoder) marshalDoc(tag string, in reflect.Value) { - e.init() - yaml_document_start_event_initialize(&e.event, nil, nil, true) - e.emit() - e.marshal(tag, in) - yaml_document_end_event_initialize(&e.event, true) - e.emit() -} - -func (e *encoder) marshal(tag string, in reflect.Value) { - if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { - e.nilv() - return - } - iface := in.Interface() - switch m := iface.(type) { - case jsonNumber: - integer, err := m.Int64() - if err == nil { - // In this case the json.Number is a valid int64 - in = reflect.ValueOf(integer) - break - } - float, err := m.Float64() - if err == nil { - // In this case the json.Number is a valid float64 - in = reflect.ValueOf(float) - break - } - // fallback case - no number could be obtained - in = reflect.ValueOf(m.String()) - case time.Time, *time.Time: - // Although time.Time implements TextMarshaler, - // we don't want to treat it as a string for YAML - // purposes because YAML has special support for - // timestamps. - case Marshaler: - v, err := m.MarshalYAML() - if err != nil { - fail(err) - } - if v == nil { - e.nilv() - return - } - in = reflect.ValueOf(v) - case encoding.TextMarshaler: - text, err := m.MarshalText() - if err != nil { - fail(err) - } - in = reflect.ValueOf(string(text)) - case nil: - e.nilv() - return - } - switch in.Kind() { - case reflect.Interface: - e.marshal(tag, in.Elem()) - case reflect.Map: - e.mapv(tag, in) - case reflect.Ptr: - if in.Type() == ptrTimeType { - e.timev(tag, in.Elem()) - } else { - e.marshal(tag, in.Elem()) - } - case reflect.Struct: - if in.Type() == timeType { - e.timev(tag, in) - } else { - e.structv(tag, in) - } - case reflect.Slice, reflect.Array: - if in.Type().Elem() == mapItemType { - e.itemsv(tag, in) - } else { - e.slicev(tag, in) - } - case reflect.String: - e.stringv(tag, in) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if in.Type() == durationType { - e.stringv(tag, reflect.ValueOf(iface.(time.Duration).String())) - } else { - e.intv(tag, in) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - e.uintv(tag, in) - case reflect.Float32, reflect.Float64: - e.floatv(tag, in) - case reflect.Bool: - e.boolv(tag, in) - default: - panic("cannot marshal type: " + in.Type().String()) - } -} - -func (e *encoder) mapv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - keys := keyList(in.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - e.marshal("", k) - e.marshal("", in.MapIndex(k)) - } - }) -} - -func (e *encoder) itemsv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - slice := in.Convert(reflect.TypeOf([]MapItem{})).Interface().([]MapItem) - for _, item := range slice { - e.marshal("", reflect.ValueOf(item.Key)) - e.marshal("", reflect.ValueOf(item.Value)) - } - }) -} - -func (e *encoder) structv(tag string, in reflect.Value) { - sinfo, err := getStructInfo(in.Type()) - if err != nil { - panic(err) - } - e.mappingv(tag, func() { - for _, info := range sinfo.FieldsList { - var value reflect.Value - if info.Inline == nil { - value = in.Field(info.Num) - } else { - value = in.FieldByIndex(info.Inline) - } - if info.OmitEmpty && isZero(value) { - continue - } - e.marshal("", reflect.ValueOf(info.Key)) - e.flow = info.Flow - e.marshal("", value) - } - if sinfo.InlineMap >= 0 { - m := in.Field(sinfo.InlineMap) - if m.Len() > 0 { - e.flow = false - keys := keyList(m.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - if _, found := sinfo.FieldsMap[k.String()]; found { - panic(fmt.Sprintf("Can't have key %q in inlined map; conflicts with struct field", k.String())) - } - e.marshal("", k) - e.flow = false - e.marshal("", m.MapIndex(k)) - } - } - } - }) -} - -func (e *encoder) mappingv(tag string, f func()) { - implicit := tag == "" - style := yaml_BLOCK_MAPPING_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_MAPPING_STYLE - } - yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) - e.emit() - f() - yaml_mapping_end_event_initialize(&e.event) - e.emit() -} - -func (e *encoder) slicev(tag string, in reflect.Value) { - implicit := tag == "" - style := yaml_BLOCK_SEQUENCE_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_SEQUENCE_STYLE - } - e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - n := in.Len() - for i := 0; i < n; i++ { - e.marshal("", in.Index(i)) - } - e.must(yaml_sequence_end_event_initialize(&e.event)) - e.emit() -} - -// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. -// -// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported -// in YAML 1.2 and by this package, but these should be marshalled quoted for -// the time being for compatibility with other parsers. -func isBase60Float(s string) (result bool) { - // Fast path. - if s == "" { - return false - } - c := s[0] - if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { - return false - } - // Do the full match. - return base60float.MatchString(s) -} - -// From http://yaml.org/type/float.html, except the regular expression there -// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. -var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) - -func (e *encoder) stringv(tag string, in reflect.Value) { - var style yaml_scalar_style_t - s := in.String() - canUsePlain := true - switch { - case !utf8.ValidString(s): - if tag == yaml_BINARY_TAG { - failf("explicitly tagged !!binary data must be base64-encoded") - } - if tag != "" { - failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) - } - // It can't be encoded directly as YAML so use a binary tag - // and encode it as base64. - tag = yaml_BINARY_TAG - s = encodeBase64(s) - case tag == "": - // Check to see if it would resolve to a specific - // tag when encoded unquoted. If it doesn't, - // there's no need to quote it. - rtag, _ := resolve("", s) - canUsePlain = rtag == yaml_STR_TAG && !isBase60Float(s) - } - // Note: it's possible for user code to emit invalid YAML - // if they explicitly specify a tag and a string containing - // text that's incompatible with that tag. - switch { - case strings.Contains(s, "\n"): - style = yaml_LITERAL_SCALAR_STYLE - case canUsePlain: - style = yaml_PLAIN_SCALAR_STYLE - default: - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - e.emitScalar(s, "", tag, style) -} - -func (e *encoder) boolv(tag string, in reflect.Value) { - var s string - if in.Bool() { - s = "true" - } else { - s = "false" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) intv(tag string, in reflect.Value) { - s := strconv.FormatInt(in.Int(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) uintv(tag string, in reflect.Value) { - s := strconv.FormatUint(in.Uint(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) timev(tag string, in reflect.Value) { - t := in.Interface().(time.Time) - s := t.Format(time.RFC3339Nano) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) floatv(tag string, in reflect.Value) { - // Issue #352: When formatting, use the precision of the underlying value - precision := 64 - if in.Kind() == reflect.Float32 { - precision = 32 - } - - s := strconv.FormatFloat(in.Float(), 'g', -1, precision) - switch s { - case "+Inf": - s = ".inf" - case "-Inf": - s = "-.inf" - case "NaN": - s = ".nan" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) nilv() { - e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t) { - implicit := tag == "" - e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) - e.emit() -} diff --git a/vendor/gopkg.in/yaml.v2/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go deleted file mode 100644 index 81d05dfe57..0000000000 --- a/vendor/gopkg.in/yaml.v2/parserc.go +++ /dev/null @@ -1,1095 +0,0 @@ -package yaml - -import ( - "bytes" -) - -// The parser implements the following grammar: -// -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// implicit_document ::= block_node DOCUMENT-END* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// block_node_or_indentless_sequence ::= -// ALIAS -// | properties (block_content | indentless_block_sequence)? -// | block_content -// | indentless_block_sequence -// block_node ::= ALIAS -// | properties block_content? -// | block_content -// flow_node ::= ALIAS -// | properties flow_content? -// | flow_content -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// block_content ::= block_collection | flow_collection | SCALAR -// flow_content ::= flow_collection | SCALAR -// block_collection ::= block_sequence | block_mapping -// flow_collection ::= flow_sequence | flow_mapping -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// block_mapping ::= BLOCK-MAPPING_START -// ((KEY block_node_or_indentless_sequence?)? -// (VALUE block_node_or_indentless_sequence?)?)* -// BLOCK-END -// flow_sequence ::= FLOW-SEQUENCE-START -// (flow_sequence_entry FLOW-ENTRY)* -// flow_sequence_entry? -// FLOW-SEQUENCE-END -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// flow_mapping ::= FLOW-MAPPING-START -// (flow_mapping_entry FLOW-ENTRY)* -// flow_mapping_entry? -// FLOW-MAPPING-END -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? - -// Peek the next token in the token queue. -func peek_token(parser *yaml_parser_t) *yaml_token_t { - if parser.token_available || yaml_parser_fetch_more_tokens(parser) { - return &parser.tokens[parser.tokens_head] - } - return nil -} - -// Remove the next token from the queue (must be called after peek_token). -func skip_token(parser *yaml_parser_t) { - parser.token_available = false - parser.tokens_parsed++ - parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN - parser.tokens_head++ -} - -// Get the next event. -func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { - // Erase the event object. - *event = yaml_event_t{} - - // No events after the end of the stream or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { - return true - } - - // Generate the next event. - return yaml_parser_state_machine(parser, event) -} - -// Set parser error. -func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -// State dispatcher. -func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { - //trace("yaml_parser_state_machine", "state:", parser.state.String()) - - switch parser.state { - case yaml_PARSE_STREAM_START_STATE: - return yaml_parser_parse_stream_start(parser, event) - - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, true) - - case yaml_PARSE_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, false) - - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return yaml_parser_parse_document_content(parser, event) - - case yaml_PARSE_DOCUMENT_END_STATE: - return yaml_parser_parse_document_end(parser, event) - - case yaml_PARSE_BLOCK_NODE_STATE: - return yaml_parser_parse_node(parser, event, true, false) - - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return yaml_parser_parse_node(parser, event, true, true) - - case yaml_PARSE_FLOW_NODE_STATE: - return yaml_parser_parse_node(parser, event, false, false) - - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, true) - - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, false) - - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_indentless_sequence_entry(parser, event) - - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, true) - - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, false) - - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return yaml_parser_parse_block_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, true) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, false) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) - - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, true) - - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, true) - - default: - panic("invalid parser state") - } -} - -// Parse the production: -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ -func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_STREAM_START_TOKEN { - return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) - } - parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - encoding: token.encoding, - } - skip_token(parser) - return true -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// * -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* -func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { - - token := peek_token(parser) - if token == nil { - return false - } - - // Parse extra document end indicators. - if !implicit { - for token.typ == yaml_DOCUMENT_END_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && - token.typ != yaml_TAG_DIRECTIVE_TOKEN && - token.typ != yaml_DOCUMENT_START_TOKEN && - token.typ != yaml_STREAM_END_TOKEN { - // Parse an implicit document. - if !yaml_parser_process_directives(parser, nil, nil) { - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_BLOCK_NODE_STATE - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - } else if token.typ != yaml_STREAM_END_TOKEN { - // Parse an explicit document. - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - start_mark := token.start_mark - if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { - return false - } - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_DOCUMENT_START_TOKEN { - yaml_parser_set_parser_error(parser, - "did not find expected ", token.start_mark) - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE - end_mark := token.end_mark - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: false, - } - skip_token(parser) - - } else { - // Parse the stream end. - parser.state = yaml_PARSE_END_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - } - - return true -} - -// Parse the productions: -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** -// -func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || - token.typ == yaml_TAG_DIRECTIVE_TOKEN || - token.typ == yaml_DOCUMENT_START_TOKEN || - token.typ == yaml_DOCUMENT_END_TOKEN || - token.typ == yaml_STREAM_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - return yaml_parser_process_empty_scalar(parser, event, - token.start_mark) - } - return yaml_parser_parse_node(parser, event, true, false) -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// -func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - start_mark := token.start_mark - end_mark := token.start_mark - - implicit := true - if token.typ == yaml_DOCUMENT_END_TOKEN { - end_mark = token.end_mark - skip_token(parser) - implicit = false - } - - parser.tag_directives = parser.tag_directives[:0] - - parser.state = yaml_PARSE_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - start_mark: start_mark, - end_mark: end_mark, - implicit: implicit, - } - return true -} - -// Parse the productions: -// block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * -// block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * -// flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* -// block_content ::= block_collection | flow_collection | SCALAR -// ****** -// flow_content ::= flow_collection | SCALAR -// ****** -func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { - //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_ALIAS_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - *event = yaml_event_t{ - typ: yaml_ALIAS_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - anchor: token.value, - } - skip_token(parser) - return true - } - - start_mark := token.start_mark - end_mark := token.start_mark - - var tag_token bool - var tag_handle, tag_suffix, anchor []byte - var tag_mark yaml_mark_t - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - start_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } else if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - start_mark = token.start_mark - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - var tag []byte - if tag_token { - if len(tag_handle) == 0 { - tag = tag_suffix - tag_suffix = nil - } else { - for i := range parser.tag_directives { - if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { - tag = append([]byte(nil), parser.tag_directives[i].prefix...) - tag = append(tag, tag_suffix...) - break - } - } - if len(tag) == 0 { - yaml_parser_set_parser_error_context(parser, - "while parsing a node", start_mark, - "found undefined tag handle", tag_mark) - return false - } - } - } - - implicit := len(tag) == 0 - if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_SCALAR_TOKEN { - var plain_implicit, quoted_implicit bool - end_mark = token.end_mark - if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { - plain_implicit = true - } else if len(tag) == 0 { - quoted_implicit = true - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - value: token.value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(token.style), - } - skip_token(parser) - return true - } - if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { - // [Go] Some of the events below can be merged as they differ only on style. - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_FLOW_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), - } - return true - } - if len(anchor) > 0 || len(tag) > 0 { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - quoted_implicit: false, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true - } - - context := "while parsing a flow node" - if block { - context = "while parsing a block node" - } - yaml_parser_set_parser_error_context(parser, context, start_mark, - "did not find expected node content", token.start_mark) - return false -} - -// Parse the productions: -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* -// -func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } else { - parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } - if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block collection", context_mark, - "did not find expected '-' indicator", token.start_mark) -} - -// Parse the productions: -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * -func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && - token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? - } - return true -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* -// -// BLOCK-END -// ********* -// -func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_KEY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } else { - parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } else if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block mapping", context_mark, - "did not find expected key", token.start_mark) -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// -// -func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow sequence", context_mark, - "did not find expected ',' or ']'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - implicit: true, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - skip_token(parser) - return true - } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true -} - -// -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - mark := token.end_mark - skip_token(parser) - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? - } - return true -} - -// Parse the productions: -// flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * -// -func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow mapping", context_mark, - "did not find expected ',' or '}'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } else { - parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true -} - -// Parse the productions: -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// -func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { - token := peek_token(parser) - if token == nil { - return false - } - if empty { - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Generate an empty scalar event. -func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: mark, - end_mark: mark, - value: nil, // Empty - implicit: true, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true -} - -var default_tag_directives = []yaml_tag_directive_t{ - {[]byte("!"), []byte("!")}, - {[]byte("!!"), []byte("tag:yaml.org,2002:")}, -} - -// Parse directives. -func yaml_parser_process_directives(parser *yaml_parser_t, - version_directive_ref **yaml_version_directive_t, - tag_directives_ref *[]yaml_tag_directive_t) bool { - - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - - token := peek_token(parser) - if token == nil { - return false - } - - for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { - if version_directive != nil { - yaml_parser_set_parser_error(parser, - "found duplicate %YAML directive", token.start_mark) - return false - } - if token.major != 1 || token.minor != 1 { - yaml_parser_set_parser_error(parser, - "found incompatible YAML document", token.start_mark) - return false - } - version_directive = &yaml_version_directive_t{ - major: token.major, - minor: token.minor, - } - } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { - value := yaml_tag_directive_t{ - handle: token.value, - prefix: token.prefix, - } - if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { - return false - } - tag_directives = append(tag_directives, value) - } - - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - - for i := range default_tag_directives { - if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { - return false - } - } - - if version_directive_ref != nil { - *version_directive_ref = version_directive - } - if tag_directives_ref != nil { - *tag_directives_ref = tag_directives - } - return true -} - -// Append a tag directive to the directives stack. -func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { - for i := range parser.tag_directives { - if bytes.Equal(value.handle, parser.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) - } - } - - // [Go] I suspect the copy is unnecessary. This was likely done - // because there was no way to track ownership of the data. - value_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(value_copy.handle, value.handle) - copy(value_copy.prefix, value.prefix) - parser.tag_directives = append(parser.tag_directives, value_copy) - return true -} diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go deleted file mode 100644 index 7c1f5fac3d..0000000000 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ /dev/null @@ -1,412 +0,0 @@ -package yaml - -import ( - "io" -) - -// Set the reader error and return 0. -func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { - parser.error = yaml_READER_ERROR - parser.problem = problem - parser.problem_offset = offset - parser.problem_value = value - return false -} - -// Byte order marks. -const ( - bom_UTF8 = "\xef\xbb\xbf" - bom_UTF16LE = "\xff\xfe" - bom_UTF16BE = "\xfe\xff" -) - -// Determine the input stream encoding by checking the BOM symbol. If no BOM is -// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. -func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { - // Ensure that we had enough bytes in the raw buffer. - for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { - if !yaml_parser_update_raw_buffer(parser) { - return false - } - } - - // Determine the encoding. - buf := parser.raw_buffer - pos := parser.raw_buffer_pos - avail := len(buf) - pos - if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { - parser.encoding = yaml_UTF16LE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { - parser.encoding = yaml_UTF16BE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { - parser.encoding = yaml_UTF8_ENCODING - parser.raw_buffer_pos += 3 - parser.offset += 3 - } else { - parser.encoding = yaml_UTF8_ENCODING - } - return true -} - -// Update the raw buffer. -func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { - size_read := 0 - - // Return if the raw buffer is full. - if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { - return true - } - - // Return on EOF. - if parser.eof { - return true - } - - // Move the remaining bytes in the raw buffer to the beginning. - if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { - copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) - } - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] - parser.raw_buffer_pos = 0 - - // Call the read handler to fill the buffer. - size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] - if err == io.EOF { - parser.eof = true - } else if err != nil { - return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) - } - return true -} - -// Ensure that the buffer contains at least `length` characters. -// Return true on success, false on failure. -// -// The length is supposed to be significantly less that the buffer size. -func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { - if parser.read_handler == nil { - panic("read handler must be set") - } - - // [Go] This function was changed to guarantee the requested length size at EOF. - // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests - - // If the EOF flag is set and the raw buffer is empty, do nothing. - if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { - // [Go] ACTUALLY! Read the documentation of this function above. - // This is just broken. To return true, we need to have the - // given length in the buffer. Not doing that means every single - // check that calls this function to make sure the buffer has a - // given length is Go) panicking; or C) accessing invalid memory. - //return true - } - - // Return if the buffer contains enough characters. - if parser.unread >= length { - return true - } - - // Determine the input encoding if it is not known yet. - if parser.encoding == yaml_ANY_ENCODING { - if !yaml_parser_determine_encoding(parser) { - return false - } - } - - // Move the unread characters to the beginning of the buffer. - buffer_len := len(parser.buffer) - if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { - copy(parser.buffer, parser.buffer[parser.buffer_pos:]) - buffer_len -= parser.buffer_pos - parser.buffer_pos = 0 - } else if parser.buffer_pos == buffer_len { - buffer_len = 0 - parser.buffer_pos = 0 - } - - // Open the whole buffer for writing, and cut it before returning. - parser.buffer = parser.buffer[:cap(parser.buffer)] - - // Fill the buffer until it has enough characters. - first := true - for parser.unread < length { - - // Fill the raw buffer if necessary. - if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { - if !yaml_parser_update_raw_buffer(parser) { - parser.buffer = parser.buffer[:buffer_len] - return false - } - } - first = false - - // Decode the raw buffer. - inner: - for parser.raw_buffer_pos != len(parser.raw_buffer) { - var value rune - var width int - - raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos - - // Decode the next character. - switch parser.encoding { - case yaml_UTF8_ENCODING: - // Decode a UTF-8 character. Check RFC 3629 - // (http://www.ietf.org/rfc/rfc3629.txt) for more details. - // - // The following table (taken from the RFC) is used for - // decoding. - // - // Char. number range | UTF-8 octet sequence - // (hexadecimal) | (binary) - // --------------------+------------------------------------ - // 0000 0000-0000 007F | 0xxxxxxx - // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx - // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx - // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // - // Additionally, the characters in the range 0xD800-0xDFFF - // are prohibited as they are reserved for use with UTF-16 - // surrogate pairs. - - // Determine the length of the UTF-8 sequence. - octet := parser.raw_buffer[parser.raw_buffer_pos] - switch { - case octet&0x80 == 0x00: - width = 1 - case octet&0xE0 == 0xC0: - width = 2 - case octet&0xF0 == 0xE0: - width = 3 - case octet&0xF8 == 0xF0: - width = 4 - default: - // The leading octet is invalid. - return yaml_parser_set_reader_error(parser, - "invalid leading UTF-8 octet", - parser.offset, int(octet)) - } - - // Check if the raw buffer contains an incomplete character. - if width > raw_unread { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-8 octet sequence", - parser.offset, -1) - } - break inner - } - - // Decode the leading octet. - switch { - case octet&0x80 == 0x00: - value = rune(octet & 0x7F) - case octet&0xE0 == 0xC0: - value = rune(octet & 0x1F) - case octet&0xF0 == 0xE0: - value = rune(octet & 0x0F) - case octet&0xF8 == 0xF0: - value = rune(octet & 0x07) - default: - value = 0 - } - - // Check and decode the trailing octets. - for k := 1; k < width; k++ { - octet = parser.raw_buffer[parser.raw_buffer_pos+k] - - // Check if the octet is valid. - if (octet & 0xC0) != 0x80 { - return yaml_parser_set_reader_error(parser, - "invalid trailing UTF-8 octet", - parser.offset+k, int(octet)) - } - - // Decode the octet. - value = (value << 6) + rune(octet&0x3F) - } - - // Check the length of the sequence against the value. - switch { - case width == 1: - case width == 2 && value >= 0x80: - case width == 3 && value >= 0x800: - case width == 4 && value >= 0x10000: - default: - return yaml_parser_set_reader_error(parser, - "invalid length of a UTF-8 sequence", - parser.offset, -1) - } - - // Check the range of the value. - if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { - return yaml_parser_set_reader_error(parser, - "invalid Unicode character", - parser.offset, int(value)) - } - - case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: - var low, high int - if parser.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - low, high = 1, 0 - } - - // The UTF-16 encoding is not as simple as one might - // naively think. Check RFC 2781 - // (http://www.ietf.org/rfc/rfc2781.txt). - // - // Normally, two subsequent bytes describe a Unicode - // character. However a special technique (called a - // surrogate pair) is used for specifying character - // values larger than 0xFFFF. - // - // A surrogate pair consists of two pseudo-characters: - // high surrogate area (0xD800-0xDBFF) - // low surrogate area (0xDC00-0xDFFF) - // - // The following formulas are used for decoding - // and encoding characters using surrogate pairs: - // - // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) - // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) - // W1 = 110110yyyyyyyyyy - // W2 = 110111xxxxxxxxxx - // - // where U is the character value, W1 is the high surrogate - // area, W2 is the low surrogate area. - - // Check for incomplete UTF-16 character. - if raw_unread < 2 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 character", - parser.offset, -1) - } - break inner - } - - // Get the character. - value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) - - // Check for unexpected low surrogate area. - if value&0xFC00 == 0xDC00 { - return yaml_parser_set_reader_error(parser, - "unexpected low surrogate area", - parser.offset, int(value)) - } - - // Check for a high surrogate area. - if value&0xFC00 == 0xD800 { - width = 4 - - // Check for incomplete surrogate pair. - if raw_unread < 4 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 surrogate pair", - parser.offset, -1) - } - break inner - } - - // Get the next character. - value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) - - // Check for a low surrogate area. - if value2&0xFC00 != 0xDC00 { - return yaml_parser_set_reader_error(parser, - "expected low surrogate area", - parser.offset+2, int(value2)) - } - - // Generate the value of the surrogate pair. - value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) - } else { - width = 2 - } - - default: - panic("impossible") - } - - // Check if the character is in the allowed range: - // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) - // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) - // | [#x10000-#x10FFFF] (32 bit) - switch { - case value == 0x09: - case value == 0x0A: - case value == 0x0D: - case value >= 0x20 && value <= 0x7E: - case value == 0x85: - case value >= 0xA0 && value <= 0xD7FF: - case value >= 0xE000 && value <= 0xFFFD: - case value >= 0x10000 && value <= 0x10FFFF: - default: - return yaml_parser_set_reader_error(parser, - "control characters are not allowed", - parser.offset, int(value)) - } - - // Move the raw pointers. - parser.raw_buffer_pos += width - parser.offset += width - - // Finally put the character into the buffer. - if value <= 0x7F { - // 0000 0000-0000 007F . 0xxxxxxx - parser.buffer[buffer_len+0] = byte(value) - buffer_len += 1 - } else if value <= 0x7FF { - // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) - parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) - buffer_len += 2 - } else if value <= 0xFFFF { - // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) - buffer_len += 3 - } else { - // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) - buffer_len += 4 - } - - parser.unread++ - } - - // On EOF, put NUL into the buffer and return. - if parser.eof { - parser.buffer[buffer_len] = 0 - buffer_len++ - parser.unread++ - break - } - } - // [Go] Read the documentation of this function above. To return true, - // we need to have the given length in the buffer. Not doing that means - // every single check that calls this function to make sure the buffer - // has a given length is Go) panicking; or C) accessing invalid memory. - // This happens here due to the EOF above breaking early. - for buffer_len < length { - parser.buffer[buffer_len] = 0 - buffer_len++ - } - parser.buffer = parser.buffer[:buffer_len] - return true -} diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go deleted file mode 100644 index 4120e0c916..0000000000 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ /dev/null @@ -1,258 +0,0 @@ -package yaml - -import ( - "encoding/base64" - "math" - "regexp" - "strconv" - "strings" - "time" -) - -type resolveMapItem struct { - value interface{} - tag string -} - -var resolveTable = make([]byte, 256) -var resolveMap = make(map[string]resolveMapItem) - -func init() { - t := resolveTable - t[int('+')] = 'S' // Sign - t[int('-')] = 'S' - for _, c := range "0123456789" { - t[int(c)] = 'D' // Digit - } - for _, c := range "yYnNtTfFoO~" { - t[int(c)] = 'M' // In map - } - t[int('.')] = '.' // Float (potentially in map) - - var resolveMapList = []struct { - v interface{} - tag string - l []string - }{ - {true, yaml_BOOL_TAG, []string{"y", "Y", "yes", "Yes", "YES"}}, - {true, yaml_BOOL_TAG, []string{"true", "True", "TRUE"}}, - {true, yaml_BOOL_TAG, []string{"on", "On", "ON"}}, - {false, yaml_BOOL_TAG, []string{"n", "N", "no", "No", "NO"}}, - {false, yaml_BOOL_TAG, []string{"false", "False", "FALSE"}}, - {false, yaml_BOOL_TAG, []string{"off", "Off", "OFF"}}, - {nil, yaml_NULL_TAG, []string{"", "~", "null", "Null", "NULL"}}, - {math.NaN(), yaml_FLOAT_TAG, []string{".nan", ".NaN", ".NAN"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{".inf", ".Inf", ".INF"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{"+.inf", "+.Inf", "+.INF"}}, - {math.Inf(-1), yaml_FLOAT_TAG, []string{"-.inf", "-.Inf", "-.INF"}}, - {"<<", yaml_MERGE_TAG, []string{"<<"}}, - } - - m := resolveMap - for _, item := range resolveMapList { - for _, s := range item.l { - m[s] = resolveMapItem{item.v, item.tag} - } - } -} - -const longTagPrefix = "tag:yaml.org,2002:" - -func shortTag(tag string) string { - // TODO This can easily be made faster and produce less garbage. - if strings.HasPrefix(tag, longTagPrefix) { - return "!!" + tag[len(longTagPrefix):] - } - return tag -} - -func longTag(tag string) string { - if strings.HasPrefix(tag, "!!") { - return longTagPrefix + tag[2:] - } - return tag -} - -func resolvableTag(tag string) bool { - switch tag { - case "", yaml_STR_TAG, yaml_BOOL_TAG, yaml_INT_TAG, yaml_FLOAT_TAG, yaml_NULL_TAG, yaml_TIMESTAMP_TAG: - return true - } - return false -} - -var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) - -func resolve(tag string, in string) (rtag string, out interface{}) { - if !resolvableTag(tag) { - return tag, in - } - - defer func() { - switch tag { - case "", rtag, yaml_STR_TAG, yaml_BINARY_TAG: - return - case yaml_FLOAT_TAG: - if rtag == yaml_INT_TAG { - switch v := out.(type) { - case int64: - rtag = yaml_FLOAT_TAG - out = float64(v) - return - case int: - rtag = yaml_FLOAT_TAG - out = float64(v) - return - } - } - } - failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) - }() - - // Any data is accepted as a !!str or !!binary. - // Otherwise, the prefix is enough of a hint about what it might be. - hint := byte('N') - if in != "" { - hint = resolveTable[in[0]] - } - if hint != 0 && tag != yaml_STR_TAG && tag != yaml_BINARY_TAG { - // Handle things we can lookup in a map. - if item, ok := resolveMap[in]; ok { - return item.tag, item.value - } - - // Base 60 floats are a bad idea, were dropped in YAML 1.2, and - // are purposefully unsupported here. They're still quoted on - // the way out for compatibility with other parser, though. - - switch hint { - case 'M': - // We've already checked the map above. - - case '.': - // Not in the map, so maybe a normal float. - floatv, err := strconv.ParseFloat(in, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - - case 'D', 'S': - // Int, float, or timestamp. - // Only try values as a timestamp if the value is unquoted or there's an explicit - // !!timestamp tag. - if tag == "" || tag == yaml_TIMESTAMP_TAG { - t, ok := parseTimestamp(in) - if ok { - return yaml_TIMESTAMP_TAG, t - } - } - - plain := strings.Replace(in, "_", "", -1) - intv, err := strconv.ParseInt(plain, 0, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - uintv, err := strconv.ParseUint(plain, 0, 64) - if err == nil { - return yaml_INT_TAG, uintv - } - if yamlStyleFloat.MatchString(plain) { - floatv, err := strconv.ParseFloat(plain, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - } - if strings.HasPrefix(plain, "0b") { - intv, err := strconv.ParseInt(plain[2:], 2, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - uintv, err := strconv.ParseUint(plain[2:], 2, 64) - if err == nil { - return yaml_INT_TAG, uintv - } - } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) - if err == nil { - if true || intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - } - default: - panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") - } - } - return yaml_STR_TAG, in -} - -// encodeBase64 encodes s as base64 that is broken up into multiple lines -// as appropriate for the resulting length. -func encodeBase64(s string) string { - const lineLen = 70 - encLen := base64.StdEncoding.EncodedLen(len(s)) - lines := encLen/lineLen + 1 - buf := make([]byte, encLen*2+lines) - in := buf[0:encLen] - out := buf[encLen:] - base64.StdEncoding.Encode(in, []byte(s)) - k := 0 - for i := 0; i < len(in); i += lineLen { - j := i + lineLen - if j > len(in) { - j = len(in) - } - k += copy(out[k:], in[i:j]) - if lines > 1 { - out[k] = '\n' - k++ - } - } - return string(out[:k]) -} - -// This is a subset of the formats allowed by the regular expression -// defined at http://yaml.org/type/timestamp.html. -var allowedTimestampFormats = []string{ - "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. - "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". - "2006-1-2 15:4:5.999999999", // space separated with no time zone - "2006-1-2", // date only - // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" - // from the set of examples. -} - -// parseTimestamp parses s as a timestamp string and -// returns the timestamp and reports whether it succeeded. -// Timestamp formats are defined at http://yaml.org/type/timestamp.html -func parseTimestamp(s string) (time.Time, bool) { - // TODO write code to check all the formats supported by - // http://yaml.org/type/timestamp.html instead of using time.Parse. - - // Quick check: all date formats start with YYYY-. - i := 0 - for ; i < len(s); i++ { - if c := s[i]; c < '0' || c > '9' { - break - } - } - if i != 4 || i == len(s) || s[i] != '-' { - return time.Time{}, false - } - for _, format := range allowedTimestampFormats { - if t, err := time.Parse(format, s); err == nil { - return t, true - } - } - return time.Time{}, false -} diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go deleted file mode 100644 index 0b9bb6030a..0000000000 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ /dev/null @@ -1,2711 +0,0 @@ -package yaml - -import ( - "bytes" - "fmt" -) - -// Introduction -// ************ -// -// The following notes assume that you are familiar with the YAML specification -// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in -// some cases we are less restrictive that it requires. -// -// The process of transforming a YAML stream into a sequence of events is -// divided on two steps: Scanning and Parsing. -// -// The Scanner transforms the input stream into a sequence of tokens, while the -// parser transform the sequence of tokens produced by the Scanner into a -// sequence of parsing events. -// -// The Scanner is rather clever and complicated. The Parser, on the contrary, -// is a straightforward implementation of a recursive-descendant parser (or, -// LL(1) parser, as it is usually called). -// -// Actually there are two issues of Scanning that might be called "clever", the -// rest is quite straightforward. The issues are "block collection start" and -// "simple keys". Both issues are explained below in details. -// -// Here the Scanning step is explained and implemented. We start with the list -// of all the tokens produced by the Scanner together with short descriptions. -// -// Now, tokens: -// -// STREAM-START(encoding) # The stream start. -// STREAM-END # The stream end. -// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. -// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. -// DOCUMENT-START # '---' -// DOCUMENT-END # '...' -// BLOCK-SEQUENCE-START # Indentation increase denoting a block -// BLOCK-MAPPING-START # sequence or a block mapping. -// BLOCK-END # Indentation decrease. -// FLOW-SEQUENCE-START # '[' -// FLOW-SEQUENCE-END # ']' -// BLOCK-SEQUENCE-START # '{' -// BLOCK-SEQUENCE-END # '}' -// BLOCK-ENTRY # '-' -// FLOW-ENTRY # ',' -// KEY # '?' or nothing (simple keys). -// VALUE # ':' -// ALIAS(anchor) # '*anchor' -// ANCHOR(anchor) # '&anchor' -// TAG(handle,suffix) # '!handle!suffix' -// SCALAR(value,style) # A scalar. -// -// The following two tokens are "virtual" tokens denoting the beginning and the -// end of the stream: -// -// STREAM-START(encoding) -// STREAM-END -// -// We pass the information about the input stream encoding with the -// STREAM-START token. -// -// The next two tokens are responsible for tags: -// -// VERSION-DIRECTIVE(major,minor) -// TAG-DIRECTIVE(handle,prefix) -// -// Example: -// -// %YAML 1.1 -// %TAG ! !foo -// %TAG !yaml! tag:yaml.org,2002: -// --- -// -// The correspoding sequence of tokens: -// -// STREAM-START(utf-8) -// VERSION-DIRECTIVE(1,1) -// TAG-DIRECTIVE("!","!foo") -// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") -// DOCUMENT-START -// STREAM-END -// -// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole -// line. -// -// The document start and end indicators are represented by: -// -// DOCUMENT-START -// DOCUMENT-END -// -// Note that if a YAML stream contains an implicit document (without '---' -// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be -// produced. -// -// In the following examples, we present whole documents together with the -// produced tokens. -// -// 1. An implicit document: -// -// 'a scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// STREAM-END -// -// 2. An explicit document: -// -// --- -// 'a scalar' -// ... -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// SCALAR("a scalar",single-quoted) -// DOCUMENT-END -// STREAM-END -// -// 3. Several documents in a stream: -// -// 'a scalar' -// --- -// 'another scalar' -// --- -// 'yet another scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// DOCUMENT-START -// SCALAR("another scalar",single-quoted) -// DOCUMENT-START -// SCALAR("yet another scalar",single-quoted) -// STREAM-END -// -// We have already introduced the SCALAR token above. The following tokens are -// used to describe aliases, anchors, tag, and scalars: -// -// ALIAS(anchor) -// ANCHOR(anchor) -// TAG(handle,suffix) -// SCALAR(value,style) -// -// The following series of examples illustrate the usage of these tokens: -// -// 1. A recursive sequence: -// -// &A [ *A ] -// -// Tokens: -// -// STREAM-START(utf-8) -// ANCHOR("A") -// FLOW-SEQUENCE-START -// ALIAS("A") -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A tagged scalar: -// -// !!float "3.14" # A good approximation. -// -// Tokens: -// -// STREAM-START(utf-8) -// TAG("!!","float") -// SCALAR("3.14",double-quoted) -// STREAM-END -// -// 3. Various scalar styles: -// -// --- # Implicit empty plain scalars do not produce tokens. -// --- a plain scalar -// --- 'a single-quoted scalar' -// --- "a double-quoted scalar" -// --- |- -// a literal scalar -// --- >- -// a folded -// scalar -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// DOCUMENT-START -// SCALAR("a plain scalar",plain) -// DOCUMENT-START -// SCALAR("a single-quoted scalar",single-quoted) -// DOCUMENT-START -// SCALAR("a double-quoted scalar",double-quoted) -// DOCUMENT-START -// SCALAR("a literal scalar",literal) -// DOCUMENT-START -// SCALAR("a folded scalar",folded) -// STREAM-END -// -// Now it's time to review collection-related tokens. We will start with -// flow collections: -// -// FLOW-SEQUENCE-START -// FLOW-SEQUENCE-END -// FLOW-MAPPING-START -// FLOW-MAPPING-END -// FLOW-ENTRY -// KEY -// VALUE -// -// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and -// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' -// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the -// indicators '?' and ':', which are used for denoting mapping keys and values, -// are represented by the KEY and VALUE tokens. -// -// The following examples show flow collections: -// -// 1. A flow sequence: -// -// [item 1, item 2, item 3] -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-SEQUENCE-START -// SCALAR("item 1",plain) -// FLOW-ENTRY -// SCALAR("item 2",plain) -// FLOW-ENTRY -// SCALAR("item 3",plain) -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A flow mapping: -// -// { -// a simple key: a value, # Note that the KEY token is produced. -// ? a complex key: another value, -// } -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// FLOW-ENTRY -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// FLOW-ENTRY -// FLOW-MAPPING-END -// STREAM-END -// -// A simple key is a key which is not denoted by the '?' indicator. Note that -// the Scanner still produce the KEY token whenever it encounters a simple key. -// -// For scanning block collections, the following tokens are used (note that we -// repeat KEY and VALUE here): -// -// BLOCK-SEQUENCE-START -// BLOCK-MAPPING-START -// BLOCK-END -// BLOCK-ENTRY -// KEY -// VALUE -// -// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation -// increase that precedes a block collection (cf. the INDENT token in Python). -// The token BLOCK-END denote indentation decrease that ends a block collection -// (cf. the DEDENT token in Python). However YAML has some syntax pecularities -// that makes detections of these tokens more complex. -// -// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators -// '-', '?', and ':' correspondingly. -// -// The following examples show how the tokens BLOCK-SEQUENCE-START, -// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: -// -// 1. Block sequences: -// -// - item 1 -// - item 2 -// - -// - item 3.1 -// - item 3.2 -// - -// key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 3.1",plain) -// BLOCK-ENTRY -// SCALAR("item 3.2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Block mappings: -// -// a simple key: a value # The KEY token is produced here. -// ? a complex key -// : another value -// a mapping: -// key 1: value 1 -// key 2: value 2 -// a sequence: -// - item 1 -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// KEY -// SCALAR("a mapping",plain) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML does not always require to start a new block collection from a new -// line. If the current line contains only '-', '?', and ':' indicators, a new -// block collection may start at the current line. The following examples -// illustrate this case: -// -// 1. Collections in a sequence: -// -// - - item 1 -// - item 2 -// - key 1: value 1 -// key 2: value 2 -// - ? complex key -// : complex value -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("complex key") -// VALUE -// SCALAR("complex value") -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Collections in a mapping: -// -// ? a sequence -// : - item 1 -// - item 2 -// ? a mapping -// : key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// KEY -// SCALAR("a mapping",plain) -// VALUE -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML also permits non-indented sequences if they are included into a block -// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: -// -// key: -// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key",plain) -// VALUE -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// - -// Ensure that the buffer contains the required number of characters. -// Return true on success, false on failure (reader error or memory error). -func cache(parser *yaml_parser_t, length int) bool { - // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) - return parser.unread >= length || yaml_parser_update_buffer(parser, length) -} - -// Advance the buffer pointer. -func skip(parser *yaml_parser_t) { - parser.mark.index++ - parser.mark.column++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) -} - -func skip_line(parser *yaml_parser_t) { - if is_crlf(parser.buffer, parser.buffer_pos) { - parser.mark.index += 2 - parser.mark.column = 0 - parser.mark.line++ - parser.unread -= 2 - parser.buffer_pos += 2 - } else if is_break(parser.buffer, parser.buffer_pos) { - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) - } -} - -// Copy a character to a string buffer and advance pointers. -func read(parser *yaml_parser_t, s []byte) []byte { - w := width(parser.buffer[parser.buffer_pos]) - if w == 0 { - panic("invalid character sequence") - } - if len(s) == 0 { - s = make([]byte, 0, 32) - } - if w == 1 && len(s)+w <= cap(s) { - s = s[:len(s)+1] - s[len(s)-1] = parser.buffer[parser.buffer_pos] - parser.buffer_pos++ - } else { - s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) - parser.buffer_pos += w - } - parser.mark.index++ - parser.mark.column++ - parser.unread-- - return s -} - -// Copy a line break character to a string buffer and advance pointers. -func read_line(parser *yaml_parser_t, s []byte) []byte { - buf := parser.buffer - pos := parser.buffer_pos - switch { - case buf[pos] == '\r' && buf[pos+1] == '\n': - // CR LF . LF - s = append(s, '\n') - parser.buffer_pos += 2 - parser.mark.index++ - parser.unread-- - case buf[pos] == '\r' || buf[pos] == '\n': - // CR|LF . LF - s = append(s, '\n') - parser.buffer_pos += 1 - case buf[pos] == '\xC2' && buf[pos+1] == '\x85': - // NEL . LF - s = append(s, '\n') - parser.buffer_pos += 2 - case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): - // LS|PS . LS|PS - s = append(s, buf[parser.buffer_pos:pos+3]...) - parser.buffer_pos += 3 - default: - return s - } - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - return s -} - -// Get the next token. -func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { - // Erase the token object. - *token = yaml_token_t{} // [Go] Is this necessary? - - // No tokens after STREAM-END or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR { - return true - } - - // Ensure that the tokens queue contains enough tokens. - if !parser.token_available { - if !yaml_parser_fetch_more_tokens(parser) { - return false - } - } - - // Fetch the next token from the queue. - *token = parser.tokens[parser.tokens_head] - parser.tokens_head++ - parser.tokens_parsed++ - parser.token_available = false - - if token.typ == yaml_STREAM_END_TOKEN { - parser.stream_end_produced = true - } - return true -} - -// Set the scanner error and return false. -func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { - parser.error = yaml_SCANNER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = parser.mark - return false -} - -func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { - context := "while parsing a tag" - if directive { - context = "while parsing a %TAG directive" - } - return yaml_parser_set_scanner_error(parser, context, context_mark, problem) -} - -func trace(args ...interface{}) func() { - pargs := append([]interface{}{"+++"}, args...) - fmt.Println(pargs...) - pargs = append([]interface{}{"---"}, args...) - return func() { fmt.Println(pargs...) } -} - -// Ensure that the tokens queue contains at least one token which can be -// returned to the Parser. -func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { - // While we need more tokens to fetch, do it. - for { - if parser.tokens_head != len(parser.tokens) { - // If queue is non-empty, check if any potential simple key may - // occupy the head position. - head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] - if !ok { - break - } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { - return false - } else if !valid { - break - } - } - // Fetch the next token. - if !yaml_parser_fetch_next_token(parser) { - return false - } - } - - parser.token_available = true - return true -} - -// The dispatcher for token fetchers. -func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool { - // Ensure that the buffer is initialized. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we just started scanning. Fetch STREAM-START then. - if !parser.stream_start_produced { - return yaml_parser_fetch_stream_start(parser) - } - - // Eat whitespaces and comments until we reach the next token. - if !yaml_parser_scan_to_next_token(parser) { - return false - } - - // Check the indentation level against the current column. - if !yaml_parser_unroll_indent(parser, parser.mark.column) { - return false - } - - // Ensure that the buffer contains at least 4 characters. 4 is the length - // of the longest indicators ('--- ' and '... '). - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - // Is it the end of the stream? - if is_z(parser.buffer, parser.buffer_pos) { - return yaml_parser_fetch_stream_end(parser) - } - - // Is it a directive? - if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { - return yaml_parser_fetch_directive(parser) - } - - buf := parser.buffer - pos := parser.buffer_pos - - // Is it the document start indicator? - if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) - } - - // Is it the document end indicator? - if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) - } - - // Is it the flow sequence start indicator? - if buf[pos] == '[' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) - } - - // Is it the flow mapping start indicator? - if parser.buffer[parser.buffer_pos] == '{' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) - } - - // Is it the flow sequence end indicator? - if parser.buffer[parser.buffer_pos] == ']' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_SEQUENCE_END_TOKEN) - } - - // Is it the flow mapping end indicator? - if parser.buffer[parser.buffer_pos] == '}' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_MAPPING_END_TOKEN) - } - - // Is it the flow entry indicator? - if parser.buffer[parser.buffer_pos] == ',' { - return yaml_parser_fetch_flow_entry(parser) - } - - // Is it the block entry indicator? - if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { - return yaml_parser_fetch_block_entry(parser) - } - - // Is it the key indicator? - if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_key(parser) - } - - // Is it the value indicator? - if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_value(parser) - } - - // Is it an alias? - if parser.buffer[parser.buffer_pos] == '*' { - return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) - } - - // Is it an anchor? - if parser.buffer[parser.buffer_pos] == '&' { - return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) - } - - // Is it a tag? - if parser.buffer[parser.buffer_pos] == '!' { - return yaml_parser_fetch_tag(parser) - } - - // Is it a literal scalar? - if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, true) - } - - // Is it a folded scalar? - if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, false) - } - - // Is it a single-quoted scalar? - if parser.buffer[parser.buffer_pos] == '\'' { - return yaml_parser_fetch_flow_scalar(parser, true) - } - - // Is it a double-quoted scalar? - if parser.buffer[parser.buffer_pos] == '"' { - return yaml_parser_fetch_flow_scalar(parser, false) - } - - // Is it a plain scalar? - // - // A plain scalar may start with any non-blank characters except - // - // '-', '?', ':', ',', '[', ']', '{', '}', - // '#', '&', '*', '!', '|', '>', '\'', '\"', - // '%', '@', '`'. - // - // In the block context (and, for the '-' indicator, in the flow context - // too), it may also start with the characters - // - // '-', '?', ':' - // - // if it is followed by a non-space character. - // - // The last rule is more restrictive than the specification requires. - // [Go] Make this logic more reasonable. - //switch parser.buffer[parser.buffer_pos] { - //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': - //} - if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || - parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || - parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || - (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level == 0 && - (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && - !is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_plain_scalar(parser) - } - - // If we don't determine the token type so far, it is an error. - return yaml_parser_set_scanner_error(parser, - "while scanning for the next token", parser.mark, - "found character that cannot start any token") -} - -func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { - if !simple_key.possible { - return false, true - } - - // The 1.2 specification says: - // - // "If the ? indicator is omitted, parsing needs to see past the - // implicit key to recognize it as such. To limit the amount of - // lookahead required, the “:” indicator must appear at most 1024 - // Unicode characters beyond the start of the key. In addition, the key - // is restricted to a single line." - // - if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index { - // Check if the potential simple key to be removed is required. - if simple_key.required { - return false, yaml_parser_set_scanner_error(parser, - "while scanning a simple key", simple_key.mark, - "could not find expected ':'") - } - simple_key.possible = false - return false, true - } - return true, true -} - -// Check if a simple key may start at the current position and add it if -// needed. -func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { - // A simple key is required at the current position if the scanner is in - // the block context and the current column coincides with the indentation - // level. - - required := parser.flow_level == 0 && parser.indent == parser.mark.column - - // - // If the current position may start a simple key, save it. - // - if parser.simple_key_allowed { - simple_key := yaml_simple_key_t{ - possible: true, - required: required, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - mark: parser.mark, - } - - if !yaml_parser_remove_simple_key(parser) { - return false - } - parser.simple_keys[len(parser.simple_keys)-1] = simple_key - parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 - } - return true -} - -// Remove a potential simple key at the current flow level. -func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { - i := len(parser.simple_keys) - 1 - if parser.simple_keys[i].possible { - // If the key is required, it is an error. - if parser.simple_keys[i].required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", parser.simple_keys[i].mark, - "could not find expected ':'") - } - // Remove the key from the stack. - parser.simple_keys[i].possible = false - delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) - } - return true -} - -// max_flow_level limits the flow_level -const max_flow_level = 10000 - -// Increase the flow level and resize the simple key list if needed. -func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { - // Reset the simple key on the next level. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{ - possible: false, - required: false, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - mark: parser.mark, - }) - - // Increase the flow level. - parser.flow_level++ - if parser.flow_level > max_flow_level { - return yaml_parser_set_scanner_error(parser, - "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, - fmt.Sprintf("exceeded max depth of %d", max_flow_level)) - } - return true -} - -// Decrease the flow level. -func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { - if parser.flow_level > 0 { - parser.flow_level-- - last := len(parser.simple_keys) - 1 - delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) - parser.simple_keys = parser.simple_keys[:last] - } - return true -} - -// max_indents limits the indents stack size -const max_indents = 10000 - -// Push the current indentation level to the stack and set the new level -// the current column is greater than the indentation level. In this case, -// append or insert the specified token into the token queue. -func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - if parser.indent < column { - // Push the current indentation level to the stack and set the new - // indentation level. - parser.indents = append(parser.indents, parser.indent) - parser.indent = column - if len(parser.indents) > max_indents { - return yaml_parser_set_scanner_error(parser, - "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, - fmt.Sprintf("exceeded max depth of %d", max_indents)) - } - - // Create a token and insert it into the queue. - token := yaml_token_t{ - typ: typ, - start_mark: mark, - end_mark: mark, - } - if number > -1 { - number -= parser.tokens_parsed - } - yaml_insert_token(parser, number, &token) - } - return true -} - -// Pop indentation levels from the indents stack until the current level -// becomes less or equal to the column. For each indentation level, append -// the BLOCK-END token. -func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - // Loop through the indentation levels in the stack. - for parser.indent > column { - // Create a token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - - // Pop the indentation level. - parser.indent = parser.indents[len(parser.indents)-1] - parser.indents = parser.indents[:len(parser.indents)-1] - } - return true -} - -// Initialize the scanner and produce the STREAM-START token. -func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { - - // Set the initial indentation. - parser.indent = -1 - - // Initialize the simple key stack. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - parser.simple_keys_by_tok = make(map[int]int) - - // A simple key is allowed at the beginning of the stream. - parser.simple_key_allowed = true - - // We have started. - parser.stream_start_produced = true - - // Create the STREAM-START token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_START_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - encoding: parser.encoding, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the STREAM-END token and shut down the scanner. -func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { - - // Force new line. - if parser.mark.column != 0 { - parser.mark.column = 0 - parser.mark.line++ - } - - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the STREAM-END token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. -func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. - token := yaml_token_t{} - if !yaml_parser_scan_directive(parser, &token) { - return false - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the DOCUMENT-START or DOCUMENT-END token. -func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Consume the token. - start_mark := parser.mark - - skip(parser) - skip(parser) - skip(parser) - - end_mark := parser.mark - - // Create the DOCUMENT-START or DOCUMENT-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. -func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // The indicators '[' and '{' may start a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // Increase the flow level. - if !yaml_parser_increase_flow_level(parser) { - return false - } - - // A simple key may follow the indicators '[' and '{'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. -func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset any potential simple key on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Decrease the flow level. - if !yaml_parser_decrease_flow_level(parser) { - return false - } - - // No simple keys after the indicators ']' and '}'. - parser.simple_key_allowed = false - - // Consume the token. - - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-ENTRY token. -func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after ','. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_FLOW_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the BLOCK-ENTRY token. -func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { - // Check if the scanner is in the block context. - if parser.flow_level == 0 { - // Check if we are allowed to start a new entry. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "block sequence entries are not allowed in this context") - } - // Add the BLOCK-SEQUENCE-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { - return false - } - } else { - // It is an error for the '-' indicator to occur in the flow context, - // but we let the Parser detect and report about it because the Parser - // is able to point to the context. - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '-'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the BLOCK-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the KEY token. -func yaml_parser_fetch_key(parser *yaml_parser_t) bool { - - // In the block context, additional checks are required. - if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping keys are not allowed in this context") - } - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '?' in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the KEY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the VALUE token. -func yaml_parser_fetch_value(parser *yaml_parser_t) bool { - - simple_key := &parser.simple_keys[len(parser.simple_keys)-1] - - // Have we found a simple key? - if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { - return false - - } else if valid { - - // Create the KEY token and insert it into the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: simple_key.mark, - end_mark: simple_key.mark, - } - yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) - - // In the block context, we may need to add the BLOCK-MAPPING-START token. - if !yaml_parser_roll_indent(parser, simple_key.mark.column, - simple_key.token_number, - yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { - return false - } - - // Remove the simple key. - simple_key.possible = false - delete(parser.simple_keys_by_tok, simple_key.token_number) - - // A simple key cannot follow another simple key. - parser.simple_key_allowed = false - - } else { - // The ':' indicator follows a complex key. - - // In the block context, extra checks are required. - if parser.flow_level == 0 { - - // Check if we are allowed to start a complex value. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping values are not allowed in this context") - } - - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Simple keys after ':' are allowed in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - } - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the VALUE token and append it to the queue. - token := yaml_token_t{ - typ: yaml_VALUE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the ALIAS or ANCHOR token. -func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // An anchor or an alias could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow an anchor or an alias. - parser.simple_key_allowed = false - - // Create the ALIAS or ANCHOR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_anchor(parser, &token, typ) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the TAG token. -func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { - // A tag could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a tag. - parser.simple_key_allowed = false - - // Create the TAG token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_tag(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. -func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { - // Remove any potential simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // A simple key may follow a block scalar. - parser.simple_key_allowed = true - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_block_scalar(parser, &token, literal) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. -func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_flow_scalar(parser, &token, single) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,plain) token. -func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_plain_scalar(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Eat whitespaces and comments until the next token is found. -func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { - - // Until the next token is not found. - for { - // Allow the BOM mark to start a line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { - skip(parser) - } - - // Eat whitespaces. - // Tabs are allowed: - // - in the flow context - // - in the block context, but not at the beginning of the line or - // after '-', '?', or ':' (complex value). - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Eat a comment until a line break. - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // If it is a line break, eat it. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - - // In the block context, a new line may start a simple key. - if parser.flow_level == 0 { - parser.simple_key_allowed = true - } - } else { - break // We have found a token. - } - } - - return true -} - -// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { - // Eat '%'. - start_mark := parser.mark - skip(parser) - - // Scan the directive name. - var name []byte - if !yaml_parser_scan_directive_name(parser, start_mark, &name) { - return false - } - - // Is it a YAML directive? - if bytes.Equal(name, []byte("YAML")) { - // Scan the VERSION directive value. - var major, minor int8 - if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { - return false - } - end_mark := parser.mark - - // Create a VERSION-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_VERSION_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - major: major, - minor: minor, - } - - // Is it a TAG directive? - } else if bytes.Equal(name, []byte("TAG")) { - // Scan the TAG directive value. - var handle, prefix []byte - if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { - return false - } - end_mark := parser.mark - - // Create a TAG-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_TAG_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - prefix: prefix, - } - - // Unknown directive. - } else { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unknown directive name") - return false - } - - // Eat the rest of the line including any comments. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - return true -} - -// Scan the directive name. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ -// -func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { - // Consume the directive name. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - var s []byte - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the name is empty. - if len(s) == 0 { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "could not find expected directive name") - return false - } - - // Check for an blank character after the name. - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unexpected non-alphabetical character") - return false - } - *name = s - return true -} - -// Scan the value of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ -func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the major version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { - return false - } - - // Eat '.'. - if parser.buffer[parser.buffer_pos] != '.' { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected digit or '.' character") - } - - skip(parser) - - // Consume the minor version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { - return false - } - return true -} - -const max_number_length = 2 - -// Scan the version number of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ -func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { - - // Repeat while the next character is digit. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var value, length int8 - for is_digit(parser.buffer, parser.buffer_pos) { - // Check if the number is too long. - length++ - if length > max_number_length { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "found extremely long version number") - } - value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the number was present. - if length == 0 { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected version number") - } - *number = value - return true -} - -// Scan the value of a TAG-DIRECTIVE token. -// -// Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { - var handle_value, prefix_value []byte - - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a handle. - if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { - return false - } - - // Expect a whitespace. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blank(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace") - return false - } - - // Eat whitespaces. - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a prefix. - if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { - return false - } - - // Expect a whitespace or line break. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace or line break") - return false - } - - *handle = handle_value - *prefix = prefix_value - return true -} - -func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { - var s []byte - - // Eat the indicator character. - start_mark := parser.mark - skip(parser) - - // Consume the value. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - end_mark := parser.mark - - /* - * Check if length of the anchor is greater than 0 and it is followed by - * a whitespace character or one of the indicators: - * - * '?', ':', ',', ']', '}', '%', '@', '`'. - */ - - if len(s) == 0 || - !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || - parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '`') { - context := "while scanning an alias" - if typ == yaml_ANCHOR_TOKEN { - context = "while scanning an anchor" - } - yaml_parser_set_scanner_error(parser, context, start_mark, - "did not find expected alphabetic or numeric character") - return false - } - - // Create a token. - *token = yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - value: s, - } - - return true -} - -/* - * Scan a TAG token. - */ - -func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { - var handle, suffix []byte - - start_mark := parser.mark - - // Check if the tag is in the canonical form. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - if parser.buffer[parser.buffer_pos+1] == '<' { - // Keep the handle as '' - - // Eat '!<' - skip(parser) - skip(parser) - - // Consume the tag value. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - - // Check for '>' and eat it. - if parser.buffer[parser.buffer_pos] != '>' { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find the expected '>'") - return false - } - - skip(parser) - } else { - // The tag has either the '!suffix' or the '!handle!suffix' form. - - // First, try to scan a handle. - if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { - return false - } - - // Check if it is, indeed, handle. - if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { - // Scan the suffix now. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - } else { - // It wasn't a handle after all. Scan the rest of the tag. - if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { - return false - } - - // Set the handle to '!'. - handle = []byte{'!'} - - // A special case: the '!' tag. Set the handle to '' and the - // suffix to '!'. - if len(suffix) == 0 { - handle, suffix = suffix, handle - } - } - } - - // Check the character which ends the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find expected whitespace or line break") - return false - } - - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_TAG_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - suffix: suffix, - } - return true -} - -// Scan a tag handle. -func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { - // Check the initial '!' character. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] != '!' { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - - var s []byte - - // Copy the '!' character. - s = read(parser, s) - - // Copy all subsequent alphabetical and numerical characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the trailing character is '!' and copy it. - if parser.buffer[parser.buffer_pos] == '!' { - s = read(parser, s) - } else { - // It's either the '!' tag or not really a tag handle. If it's a %TAG - // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && string(s) != "!" { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - } - - *handle = s - return true -} - -// Scan a tag. -func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { - //size_t length = head ? strlen((char *)head) : 0 - var s []byte - hasTag := len(head) > 0 - - // Copy the head if needed. - // - // Note that we don't copy the leading '!' character. - if len(head) > 1 { - s = append(s, head[1:]...) - } - - // Scan the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // The set of characters that may appear in URI is as follows: - // - // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', - // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', - // '%'. - // [Go] Convert this into more reasonable logic. - for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || - parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || - parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || - parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || - parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || - parser.buffer[parser.buffer_pos] == '%' { - // Check if it is a URI-escape sequence. - if parser.buffer[parser.buffer_pos] == '%' { - if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { - return false - } - } else { - s = read(parser, s) - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - hasTag = true - } - - if !hasTag { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected tag URI") - return false - } - *uri = s - return true -} - -// Decode an URI-escape sequence corresponding to a single UTF-8 character. -func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { - - // Decode the required number of characters. - w := 1024 - for w > 0 { - // Check for a URI-escaped octet. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - - if !(parser.buffer[parser.buffer_pos] == '%' && - is_hex(parser.buffer, parser.buffer_pos+1) && - is_hex(parser.buffer, parser.buffer_pos+2)) { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find URI escaped octet") - } - - // Get the octet. - octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) - - // If it is the leading octet, determine the length of the UTF-8 sequence. - if w == 1024 { - w = width(octet) - if w == 0 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect leading UTF-8 octet") - } - } else { - // Check if the trailing octet is correct. - if octet&0xC0 != 0x80 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect trailing UTF-8 octet") - } - } - - // Copy the octet and move the pointers. - *s = append(*s, octet) - skip(parser) - skip(parser) - skip(parser) - w-- - } - return true -} - -// Scan a block scalar. -func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { - // Eat the indicator '|' or '>'. - start_mark := parser.mark - skip(parser) - - // Scan the additional block scalar indicators. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check for a chomping indicator. - var chomping, increment int - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - // Set the chomping method and eat the indicator. - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - - // Check for an indentation indicator. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_digit(parser.buffer, parser.buffer_pos) { - // Check that the indentation is greater than 0. - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an indentation indicator equal to 0") - return false - } - - // Get the indentation level and eat the indicator. - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - } - - } else if is_digit(parser.buffer, parser.buffer_pos) { - // Do the same as above, but in the opposite order. - - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an indentation indicator equal to 0") - return false - } - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - } - } - - // Eat whitespaces and comments to the end of the line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - end_mark := parser.mark - - // Set the indentation level if it was specified. - var indent int - if increment > 0 { - if parser.indent >= 0 { - indent = parser.indent + increment - } else { - indent = increment - } - } - - // Scan the leading line breaks and determine the indentation level if needed. - var s, leading_break, trailing_breaks []byte - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - - // Scan the block scalar content. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var leading_blank, trailing_blank bool - for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { - // We are at the beginning of a non-empty line. - - // Is it a trailing whitespace? - trailing_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Check if we need to fold the leading line break. - if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { - // Do we need to join the lines by space? - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } - } else { - s = append(s, leading_break...) - } - leading_break = leading_break[:0] - - // Append the remaining line breaks. - s = append(s, trailing_breaks...) - trailing_breaks = trailing_breaks[:0] - - // Is it a leading whitespace? - leading_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Consume the current line. - for !is_breakz(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - leading_break = read_line(parser, leading_break) - - // Eat the following indentation spaces and line breaks. - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - } - - // Chomp the tail. - if chomping != -1 { - s = append(s, leading_break...) - } - if chomping == 1 { - s = append(s, trailing_breaks...) - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_LITERAL_SCALAR_STYLE, - } - if !literal { - token.style = yaml_FOLDED_SCALAR_STYLE - } - return true -} - -// Scan indentation spaces and line breaks for a block scalar. Determine the -// indentation level if needed. -func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { - *end_mark = parser.mark - - // Eat the indentation spaces and line breaks. - max_indent := 0 - for { - // Eat the indentation spaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.mark.column > max_indent { - max_indent = parser.mark.column - } - - // Check for a tab character messing the indentation. - if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { - return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found a tab character where an indentation space is expected") - } - - // Have we found a non-empty line? - if !is_break(parser.buffer, parser.buffer_pos) { - break - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - // [Go] Should really be returning breaks instead. - *breaks = read_line(parser, *breaks) - *end_mark = parser.mark - } - - // Determine the indentation level if needed. - if *indent == 0 { - *indent = max_indent - if *indent < parser.indent+1 { - *indent = parser.indent + 1 - } - if *indent < 1 { - *indent = 1 - } - } - return true -} - -// Scan a quoted scalar. -func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { - // Eat the left quote. - start_mark := parser.mark - skip(parser) - - // Consume the content of the quoted scalar. - var s, leading_break, trailing_breaks, whitespaces []byte - for { - // Check that there are no document indicators at the beginning of the line. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected document indicator") - return false - } - - // Check for EOF. - if is_z(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected end of stream") - return false - } - - // Consume non-blank characters. - leading_blanks := false - for !is_blankz(parser.buffer, parser.buffer_pos) { - if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { - // Is is an escaped single quote. - s = append(s, '\'') - skip(parser) - skip(parser) - - } else if single && parser.buffer[parser.buffer_pos] == '\'' { - // It is a right single quote. - break - } else if !single && parser.buffer[parser.buffer_pos] == '"' { - // It is a right double quote. - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { - // It is an escaped line break. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - skip(parser) - skip_line(parser) - leading_blanks = true - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' { - // It is an escape sequence. - code_length := 0 - - // Check the escape character. - switch parser.buffer[parser.buffer_pos+1] { - case '0': - s = append(s, 0) - case 'a': - s = append(s, '\x07') - case 'b': - s = append(s, '\x08') - case 't', '\t': - s = append(s, '\x09') - case 'n': - s = append(s, '\x0A') - case 'v': - s = append(s, '\x0B') - case 'f': - s = append(s, '\x0C') - case 'r': - s = append(s, '\x0D') - case 'e': - s = append(s, '\x1B') - case ' ': - s = append(s, '\x20') - case '"': - s = append(s, '"') - case '\'': - s = append(s, '\'') - case '\\': - s = append(s, '\\') - case 'N': // NEL (#x85) - s = append(s, '\xC2') - s = append(s, '\x85') - case '_': // #xA0 - s = append(s, '\xC2') - s = append(s, '\xA0') - case 'L': // LS (#x2028) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA8') - case 'P': // PS (#x2029) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA9') - case 'x': - code_length = 2 - case 'u': - code_length = 4 - case 'U': - code_length = 8 - default: - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found unknown escape character") - return false - } - - skip(parser) - skip(parser) - - // Consume an arbitrary escape code. - if code_length > 0 { - var value int - - // Scan the character value. - if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { - return false - } - for k := 0; k < code_length; k++ { - if !is_hex(parser.buffer, parser.buffer_pos+k) { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "did not find expected hexdecimal number") - return false - } - value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) - } - - // Check the value and write the character. - if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found invalid Unicode character escape code") - return false - } - if value <= 0x7F { - s = append(s, byte(value)) - } else if value <= 0x7FF { - s = append(s, byte(0xC0+(value>>6))) - s = append(s, byte(0x80+(value&0x3F))) - } else if value <= 0xFFFF { - s = append(s, byte(0xE0+(value>>12))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } else { - s = append(s, byte(0xF0+(value>>18))) - s = append(s, byte(0x80+((value>>12)&0x3F))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } - - // Advance the pointer. - for k := 0; k < code_length; k++ { - skip(parser) - } - } - } else { - // It is a non-escaped non-blank character. - s = read(parser, s) - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we are at the end of the scalar. - if single { - if parser.buffer[parser.buffer_pos] == '\'' { - break - } - } else { - if parser.buffer[parser.buffer_pos] == '"' { - break - } - } - - // Consume blank characters. - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Join the whitespaces or fold line breaks. - if leading_blanks { - // Do we need to fold line breaks? - if len(leading_break) > 0 && leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Eat the right quote. - skip(parser) - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_SINGLE_QUOTED_SCALAR_STYLE, - } - if !single { - token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - return true -} - -// Scan a plain scalar. -func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { - - var s, leading_break, trailing_breaks, whitespaces []byte - var leading_blanks bool - var indent = parser.indent + 1 - - start_mark := parser.mark - end_mark := parser.mark - - // Consume the content of the plain scalar. - for { - // Check for a document indicator. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - break - } - - // Check for a comment. - if parser.buffer[parser.buffer_pos] == '#' { - break - } - - // Consume non-blank characters. - for !is_blankz(parser.buffer, parser.buffer_pos) { - - // Check for indicators that may end a plain scalar. - if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level > 0 && - (parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}')) { - break - } - - // Check if we need to join whitespaces and breaks. - if leading_blanks || len(whitespaces) > 0 { - if leading_blanks { - // Do we need to fold line breaks? - if leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - leading_blanks = false - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Copy the character. - s = read(parser, s) - - end_mark = parser.mark - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Is it the end? - if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { - break - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - - // Check for tab characters that abuse indentation. - if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found a tab character that violates indentation") - return false - } - - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check indentation level. - if parser.flow_level == 0 && parser.mark.column < indent { - break - } - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_PLAIN_SCALAR_STYLE, - } - - // Note that we change the 'simple_key_allowed' flag. - if leading_blanks { - parser.simple_key_allowed = true - } - return true -} diff --git a/vendor/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go deleted file mode 100644 index 4c45e660a8..0000000000 --- a/vendor/gopkg.in/yaml.v2/sorter.go +++ /dev/null @@ -1,113 +0,0 @@ -package yaml - -import ( - "reflect" - "unicode" -) - -type keyList []reflect.Value - -func (l keyList) Len() int { return len(l) } -func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l keyList) Less(i, j int) bool { - a := l[i] - b := l[j] - ak := a.Kind() - bk := b.Kind() - for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { - a = a.Elem() - ak = a.Kind() - } - for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { - b = b.Elem() - bk = b.Kind() - } - af, aok := keyFloat(a) - bf, bok := keyFloat(b) - if aok && bok { - if af != bf { - return af < bf - } - if ak != bk { - return ak < bk - } - return numLess(a, b) - } - if ak != reflect.String || bk != reflect.String { - return ak < bk - } - ar, br := []rune(a.String()), []rune(b.String()) - for i := 0; i < len(ar) && i < len(br); i++ { - if ar[i] == br[i] { - continue - } - al := unicode.IsLetter(ar[i]) - bl := unicode.IsLetter(br[i]) - if al && bl { - return ar[i] < br[i] - } - if al || bl { - return bl - } - var ai, bi int - var an, bn int64 - if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { - if ar[j] != '0' { - an = 1 - bn = 1 - break - } - } - } - for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { - an = an*10 + int64(ar[ai]-'0') - } - for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { - bn = bn*10 + int64(br[bi]-'0') - } - if an != bn { - return an < bn - } - if ai != bi { - return ai < bi - } - return ar[i] < br[i] - } - return len(ar) < len(br) -} - -// keyFloat returns a float value for v if it is a number/bool -// and whether it is a number/bool or not. -func keyFloat(v reflect.Value) (f float64, ok bool) { - switch v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return float64(v.Int()), true - case reflect.Float32, reflect.Float64: - return v.Float(), true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return float64(v.Uint()), true - case reflect.Bool: - if v.Bool() { - return 1, true - } - return 0, true - } - return 0, false -} - -// numLess returns whether a < b. -// a and b must necessarily have the same kind. -func numLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return a.Int() < b.Int() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Bool: - return !a.Bool() && b.Bool() - } - panic("not a number") -} diff --git a/vendor/gopkg.in/yaml.v2/writerc.go b/vendor/gopkg.in/yaml.v2/writerc.go deleted file mode 100644 index a2dde608cb..0000000000 --- a/vendor/gopkg.in/yaml.v2/writerc.go +++ /dev/null @@ -1,26 +0,0 @@ -package yaml - -// Set the writer error and return false. -func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_WRITER_ERROR - emitter.problem = problem - return false -} - -// Flush the output buffer. -func yaml_emitter_flush(emitter *yaml_emitter_t) bool { - if emitter.write_handler == nil { - panic("write handler not set") - } - - // Check if the buffer is empty. - if emitter.buffer_pos == 0 { - return true - } - - if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - return true -} diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go deleted file mode 100644 index 30813884c0..0000000000 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ /dev/null @@ -1,478 +0,0 @@ -// Package yaml implements YAML support for the Go language. -// -// Source code and other details for the project are available at GitHub: -// -// https://github.com/go-yaml/yaml -// -package yaml - -import ( - "errors" - "fmt" - "io" - "reflect" - "strings" - "sync" -) - -// MapSlice encodes and decodes as a YAML map. -// The order of keys is preserved when encoding and decoding. -type MapSlice []MapItem - -// MapItem is an item in a MapSlice. -type MapItem struct { - Key, Value interface{} -} - -// The Unmarshaler interface may be implemented by types to customize their -// behavior when being unmarshaled from a YAML document. The UnmarshalYAML -// method receives a function that may be called to unmarshal the original -// YAML value into a field or variable. It is safe to call the unmarshal -// function parameter more than once if necessary. -type Unmarshaler interface { - UnmarshalYAML(unmarshal func(interface{}) error) error -} - -// The Marshaler interface may be implemented by types to customize their -// behavior when being marshaled into a YAML document. The returned value -// is marshaled in place of the original value implementing Marshaler. -// -// If an error is returned by MarshalYAML, the marshaling procedure stops -// and returns with the provided error. -type Marshaler interface { - MarshalYAML() (interface{}, error) -} - -// Unmarshal decodes the first document found within the in byte slice -// and assigns decoded values into the out value. -// -// Maps and pointers (to a struct, string, int, etc) are accepted as out -// values. If an internal pointer within a struct is not initialized, -// the yaml package will initialize it if necessary for unmarshalling -// the provided data. The out parameter must not be nil. -// -// The type of the decoded values should be compatible with the respective -// values in out. If one or more values cannot be decoded due to a type -// mismatches, decoding continues partially until the end of the YAML -// content, and a *yaml.TypeError is returned with details for all -// missed values. -// -// Struct fields are only unmarshalled if they are exported (have an -// upper case first letter), and are unmarshalled using the field name -// lowercased as the default key. Custom keys may be defined via the -// "yaml" name in the field tag: the content preceding the first comma -// is used as the key, and the following comma-separated options are -// used to tweak the marshalling process (see Marshal). -// Conflicting names result in a runtime error. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) -// -// See the documentation of Marshal for the format of tags and a list of -// supported tag options. -// -func Unmarshal(in []byte, out interface{}) (err error) { - return unmarshal(in, out, false) -} - -// UnmarshalStrict is like Unmarshal except that any fields that are found -// in the data that do not have corresponding struct members, or mapping -// keys that are duplicates, will result in -// an error. -func UnmarshalStrict(in []byte, out interface{}) (err error) { - return unmarshal(in, out, true) -} - -// A Decoder reads and decodes YAML values from an input stream. -type Decoder struct { - strict bool - parser *parser -} - -// NewDecoder returns a new decoder that reads from r. -// -// The decoder introduces its own buffering and may read -// data from r beyond the YAML values requested. -func NewDecoder(r io.Reader) *Decoder { - return &Decoder{ - parser: newParserFromReader(r), - } -} - -// SetStrict sets whether strict decoding behaviour is enabled when -// decoding items in the data (see UnmarshalStrict). By default, decoding is not strict. -func (dec *Decoder) SetStrict(strict bool) { - dec.strict = strict -} - -// Decode reads the next YAML-encoded value from its input -// and stores it in the value pointed to by v. -// -// See the documentation for Unmarshal for details about the -// conversion of YAML into a Go value. -func (dec *Decoder) Decode(v interface{}) (err error) { - d := newDecoder(dec.strict) - defer handleErr(&err) - node := dec.parser.parse() - if node == nil { - return io.EOF - } - out := reflect.ValueOf(v) - if out.Kind() == reflect.Ptr && !out.IsNil() { - out = out.Elem() - } - d.unmarshal(node, out) - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -func unmarshal(in []byte, out interface{}, strict bool) (err error) { - defer handleErr(&err) - d := newDecoder(strict) - p := newParser(in) - defer p.destroy() - node := p.parse() - if node != nil { - v := reflect.ValueOf(out) - if v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - d.unmarshal(node, v) - } - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -// Marshal serializes the value provided into a YAML document. The structure -// of the generated document will reflect the structure of the value itself. -// Maps and pointers (to struct, string, int, etc) are accepted as the in value. -// -// Struct fields are only marshalled if they are exported (have an upper case -// first letter), and are marshalled using the field name lowercased as the -// default key. Custom keys may be defined via the "yaml" name in the field -// tag: the content preceding the first comma is used as the key, and the -// following comma-separated options are used to tweak the marshalling process. -// Conflicting names result in a runtime error. -// -// The field tag format accepted is: -// -// `(...) yaml:"[][,[,]]" (...)` -// -// The following flags are currently supported: -// -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. -// -// flow Marshal using a flow style (useful for structs, -// sequences and maps). -// -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. -// -// In addition, if the key is "-", the field is ignored. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// -func Marshal(in interface{}) (out []byte, err error) { - defer handleErr(&err) - e := newEncoder() - defer e.destroy() - e.marshalDoc("", reflect.ValueOf(in)) - e.finish() - out = e.out - return -} - -// An Encoder writes YAML values to an output stream. -type Encoder struct { - encoder *encoder -} - -// NewEncoder returns a new encoder that writes to w. -// The Encoder should be closed after use to flush all data -// to w. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ - encoder: newEncoderWithWriter(w), - } -} - -// Encode writes the YAML encoding of v to the stream. -// If multiple items are encoded to the stream, the -// second and subsequent document will be preceded -// with a "---" document separator, but the first will not. -// -// See the documentation for Marshal for details about the conversion of Go -// values to YAML. -func (e *Encoder) Encode(v interface{}) (err error) { - defer handleErr(&err) - e.encoder.marshalDoc("", reflect.ValueOf(v)) - return nil -} - -// Close closes the encoder by writing any remaining data. -// It does not write a stream terminating string "...". -func (e *Encoder) Close() (err error) { - defer handleErr(&err) - e.encoder.finish() - return nil -} - -func handleErr(err *error) { - if v := recover(); v != nil { - if e, ok := v.(yamlError); ok { - *err = e.err - } else { - panic(v) - } - } -} - -type yamlError struct { - err error -} - -func fail(err error) { - panic(yamlError{err}) -} - -func failf(format string, args ...interface{}) { - panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) -} - -// A TypeError is returned by Unmarshal when one or more fields in -// the YAML document cannot be properly decoded into the requested -// types. When this error is returned, the value is still -// unmarshaled partially. -type TypeError struct { - Errors []string -} - -func (e *TypeError) Error() string { - return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) -} - -// -------------------------------------------------------------------------- -// Maintain a mapping of keys to structure field indexes - -// The code in this section was copied from mgo/bson. - -// structInfo holds details for the serialization of fields of -// a given struct. -type structInfo struct { - FieldsMap map[string]fieldInfo - FieldsList []fieldInfo - - // InlineMap is the number of the field in the struct that - // contains an ,inline map, or -1 if there's none. - InlineMap int -} - -type fieldInfo struct { - Key string - Num int - OmitEmpty bool - Flow bool - // Id holds the unique field identifier, so we can cheaply - // check for field duplicates without maintaining an extra map. - Id int - - // Inline holds the field index if the field is part of an inlined struct. - Inline []int -} - -var structMap = make(map[reflect.Type]*structInfo) -var fieldMapMutex sync.RWMutex - -func getStructInfo(st reflect.Type) (*structInfo, error) { - fieldMapMutex.RLock() - sinfo, found := structMap[st] - fieldMapMutex.RUnlock() - if found { - return sinfo, nil - } - - n := st.NumField() - fieldsMap := make(map[string]fieldInfo) - fieldsList := make([]fieldInfo, 0, n) - inlineMap := -1 - for i := 0; i != n; i++ { - field := st.Field(i) - if field.PkgPath != "" && !field.Anonymous { - continue // Private field - } - - info := fieldInfo{Num: i} - - tag := field.Tag.Get("yaml") - if tag == "" && strings.Index(string(field.Tag), ":") < 0 { - tag = string(field.Tag) - } - if tag == "-" { - continue - } - - inline := false - fields := strings.Split(tag, ",") - if len(fields) > 1 { - for _, flag := range fields[1:] { - switch flag { - case "omitempty": - info.OmitEmpty = true - case "flow": - info.Flow = true - case "inline": - inline = true - default: - return nil, errors.New(fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)) - } - } - tag = fields[0] - } - - if inline { - switch field.Type.Kind() { - case reflect.Map: - if inlineMap >= 0 { - return nil, errors.New("Multiple ,inline maps in struct " + st.String()) - } - if field.Type.Key() != reflect.TypeOf("") { - return nil, errors.New("Option ,inline needs a map with string keys in struct " + st.String()) - } - inlineMap = info.Num - case reflect.Struct: - sinfo, err := getStructInfo(field.Type) - if err != nil { - return nil, err - } - for _, finfo := range sinfo.FieldsList { - if _, found := fieldsMap[finfo.Key]; found { - msg := "Duplicated key '" + finfo.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - if finfo.Inline == nil { - finfo.Inline = []int{i, finfo.Num} - } else { - finfo.Inline = append([]int{i}, finfo.Inline...) - } - finfo.Id = len(fieldsList) - fieldsMap[finfo.Key] = finfo - fieldsList = append(fieldsList, finfo) - } - default: - //return nil, errors.New("Option ,inline needs a struct value or map field") - return nil, errors.New("Option ,inline needs a struct value field") - } - continue - } - - if tag != "" { - info.Key = tag - } else { - info.Key = strings.ToLower(field.Name) - } - - if _, found = fieldsMap[info.Key]; found { - msg := "Duplicated key '" + info.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - - info.Id = len(fieldsList) - fieldsList = append(fieldsList, info) - fieldsMap[info.Key] = info - } - - sinfo = &structInfo{ - FieldsMap: fieldsMap, - FieldsList: fieldsList, - InlineMap: inlineMap, - } - - fieldMapMutex.Lock() - structMap[st] = sinfo - fieldMapMutex.Unlock() - return sinfo, nil -} - -// IsZeroer is used to check whether an object is zero to -// determine whether it should be omitted when marshaling -// with the omitempty flag. One notable implementation -// is time.Time. -type IsZeroer interface { - IsZero() bool -} - -func isZero(v reflect.Value) bool { - kind := v.Kind() - if z, ok := v.Interface().(IsZeroer); ok { - if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { - return true - } - return z.IsZero() - } - switch kind { - case reflect.String: - return len(v.String()) == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Slice: - return v.Len() == 0 - case reflect.Map: - return v.Len() == 0 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Struct: - vt := v.Type() - for i := v.NumField() - 1; i >= 0; i-- { - if vt.Field(i).PkgPath != "" { - continue // Private field - } - if !isZero(v.Field(i)) { - return false - } - } - return true - } - return false -} - -// FutureLineWrap globally disables line wrapping when encoding long strings. -// This is a temporary and thus deprecated method introduced to faciliate -// migration towards v3, which offers more control of line lengths on -// individual encodings, and has a default matching the behavior introduced -// by this function. -// -// The default formatting of v2 was erroneously changed in v2.3.0 and reverted -// in v2.4.0, at which point this function was introduced to help migration. -func FutureLineWrap() { - disableLineWrapping = true -} diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go deleted file mode 100644 index f6a9c8e34b..0000000000 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ /dev/null @@ -1,739 +0,0 @@ -package yaml - -import ( - "fmt" - "io" -) - -// The version directive data. -type yaml_version_directive_t struct { - major int8 // The major version number. - minor int8 // The minor version number. -} - -// The tag directive data. -type yaml_tag_directive_t struct { - handle []byte // The tag handle. - prefix []byte // The tag prefix. -} - -type yaml_encoding_t int - -// The stream encoding. -const ( - // Let the parser choose the encoding. - yaml_ANY_ENCODING yaml_encoding_t = iota - - yaml_UTF8_ENCODING // The default UTF-8 encoding. - yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. - yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. -) - -type yaml_break_t int - -// Line break types. -const ( - // Let the parser choose the break type. - yaml_ANY_BREAK yaml_break_t = iota - - yaml_CR_BREAK // Use CR for line breaks (Mac style). - yaml_LN_BREAK // Use LN for line breaks (Unix style). - yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). -) - -type yaml_error_type_t int - -// Many bad things could happen with the parser and emitter. -const ( - // No error is produced. - yaml_NO_ERROR yaml_error_type_t = iota - - yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. - yaml_READER_ERROR // Cannot read or decode the input stream. - yaml_SCANNER_ERROR // Cannot scan the input stream. - yaml_PARSER_ERROR // Cannot parse the input stream. - yaml_COMPOSER_ERROR // Cannot compose a YAML document. - yaml_WRITER_ERROR // Cannot write to the output stream. - yaml_EMITTER_ERROR // Cannot emit a YAML stream. -) - -// The pointer position. -type yaml_mark_t struct { - index int // The position index. - line int // The position line. - column int // The position column. -} - -// Node Styles - -type yaml_style_t int8 - -type yaml_scalar_style_t yaml_style_t - -// Scalar styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota - - yaml_PLAIN_SCALAR_STYLE // The plain scalar style. - yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. - yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. - yaml_LITERAL_SCALAR_STYLE // The literal scalar style. - yaml_FOLDED_SCALAR_STYLE // The folded scalar style. -) - -type yaml_sequence_style_t yaml_style_t - -// Sequence styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota - - yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. - yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. -) - -type yaml_mapping_style_t yaml_style_t - -// Mapping styles. -const ( - // Let the emitter choose the style. - yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota - - yaml_BLOCK_MAPPING_STYLE // The block mapping style. - yaml_FLOW_MAPPING_STYLE // The flow mapping style. -) - -// Tokens - -type yaml_token_type_t int - -// Token types. -const ( - // An empty token. - yaml_NO_TOKEN yaml_token_type_t = iota - - yaml_STREAM_START_TOKEN // A STREAM-START token. - yaml_STREAM_END_TOKEN // A STREAM-END token. - - yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. - yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. - yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. - yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. - - yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. - yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. - yaml_BLOCK_END_TOKEN // A BLOCK-END token. - - yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. - yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. - yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. - yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. - - yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. - yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. - yaml_KEY_TOKEN // A KEY token. - yaml_VALUE_TOKEN // A VALUE token. - - yaml_ALIAS_TOKEN // An ALIAS token. - yaml_ANCHOR_TOKEN // An ANCHOR token. - yaml_TAG_TOKEN // A TAG token. - yaml_SCALAR_TOKEN // A SCALAR token. -) - -func (tt yaml_token_type_t) String() string { - switch tt { - case yaml_NO_TOKEN: - return "yaml_NO_TOKEN" - case yaml_STREAM_START_TOKEN: - return "yaml_STREAM_START_TOKEN" - case yaml_STREAM_END_TOKEN: - return "yaml_STREAM_END_TOKEN" - case yaml_VERSION_DIRECTIVE_TOKEN: - return "yaml_VERSION_DIRECTIVE_TOKEN" - case yaml_TAG_DIRECTIVE_TOKEN: - return "yaml_TAG_DIRECTIVE_TOKEN" - case yaml_DOCUMENT_START_TOKEN: - return "yaml_DOCUMENT_START_TOKEN" - case yaml_DOCUMENT_END_TOKEN: - return "yaml_DOCUMENT_END_TOKEN" - case yaml_BLOCK_SEQUENCE_START_TOKEN: - return "yaml_BLOCK_SEQUENCE_START_TOKEN" - case yaml_BLOCK_MAPPING_START_TOKEN: - return "yaml_BLOCK_MAPPING_START_TOKEN" - case yaml_BLOCK_END_TOKEN: - return "yaml_BLOCK_END_TOKEN" - case yaml_FLOW_SEQUENCE_START_TOKEN: - return "yaml_FLOW_SEQUENCE_START_TOKEN" - case yaml_FLOW_SEQUENCE_END_TOKEN: - return "yaml_FLOW_SEQUENCE_END_TOKEN" - case yaml_FLOW_MAPPING_START_TOKEN: - return "yaml_FLOW_MAPPING_START_TOKEN" - case yaml_FLOW_MAPPING_END_TOKEN: - return "yaml_FLOW_MAPPING_END_TOKEN" - case yaml_BLOCK_ENTRY_TOKEN: - return "yaml_BLOCK_ENTRY_TOKEN" - case yaml_FLOW_ENTRY_TOKEN: - return "yaml_FLOW_ENTRY_TOKEN" - case yaml_KEY_TOKEN: - return "yaml_KEY_TOKEN" - case yaml_VALUE_TOKEN: - return "yaml_VALUE_TOKEN" - case yaml_ALIAS_TOKEN: - return "yaml_ALIAS_TOKEN" - case yaml_ANCHOR_TOKEN: - return "yaml_ANCHOR_TOKEN" - case yaml_TAG_TOKEN: - return "yaml_TAG_TOKEN" - case yaml_SCALAR_TOKEN: - return "yaml_SCALAR_TOKEN" - } - return "" -} - -// The token structure. -type yaml_token_t struct { - // The token type. - typ yaml_token_type_t - - // The start/end of the token. - start_mark, end_mark yaml_mark_t - - // The stream encoding (for yaml_STREAM_START_TOKEN). - encoding yaml_encoding_t - - // The alias/anchor/scalar value or tag/tag directive handle - // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). - value []byte - - // The tag suffix (for yaml_TAG_TOKEN). - suffix []byte - - // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). - prefix []byte - - // The scalar style (for yaml_SCALAR_TOKEN). - style yaml_scalar_style_t - - // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). - major, minor int8 -} - -// Events - -type yaml_event_type_t int8 - -// Event types. -const ( - // An empty event. - yaml_NO_EVENT yaml_event_type_t = iota - - yaml_STREAM_START_EVENT // A STREAM-START event. - yaml_STREAM_END_EVENT // A STREAM-END event. - yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. - yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. - yaml_ALIAS_EVENT // An ALIAS event. - yaml_SCALAR_EVENT // A SCALAR event. - yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. - yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. - yaml_MAPPING_START_EVENT // A MAPPING-START event. - yaml_MAPPING_END_EVENT // A MAPPING-END event. -) - -var eventStrings = []string{ - yaml_NO_EVENT: "none", - yaml_STREAM_START_EVENT: "stream start", - yaml_STREAM_END_EVENT: "stream end", - yaml_DOCUMENT_START_EVENT: "document start", - yaml_DOCUMENT_END_EVENT: "document end", - yaml_ALIAS_EVENT: "alias", - yaml_SCALAR_EVENT: "scalar", - yaml_SEQUENCE_START_EVENT: "sequence start", - yaml_SEQUENCE_END_EVENT: "sequence end", - yaml_MAPPING_START_EVENT: "mapping start", - yaml_MAPPING_END_EVENT: "mapping end", -} - -func (e yaml_event_type_t) String() string { - if e < 0 || int(e) >= len(eventStrings) { - return fmt.Sprintf("unknown event %d", e) - } - return eventStrings[e] -} - -// The event structure. -type yaml_event_t struct { - - // The event type. - typ yaml_event_type_t - - // The start and end of the event. - start_mark, end_mark yaml_mark_t - - // The document encoding (for yaml_STREAM_START_EVENT). - encoding yaml_encoding_t - - // The version directive (for yaml_DOCUMENT_START_EVENT). - version_directive *yaml_version_directive_t - - // The list of tag directives (for yaml_DOCUMENT_START_EVENT). - tag_directives []yaml_tag_directive_t - - // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). - anchor []byte - - // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - tag []byte - - // The scalar value (for yaml_SCALAR_EVENT). - value []byte - - // Is the document start/end indicator implicit, or the tag optional? - // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). - implicit bool - - // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). - quoted_implicit bool - - // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - style yaml_style_t -} - -func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } -func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } -func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } - -// Nodes - -const ( - yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. - yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. - yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. - yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. - yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. - yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. - - yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. - yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. - - // Not in original libyaml. - yaml_BINARY_TAG = "tag:yaml.org,2002:binary" - yaml_MERGE_TAG = "tag:yaml.org,2002:merge" - - yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. - yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. - yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. -) - -type yaml_node_type_t int - -// Node types. -const ( - // An empty node. - yaml_NO_NODE yaml_node_type_t = iota - - yaml_SCALAR_NODE // A scalar node. - yaml_SEQUENCE_NODE // A sequence node. - yaml_MAPPING_NODE // A mapping node. -) - -// An element of a sequence node. -type yaml_node_item_t int - -// An element of a mapping node. -type yaml_node_pair_t struct { - key int // The key of the element. - value int // The value of the element. -} - -// The node structure. -type yaml_node_t struct { - typ yaml_node_type_t // The node type. - tag []byte // The node tag. - - // The node data. - - // The scalar parameters (for yaml_SCALAR_NODE). - scalar struct { - value []byte // The scalar value. - length int // The length of the scalar value. - style yaml_scalar_style_t // The scalar style. - } - - // The sequence parameters (for YAML_SEQUENCE_NODE). - sequence struct { - items_data []yaml_node_item_t // The stack of sequence items. - style yaml_sequence_style_t // The sequence style. - } - - // The mapping parameters (for yaml_MAPPING_NODE). - mapping struct { - pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). - pairs_start *yaml_node_pair_t // The beginning of the stack. - pairs_end *yaml_node_pair_t // The end of the stack. - pairs_top *yaml_node_pair_t // The top of the stack. - style yaml_mapping_style_t // The mapping style. - } - - start_mark yaml_mark_t // The beginning of the node. - end_mark yaml_mark_t // The end of the node. - -} - -// The document structure. -type yaml_document_t struct { - - // The document nodes. - nodes []yaml_node_t - - // The version directive. - version_directive *yaml_version_directive_t - - // The list of tag directives. - tag_directives_data []yaml_tag_directive_t - tag_directives_start int // The beginning of the tag directives list. - tag_directives_end int // The end of the tag directives list. - - start_implicit int // Is the document start indicator implicit? - end_implicit int // Is the document end indicator implicit? - - // The start/end of the document. - start_mark, end_mark yaml_mark_t -} - -// The prototype of a read handler. -// -// The read handler is called when the parser needs to read more bytes from the -// source. The handler should write not more than size bytes to the buffer. -// The number of written bytes should be set to the size_read variable. -// -// [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). -// [out] buffer The buffer to write the data from the source. -// [in] size The size of the buffer. -// [out] size_read The actual number of bytes read from the source. -// -// On success, the handler should return 1. If the handler failed, -// the returned value should be 0. On EOF, the handler should set the -// size_read to 0 and return 1. -type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) - -// This structure holds information about a potential simple key. -type yaml_simple_key_t struct { - possible bool // Is a simple key possible? - required bool // Is a simple key required? - token_number int // The number of the token. - mark yaml_mark_t // The position mark. -} - -// The states of the parser. -type yaml_parser_state_t int - -const ( - yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota - - yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. - yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. - yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. - yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. - yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. - yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. - yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. - yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. - yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. - yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. - yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. - yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. - yaml_PARSE_END_STATE // Expect nothing. -) - -func (ps yaml_parser_state_t) String() string { - switch ps { - case yaml_PARSE_STREAM_START_STATE: - return "yaml_PARSE_STREAM_START_STATE" - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_START_STATE: - return "yaml_PARSE_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return "yaml_PARSE_DOCUMENT_CONTENT_STATE" - case yaml_PARSE_DOCUMENT_END_STATE: - return "yaml_PARSE_DOCUMENT_END_STATE" - case yaml_PARSE_BLOCK_NODE_STATE: - return "yaml_PARSE_BLOCK_NODE_STATE" - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" - case yaml_PARSE_FLOW_NODE_STATE: - return "yaml_PARSE_FLOW_NODE_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" - case yaml_PARSE_END_STATE: - return "yaml_PARSE_END_STATE" - } - return "" -} - -// This structure holds aliases data. -type yaml_alias_data_t struct { - anchor []byte // The anchor. - index int // The node id. - mark yaml_mark_t // The anchor mark. -} - -// The parser structure. -// -// All members are internal. Manage the structure using the -// yaml_parser_ family of functions. -type yaml_parser_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - - problem string // Error description. - - // The byte about which the problem occurred. - problem_offset int - problem_value int - problem_mark yaml_mark_t - - // The error context. - context string - context_mark yaml_mark_t - - // Reader stuff - - read_handler yaml_read_handler_t // Read handler. - - input_reader io.Reader // File input data. - input []byte // String input data. - input_pos int - - eof bool // EOF flag - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - unread int // The number of unread characters in the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The input encoding. - - offset int // The offset of the current position (in bytes). - mark yaml_mark_t // The mark of the current position. - - // Scanner stuff - - stream_start_produced bool // Have we started to scan the input stream? - stream_end_produced bool // Have we reached the end of the input stream? - - flow_level int // The number of unclosed '[' and '{' indicators. - - tokens []yaml_token_t // The tokens queue. - tokens_head int // The head of the tokens queue. - tokens_parsed int // The number of tokens fetched from the queue. - token_available bool // Does the tokens queue contain a token ready for dequeueing. - - indent int // The current indentation level. - indents []int // The indentation levels stack. - - simple_key_allowed bool // May a simple key occur at the current position? - simple_keys []yaml_simple_key_t // The stack of simple keys. - simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number - - // Parser stuff - - state yaml_parser_state_t // The current parser state. - states []yaml_parser_state_t // The parser states stack. - marks []yaml_mark_t // The stack of marks. - tag_directives []yaml_tag_directive_t // The list of TAG directives. - - // Dumper stuff - - aliases []yaml_alias_data_t // The alias data. - - document *yaml_document_t // The currently parsed document. -} - -// Emitter Definitions - -// The prototype of a write handler. -// -// The write handler is called when the emitter needs to flush the accumulated -// characters to the output. The handler should write @a size bytes of the -// @a buffer to the output. -// -// @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). -// @param[in] buffer The buffer with bytes to be written. -// @param[in] size The size of the buffer. -// -// @returns On success, the handler should return @c 1. If the handler failed, -// the returned value should be @c 0. -// -type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error - -type yaml_emitter_state_t int - -// The emitter states. -const ( - // Expect STREAM-START. - yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota - - yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. - yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. - yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. - yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. - yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. - yaml_EMIT_END_STATE // Expect nothing. -) - -// The emitter structure. -// -// All members are internal. Manage the structure using the @c yaml_emitter_ -// family of functions. -type yaml_emitter_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - problem string // Error description. - - // Writer stuff - - write_handler yaml_write_handler_t // Write handler. - - output_buffer *[]byte // String output data. - output_writer io.Writer // File output data. - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The stream encoding. - - // Emitter stuff - - canonical bool // If the output is in the canonical style? - best_indent int // The number of indentation spaces. - best_width int // The preferred width of the output lines. - unicode bool // Allow unescaped non-ASCII characters? - line_break yaml_break_t // The preferred line break. - - state yaml_emitter_state_t // The current emitter state. - states []yaml_emitter_state_t // The stack of states. - - events []yaml_event_t // The event queue. - events_head int // The head of the event queue. - - indents []int // The stack of indentation levels. - - tag_directives []yaml_tag_directive_t // The list of tag directives. - - indent int // The current indentation level. - - flow_level int // The current flow level. - - root_context bool // Is it the document root context? - sequence_context bool // Is it a sequence context? - mapping_context bool // Is it a mapping context? - simple_key_context bool // Is it a simple mapping key context? - - line int // The current line. - column int // The current column. - whitespace bool // If the last character was a whitespace? - indention bool // If the last character was an indentation character (' ', '-', '?', ':')? - open_ended bool // If an explicit document end is required? - - // Anchor analysis. - anchor_data struct { - anchor []byte // The anchor value. - alias bool // Is it an alias? - } - - // Tag analysis. - tag_data struct { - handle []byte // The tag handle. - suffix []byte // The tag suffix. - } - - // Scalar analysis. - scalar_data struct { - value []byte // The scalar value. - multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? - block_plain_allowed bool // Can the scalar be expressed in the block plain style? - single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? - block_allowed bool // Can the scalar be expressed in the literal or folded styles? - style yaml_scalar_style_t // The output style. - } - - // Dumper stuff - - opened bool // If the stream was already opened? - closed bool // If the stream was already closed? - - // The information associated with the document nodes. - anchors *struct { - references int // The number of references. - anchor int // The anchor id. - serialized bool // If the node has been emitted? - } - - last_anchor_id int // The last assigned anchor id. - - document *yaml_document_t // The currently emitted document. -} diff --git a/vendor/gopkg.in/yaml.v2/yamlprivateh.go b/vendor/gopkg.in/yaml.v2/yamlprivateh.go deleted file mode 100644 index 8110ce3c37..0000000000 --- a/vendor/gopkg.in/yaml.v2/yamlprivateh.go +++ /dev/null @@ -1,173 +0,0 @@ -package yaml - -const ( - // The size of the input raw buffer. - input_raw_buffer_size = 512 - - // The size of the input buffer. - // It should be possible to decode the whole raw buffer. - input_buffer_size = input_raw_buffer_size * 3 - - // The size of the output buffer. - output_buffer_size = 128 - - // The size of the output raw buffer. - // It should be possible to encode the whole output buffer. - output_raw_buffer_size = (output_buffer_size*2 + 2) - - // The size of other stacks and queues. - initial_stack_size = 16 - initial_queue_size = 16 - initial_string_size = 16 -) - -// Check if the character at the specified position is an alphabetical -// character, a digit, '_', or '-'. -func is_alpha(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' -} - -// Check if the character at the specified position is a digit. -func is_digit(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' -} - -// Get the value of a digit. -func as_digit(b []byte, i int) int { - return int(b[i]) - '0' -} - -// Check if the character at the specified position is a hex-digit. -func is_hex(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' -} - -// Get the value of a hex-digit. -func as_hex(b []byte, i int) int { - bi := b[i] - if bi >= 'A' && bi <= 'F' { - return int(bi) - 'A' + 10 - } - if bi >= 'a' && bi <= 'f' { - return int(bi) - 'a' + 10 - } - return int(bi) - '0' -} - -// Check if the character is ASCII. -func is_ascii(b []byte, i int) bool { - return b[i] <= 0x7F -} - -// Check if the character at the start of the buffer can be printed unescaped. -func is_printable(b []byte, i int) bool { - return ((b[i] == 0x0A) || // . == #x0A - (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E - (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF - (b[i] > 0xC2 && b[i] < 0xED) || - (b[i] == 0xED && b[i+1] < 0xA0) || - (b[i] == 0xEE) || - (b[i] == 0xEF && // #xE000 <= . <= #xFFFD - !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF - !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) -} - -// Check if the character at the specified position is NUL. -func is_z(b []byte, i int) bool { - return b[i] == 0x00 -} - -// Check if the beginning of the buffer is a BOM. -func is_bom(b []byte, i int) bool { - return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF -} - -// Check if the character at the specified position is space. -func is_space(b []byte, i int) bool { - return b[i] == ' ' -} - -// Check if the character at the specified position is tab. -func is_tab(b []byte, i int) bool { - return b[i] == '\t' -} - -// Check if the character at the specified position is blank (space or tab). -func is_blank(b []byte, i int) bool { - //return is_space(b, i) || is_tab(b, i) - return b[i] == ' ' || b[i] == '\t' -} - -// Check if the character at the specified position is a line break. -func is_break(b []byte, i int) bool { - return (b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) -} - -func is_crlf(b []byte, i int) bool { - return b[i] == '\r' && b[i+1] == '\n' -} - -// Check if the character is a line break or NUL. -func is_breakz(b []byte, i int) bool { - //return is_break(b, i) || is_z(b, i) - return ( // is_break: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - // is_z: - b[i] == 0) -} - -// Check if the character is a line break, space, or NUL. -func is_spacez(b []byte, i int) bool { - //return is_space(b, i) || is_breakz(b, i) - return ( // is_space: - b[i] == ' ' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Check if the character is a line break, space, tab, or NUL. -func is_blankz(b []byte, i int) bool { - //return is_blank(b, i) || is_breakz(b, i) - return ( // is_blank: - b[i] == ' ' || b[i] == '\t' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Determine the width of the character. -func width(b byte) int { - // Don't replace these by a switch without first - // confirming that it is being inlined. - if b&0x80 == 0x00 { - return 1 - } - if b&0xE0 == 0xC0 { - return 2 - } - if b&0xF0 == 0xE0 { - return 3 - } - if b&0xF8 == 0xF0 { - return 4 - } - return 0 - -} diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go index 385c60e0d3..98066211d8 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go @@ -17,6 +17,7 @@ limitations under the License. // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true // +groupName=admissionregistration.k8s.io // Package v1alpha1 is the v1alpha1 version of the API. diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go index 111cc72874..993ff6f20e 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go @@ -25,6 +25,7 @@ import ( io "io" proto "github.com/gogo/protobuf/proto" + k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -45,10 +46,38 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} } +func (*ApplyConfiguration) ProtoMessage() {} +func (*ApplyConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{0} +} +func (m *ApplyConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ApplyConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ApplyConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplyConfiguration.Merge(m, src) +} +func (m *ApplyConfiguration) XXX_Size() int { + return m.Size() +} +func (m *ApplyConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_ApplyConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplyConfiguration proto.InternalMessageInfo + func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{0} + return fileDescriptor_2c49182728ae0af5, []int{1} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,7 +105,7 @@ var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{1} + return fileDescriptor_2c49182728ae0af5, []int{2} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -101,10 +130,38 @@ func (m *ExpressionWarning) XXX_DiscardUnknown() { var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo +func (m *JSONPatch) Reset() { *m = JSONPatch{} } +func (*JSONPatch) ProtoMessage() {} +func (*JSONPatch) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{3} +} +func (m *JSONPatch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JSONPatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *JSONPatch) XXX_Merge(src proto.Message) { + xxx_messageInfo_JSONPatch.Merge(m, src) +} +func (m *JSONPatch) XXX_Size() int { + return m.Size() +} +func (m *JSONPatch) XXX_DiscardUnknown() { + xxx_messageInfo_JSONPatch.DiscardUnknown(m) +} + +var xxx_messageInfo_JSONPatch proto.InternalMessageInfo + func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{2} + return fileDescriptor_2c49182728ae0af5, []int{4} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +189,7 @@ var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{3} + return fileDescriptor_2c49182728ae0af5, []int{5} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -157,10 +214,206 @@ func (m *MatchResources) XXX_DiscardUnknown() { var xxx_messageInfo_MatchResources proto.InternalMessageInfo +func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} } +func (*MutatingAdmissionPolicy) ProtoMessage() {} +func (*MutatingAdmissionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{6} +} +func (m *MutatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MutatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MutatingAdmissionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_MutatingAdmissionPolicy.Merge(m, src) +} +func (m *MutatingAdmissionPolicy) XXX_Size() int { + return m.Size() +} +func (m *MutatingAdmissionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_MutatingAdmissionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_MutatingAdmissionPolicy proto.InternalMessageInfo + +func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} } +func (*MutatingAdmissionPolicyBinding) ProtoMessage() {} +func (*MutatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{7} +} +func (m *MutatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MutatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MutatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { + xxx_messageInfo_MutatingAdmissionPolicyBinding.Merge(m, src) +} +func (m *MutatingAdmissionPolicyBinding) XXX_Size() int { + return m.Size() +} +func (m *MutatingAdmissionPolicyBinding) XXX_DiscardUnknown() { + xxx_messageInfo_MutatingAdmissionPolicyBinding.DiscardUnknown(m) +} + +var xxx_messageInfo_MutatingAdmissionPolicyBinding proto.InternalMessageInfo + +func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} } +func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {} +func (*MutatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{8} +} +func (m *MutatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MutatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MutatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { + xxx_messageInfo_MutatingAdmissionPolicyBindingList.Merge(m, src) +} +func (m *MutatingAdmissionPolicyBindingList) XXX_Size() int { + return m.Size() +} +func (m *MutatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { + xxx_messageInfo_MutatingAdmissionPolicyBindingList.DiscardUnknown(m) +} + +var xxx_messageInfo_MutatingAdmissionPolicyBindingList proto.InternalMessageInfo + +func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} } +func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {} +func (*MutatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{9} +} +func (m *MutatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MutatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MutatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.Merge(m, src) +} +func (m *MutatingAdmissionPolicyBindingSpec) XXX_Size() int { + return m.Size() +} +func (m *MutatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { + xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_MutatingAdmissionPolicyBindingSpec proto.InternalMessageInfo + +func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} } +func (*MutatingAdmissionPolicyList) ProtoMessage() {} +func (*MutatingAdmissionPolicyList) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{10} +} +func (m *MutatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MutatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MutatingAdmissionPolicyList) XXX_Merge(src proto.Message) { + xxx_messageInfo_MutatingAdmissionPolicyList.Merge(m, src) +} +func (m *MutatingAdmissionPolicyList) XXX_Size() int { + return m.Size() +} +func (m *MutatingAdmissionPolicyList) XXX_DiscardUnknown() { + xxx_messageInfo_MutatingAdmissionPolicyList.DiscardUnknown(m) +} + +var xxx_messageInfo_MutatingAdmissionPolicyList proto.InternalMessageInfo + +func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} } +func (*MutatingAdmissionPolicySpec) ProtoMessage() {} +func (*MutatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{11} +} +func (m *MutatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MutatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MutatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_MutatingAdmissionPolicySpec.Merge(m, src) +} +func (m *MutatingAdmissionPolicySpec) XXX_Size() int { + return m.Size() +} +func (m *MutatingAdmissionPolicySpec) XXX_DiscardUnknown() { + xxx_messageInfo_MutatingAdmissionPolicySpec.DiscardUnknown(m) +} + +var xxx_messageInfo_MutatingAdmissionPolicySpec proto.InternalMessageInfo + +func (m *Mutation) Reset() { *m = Mutation{} } +func (*Mutation) ProtoMessage() {} +func (*Mutation) Descriptor() ([]byte, []int) { + return fileDescriptor_2c49182728ae0af5, []int{12} +} +func (m *Mutation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Mutation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mutation.Merge(m, src) +} +func (m *Mutation) XXX_Size() int { + return m.Size() +} +func (m *Mutation) XXX_DiscardUnknown() { + xxx_messageInfo_Mutation.DiscardUnknown(m) +} + +var xxx_messageInfo_Mutation proto.InternalMessageInfo + func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{4} + return fileDescriptor_2c49182728ae0af5, []int{13} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,7 +441,7 @@ var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{5} + return fileDescriptor_2c49182728ae0af5, []int{14} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -216,7 +469,7 @@ var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{6} + return fileDescriptor_2c49182728ae0af5, []int{15} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -244,7 +497,7 @@ var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{7} + return fileDescriptor_2c49182728ae0af5, []int{16} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -272,7 +525,7 @@ var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{8} + return fileDescriptor_2c49182728ae0af5, []int{17} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -300,7 +553,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{9} + return fileDescriptor_2c49182728ae0af5, []int{18} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +581,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{10} + return fileDescriptor_2c49182728ae0af5, []int{19} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -356,7 +609,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageIn func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{11} + return fileDescriptor_2c49182728ae0af5, []int{20} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +637,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageIn func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{12} + return fileDescriptor_2c49182728ae0af5, []int{21} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +665,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{13} + return fileDescriptor_2c49182728ae0af5, []int{22} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -440,7 +693,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{14} + return fileDescriptor_2c49182728ae0af5, []int{23} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -468,7 +721,7 @@ var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{15} + return fileDescriptor_2c49182728ae0af5, []int{24} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,7 +749,7 @@ var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { - return fileDescriptor_2c49182728ae0af5, []int{16} + return fileDescriptor_2c49182728ae0af5, []int{25} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,10 +775,19 @@ func (m *Variable) XXX_DiscardUnknown() { var xxx_messageInfo_Variable proto.InternalMessageInfo func init() { + proto.RegisterType((*ApplyConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.ApplyConfiguration") proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1alpha1.AuditAnnotation") proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1alpha1.ExpressionWarning") + proto.RegisterType((*JSONPatch)(nil), "k8s.io.api.admissionregistration.v1alpha1.JSONPatch") proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1alpha1.MatchCondition") proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1alpha1.MatchResources") + proto.RegisterType((*MutatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy") + proto.RegisterType((*MutatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding") + proto.RegisterType((*MutatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList") + proto.RegisterType((*MutatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec") + proto.RegisterType((*MutatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList") + proto.RegisterType((*MutatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec") + proto.RegisterType((*Mutation)(nil), "k8s.io.api.admissionregistration.v1alpha1.Mutation") proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1alpha1.NamedRuleWithOperations") proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1alpha1.ParamKind") proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1alpha1.ParamRef") @@ -546,101 +808,147 @@ func init() { } var fileDescriptor_2c49182728ae0af5 = []byte{ - // 1498 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xc6, 0x6e, 0x12, 0x8f, 0x73, 0xb1, 0xe7, 0xdf, 0x2a, 0x6e, 0xfe, 0xd4, 0x1b, 0xad, - 0x2a, 0xd4, 0x48, 0xb0, 0x26, 0x69, 0xa1, 0xb4, 0x42, 0x42, 0xd9, 0xde, 0xe8, 0x25, 0x17, 0x4d, - 0x51, 0x22, 0x21, 0x90, 0x98, 0xec, 0x4e, 0xec, 0x69, 0xbc, 0x17, 0x76, 0xd6, 0xa1, 0x11, 0x48, - 0x54, 0xe2, 0x05, 0xde, 0x78, 0xe0, 0x85, 0x57, 0x3e, 0x02, 0xdf, 0x80, 0xb7, 0x3e, 0xf6, 0xb1, - 0x3c, 0x60, 0x51, 0xf3, 0xc2, 0x27, 0x00, 0x29, 0x2f, 0xa0, 0x99, 0x9d, 0xbd, 0xda, 0x26, 0x76, - 0x09, 0xbc, 0x79, 0xce, 0x9c, 0xf3, 0xfb, 0xcd, 0x39, 0x73, 0xce, 0xd9, 0x33, 0x06, 0xd7, 0x0e, - 0xde, 0x66, 0x3a, 0x75, 0x1b, 0xd8, 0xa3, 0x0d, 0x6c, 0xd9, 0x94, 0x31, 0xea, 0x3a, 0x3e, 0x69, - 0x52, 0x16, 0xf8, 0x38, 0xa0, 0xae, 0xd3, 0x38, 0x5c, 0xc5, 0x6d, 0xaf, 0x85, 0x57, 0x1b, 0x4d, - 0xe2, 0x10, 0x1f, 0x07, 0xc4, 0xd2, 0x3d, 0xdf, 0x0d, 0x5c, 0xb8, 0x12, 0x9a, 0xea, 0xd8, 0xa3, - 0xfa, 0x40, 0x53, 0x3d, 0x32, 0x5d, 0x7a, 0xbd, 0x49, 0x83, 0x56, 0x67, 0x4f, 0x37, 0x5d, 0xbb, - 0xd1, 0x74, 0x9b, 0x6e, 0x43, 0x20, 0xec, 0x75, 0xf6, 0xc5, 0x4a, 0x2c, 0xc4, 0xaf, 0x10, 0x79, - 0xe9, 0xf2, 0x08, 0x87, 0xca, 0x1f, 0x67, 0xe9, 0x4a, 0x62, 0x64, 0x63, 0xb3, 0x45, 0x1d, 0xe2, - 0x1f, 0x35, 0xbc, 0x83, 0x26, 0x17, 0xb0, 0x86, 0x4d, 0x02, 0x3c, 0xc8, 0xaa, 0x31, 0xcc, 0xca, - 0xef, 0x38, 0x01, 0xb5, 0x49, 0x9f, 0xc1, 0x5b, 0x27, 0x19, 0x30, 0xb3, 0x45, 0x6c, 0x9c, 0xb7, - 0xd3, 0x18, 0x58, 0x58, 0xef, 0x58, 0x34, 0x58, 0x77, 0x1c, 0x37, 0x10, 0x4e, 0xc0, 0x0b, 0xa0, - 0x70, 0x40, 0x8e, 0x6a, 0xca, 0xb2, 0x72, 0xa9, 0x64, 0x94, 0x9f, 0x76, 0xd5, 0x89, 0x5e, 0x57, - 0x2d, 0xdc, 0x27, 0x47, 0x88, 0xcb, 0xe1, 0x3a, 0x58, 0x38, 0xc4, 0xed, 0x0e, 0xb9, 0xf5, 0xd8, - 0xf3, 0x89, 0x08, 0x41, 0x6d, 0x52, 0xa8, 0x2e, 0x4a, 0xd5, 0x85, 0x9d, 0xec, 0x36, 0xca, 0xeb, - 0x6b, 0x6d, 0x50, 0x4d, 0x56, 0xbb, 0xd8, 0x77, 0xa8, 0xd3, 0x84, 0xaf, 0x81, 0x99, 0x7d, 0x4a, - 0xda, 0x16, 0x22, 0xfb, 0x12, 0xb0, 0x22, 0x01, 0x67, 0x6e, 0x4b, 0x39, 0x8a, 0x35, 0xe0, 0x0a, - 0x98, 0xfe, 0x34, 0x34, 0xac, 0x15, 0x84, 0xf2, 0x82, 0x54, 0x9e, 0x96, 0x78, 0x28, 0xda, 0xd7, - 0xf6, 0xc1, 0xfc, 0x06, 0x0e, 0xcc, 0xd6, 0x0d, 0xd7, 0xb1, 0xa8, 0xf0, 0x70, 0x19, 0x14, 0x1d, - 0x6c, 0x13, 0xe9, 0xe2, 0xac, 0xb4, 0x2c, 0x6e, 0x62, 0x9b, 0x20, 0xb1, 0x03, 0xd7, 0x00, 0x20, - 0x79, 0xff, 0xa0, 0xd4, 0x03, 0x29, 0xd7, 0x52, 0x5a, 0xda, 0x4f, 0x45, 0x49, 0x84, 0x08, 0x73, - 0x3b, 0xbe, 0x49, 0x18, 0x7c, 0x0c, 0xaa, 0x1c, 0x8e, 0x79, 0xd8, 0x24, 0x0f, 0x49, 0x9b, 0x98, - 0x81, 0xeb, 0x0b, 0xd6, 0xf2, 0xda, 0x65, 0x3d, 0xc9, 0xd3, 0xf8, 0xc6, 0x74, 0xef, 0xa0, 0xc9, - 0x05, 0x4c, 0xe7, 0x89, 0xa1, 0x1f, 0xae, 0xea, 0x0f, 0xf0, 0x1e, 0x69, 0x47, 0xa6, 0xc6, 0xb9, - 0x5e, 0x57, 0xad, 0x6e, 0xe6, 0x11, 0x51, 0x3f, 0x09, 0x74, 0xc1, 0xbc, 0xbb, 0xf7, 0x88, 0x98, - 0x41, 0x4c, 0x3b, 0xf9, 0xf2, 0xb4, 0xb0, 0xd7, 0x55, 0xe7, 0xb7, 0x32, 0x70, 0x28, 0x07, 0x0f, - 0xbf, 0x00, 0x73, 0xbe, 0xf4, 0x1b, 0x75, 0xda, 0x84, 0xd5, 0x0a, 0xcb, 0x85, 0x4b, 0xe5, 0x35, - 0x43, 0x1f, 0xb9, 0x1c, 0x75, 0xee, 0x98, 0xc5, 0x8d, 0x77, 0x69, 0xd0, 0xda, 0xf2, 0x48, 0xb8, - 0xcf, 0x8c, 0x73, 0x32, 0xf0, 0x73, 0x28, 0x4d, 0x80, 0xb2, 0x7c, 0xf0, 0x5b, 0x05, 0x9c, 0x25, - 0x8f, 0xcd, 0x76, 0xc7, 0x22, 0x19, 0xbd, 0x5a, 0xf1, 0xd4, 0x0e, 0xf2, 0x8a, 0x3c, 0xc8, 0xd9, - 0x5b, 0x03, 0x78, 0xd0, 0x40, 0x76, 0x78, 0x13, 0x94, 0x6d, 0x9e, 0x14, 0xdb, 0x6e, 0x9b, 0x9a, - 0x47, 0xb5, 0x69, 0x91, 0x4a, 0x5a, 0xaf, 0xab, 0x96, 0x37, 0x12, 0xf1, 0x71, 0x57, 0x5d, 0x48, - 0x2d, 0xdf, 0x3f, 0xf2, 0x08, 0x4a, 0x9b, 0x69, 0xcf, 0x15, 0xb0, 0x38, 0xe4, 0x54, 0xf0, 0x6a, - 0x12, 0x79, 0x91, 0x1a, 0x35, 0x65, 0xb9, 0x70, 0xa9, 0x64, 0x54, 0xd3, 0x11, 0x13, 0x1b, 0x28, - 0xab, 0x07, 0xbf, 0x54, 0x00, 0xf4, 0xfb, 0xf0, 0x64, 0xa2, 0x5c, 0x1d, 0x25, 0x5e, 0xfa, 0x80, - 0x20, 0x2d, 0xc9, 0x20, 0xc1, 0xfe, 0x3d, 0x34, 0x80, 0x4e, 0xc3, 0xa0, 0xb4, 0x8d, 0x7d, 0x6c, - 0xdf, 0xa7, 0x8e, 0xc5, 0xeb, 0x0e, 0x7b, 0x74, 0x87, 0xf8, 0xa2, 0xee, 0x94, 0x6c, 0xdd, 0xad, - 0x6f, 0xdf, 0x95, 0x3b, 0x28, 0xa5, 0xc5, 0xab, 0xf9, 0x80, 0x3a, 0x96, 0xac, 0xd2, 0xb8, 0x9a, - 0x39, 0x1e, 0x12, 0x3b, 0xda, 0x0f, 0x93, 0x60, 0x46, 0x70, 0xf0, 0xce, 0x71, 0x72, 0xf1, 0x37, - 0x40, 0x29, 0x2e, 0x28, 0x89, 0x5a, 0x95, 0x6a, 0xa5, 0xb8, 0xf8, 0x50, 0xa2, 0x03, 0x3f, 0x02, - 0x33, 0x2c, 0x2a, 0xb3, 0xc2, 0xcb, 0x97, 0xd9, 0x2c, 0xef, 0x75, 0x71, 0x81, 0xc5, 0x90, 0x30, - 0x00, 0x8b, 0x1e, 0x3f, 0x3d, 0x09, 0x88, 0xbf, 0xe9, 0x06, 0xb7, 0xdd, 0x8e, 0x63, 0xad, 0x9b, - 0x3c, 0x7a, 0xb5, 0xa2, 0x38, 0xdd, 0xf5, 0x5e, 0x57, 0x5d, 0xdc, 0x1e, 0xac, 0x72, 0xdc, 0x55, - 0xff, 0x3f, 0x64, 0x4b, 0xa4, 0xd9, 0x30, 0x68, 0xed, 0x3b, 0x05, 0xcc, 0x72, 0x8d, 0x1b, 0x2d, - 0x62, 0x1e, 0xf0, 0x06, 0xfd, 0x95, 0x02, 0x20, 0xc9, 0xb7, 0xed, 0x30, 0xdb, 0xca, 0x6b, 0xef, - 0x8c, 0x51, 0x5e, 0x7d, 0xbd, 0x3f, 0xc9, 0x99, 0xbe, 0x2d, 0x86, 0x06, 0x70, 0x6a, 0x3f, 0x4f, - 0x82, 0xf3, 0x3b, 0xb8, 0x4d, 0x2d, 0x1c, 0x50, 0xa7, 0xb9, 0x1e, 0xd1, 0x85, 0xc5, 0x02, 0x3f, - 0x06, 0x33, 0x3c, 0xc0, 0x16, 0x0e, 0xb0, 0x6c, 0xb6, 0x6f, 0x8c, 0x76, 0x1d, 0x61, 0x8b, 0xdb, - 0x20, 0x01, 0x4e, 0x92, 0x2e, 0x91, 0xa1, 0x18, 0x15, 0x3e, 0x02, 0x45, 0xe6, 0x11, 0x53, 0x96, - 0xca, 0x7b, 0x63, 0xf8, 0x3e, 0xf4, 0xd4, 0x0f, 0x3d, 0x62, 0x26, 0xd9, 0xc8, 0x57, 0x48, 0x70, - 0x40, 0x1f, 0x4c, 0xb1, 0x00, 0x07, 0x1d, 0x26, 0x53, 0xeb, 0xde, 0xa9, 0xb0, 0x09, 0x44, 0x63, - 0x5e, 0xf2, 0x4d, 0x85, 0x6b, 0x24, 0x99, 0xb4, 0x3f, 0x14, 0xb0, 0x3c, 0xd4, 0xd6, 0xa0, 0x8e, - 0xc5, 0xf3, 0xe1, 0xdf, 0x0f, 0xf3, 0x27, 0x99, 0x30, 0x6f, 0x9d, 0x86, 0xe3, 0xf2, 0xf0, 0xc3, - 0xa2, 0xad, 0xfd, 0xae, 0x80, 0x8b, 0x27, 0x19, 0x3f, 0xa0, 0x2c, 0x80, 0x1f, 0xf6, 0x79, 0xaf, - 0x8f, 0x58, 0xf3, 0x94, 0x85, 0xbe, 0xc7, 0xe3, 0x4d, 0x24, 0x49, 0x79, 0xee, 0x81, 0x33, 0x34, - 0x20, 0x36, 0x6f, 0xc6, 0xbc, 0xba, 0xee, 0x9f, 0xa2, 0xeb, 0xc6, 0x9c, 0xe4, 0x3d, 0x73, 0x97, - 0x33, 0xa0, 0x90, 0x48, 0xfb, 0xba, 0x70, 0xb2, 0xe3, 0x3c, 0x4e, 0xbc, 0x45, 0x7b, 0x42, 0xb8, - 0x99, 0x74, 0xd1, 0xf8, 0x1a, 0xb7, 0xe3, 0x1d, 0x94, 0xd2, 0xe2, 0x0d, 0xd2, 0x93, 0xfd, 0x77, - 0xc0, 0x1c, 0x72, 0x92, 0x47, 0x51, 0xeb, 0x0e, 0x1b, 0x64, 0xb4, 0x42, 0x31, 0x24, 0xec, 0x80, - 0x79, 0x3b, 0x33, 0x78, 0xc9, 0x52, 0xb9, 0x36, 0x06, 0x49, 0x76, 0x72, 0x0b, 0x47, 0x9e, 0xac, - 0x0c, 0xe5, 0x48, 0xe0, 0x2e, 0xa8, 0x1e, 0xca, 0x88, 0xb9, 0x4e, 0xd8, 0x35, 0xc3, 0x69, 0xa3, - 0x64, 0xac, 0xf0, 0x41, 0x6d, 0x27, 0xbf, 0x79, 0xdc, 0x55, 0x2b, 0x79, 0x21, 0xea, 0xc7, 0xd0, - 0x7e, 0x53, 0xc0, 0x85, 0xa1, 0x77, 0xf1, 0x1f, 0x64, 0x1f, 0xcd, 0x66, 0xdf, 0xcd, 0x53, 0xc9, - 0xbe, 0xc1, 0x69, 0xf7, 0xfd, 0xd4, 0xdf, 0xb8, 0x2a, 0xf2, 0x0d, 0x83, 0x92, 0x17, 0xcd, 0x07, - 0xd2, 0xd7, 0x2b, 0xe3, 0x26, 0x0f, 0xb7, 0x35, 0xe6, 0xf8, 0xf7, 0x3b, 0x5e, 0xa2, 0x04, 0x15, - 0x7e, 0x06, 0x2a, 0xb6, 0x7c, 0x21, 0x70, 0x00, 0xea, 0x04, 0xd1, 0x14, 0xf4, 0x0f, 0x32, 0xe8, - 0x6c, 0xaf, 0xab, 0x56, 0x36, 0x72, 0xb0, 0xa8, 0x8f, 0x08, 0xb6, 0x41, 0x39, 0xc9, 0x80, 0x68, - 0x6c, 0x7e, 0xf3, 0x25, 0x42, 0xee, 0x3a, 0xc6, 0xff, 0x64, 0x8c, 0xcb, 0x89, 0x8c, 0xa1, 0x34, - 0x3c, 0x7c, 0x00, 0xe6, 0xf6, 0x31, 0x6d, 0x77, 0x7c, 0x22, 0x07, 0xd2, 0x70, 0x82, 0x78, 0x95, - 0x0f, 0x8b, 0xb7, 0xd3, 0x1b, 0xc7, 0x5d, 0xb5, 0x9a, 0x11, 0x88, 0x69, 0x21, 0x6b, 0x0c, 0x9f, - 0x28, 0xa0, 0x82, 0xb3, 0xcf, 0x47, 0x56, 0x3b, 0x23, 0x3c, 0xb8, 0x3e, 0x86, 0x07, 0xb9, 0x17, - 0xa8, 0x51, 0x93, 0x6e, 0x54, 0x72, 0x1b, 0x0c, 0xf5, 0xb1, 0xc1, 0xcf, 0xc1, 0x82, 0x9d, 0x79, - 0xdd, 0xb1, 0xda, 0x94, 0x38, 0xc0, 0xd8, 0x57, 0x17, 0x23, 0x24, 0x2f, 0xd9, 0xac, 0x9c, 0xa1, - 0x3c, 0x15, 0xb4, 0x40, 0xe9, 0x10, 0xfb, 0x14, 0xef, 0xf1, 0x87, 0xc6, 0xb4, 0xe0, 0xbd, 0x3c, - 0xd6, 0xd5, 0x85, 0xb6, 0xc9, 0x7c, 0x19, 0x49, 0x18, 0x4a, 0x80, 0xb5, 0x1f, 0x27, 0x81, 0x7a, - 0xc2, 0xa7, 0x1c, 0xde, 0x03, 0xd0, 0xdd, 0x63, 0xc4, 0x3f, 0x24, 0xd6, 0x9d, 0xf0, 0x8d, 0x1f, - 0x4d, 0xd0, 0x85, 0x64, 0xbc, 0xda, 0xea, 0xd3, 0x40, 0x03, 0xac, 0xa0, 0x0d, 0x66, 0x83, 0xd4, - 0xe4, 0x37, 0xce, 0x8b, 0x40, 0x3a, 0x96, 0x1e, 0x1c, 0x8d, 0x4a, 0xaf, 0xab, 0x66, 0x46, 0x49, - 0x94, 0x81, 0x87, 0x26, 0x00, 0x66, 0x72, 0x7b, 0x61, 0x01, 0x34, 0x46, 0x6b, 0x67, 0xc9, 0x9d, - 0xc5, 0x9f, 0xa0, 0xd4, 0x75, 0xa5, 0x60, 0xb5, 0x3f, 0x15, 0x00, 0x92, 0xaa, 0x80, 0x17, 0x41, - 0xea, 0x19, 0x2f, 0xbf, 0x62, 0x45, 0x0e, 0x81, 0x52, 0x72, 0xb8, 0x02, 0xa6, 0x6d, 0xc2, 0x18, - 0x6e, 0x46, 0xef, 0x80, 0xf8, 0x5f, 0x86, 0x8d, 0x50, 0x8c, 0xa2, 0x7d, 0xb8, 0x0b, 0xa6, 0x7c, - 0x82, 0x99, 0xeb, 0xc8, 0xff, 0x23, 0xde, 0xe5, 0x63, 0x15, 0x12, 0x92, 0xe3, 0xae, 0xba, 0x3a, - 0xca, 0xbf, 0x40, 0xba, 0x9c, 0xc2, 0x84, 0x11, 0x92, 0x70, 0xf0, 0x0e, 0xa8, 0x4a, 0x8e, 0xd4, - 0x81, 0xc3, 0xaa, 0x3d, 0x2f, 0x4f, 0x53, 0xdd, 0xc8, 0x2b, 0xa0, 0x7e, 0x1b, 0xed, 0x1e, 0x98, - 0x89, 0xb2, 0x0b, 0xd6, 0x40, 0x31, 0xf5, 0xf9, 0x0e, 0x1d, 0x17, 0x92, 0x5c, 0x60, 0x26, 0x07, - 0x07, 0xc6, 0xd8, 0x7a, 0xfa, 0xa2, 0x3e, 0xf1, 0xec, 0x45, 0x7d, 0xe2, 0xf9, 0x8b, 0xfa, 0xc4, - 0x93, 0x5e, 0x5d, 0x79, 0xda, 0xab, 0x2b, 0xcf, 0x7a, 0x75, 0xe5, 0x79, 0xaf, 0xae, 0xfc, 0xd2, - 0xab, 0x2b, 0xdf, 0xfc, 0x5a, 0x9f, 0xf8, 0x60, 0x65, 0xe4, 0x7f, 0xf1, 0xfe, 0x0a, 0x00, 0x00, - 0xff, 0xff, 0x22, 0xbd, 0xc5, 0xc7, 0xf1, 0x13, 0x00, 0x00, + // 1783 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xdd, 0x6f, 0x1b, 0x4b, + 0x15, 0xcf, 0xda, 0xce, 0x87, 0xc7, 0xf9, 0xf2, 0xd0, 0x12, 0x37, 0xa5, 0xde, 0x68, 0x55, 0xa1, + 0x46, 0x82, 0x35, 0x49, 0x0b, 0xa5, 0x55, 0x51, 0x95, 0x6d, 0x9b, 0xb6, 0x69, 0x9d, 0x44, 0x53, + 0x94, 0x20, 0x04, 0x12, 0x93, 0xf5, 0xc4, 0xde, 0xc6, 0xfb, 0xc1, 0xce, 0x3a, 0x34, 0x02, 0x89, + 0x4a, 0x08, 0x09, 0xde, 0x78, 0xe0, 0x85, 0x37, 0xc4, 0x1f, 0xc0, 0x03, 0xfc, 0x05, 0xbc, 0xf5, + 0xb1, 0x8f, 0xe5, 0x81, 0x15, 0x35, 0x20, 0xf1, 0x0c, 0xd2, 0xbd, 0x52, 0x5e, 0xee, 0xd5, 0xcc, + 0xce, 0x7e, 0x79, 0xed, 0xc6, 0x4e, 0xd3, 0xf4, 0xe1, 0xde, 0x37, 0xcf, 0xf9, 0xf8, 0x9d, 0x39, + 0x67, 0xce, 0x9c, 0x39, 0xc7, 0x0b, 0x6e, 0x1d, 0x7c, 0x97, 0xaa, 0x86, 0x5d, 0xc3, 0x8e, 0x51, + 0xc3, 0x0d, 0xd3, 0xa0, 0xd4, 0xb0, 0x2d, 0x97, 0x34, 0x0d, 0xea, 0xb9, 0xd8, 0x33, 0x6c, 0xab, + 0x76, 0xb8, 0x82, 0xdb, 0x4e, 0x0b, 0xaf, 0xd4, 0x9a, 0xc4, 0x22, 0x2e, 0xf6, 0x48, 0x43, 0x75, + 0x5c, 0xdb, 0xb3, 0xe1, 0x72, 0xa0, 0xaa, 0x62, 0xc7, 0x50, 0xfb, 0xaa, 0xaa, 0xa1, 0xea, 0xe2, + 0x37, 0x9b, 0x86, 0xd7, 0xea, 0xec, 0xa9, 0xba, 0x6d, 0xd6, 0x9a, 0x76, 0xd3, 0xae, 0x71, 0x84, + 0xbd, 0xce, 0x3e, 0x5f, 0xf1, 0x05, 0xff, 0x15, 0x20, 0x2f, 0x5e, 0x1f, 0x62, 0x53, 0xbd, 0xdb, + 0x59, 0xbc, 0x11, 0x2b, 0x99, 0x58, 0x6f, 0x19, 0x16, 0x71, 0x8f, 0x6a, 0xce, 0x41, 0x93, 0x11, + 0x68, 0xcd, 0x24, 0x1e, 0xee, 0xa7, 0x55, 0x1b, 0xa4, 0xe5, 0x76, 0x2c, 0xcf, 0x30, 0x49, 0x46, + 0xe1, 0x3b, 0x27, 0x29, 0x50, 0xbd, 0x45, 0x4c, 0xdc, 0xab, 0xa7, 0x3c, 0x02, 0x70, 0xcd, 0x71, + 0xda, 0x47, 0xf7, 0x6c, 0x6b, 0xdf, 0x68, 0x76, 0x02, 0x3f, 0xe0, 0x2a, 0x00, 0xe4, 0x85, 0xe3, + 0x12, 0xee, 0x61, 0x45, 0x5a, 0x92, 0xae, 0x15, 0x35, 0xf8, 0xca, 0x97, 0xc7, 0xba, 0xbe, 0x0c, + 0x1e, 0x44, 0x1c, 0x94, 0x90, 0x52, 0x28, 0x98, 0x5b, 0xeb, 0x34, 0x0c, 0x6f, 0xcd, 0xb2, 0x6c, + 0x2f, 0x80, 0xb9, 0x02, 0xf2, 0x07, 0xe4, 0x48, 0xe8, 0x97, 0x84, 0x7e, 0xfe, 0x09, 0x39, 0x42, + 0x8c, 0x0e, 0xd7, 0xc0, 0xdc, 0x21, 0x6e, 0x77, 0x48, 0x0c, 0x58, 0xc9, 0x71, 0xd1, 0x05, 0x21, + 0x3a, 0xb7, 0x93, 0x66, 0xa3, 0x5e, 0x79, 0xa5, 0x0d, 0xca, 0xf1, 0x6a, 0x17, 0xbb, 0x96, 0x61, + 0x35, 0xe1, 0x37, 0xc0, 0xd4, 0xbe, 0x41, 0xda, 0x0d, 0x44, 0xf6, 0x05, 0xe0, 0xbc, 0x00, 0x9c, + 0x5a, 0x17, 0x74, 0x14, 0x49, 0xc0, 0x65, 0x30, 0xf9, 0xb3, 0x40, 0xb1, 0x92, 0xe7, 0xc2, 0x73, + 0x42, 0x78, 0x52, 0xe0, 0xa1, 0x90, 0xaf, 0xdc, 0x05, 0xc5, 0x8d, 0x67, 0x5b, 0x9b, 0xdb, 0xd8, + 0xd3, 0x5b, 0xa7, 0x8a, 0xd1, 0x3e, 0x98, 0xad, 0x33, 0xe5, 0x7b, 0xb6, 0xd5, 0x30, 0x78, 0x88, + 0x96, 0x40, 0xc1, 0xc2, 0x26, 0x11, 0xfa, 0xd3, 0x42, 0xbf, 0xb0, 0x89, 0x4d, 0x82, 0x38, 0xa7, + 0xc7, 0x4e, 0x6e, 0x28, 0x3b, 0x7f, 0x2f, 0x08, 0x43, 0x88, 0x50, 0xbb, 0xe3, 0xea, 0x84, 0xc2, + 0x17, 0xa0, 0xcc, 0xe0, 0xa8, 0x83, 0x75, 0xf2, 0x8c, 0xb4, 0x89, 0xee, 0xd9, 0x2e, 0xb7, 0x5a, + 0x5a, 0xbd, 0xae, 0xc6, 0x57, 0x26, 0x4a, 0x1e, 0xd5, 0x39, 0x68, 0x32, 0x02, 0x55, 0x59, 0x8e, + 0xaa, 0x87, 0x2b, 0xea, 0x53, 0xbc, 0x47, 0xda, 0xa1, 0xaa, 0x76, 0xb1, 0xeb, 0xcb, 0xe5, 0xcd, + 0x5e, 0x44, 0x94, 0x35, 0x02, 0x6d, 0x30, 0x6b, 0xef, 0x3d, 0x27, 0xba, 0x17, 0x99, 0xcd, 0x9d, + 0xde, 0x2c, 0xec, 0xfa, 0xf2, 0xec, 0x56, 0x0a, 0x0e, 0xf5, 0xc0, 0xc3, 0x5f, 0x82, 0x19, 0x57, + 0xf8, 0x8d, 0x3a, 0x6d, 0x42, 0x2b, 0xf9, 0xa5, 0xfc, 0xb5, 0xd2, 0xaa, 0xa6, 0x0e, 0x5d, 0x19, + 0x54, 0xe6, 0x58, 0x83, 0x29, 0xef, 0x1a, 0x5e, 0x6b, 0xcb, 0x21, 0x01, 0x9f, 0x6a, 0x17, 0x45, + 0xe0, 0x67, 0x50, 0xd2, 0x00, 0x4a, 0xdb, 0x83, 0xbf, 0x97, 0xc0, 0x05, 0xf2, 0x42, 0x6f, 0x77, + 0x1a, 0x24, 0x25, 0x57, 0x29, 0x9c, 0xd9, 0x46, 0xbe, 0x26, 0x36, 0x72, 0xe1, 0x41, 0x1f, 0x3b, + 0xa8, 0xaf, 0x75, 0x78, 0x1f, 0x94, 0x4c, 0x96, 0x14, 0xdb, 0x76, 0xdb, 0xd0, 0x8f, 0x2a, 0x93, + 0x3c, 0x95, 0x94, 0xae, 0x2f, 0x97, 0xea, 0x31, 0xf9, 0xd8, 0x97, 0xe7, 0x12, 0xcb, 0xef, 0x1f, + 0x39, 0x04, 0x25, 0xd5, 0x94, 0xff, 0x48, 0x60, 0xa1, 0xde, 0x61, 0x37, 0xdc, 0x6a, 0xae, 0x85, + 0x9b, 0x0f, 0x78, 0xf0, 0x27, 0x60, 0x8a, 0x1d, 0x5b, 0x03, 0x7b, 0x58, 0xe4, 0xd6, 0xb7, 0x86, + 0x3b, 0xe4, 0xe0, 0x44, 0xeb, 0xc4, 0xc3, 0x71, 0x6e, 0xc7, 0x34, 0x14, 0xa1, 0xc2, 0x16, 0x28, + 0x50, 0x87, 0xe8, 0x22, 0x85, 0xd6, 0x47, 0x88, 0xe4, 0x80, 0x3d, 0x3f, 0x73, 0x88, 0x1e, 0xdf, + 0x3b, 0xb6, 0x42, 0xdc, 0x82, 0xf2, 0x7f, 0x09, 0x54, 0x07, 0xe8, 0x68, 0x86, 0xd5, 0x60, 0x85, + 0xe6, 0xc3, 0xbb, 0x6b, 0xa7, 0xdc, 0xad, 0xbf, 0xbf, 0xbb, 0x62, 0xeb, 0x03, 0xbd, 0xfe, 0x9f, + 0x04, 0x94, 0x77, 0xab, 0x3e, 0x35, 0xa8, 0x07, 0x7f, 0x94, 0xf1, 0x5c, 0x1d, 0xf2, 0x36, 0x1b, + 0x34, 0xf0, 0x3b, 0x2a, 0xc9, 0x21, 0x25, 0xe1, 0xb5, 0x05, 0xc6, 0x0d, 0x8f, 0x98, 0xb4, 0x92, + 0xe3, 0xf7, 0xe5, 0xf1, 0x99, 0xb9, 0xad, 0xcd, 0x08, 0xab, 0xe3, 0x8f, 0x19, 0x3e, 0x0a, 0xcc, + 0x28, 0x7f, 0xce, 0x9d, 0xe4, 0x34, 0x8b, 0x10, 0xab, 0xc4, 0x0e, 0x27, 0x6e, 0xc6, 0x15, 0x3b, + 0x3a, 0xbe, 0xed, 0x88, 0x83, 0x12, 0x52, 0xf0, 0xc7, 0x60, 0xca, 0xc1, 0x2e, 0x36, 0xc3, 0xb7, + 0x28, 0x5d, 0xf6, 0x4e, 0xf2, 0x66, 0x5b, 0xa8, 0x6a, 0xd3, 0x2c, 0x52, 0xe1, 0x0a, 0x45, 0x90, + 0xb0, 0x03, 0x66, 0xcd, 0x54, 0x9d, 0xe7, 0x6f, 0x58, 0x69, 0xf5, 0xd6, 0x28, 0x21, 0x4b, 0x01, + 0x04, 0x15, 0x36, 0x4d, 0x43, 0x3d, 0x46, 0x94, 0x7f, 0x4b, 0xe0, 0xf2, 0x80, 0x80, 0x9d, 0x43, + 0x7a, 0x34, 0xd3, 0xe9, 0xa1, 0x9d, 0x41, 0x7a, 0xf4, 0xcf, 0x8b, 0x3f, 0x4e, 0x0c, 0x74, 0x93, + 0x27, 0x04, 0x06, 0x45, 0x7e, 0x12, 0x4f, 0x0c, 0xab, 0x21, 0xfc, 0xbc, 0x31, 0xea, 0xe9, 0x32, + 0x5d, 0x6d, 0xa6, 0xeb, 0xcb, 0xc5, 0x68, 0x89, 0x62, 0x54, 0xf8, 0x73, 0x30, 0x6f, 0x8a, 0x8e, + 0x81, 0x01, 0x18, 0x96, 0x47, 0x45, 0x1e, 0xbd, 0xc7, 0x11, 0x5f, 0xe8, 0xfa, 0xf2, 0x7c, 0xbd, + 0x07, 0x16, 0x65, 0x0c, 0xc1, 0x06, 0x28, 0x1e, 0x62, 0xd7, 0xc0, 0x7b, 0xf1, 0x23, 0x3a, 0x4a, + 0xf6, 0xee, 0x08, 0x5d, 0xad, 0x2c, 0xa2, 0x5b, 0x0c, 0x29, 0x14, 0xc5, 0xc0, 0xcc, 0x8a, 0xd9, + 0x09, 0x3a, 0xc6, 0xf0, 0x85, 0xbc, 0x3e, 0xf2, 0x91, 0xda, 0x56, 0x6c, 0x25, 0xa4, 0x50, 0x14, + 0x03, 0xc3, 0xa7, 0x60, 0x66, 0x1f, 0x1b, 0xed, 0x8e, 0x4b, 0xc4, 0xf3, 0x37, 0xce, 0xef, 0xef, + 0xd7, 0xd9, 0x63, 0xbe, 0x9e, 0x64, 0x1c, 0xfb, 0x72, 0x39, 0x45, 0xe0, 0x4f, 0x60, 0x5a, 0x19, + 0xfe, 0x02, 0xcc, 0x99, 0xa9, 0x46, 0x8e, 0x56, 0x26, 0xf8, 0xce, 0x47, 0x3e, 0x95, 0x08, 0x21, + 0xee, 0x7a, 0xd3, 0x74, 0x8a, 0x7a, 0x4d, 0xc1, 0xdf, 0x48, 0x00, 0xba, 0xc4, 0xb0, 0x0e, 0x6d, + 0x9d, 0x43, 0xa6, 0x1e, 0xf4, 0x1f, 0x08, 0x18, 0x88, 0x32, 0x12, 0xc7, 0xbe, 0x7c, 0x7b, 0x88, + 0x19, 0x46, 0xcd, 0x6a, 0xf2, 0x18, 0xf4, 0xb1, 0xa9, 0xfc, 0x35, 0x07, 0xa6, 0xc2, 0x78, 0xc3, + 0x3b, 0xec, 0x3e, 0x78, 0x7a, 0x8b, 0x49, 0x8b, 0x4e, 0xb5, 0x1a, 0x1e, 0xca, 0x76, 0xc8, 0x38, + 0x4e, 0x2e, 0x50, 0xac, 0x00, 0x7f, 0x2d, 0x01, 0x88, 0x33, 0xb3, 0x88, 0x28, 0x68, 0xdf, 0x1b, + 0x21, 0xae, 0xd9, 0x81, 0x46, 0xfb, 0x2a, 0x0b, 0x48, 0x96, 0x8e, 0xfa, 0x18, 0x64, 0xb7, 0xfa, + 0x39, 0xb5, 0x2d, 0xbe, 0xc7, 0x4a, 0x61, 0xe4, 0x5b, 0x1d, 0x4d, 0x08, 0xc1, 0xad, 0x8e, 0x96, + 0x28, 0x46, 0x55, 0xde, 0x48, 0x60, 0x61, 0x40, 0x67, 0x07, 0x6f, 0xc6, 0xdd, 0x2b, 0x6f, 0xaf, + 0x2b, 0xd2, 0x52, 0xfe, 0x5a, 0x51, 0x2b, 0x27, 0xbb, 0x4e, 0xce, 0x40, 0x69, 0x39, 0xf8, 0x2b, + 0x96, 0x15, 0x19, 0x3c, 0x51, 0x2d, 0x6e, 0x0e, 0xe3, 0x81, 0xda, 0xa7, 0xd1, 0x5c, 0x8c, 0xd2, + 0x29, 0xc3, 0x43, 0x7d, 0xcc, 0x29, 0x18, 0xc4, 0x85, 0x8c, 0xbd, 0x98, 0xd8, 0x31, 0x76, 0x88, + 0xdb, 0x6f, 0x46, 0x5a, 0xdb, 0x7e, 0x2c, 0x38, 0x28, 0x21, 0xc5, 0x26, 0xa2, 0x03, 0x56, 0x4f, + 0x73, 0xe9, 0x89, 0x88, 0x17, 0x46, 0xce, 0x51, 0xfe, 0x92, 0x03, 0xd1, 0x5b, 0x38, 0xc4, 0x00, + 0x55, 0x03, 0xc5, 0x68, 0x28, 0x11, 0xa8, 0x51, 0xa9, 0x88, 0x06, 0x18, 0x14, 0xcb, 0xb0, 0x37, + 0x9b, 0x86, 0xa3, 0x4a, 0xfe, 0xf4, 0xa3, 0x0a, 0x7f, 0xb3, 0xa3, 0x21, 0x25, 0x82, 0x84, 0x1e, + 0x58, 0xe0, 0xf5, 0x9d, 0x78, 0xc4, 0xdd, 0xb4, 0xbd, 0x75, 0xbb, 0x63, 0x35, 0xd6, 0x74, 0x9e, + 0xeb, 0x05, 0xbe, 0xbb, 0xdb, 0x5d, 0x5f, 0x5e, 0xd8, 0xee, 0x2f, 0x72, 0xec, 0xcb, 0x97, 0x07, + 0xb0, 0xf8, 0x7d, 0x1a, 0x04, 0xad, 0xfc, 0x41, 0x02, 0xd3, 0x4c, 0xe2, 0x5e, 0x8b, 0xe8, 0x07, + 0xac, 0x79, 0x65, 0x45, 0x84, 0xf4, 0xce, 0xce, 0x41, 0xb6, 0x95, 0x56, 0xef, 0x8c, 0x90, 0xf0, + 0x99, 0x01, 0x3c, 0xce, 0x99, 0x0c, 0x8b, 0xa2, 0x3e, 0x36, 0x95, 0x7f, 0xe4, 0xc0, 0xa5, 0x1d, + 0xdc, 0x36, 0x1a, 0x1f, 0x69, 0xa8, 0x78, 0x9e, 0xea, 0xb2, 0x1f, 0x8d, 0xf4, 0xc4, 0x0d, 0xd8, + 0xf5, 0xa0, 0x06, 0x1b, 0xba, 0x60, 0x82, 0x7a, 0xd8, 0xeb, 0x84, 0x9d, 0xda, 0xc6, 0x99, 0x58, + 0xe3, 0x88, 0xda, 0xac, 0xb0, 0x37, 0x11, 0xac, 0x91, 0xb0, 0xa4, 0x7c, 0x2a, 0x81, 0xa5, 0x81, + 0xba, 0xe7, 0x37, 0xcc, 0xfc, 0x34, 0x15, 0xe6, 0xad, 0xb3, 0x70, 0xfc, 0xa4, 0x71, 0xe6, 0x13, + 0x09, 0x5c, 0x3d, 0x49, 0xf9, 0x1c, 0x3a, 0x56, 0x27, 0xdd, 0xb1, 0x3e, 0x39, 0x43, 0xd7, 0x07, + 0xb4, 0xae, 0xbf, 0xcd, 0x9f, 0xec, 0xf8, 0x97, 0x43, 0x4d, 0xea, 0x1f, 0xb2, 0x5d, 0x50, 0x3e, + 0x14, 0x11, 0xb3, 0xad, 0xa0, 0x6a, 0x06, 0xfd, 0x68, 0x51, 0x5b, 0xee, 0xfa, 0x72, 0x79, 0xa7, + 0x97, 0x79, 0xec, 0xcb, 0xf3, 0xbd, 0x44, 0x94, 0xc5, 0x50, 0xfe, 0x2b, 0x81, 0x2b, 0x03, 0xcf, + 0xe2, 0x1c, 0xb2, 0xcf, 0x48, 0x67, 0xdf, 0xfd, 0x33, 0xc9, 0xbe, 0xfe, 0x69, 0xf7, 0xa7, 0x89, + 0x77, 0xb8, 0xfa, 0x85, 0x98, 0x99, 0xda, 0xa0, 0x14, 0x67, 0x40, 0x38, 0x35, 0x7d, 0xfb, 0x14, + 0x21, 0xb7, 0x2d, 0xed, 0x2b, 0x22, 0xc6, 0xa5, 0x98, 0x46, 0x51, 0x12, 0x3e, 0x3b, 0xd5, 0x14, + 0xde, 0x67, 0xaa, 0x79, 0x29, 0x81, 0x79, 0x9c, 0xfe, 0x0f, 0x9f, 0x56, 0xc6, 0xb9, 0x07, 0xb7, + 0x47, 0xe9, 0xbf, 0xd3, 0x10, 0x5a, 0x45, 0xb8, 0x31, 0xdf, 0xc3, 0xa0, 0x28, 0x63, 0xed, 0x23, + 0x0f, 0x56, 0xa9, 0x81, 0x77, 0xf2, 0x03, 0x0d, 0xbc, 0xca, 0xdf, 0x72, 0x40, 0x3e, 0xe1, 0x29, + 0x87, 0x1b, 0x00, 0xda, 0x7b, 0x94, 0xb8, 0x87, 0xa4, 0xf1, 0x30, 0xf8, 0x64, 0x13, 0x76, 0xd0, + 0xf9, 0xb8, 0xbd, 0xda, 0xca, 0x48, 0xa0, 0x3e, 0x5a, 0xd0, 0x04, 0xd3, 0x5e, 0xa2, 0xf3, 0x1b, + 0x65, 0x22, 0x10, 0x8e, 0x25, 0x1b, 0x47, 0x6d, 0xbe, 0xeb, 0xcb, 0xa9, 0x56, 0x12, 0xa5, 0xe0, + 0xa1, 0x0e, 0x80, 0x1e, 0x9f, 0x5e, 0x70, 0x01, 0x6a, 0xc3, 0x95, 0xb3, 0xf8, 0xcc, 0xa2, 0x27, + 0x28, 0x71, 0x5c, 0x09, 0x58, 0xe5, 0x33, 0x09, 0x80, 0xf8, 0x56, 0xc0, 0xab, 0x20, 0xf1, 0x29, + 0x44, 0xbc, 0x62, 0x05, 0x06, 0x81, 0x12, 0x74, 0xb8, 0x0c, 0x26, 0x4d, 0x42, 0x29, 0x6e, 0x86, + 0x73, 0x40, 0xf4, 0xa9, 0xa7, 0x1e, 0x90, 0x51, 0xc8, 0x87, 0xbb, 0x60, 0xc2, 0x25, 0x98, 0x8a, + 0xf9, 0xb3, 0xa8, 0xdd, 0x65, 0x6d, 0x15, 0xe2, 0x94, 0x63, 0x5f, 0x5e, 0x19, 0xe6, 0xa3, 0x9e, + 0x2a, 0xba, 0x30, 0xae, 0x84, 0x04, 0x1c, 0x7c, 0x08, 0xca, 0xc2, 0x46, 0x62, 0xc3, 0xc1, 0xad, + 0xbd, 0x24, 0x76, 0x53, 0xae, 0xf7, 0x0a, 0xa0, 0xac, 0x8e, 0xb2, 0x01, 0xa6, 0xc2, 0xec, 0x82, + 0x15, 0x50, 0x48, 0x3c, 0xdf, 0x81, 0xe3, 0x9c, 0xd2, 0x13, 0x98, 0x5c, 0xff, 0xc0, 0x68, 0x5b, + 0xaf, 0xde, 0x56, 0xc7, 0x5e, 0xbf, 0xad, 0x8e, 0xbd, 0x79, 0x5b, 0x1d, 0x7b, 0xd9, 0xad, 0x4a, + 0xaf, 0xba, 0x55, 0xe9, 0x75, 0xb7, 0x2a, 0xbd, 0xe9, 0x56, 0xa5, 0x7f, 0x76, 0xab, 0xd2, 0xef, + 0xfe, 0x55, 0x1d, 0xfb, 0xe1, 0xf2, 0xd0, 0x1f, 0x65, 0x3f, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xac, + 0xc8, 0x8c, 0x78, 0xc0, 0x1d, 0x00, 0x00, +} + +func (m *ApplyConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplyConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ApplyConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) { @@ -709,6 +1017,34 @@ func (m *ExpressionWarning) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *JSONPatch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JSONPatch) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JSONPatch) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *MatchCondition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -824,7 +1160,7 @@ func (m *MatchResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) { +func (m *MutatingAdmissionPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -834,18 +1170,18 @@ func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedRuleWithOperations) MarshalTo(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.RuleWithOperations.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -854,19 +1190,20 @@ func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) } i-- dAtA[i] = 0x12 - if len(m.ResourceNames) > 0 { - for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ResourceNames[iNdEx]) - copy(dAtA[i:], m.ResourceNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) - i-- - dAtA[i] = 0xa + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ParamKind) Marshal() (dAtA []byte, err error) { +func (m *MutatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -876,187 +1213,12 @@ func (m *ParamKind) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ParamKind) MarshalTo(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ParamKind) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - i -= len(m.APIVersion) - copy(dAtA[i:], m.APIVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ParamRef) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ParamRef) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ParameterNotFoundAction != nil { - i -= len(*m.ParameterNotFoundAction) - copy(dAtA[i:], *m.ParameterNotFoundAction) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ParameterNotFoundAction))) - i-- - dAtA[i] = 0x22 - } - if m.Selector != nil { - { - size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TypeChecking) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TypeChecking) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ExpressionWarnings) > 0 { - for iNdEx := len(m.ExpressionWarnings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExpressionWarnings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ValidatingAdmissionPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1084,7 +1246,7 @@ func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) { +func (m *MutatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1094,12 +1256,12 @@ func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *ValidatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1131,7 +1293,7 @@ func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) { +func (m *MutatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1141,25 +1303,16 @@ func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *ValidatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ValidationActions) > 0 { - for iNdEx := len(m.ValidationActions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ValidationActions[iNdEx]) - copy(dAtA[i:], m.ValidationActions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValidationActions[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } if m.MatchResources != nil { { size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i]) @@ -1192,7 +1345,7 @@ func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) { +func (m *MutatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1202,12 +1355,12 @@ func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1239,7 +1392,7 @@ func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) { +func (m *MutatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1249,30 +1402,21 @@ func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MutatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Variables) > 0 { - for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } + i -= len(m.ReinvocationPolicy) + copy(dAtA[i:], m.ReinvocationPolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReinvocationPolicy))) + i-- + dAtA[i] = 0x3a if len(m.MatchConditions) > 0 { for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { { @@ -1287,10 +1431,17 @@ func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, dAtA[i] = 0x32 } } - if len(m.AuditAnnotations) > 0 { - for iNdEx := len(m.AuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { + if m.FailurePolicy != nil { + i -= len(*m.FailurePolicy) + copy(dAtA[i:], *m.FailurePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) + i-- + dAtA[i] = 0x2a + } + if len(m.Mutations) > 0 { + for iNdEx := len(m.Mutations) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.AuditAnnotations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Mutations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1298,20 +1449,13 @@ func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } } - if m.FailurePolicy != nil { - i -= len(*m.FailurePolicy) - copy(dAtA[i:], *m.FailurePolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) - i-- - dAtA[i] = 0x22 - } - if len(m.Validations) > 0 { - for iNdEx := len(m.Validations) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Variables) > 0 { + for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Validations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1349,7 +1493,7 @@ func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) { +func (m *Mutation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1359,33 +1503,31 @@ func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ValidatingAdmissionPolicyStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *Mutation) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Mutation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if m.JSONPatch != nil { + { + size, err := m.JSONPatch.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 } - if m.TypeChecking != nil { + if m.ApplyConfiguration != nil { { - size, err := m.TypeChecking.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ApplyConfiguration.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1393,15 +1535,17 @@ func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i -= len(m.PatchType) + copy(dAtA[i:], m.PatchType) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PatchType))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x12 return len(dAtA) - i, nil } -func (m *Validation) Marshal() (dAtA []byte, err error) { +func (m *NamedRuleWithOperations) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1411,42 +1555,72 @@ func (m *Validation) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Validation) MarshalTo(dAtA []byte) (int, error) { +func (m *NamedRuleWithOperations) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NamedRuleWithOperations) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.MessageExpression) - copy(dAtA[i:], m.MessageExpression) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression))) + { + size, err := m.RuleWithOperations.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x22 - if m.Reason != nil { - i -= len(*m.Reason) - copy(dAtA[i:], *m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 + if len(m.ResourceNames) > 0 { + for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResourceNames[iNdEx]) + copy(dAtA[i:], m.ResourceNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) + i-- + dAtA[i] = 0xa + } } - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + return len(dAtA) - i, nil +} + +func (m *ParamKind) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamKind) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamKind) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) i-- dAtA[i] = 0x12 - i -= len(m.Expression) - copy(dAtA[i:], m.Expression) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i -= len(m.APIVersion) + copy(dAtA[i:], m.APIVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *Variable) Marshal() (dAtA []byte, err error) { +func (m *ParamRef) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1456,19 +1630,38 @@ func (m *Variable) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Variable) MarshalTo(dAtA []byte) (int, error) { +func (m *ParamRef) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ParamRef) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Expression) - copy(dAtA[i:], m.Expression) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + if m.ParameterNotFoundAction != nil { + i -= len(*m.ParameterNotFoundAction) + copy(dAtA[i:], *m.ParameterNotFoundAction) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ParameterNotFoundAction))) + i-- + dAtA[i] = 0x22 + } + if m.Selector != nil { + { + size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0x12 i -= len(m.Name) @@ -1479,606 +1672,2773 @@ func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *TypeChecking) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *AuditAnnotation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ValueExpression) - n += 1 + l + sovGenerated(uint64(l)) - return n + +func (m *TypeChecking) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ExpressionWarning) Size() (n int) { - if m == nil { - return 0 - } +func (m *TypeChecking) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.FieldRef) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Warning) - n += 1 + l + sovGenerated(uint64(l)) - return n + if len(m.ExpressionWarnings) > 0 { + for iNdEx := len(m.ExpressionWarnings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExpressionWarnings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *MatchCondition) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingAdmissionPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Expression) - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *MatchResources) Size() (n int) { - if m == nil { - return 0 - } +func (m *ValidatingAdmissionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.NamespaceSelector != nil { - l = m.NamespaceSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.ObjectSelector != nil { - l = m.ObjectSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.ResourceRules) > 0 { - for _, e := range m.ResourceRules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if len(m.ExcludeResourceRules) > 0 { - for _, e := range m.ExcludeResourceRules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if m.MatchPolicy != nil { - l = len(*m.MatchPolicy) - n += 1 + l + sovGenerated(uint64(l)) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *NamedRuleWithOperations) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceNames) > 0 { - for _, s := range m.ResourceNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } +func (m *ValidatingAdmissionPolicyBinding) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - l = m.RuleWithOperations.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *ParamKind) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.APIVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - return n +func (m *ValidatingAdmissionPolicyBinding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ParamRef) Size() (n int) { - if m == nil { - return 0 - } +func (m *ValidatingAdmissionPolicyBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - if m.Selector != nil { - l = m.Selector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.ParameterNotFoundAction != nil { - l = len(*m.ParameterNotFoundAction) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *TypeChecking) Size() (n int) { - if m == nil { - return 0 + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - var l int - _ = l - if len(m.ExpressionWarnings) > 0 { - for _, e := range m.ExpressionWarnings { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicy) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingAdmissionPolicyBindingList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - 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 + return dAtA[:n], nil } -func (m *ValidatingAdmissionPolicyBinding) Size() (n int) { - if m == nil { - return 0 - } - 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 *ValidatingAdmissionPolicyBindingList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ValidatingAdmissionPolicyBindingList) Size() (n int) { - if m == nil { - return 0 - } +func (m *ValidatingAdmissionPolicyBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyBindingSpec) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingAdmissionPolicyBindingSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyBindingSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyBindingSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.PolicyName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParamRef != nil { - l = m.ParamRef.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.ValidationActions) > 0 { + for iNdEx := len(m.ValidationActions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ValidationActions[iNdEx]) + copy(dAtA[i:], m.ValidationActions[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ValidationActions[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } if m.MatchResources != nil { - l = m.MatchResources.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.MatchResources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - if len(m.ValidationActions) > 0 { - for _, s := range m.ValidationActions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) + if m.ParamRef != nil { + { + size, err := m.ParamRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - return n + i -= len(m.PolicyName) + copy(dAtA[i:], m.PolicyName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PolicyName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyList) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingAdmissionPolicyList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i 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)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicySpec) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingAdmissionPolicySpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - if m.ParamKind != nil { - l = m.ParamKind.Size() - n += 1 + l + sovGenerated(uint64(l)) + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicySpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Variables) > 0 { + for iNdEx := len(m.Variables) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Variables[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } } - if m.MatchConstraints != nil { - l = m.MatchConstraints.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.MatchConditions) > 0 { + for iNdEx := len(m.MatchConditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MatchConditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } } - if len(m.Validations) > 0 { - for _, e := range m.Validations { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.AuditAnnotations) > 0 { + for iNdEx := len(m.AuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AuditAnnotations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } } if m.FailurePolicy != nil { - l = len(*m.FailurePolicy) - n += 1 + l + sovGenerated(uint64(l)) + i -= len(*m.FailurePolicy) + copy(dAtA[i:], *m.FailurePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.FailurePolicy))) + i-- + dAtA[i] = 0x22 } - if len(m.AuditAnnotations) > 0 { - for _, e := range m.AuditAnnotations { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Validations) > 0 { + for iNdEx := len(m.Validations) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Validations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } } - if len(m.MatchConditions) > 0 { - for _, e := range m.MatchConditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.MatchConstraints != nil { + { + size, err := m.MatchConstraints.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if len(m.Variables) > 0 { - for _, e := range m.Variables { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.ParamKind != nil { + { + size, err := m.ParamKind.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *ValidatingAdmissionPolicyStatus) Size() (n int) { - if m == nil { - return 0 +func (m *ValidatingAdmissionPolicyStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *ValidatingAdmissionPolicyStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatingAdmissionPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - if m.TypeChecking != nil { - l = m.TypeChecking.Size() - n += 1 + l + sovGenerated(uint64(l)) - } if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } } - return n + if m.TypeChecking != nil { + { + size, err := m.TypeChecking.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) + i-- + dAtA[i] = 0x8 + return len(dAtA) - i, nil } -func (m *Validation) Size() (n int) { - if m == nil { - return 0 +func (m *Validation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Validation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Expression) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) + i -= len(m.MessageExpression) + copy(dAtA[i:], m.MessageExpression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression))) + i-- + dAtA[i] = 0x22 if m.Reason != nil { - l = len(*m.Reason) - n += 1 + l + sovGenerated(uint64(l)) + i -= len(*m.Reason) + copy(dAtA[i:], *m.Reason) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) + i-- + dAtA[i] = 0x1a } - l = len(m.MessageExpression) - n += 1 + l + sovGenerated(uint64(l)) - return n + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *Variable) Size() (n int) { - if m == nil { - return 0 +func (m *Variable) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Variable) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Variable) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Expression) - n += 1 + l + sovGenerated(uint64(l)) - return n + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AuditAnnotation) String() string { - if this == nil { - return "nil" +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - s := strings.Join([]string{`&AuditAnnotation{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `ValueExpression:` + fmt.Sprintf("%v", this.ValueExpression) + `,`, - `}`, - }, "") - return s + dAtA[offset] = uint8(v) + return base } -func (this *ExpressionWarning) String() string { - if this == nil { - return "nil" +func (m *ApplyConfiguration) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ExpressionWarning{`, - `FieldRef:` + fmt.Sprintf("%v", this.FieldRef) + `,`, - `Warning:` + fmt.Sprintf("%v", this.Warning) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *MatchCondition) String() string { - if this == nil { - return "nil" + +func (m *AuditAnnotation) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&MatchCondition{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ValueExpression) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *MatchResources) String() string { - if this == nil { - return "nil" - } - repeatedStringForResourceRules := "[]NamedRuleWithOperations{" - for _, f := range this.ResourceRules { - repeatedStringForResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," - } - repeatedStringForResourceRules += "}" - repeatedStringForExcludeResourceRules := "[]NamedRuleWithOperations{" - for _, f := range this.ExcludeResourceRules { - repeatedStringForExcludeResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + +func (m *ExpressionWarning) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForExcludeResourceRules += "}" - s := strings.Join([]string{`&MatchResources{`, - `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `ResourceRules:` + repeatedStringForResourceRules + `,`, - `ExcludeResourceRules:` + repeatedStringForExcludeResourceRules + `,`, - `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.FieldRef) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Warning) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *NamedRuleWithOperations) String() string { - if this == nil { - return "nil" + +func (m *JSONPatch) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&NamedRuleWithOperations{`, - `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, - `RuleWithOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RuleWithOperations), "RuleWithOperations", "v11.RuleWithOperations", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ParamKind) String() string { - if this == nil { - return "nil" + +func (m *MatchCondition) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ParamKind{`, - `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ParamRef) String() string { - if this == nil { - return "nil" + +func (m *MatchResources) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ParamRef{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `ParameterNotFoundAction:` + valueToStringGenerated(this.ParameterNotFoundAction) + `,`, - `}`, - }, "") - return s -} -func (this *TypeChecking) String() string { - if this == nil { - return "nil" + var l int + _ = l + if m.NamespaceSelector != nil { + l = m.NamespaceSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForExpressionWarnings := "[]ExpressionWarning{" - for _, f := range this.ExpressionWarnings { - repeatedStringForExpressionWarnings += strings.Replace(strings.Replace(f.String(), "ExpressionWarning", "ExpressionWarning", 1), `&`, ``, 1) + "," + if m.ObjectSelector != nil { + l = m.ObjectSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForExpressionWarnings += "}" - s := strings.Join([]string{`&TypeChecking{`, - `ExpressionWarnings:` + repeatedStringForExpressionWarnings + `,`, - `}`, - }, "") - return s + if len(m.ResourceRules) > 0 { + for _, e := range m.ResourceRules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ExcludeResourceRules) > 0 { + for _, e := range m.ExcludeResourceRules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.MatchPolicy != nil { + l = len(*m.MatchPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (this *ValidatingAdmissionPolicy) String() string { - if this == nil { - return "nil" + +func (m *MutatingAdmissionPolicy) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ValidatingAdmissionPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicySpec", "ValidatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ValidatingAdmissionPolicyStatus", "ValidatingAdmissionPolicyStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + 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 (this *ValidatingAdmissionPolicyBinding) String() string { - if this == nil { - return "nil" + +func (m *MutatingAdmissionPolicyBinding) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ValidatingAdmissionPolicyBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicyBindingSpec", "ValidatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + 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 (this *ValidatingAdmissionPolicyBindingList) String() string { - if this == nil { - return "nil" + +func (m *MutatingAdmissionPolicyBindingList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]ValidatingAdmissionPolicyBinding{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicyBinding", "ValidatingAdmissionPolicyBinding", 1), `&`, ``, 1) + "," + 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)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return n } -func (this *ValidatingAdmissionPolicyBindingSpec) String() string { - if this == nil { - return "nil" + +func (m *MutatingAdmissionPolicyBindingSpec) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingSpec{`, - `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`, - `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`, - `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`, - `ValidationActions:` + fmt.Sprintf("%v", this.ValidationActions) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.PolicyName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParamRef != nil { + l = m.ParamRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MatchResources != nil { + l = m.MatchResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (this *ValidatingAdmissionPolicyList) String() string { - if this == nil { - return "nil" + +func (m *MutatingAdmissionPolicyList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]ValidatingAdmissionPolicy{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicy", "ValidatingAdmissionPolicy", 1), `&`, ``, 1) + "," + 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)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ValidatingAdmissionPolicyList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return n } -func (this *ValidatingAdmissionPolicySpec) String() string { - if this == nil { - return "nil" + +func (m *MutatingAdmissionPolicySpec) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForValidations := "[]Validation{" - for _, f := range this.Validations { - repeatedStringForValidations += strings.Replace(strings.Replace(f.String(), "Validation", "Validation", 1), `&`, ``, 1) + "," + var l int + _ = l + if m.ParamKind != nil { + l = m.ParamKind.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForValidations += "}" - repeatedStringForAuditAnnotations := "[]AuditAnnotation{" - for _, f := range this.AuditAnnotations { - repeatedStringForAuditAnnotations += strings.Replace(strings.Replace(f.String(), "AuditAnnotation", "AuditAnnotation", 1), `&`, ``, 1) + "," + if m.MatchConstraints != nil { + l = m.MatchConstraints.Size() + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForAuditAnnotations += "}" - repeatedStringForMatchConditions := "[]MatchCondition{" - for _, f := range this.MatchConditions { - repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + if len(m.Variables) > 0 { + for _, e := range m.Variables { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForMatchConditions += "}" - repeatedStringForVariables := "[]Variable{" - for _, f := range this.Variables { - repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + "," + if len(m.Mutations) > 0 { + for _, e := range m.Mutations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForVariables += "}" - s := strings.Join([]string{`&ValidatingAdmissionPolicySpec{`, - `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`, - `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`, - `Validations:` + repeatedStringForValidations + `,`, - `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, - `AuditAnnotations:` + repeatedStringForAuditAnnotations + `,`, - `MatchConditions:` + repeatedStringForMatchConditions + `,`, - `Variables:` + repeatedStringForVariables + `,`, - `}`, - }, "") - return s + if m.FailurePolicy != nil { + l = len(*m.FailurePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.MatchConditions) > 0 { + for _, e := range m.MatchConditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ReinvocationPolicy) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ValidatingAdmissionPolicyStatus) String() string { - if this == nil { - return "nil" + +func (m *Mutation) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForConditions := "[]Condition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + var l int + _ = l + l = len(m.PatchType) + n += 1 + l + sovGenerated(uint64(l)) + if m.ApplyConfiguration != nil { + l = m.ApplyConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.JSONPatch != nil { + l = m.JSONPatch.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *NamedRuleWithOperations) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.RuleWithOperations.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ParamKind) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ParamRef) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + if m.Selector != nil { + l = m.Selector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ParameterNotFoundAction != nil { + l = len(*m.ParameterNotFoundAction) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *TypeChecking) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ExpressionWarnings) > 0 { + for _, e := range m.ExpressionWarnings { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingAdmissionPolicy) Size() (n int) { + if m == nil { + return 0 + } + 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 *ValidatingAdmissionPolicyBinding) Size() (n int) { + if m == nil { + return 0 + } + 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 *ValidatingAdmissionPolicyBindingList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ValidatingAdmissionPolicyBindingSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PolicyName) + n += 1 + l + sovGenerated(uint64(l)) + if m.ParamRef != nil { + l = m.ParamRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MatchResources != nil { + l = m.MatchResources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ValidationActions) > 0 { + for _, s := range m.ValidationActions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingAdmissionPolicyList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ValidatingAdmissionPolicySpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ParamKind != nil { + l = m.ParamKind.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MatchConstraints != nil { + l = m.MatchConstraints.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Validations) > 0 { + for _, e := range m.Validations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.FailurePolicy != nil { + l = len(*m.FailurePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.AuditAnnotations) > 0 { + for _, e := range m.AuditAnnotations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.MatchConditions) > 0 { + for _, e := range m.MatchConditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Variables) > 0 { + for _, e := range m.Variables { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ValidatingAdmissionPolicyStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + if m.TypeChecking != nil { + l = m.TypeChecking.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *Validation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + if m.Reason != nil { + l = len(*m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.MessageExpression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Variable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *ApplyConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ApplyConfiguration{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *AuditAnnotation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AuditAnnotation{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `ValueExpression:` + fmt.Sprintf("%v", this.ValueExpression) + `,`, + `}`, + }, "") + return s +} +func (this *ExpressionWarning) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExpressionWarning{`, + `FieldRef:` + fmt.Sprintf("%v", this.FieldRef) + `,`, + `Warning:` + fmt.Sprintf("%v", this.Warning) + `,`, + `}`, + }, "") + return s +} +func (this *JSONPatch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&JSONPatch{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *MatchCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MatchCondition{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *MatchResources) String() string { + if this == nil { + return "nil" + } + repeatedStringForResourceRules := "[]NamedRuleWithOperations{" + for _, f := range this.ResourceRules { + repeatedStringForResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForResourceRules += "}" + repeatedStringForExcludeResourceRules := "[]NamedRuleWithOperations{" + for _, f := range this.ExcludeResourceRules { + repeatedStringForExcludeResourceRules += strings.Replace(strings.Replace(f.String(), "NamedRuleWithOperations", "NamedRuleWithOperations", 1), `&`, ``, 1) + "," + } + repeatedStringForExcludeResourceRules += "}" + s := strings.Join([]string{`&MatchResources{`, + `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ObjectSelector:` + strings.Replace(fmt.Sprintf("%v", this.ObjectSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ResourceRules:` + repeatedStringForResourceRules + `,`, + `ExcludeResourceRules:` + repeatedStringForExcludeResourceRules + `,`, + `MatchPolicy:` + valueToStringGenerated(this.MatchPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *MutatingAdmissionPolicy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MutatingAdmissionPolicy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "MutatingAdmissionPolicySpec", "MutatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *MutatingAdmissionPolicyBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MutatingAdmissionPolicyBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "MutatingAdmissionPolicyBindingSpec", "MutatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *MutatingAdmissionPolicyBindingList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]MutatingAdmissionPolicyBinding{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingAdmissionPolicyBinding", "MutatingAdmissionPolicyBinding", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&MutatingAdmissionPolicyBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *MutatingAdmissionPolicyBindingSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MutatingAdmissionPolicyBindingSpec{`, + `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`, + `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`, + `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`, + `}`, + }, "") + return s +} +func (this *MutatingAdmissionPolicyList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]MutatingAdmissionPolicy{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "MutatingAdmissionPolicy", "MutatingAdmissionPolicy", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&MutatingAdmissionPolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *MutatingAdmissionPolicySpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForVariables := "[]Variable{" + for _, f := range this.Variables { + repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + "," + } + repeatedStringForVariables += "}" + repeatedStringForMutations := "[]Mutation{" + for _, f := range this.Mutations { + repeatedStringForMutations += strings.Replace(strings.Replace(f.String(), "Mutation", "Mutation", 1), `&`, ``, 1) + "," + } + repeatedStringForMutations += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + s := strings.Join([]string{`&MutatingAdmissionPolicySpec{`, + `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`, + `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`, + `Variables:` + repeatedStringForVariables + `,`, + `Mutations:` + repeatedStringForMutations + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `ReinvocationPolicy:` + fmt.Sprintf("%v", this.ReinvocationPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *Mutation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Mutation{`, + `PatchType:` + fmt.Sprintf("%v", this.PatchType) + `,`, + `ApplyConfiguration:` + strings.Replace(this.ApplyConfiguration.String(), "ApplyConfiguration", "ApplyConfiguration", 1) + `,`, + `JSONPatch:` + strings.Replace(this.JSONPatch.String(), "JSONPatch", "JSONPatch", 1) + `,`, + `}`, + }, "") + return s +} +func (this *NamedRuleWithOperations) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NamedRuleWithOperations{`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `RuleWithOperations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RuleWithOperations), "RuleWithOperations", "v11.RuleWithOperations", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ParamKind) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParamKind{`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `}`, + }, "") + return s +} +func (this *ParamRef) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ParamRef{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ParameterNotFoundAction:` + valueToStringGenerated(this.ParameterNotFoundAction) + `,`, + `}`, + }, "") + return s +} +func (this *TypeChecking) String() string { + if this == nil { + return "nil" + } + repeatedStringForExpressionWarnings := "[]ExpressionWarning{" + for _, f := range this.ExpressionWarnings { + repeatedStringForExpressionWarnings += strings.Replace(strings.Replace(f.String(), "ExpressionWarning", "ExpressionWarning", 1), `&`, ``, 1) + "," + } + repeatedStringForExpressionWarnings += "}" + s := strings.Join([]string{`&TypeChecking{`, + `ExpressionWarnings:` + repeatedStringForExpressionWarnings + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicySpec", "ValidatingAdmissionPolicySpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ValidatingAdmissionPolicyStatus", "ValidatingAdmissionPolicyStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBinding) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicyBinding{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ValidatingAdmissionPolicyBindingSpec", "ValidatingAdmissionPolicyBindingSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBindingList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingAdmissionPolicyBinding{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicyBinding", "ValidatingAdmissionPolicyBinding", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyBindingSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ValidatingAdmissionPolicyBindingSpec{`, + `PolicyName:` + fmt.Sprintf("%v", this.PolicyName) + `,`, + `ParamRef:` + strings.Replace(this.ParamRef.String(), "ParamRef", "ParamRef", 1) + `,`, + `MatchResources:` + strings.Replace(this.MatchResources.String(), "MatchResources", "MatchResources", 1) + `,`, + `ValidationActions:` + fmt.Sprintf("%v", this.ValidationActions) + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ValidatingAdmissionPolicy{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ValidatingAdmissionPolicy", "ValidatingAdmissionPolicy", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicySpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForValidations := "[]Validation{" + for _, f := range this.Validations { + repeatedStringForValidations += strings.Replace(strings.Replace(f.String(), "Validation", "Validation", 1), `&`, ``, 1) + "," + } + repeatedStringForValidations += "}" + repeatedStringForAuditAnnotations := "[]AuditAnnotation{" + for _, f := range this.AuditAnnotations { + repeatedStringForAuditAnnotations += strings.Replace(strings.Replace(f.String(), "AuditAnnotation", "AuditAnnotation", 1), `&`, ``, 1) + "," + } + repeatedStringForAuditAnnotations += "}" + repeatedStringForMatchConditions := "[]MatchCondition{" + for _, f := range this.MatchConditions { + repeatedStringForMatchConditions += strings.Replace(strings.Replace(f.String(), "MatchCondition", "MatchCondition", 1), `&`, ``, 1) + "," + } + repeatedStringForMatchConditions += "}" + repeatedStringForVariables := "[]Variable{" + for _, f := range this.Variables { + repeatedStringForVariables += strings.Replace(strings.Replace(f.String(), "Variable", "Variable", 1), `&`, ``, 1) + "," + } + repeatedStringForVariables += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicySpec{`, + `ParamKind:` + strings.Replace(this.ParamKind.String(), "ParamKind", "ParamKind", 1) + `,`, + `MatchConstraints:` + strings.Replace(this.MatchConstraints.String(), "MatchResources", "MatchResources", 1) + `,`, + `Validations:` + repeatedStringForValidations + `,`, + `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, + `AuditAnnotations:` + repeatedStringForAuditAnnotations + `,`, + `MatchConditions:` + repeatedStringForMatchConditions + `,`, + `Variables:` + repeatedStringForVariables + `,`, + `}`, + }, "") + return s +} +func (this *ValidatingAdmissionPolicyStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&ValidatingAdmissionPolicyStatus{`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `TypeChecking:` + strings.Replace(this.TypeChecking.String(), "TypeChecking", "TypeChecking", 1) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `}`, + }, "") + return s +} +func (this *Validation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Validation{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Reason:` + valueToStringGenerated(this.Reason) + `,`, + `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`, + `}`, + }, "") + return s +} +func (this *Variable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Variable{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + 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 *ApplyConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplyConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplyConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AuditAnnotation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AuditAnnotation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuditAnnotation: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 ValueExpression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValueExpression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExpressionWarning) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExpressionWarning: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExpressionWarning: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldRef = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warning = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JSONPatch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JSONPatch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JSONPatch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatchCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatchCondition: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MatchResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MatchResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MatchResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NamespaceSelector == nil { + m.NamespaceSelector = &v1.LabelSelector{} + } + if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectSelector == nil { + m.ObjectSelector = &v1.LabelSelector{} + } + if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceRules = append(m.ResourceRules, NamedRuleWithOperations{}) + if err := m.ResourceRules[len(m.ResourceRules)-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 ExcludeResourceRules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExcludeResourceRules = append(m.ExcludeResourceRules, NamedRuleWithOperations{}) + if err := m.ExcludeResourceRules[len(m.ExcludeResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := MatchPolicyType(dAtA[iNdEx:postIndex]) + m.MatchPolicy = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutatingAdmissionPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingAdmissionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingAdmissionPolicy: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutatingAdmissionPolicyBinding) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingAdmissionPolicyBinding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingAdmissionPolicyBinding: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutatingAdmissionPolicyBindingList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingAdmissionPolicyBindingList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingAdmissionPolicyBindingList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, MutatingAdmissionPolicyBinding{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MutatingAdmissionPolicyBindingSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingAdmissionPolicyBindingSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingAdmissionPolicyBindingSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PolicyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PolicyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParamRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ParamRef == nil { + m.ParamRef = &ParamRef{} + } + if err := m.ParamRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MatchResources == nil { + m.MatchResources = &MatchResources{} + } + if err := m.MatchResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&ValidatingAdmissionPolicyStatus{`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `TypeChecking:` + strings.Replace(this.TypeChecking.String(), "TypeChecking", "TypeChecking", 1) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *Validation) String() string { - if this == nil { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - s := strings.Join([]string{`&Validation{`, - `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Reason:` + valueToStringGenerated(this.Reason) + `,`, - `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`, - `}`, - }, "") - return s + return nil } -func (this *Variable) String() string { - if this == nil { - return "nil" +func (m *MutatingAdmissionPolicyList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MutatingAdmissionPolicyList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MutatingAdmissionPolicyList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, MutatingAdmissionPolicy{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&Variable{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *AuditAnnotation) Unmarshal(dAtA []byte) error { +func (m *MutatingAdmissionPolicySpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2101,17 +4461,17 @@ func (m *AuditAnnotation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AuditAnnotation: wiretype end group for non-group") + return fmt.Errorf("proto: MutatingAdmissionPolicySpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AuditAnnotation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MutatingAdmissionPolicySpec: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ParamKind", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2121,29 +4481,69 @@ func (m *AuditAnnotation) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) + if m.ParamKind == nil { + m.ParamKind = &ParamKind{} + } + if err := m.ParamKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchConstraints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MatchConstraints == nil { + m.MatchConstraints = &MatchResources{} + } + if err := m.MatchConstraints.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueExpression", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2153,79 +4553,31 @@ func (m *AuditAnnotation) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValueExpression = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + m.Variables = append(m.Variables, Variable{}) + if err := m.Variables[len(m.Variables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExpressionWarning) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExpressionWarning: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExpressionWarning: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Mutations", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2235,27 +4587,29 @@ func (m *ExpressionWarning) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.FieldRef = string(dAtA[iNdEx:postIndex]) + m.Mutations = append(m.Mutations, Mutation{}) + if err := m.Mutations[len(m.Mutations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Warning", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2283,63 +4637,14 @@ func (m *ExpressionWarning) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Warning = string(dAtA[iNdEx:postIndex]) + s := FailurePolicyType(dAtA[iNdEx:postIndex]) + m.FailurePolicy = &s iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MatchCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MatchCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MatchCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchConditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2349,27 +4654,29 @@ func (m *MatchCondition) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.MatchConditions = append(m.MatchConditions, MatchCondition{}) + if err := m.MatchConditions[len(m.MatchConditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReinvocationPolicy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2397,7 +4704,7 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Expression = string(dAtA[iNdEx:postIndex]) + m.ReinvocationPolicy = k8s_io_api_admissionregistration_v1.ReinvocationPolicyType(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2420,7 +4727,7 @@ func (m *MatchCondition) Unmarshal(dAtA []byte) error { } return nil } -func (m *MatchResources) Unmarshal(dAtA []byte) error { +func (m *Mutation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2443,53 +4750,17 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MatchResources: wiretype end group for non-group") + return fmt.Errorf("proto: Mutation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MatchResources: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Mutation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NamespaceSelector == nil { - m.NamespaceSelector = &v1.LabelSelector{} - } - if err := m.NamespaceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PatchType", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2499,31 +4770,27 @@ func (m *MatchResources) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ObjectSelector == nil { - m.ObjectSelector = &v1.LabelSelector{} - } - if err := m.ObjectSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.PatchType = PatchType(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApplyConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2550,14 +4817,16 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceRules = append(m.ResourceRules, NamedRuleWithOperations{}) - if err := m.ResourceRules[len(m.ResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ApplyConfiguration == nil { + m.ApplyConfiguration = &ApplyConfiguration{} + } + if err := m.ApplyConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExcludeResourceRules", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JSONPatch", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2584,43 +4853,12 @@ func (m *MatchResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExcludeResourceRules = append(m.ExcludeResourceRules, NamedRuleWithOperations{}) - if err := m.ExcludeResourceRules[len(m.ExcludeResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if m.JSONPatch == nil { + m.JSONPatch = &JSONPatch{} } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.JSONPatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - s := MatchPolicyType(dAtA[iNdEx:postIndex]) - m.MatchPolicy = &s iNdEx = postIndex default: iNdEx = preIndex diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto index d5974d5ec4..88344ce87a 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.proto @@ -29,6 +29,51 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "k8s.io/api/admissionregistration/v1alpha1"; +// ApplyConfiguration defines the desired configuration values of an object. +message ApplyConfiguration { + // expression will be evaluated by CEL to create an apply configuration. + // ref: https://github.com/google/cel-spec + // + // Apply configurations are declared in CEL using object initialization. For example, this CEL expression + // returns an apply configuration to set a single field: + // + // Object{ + // spec: Object.spec{ + // serviceAccountName: "example" + // } + // } + // + // Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of + // values not included in the apply configuration. + // + // CEL expressions have access to the object types needed to create apply configurations: + // + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. + optional string expression = 1; +} + // AuditAnnotation describes how to produce an audit annotation for an API request. message AuditAnnotation { // key specifies the audit annotation key. The audit annotation keys of @@ -79,6 +124,75 @@ message ExpressionWarning { optional string warning = 3; } +// JSONPatch defines a JSON Patch. +message JSONPatch { + // expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). + // ref: https://github.com/google/cel-spec + // + // expression must return an array of JSONPatch values. + // + // For example, this CEL expression returns a JSON patch to conditionally modify a value: + // + // [ + // JSONPatch{op: "test", path: "/spec/example", value: "Red"}, + // JSONPatch{op: "replace", path: "/spec/example", value: "Green"} + // ] + // + // To define an object for the patch value, use Object types. For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/spec/selector", + // value: Object.spec.selector{matchLabels: {"environment": "test"}} + // } + // ] + // + // To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"), + // value: "test" + // }, + // ] + // + // CEL expressions have access to the types needed to create JSON patches and objects: + // + // - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. + // See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, + // integer, array, map or object. If set, the 'path' and 'from' fields must be set to a + // [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL + // function may be used to escape path keys containing '/' and '~'. + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) + // as well as: + // + // - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. + optional string expression = 1; +} + message MatchCondition { // Name is an identifier for this match condition, used for strategic merging of MatchConditions, // as well as providing an identifier for logging purposes. A good name should be descriptive of @@ -202,6 +316,193 @@ message MatchResources { optional string matchPolicy = 7; } +// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain. +message MutatingAdmissionPolicy { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the MutatingAdmissionPolicy. + optional MutatingAdmissionPolicySpec spec = 2; +} + +// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. +// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators +// configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget). +// +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. +message MutatingAdmissionPolicyBinding { + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the desired behavior of the MutatingAdmissionPolicyBinding. + optional MutatingAdmissionPolicyBindingSpec spec = 2; +} + +// MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding. +message MutatingAdmissionPolicyBindingList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of PolicyBinding. + repeated MutatingAdmissionPolicyBinding items = 2; +} + +// MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding. +message MutatingAdmissionPolicyBindingSpec { + // policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + optional string policyName = 1; + + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + // +optional + optional ParamRef paramRef = 2; + + // matchResources limits what resources match this binding and may be mutated by it. + // Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and + // matchConditions before the resource may be mutated. + // When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints + // and matchConditions must match for the resource to be mutated. + // Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. + // Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. + // +optional + optional MatchResources matchResources = 3; +} + +// MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy. +message MutatingAdmissionPolicyList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // List of ValidatingAdmissionPolicy. + repeated MutatingAdmissionPolicy items = 2; +} + +// MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy. +message MutatingAdmissionPolicySpec { + // paramKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null. + // +optional + optional ParamKind paramKind = 1; + + // matchConstraints specifies what resources this policy is designed to validate. + // The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. + // Required. + optional MatchResources matchConstraints = 2; + + // variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except matchConditions because matchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, variables must be sorted by the order of first appearance and acyclic. + // +listType=atomic + // +optional + repeated Variable variables = 3; + + // mutations contain operations to perform on matching objects. + // mutations may not be empty; a minimum of one mutation is required. + // mutations are evaluated in order, and are reinvoked according to + // the reinvocationPolicy. + // The mutations of a policy are invoked for each binding of this policy + // and reinvocation of mutations occurs on a per binding basis. + // + // +listType=atomic + // +optional + repeated Mutation mutations = 4; + + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if paramKind refers to a non-existent Kind. + // A binding is invalid if paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + // +optional + optional string failurePolicy = 5; + + // matchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the matchConstraints. + // An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + // + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + repeated MatchCondition matchConditions = 6; + + // reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding + // as part of a single admission evaluation. + // Allowed values are "Never" and "IfNeeded". + // + // Never: These mutations will not be called more than once per binding in a single admission evaluation. + // + // IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of + // order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only + // reinvoked when mutations change the object after this mutation is invoked. + // Required. + optional string reinvocationPolicy = 7; +} + +// Mutation specifies the CEL expression which is used to apply the Mutation. +message Mutation { + // patchType indicates the patch strategy used. + // Allowed values are "ApplyConfiguration" and "JSONPatch". + // Required. + // + // +unionDiscriminator + optional string patchType = 2; + + // applyConfiguration defines the desired configuration values of an object. + // The configuration is applied to the admission object using + // [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). + // A CEL expression is used to create apply configuration. + optional ApplyConfiguration applyConfiguration = 3; + + // jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. + // A CEL expression is used to create the JSON patch. + optional JSONPatch jsonPatch = 4; +} + // NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. // +structType=atomic message NamedRuleWithOperations { diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go index d4c2fbe807..eead376cc7 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go @@ -50,6 +50,10 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ValidatingAdmissionPolicyList{}, &ValidatingAdmissionPolicyBinding{}, &ValidatingAdmissionPolicyBindingList{}, + &MutatingAdmissionPolicy{}, + &MutatingAdmissionPolicyList{}, + &MutatingAdmissionPolicyBinding{}, + &MutatingAdmissionPolicyBindingList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go index 78d918bc72..ee50fbe2d4 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go @@ -663,3 +663,346 @@ const ( Delete OperationType = v1.Delete Connect OperationType = v1.Connect ) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain. +type MutatingAdmissionPolicy struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the MutatingAdmissionPolicy. + Spec MutatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy. +type MutatingAdmissionPolicyList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of ValidatingAdmissionPolicy. + Items []MutatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy. +type MutatingAdmissionPolicySpec struct { + // paramKind specifies the kind of resources used to parameterize this policy. + // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. + // If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. + // If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null. + // +optional + ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"` + + // matchConstraints specifies what resources this policy is designed to validate. + // The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. + // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API + // MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. + // Required. + MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"` + + // variables contain definitions of variables that can be used in composition of other expressions. + // Each variable is defined as a named CEL expression. + // The variables defined here will be available under `variables` in other expressions of the policy + // except matchConditions because matchConditions are evaluated before the rest of the policy. + // + // The expression of a variable can refer to other variables defined earlier in the list but not those after. + // Thus, variables must be sorted by the order of first appearance and acyclic. + // +listType=atomic + // +optional + Variables []Variable `json:"variables,omitempty" protobuf:"bytes,3,rep,name=variables"` + + // mutations contain operations to perform on matching objects. + // mutations may not be empty; a minimum of one mutation is required. + // mutations are evaluated in order, and are reinvoked according to + // the reinvocationPolicy. + // The mutations of a policy are invoked for each binding of this policy + // and reinvocation of mutations occurs on a per binding basis. + // + // +listType=atomic + // +optional + Mutations []Mutation `json:"mutations,omitempty" protobuf:"bytes,4,rep,name=mutations"` + + // failurePolicy defines how to handle failures for the admission policy. Failures can + // occur from CEL expression parse errors, type check errors, runtime errors and invalid + // or mis-configured policy definitions or bindings. + // + // A policy is invalid if paramKind refers to a non-existent Kind. + // A binding is invalid if paramRef.name refers to a non-existent resource. + // + // failurePolicy does not define how validations that evaluate to false are handled. + // + // Allowed values are Ignore or Fail. Defaults to Fail. + // +optional + FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,5,opt,name=failurePolicy,casttype=FailurePolicyType"` + + // matchConditions is a list of conditions that must be met for a request to be validated. + // Match conditions filter requests that have already been matched by the matchConstraints. + // An empty list of matchConditions matches all requests. + // There are a maximum of 64 match conditions allowed. + // + // If a parameter object is provided, it can be accessed via the `params` handle in the same + // manner as validation expressions. + // + // The exact matching logic is (in order): + // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + // 3. If any matchCondition evaluates to an error (but none are FALSE): + // - If failurePolicy=Fail, reject the request + // - If failurePolicy=Ignore, the policy is skipped + // + // +patchMergeKey=name + // +patchStrategy=merge + // +listType=map + // +listMapKey=name + // +optional + MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"` + + // reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding + // as part of a single admission evaluation. + // Allowed values are "Never" and "IfNeeded". + // + // Never: These mutations will not be called more than once per binding in a single admission evaluation. + // + // IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of + // order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only + // reinvoked when mutations change the object after this mutation is invoked. + // Required. + ReinvocationPolicy ReinvocationPolicyType `json:"reinvocationPolicy,omitempty" protobuf:"bytes,7,opt,name=reinvocationPolicy,casttype=ReinvocationPolicyType"` +} + +// Mutation specifies the CEL expression which is used to apply the Mutation. +type Mutation struct { + // patchType indicates the patch strategy used. + // Allowed values are "ApplyConfiguration" and "JSONPatch". + // Required. + // + // +unionDiscriminator + PatchType PatchType `json:"patchType" protobuf:"bytes,2,opt,name=patchType,casttype=PatchType"` + + // applyConfiguration defines the desired configuration values of an object. + // The configuration is applied to the admission object using + // [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). + // A CEL expression is used to create apply configuration. + ApplyConfiguration *ApplyConfiguration `json:"applyConfiguration,omitempty" protobuf:"bytes,3,opt,name=applyConfiguration"` + + // jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. + // A CEL expression is used to create the JSON patch. + JSONPatch *JSONPatch `json:"jsonPatch,omitempty" protobuf:"bytes,4,opt,name=jsonPatch"` +} + +// PatchType specifies the type of patch operation for a mutation. +// +enum +type PatchType string + +const ( + // ApplyConfiguration indicates that the mutation is using apply configuration to mutate the object. + PatchTypeApplyConfiguration PatchType = "ApplyConfiguration" + // JSONPatch indicates that the object is mutated through JSON Patch. + PatchTypeJSONPatch PatchType = "JSONPatch" +) + +// ApplyConfiguration defines the desired configuration values of an object. +type ApplyConfiguration struct { + // expression will be evaluated by CEL to create an apply configuration. + // ref: https://github.com/google/cel-spec + // + // Apply configurations are declared in CEL using object initialization. For example, this CEL expression + // returns an apply configuration to set a single field: + // + // Object{ + // spec: Object.spec{ + // serviceAccountName: "example" + // } + // } + // + // Apply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of + // values not included in the apply configuration. + // + // CEL expressions have access to the object types needed to create apply configurations: + // + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the + // object. No other metadata properties are accessible. + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. + Expression string `json:"expression,omitempty" protobuf:"bytes,1,opt,name=expression"` +} + +// JSONPatch defines a JSON Patch. +type JSONPatch struct { + // expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). + // ref: https://github.com/google/cel-spec + // + // expression must return an array of JSONPatch values. + // + // For example, this CEL expression returns a JSON patch to conditionally modify a value: + // + // [ + // JSONPatch{op: "test", path: "/spec/example", value: "Red"}, + // JSONPatch{op: "replace", path: "/spec/example", value: "Green"} + // ] + // + // To define an object for the patch value, use Object types. For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/spec/selector", + // value: Object.spec.selector{matchLabels: {"environment": "test"}} + // } + // ] + // + // To use strings containing '/' and '~' as JSONPatch path keys, use "jsonpatch.escapeKey". For example: + // + // [ + // JSONPatch{ + // op: "add", + // path: "/metadata/labels/" + jsonpatch.escapeKey("example.com/environment"), + // value: "test" + // }, + // ] + // + // CEL expressions have access to the types needed to create JSON patches and objects: + // + // - 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'. + // See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string, + // integer, array, map or object. If set, the 'path' and 'from' fields must be set to a + // [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL + // function may be used to escape path keys containing '/' and '~'. + // - 'Object' - CEL type of the resource object. + // - 'Object.' - CEL type of object field (such as 'Object.spec') + // - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers') + // + // CEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables: + // + // - 'object' - The object from the incoming request. The value is null for DELETE requests. + // - 'oldObject' - The existing object. The value is null for CREATE requests. + // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). + // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. + // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. + // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + // For example, a variable named 'foo' can be accessed as 'variables.foo'. + // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + // request resource. + // + // CEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) + // as well as: + // + // - 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively). + // + // + // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. + // Required. + Expression string `json:"expression,omitempty" protobuf:"bytes,1,opt,name=expression"` +} + +// ReinvocationPolicyType specifies what type of policy the admission mutation uses. +// +enum +type ReinvocationPolicyType = v1.ReinvocationPolicyType + +const ( + // NeverReinvocationPolicy indicates that the mutation must not be called more than once in a + // single admission evaluation. + NeverReinvocationPolicy ReinvocationPolicyType = v1.NeverReinvocationPolicy + // IfNeededReinvocationPolicy indicates that the mutation may be called at least one + // additional time as part of the admission evaluation if the object being admitted is + // modified by other admission plugins after the initial mutation call. + IfNeededReinvocationPolicy ReinvocationPolicyType = v1.IfNeededReinvocationPolicy +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. +// MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators +// configure policies for clusters. +// +// For a given admission request, each binding will cause its policy to be +// evaluated N times, where N is 1 for policies/bindings that don't use +// params, otherwise N is the number of parameters selected by the binding. +// Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget). +// +// Adding/removing policies, bindings, or params can not affect whether a +// given (policy, binding, param) combination is within its own CEL budget. +type MutatingAdmissionPolicyBinding struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // Specification of the desired behavior of the MutatingAdmissionPolicyBinding. + Spec MutatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding. +type MutatingAdmissionPolicyBindingList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + // List of PolicyBinding. + Items []MutatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding. +type MutatingAdmissionPolicyBindingSpec struct { + // policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. + // If the referenced resource does not exist, this binding is considered invalid and will be ignored + // Required. + PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"` + + // paramRef specifies the parameter resource used to configure the admission control policy. + // It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. + // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. + // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + // +optional + ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"` + + // matchResources limits what resources match this binding and may be mutated by it. + // Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and + // matchConditions before the resource may be mutated. + // When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints + // and matchConditions must match for the resource to be mutated. + // Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. + // Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. + // The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. + // '*' matches CREATE, UPDATE and CONNECT. + // +optional + MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"` +} diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go index dcf46b324f..32222a81b8 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go @@ -27,6 +27,15 @@ package v1alpha1 // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_ApplyConfiguration = map[string]string{ + "": "ApplyConfiguration defines the desired configuration values of an object.", + "expression": "expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec\n\nApply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:\n\n\tObject{\n\t spec: Object.spec{\n\t serviceAccountName: \"example\"\n\t }\n\t}\n\nApply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.\n\nCEL expressions have access to the object types needed to create apply configurations:\n\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", +} + +func (ApplyConfiguration) SwaggerDoc() map[string]string { + return map_ApplyConfiguration +} + var map_AuditAnnotation = map[string]string{ "": "AuditAnnotation describes how to produce an audit annotation for an API request.", "key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", @@ -47,6 +56,15 @@ func (ExpressionWarning) SwaggerDoc() map[string]string { return map_ExpressionWarning } +var map_JSONPatch = map[string]string{ + "": "JSONPatch defines a JSON Patch.", + "expression": "expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec\n\nexpression must return an array of JSONPatch values.\n\nFor example, this CEL expression returns a JSON patch to conditionally modify a value:\n\n\t [\n\t JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"},\n\t JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"}\n\t ]\n\nTo define an object for the patch value, use Object types. For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/spec/selector\",\n\t value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}}\n\t }\n\t ]\n\nTo use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"),\n\t value: \"test\"\n\t },\n\t ]\n\nCEL expressions have access to the types needed to create JSON patches and objects:\n\n- 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.\n See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,\n integer, array, map or object. If set, the 'path' and 'from' fields must be set to a\n [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL\n function may be used to escape path keys containing '/' and '~'.\n- 'Object' - CEL type of the resource object. - 'Object.' - CEL type of object field (such as 'Object.spec') - 'Object.....` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nCEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as:\n\n- 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", +} + +func (JSONPatch) SwaggerDoc() map[string]string { + return map_JSONPatch +} + var map_MatchResources = map[string]string{ "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", @@ -60,6 +78,83 @@ func (MatchResources) SwaggerDoc() map[string]string { return map_MatchResources } +var map_MutatingAdmissionPolicy = map[string]string{ + "": "MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "Specification of the desired behavior of the MutatingAdmissionPolicy.", +} + +func (MutatingAdmissionPolicy) SwaggerDoc() map[string]string { + return map_MutatingAdmissionPolicy +} + +var map_MutatingAdmissionPolicyBinding = map[string]string{ + "": "MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).\n\nAdding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", + "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", + "spec": "Specification of the desired behavior of the MutatingAdmissionPolicyBinding.", +} + +func (MutatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { + return map_MutatingAdmissionPolicyBinding +} + +var map_MutatingAdmissionPolicyBindingList = map[string]string{ + "": "MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of PolicyBinding.", +} + +func (MutatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { + return map_MutatingAdmissionPolicyBindingList +} + +var map_MutatingAdmissionPolicyBindingSpec = map[string]string{ + "": "MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.", + "policyName": "policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", + "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", + "matchResources": "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT.", +} + +func (MutatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { + return map_MutatingAdmissionPolicyBindingSpec +} + +var map_MutatingAdmissionPolicyList = map[string]string{ + "": "MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "items": "List of ValidatingAdmissionPolicy.", +} + +func (MutatingAdmissionPolicyList) SwaggerDoc() map[string]string { + return map_MutatingAdmissionPolicyList +} + +var map_MutatingAdmissionPolicySpec = map[string]string{ + "": "MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.", + "paramKind": "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.", + "matchConstraints": "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.", + "variables": "variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.", + "mutations": "mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.", + "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", + "matchConditions": "matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", + "reinvocationPolicy": "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.", +} + +func (MutatingAdmissionPolicySpec) SwaggerDoc() map[string]string { + return map_MutatingAdmissionPolicySpec +} + +var map_Mutation = map[string]string{ + "": "Mutation specifies the CEL expression which is used to apply the Mutation.", + "patchType": "patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required.", + "applyConfiguration": "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.", + "jsonPatch": "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.", +} + +func (Mutation) SwaggerDoc() map[string]string { + return map_Mutation +} + var map_NamedRuleWithOperations = map[string]string{ "": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go index 24cd0e4e9b..97c159c74f 100644 --- a/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go @@ -26,6 +26,22 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplyConfiguration) DeepCopyInto(out *ApplyConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyConfiguration. +func (in *ApplyConfiguration) DeepCopy() *ApplyConfiguration { + if in == nil { + return nil + } + out := new(ApplyConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) { *out = *in @@ -58,6 +74,22 @@ func (in *ExpressionWarning) DeepCopy() *ExpressionWarning { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JSONPatch) DeepCopyInto(out *JSONPatch) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatch. +func (in *JSONPatch) DeepCopy() *JSONPatch { + if in == nil { + return nil + } + out := new(JSONPatch) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchCondition) DeepCopyInto(out *MatchCondition) { *out = *in @@ -119,6 +151,226 @@ func (in *MatchResources) DeepCopy() *MatchResources { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MutatingAdmissionPolicy) DeepCopyInto(out *MutatingAdmissionPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicy. +func (in *MutatingAdmissionPolicy) DeepCopy() *MutatingAdmissionPolicy { + if in == nil { + return nil + } + out := new(MutatingAdmissionPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MutatingAdmissionPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MutatingAdmissionPolicyBinding) DeepCopyInto(out *MutatingAdmissionPolicyBinding) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBinding. +func (in *MutatingAdmissionPolicyBinding) DeepCopy() *MutatingAdmissionPolicyBinding { + if in == nil { + return nil + } + out := new(MutatingAdmissionPolicyBinding) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MutatingAdmissionPolicyBinding) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MutatingAdmissionPolicyBindingList) DeepCopyInto(out *MutatingAdmissionPolicyBindingList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MutatingAdmissionPolicyBinding, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBindingList. +func (in *MutatingAdmissionPolicyBindingList) DeepCopy() *MutatingAdmissionPolicyBindingList { + if in == nil { + return nil + } + out := new(MutatingAdmissionPolicyBindingList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MutatingAdmissionPolicyBindingList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MutatingAdmissionPolicyBindingSpec) DeepCopyInto(out *MutatingAdmissionPolicyBindingSpec) { + *out = *in + if in.ParamRef != nil { + in, out := &in.ParamRef, &out.ParamRef + *out = new(ParamRef) + (*in).DeepCopyInto(*out) + } + if in.MatchResources != nil { + in, out := &in.MatchResources, &out.MatchResources + *out = new(MatchResources) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBindingSpec. +func (in *MutatingAdmissionPolicyBindingSpec) DeepCopy() *MutatingAdmissionPolicyBindingSpec { + if in == nil { + return nil + } + out := new(MutatingAdmissionPolicyBindingSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MutatingAdmissionPolicyList) DeepCopyInto(out *MutatingAdmissionPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]MutatingAdmissionPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyList. +func (in *MutatingAdmissionPolicyList) DeepCopy() *MutatingAdmissionPolicyList { + if in == nil { + return nil + } + out := new(MutatingAdmissionPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *MutatingAdmissionPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MutatingAdmissionPolicySpec) DeepCopyInto(out *MutatingAdmissionPolicySpec) { + *out = *in + if in.ParamKind != nil { + in, out := &in.ParamKind, &out.ParamKind + *out = new(ParamKind) + **out = **in + } + if in.MatchConstraints != nil { + in, out := &in.MatchConstraints, &out.MatchConstraints + *out = new(MatchResources) + (*in).DeepCopyInto(*out) + } + if in.Variables != nil { + in, out := &in.Variables, &out.Variables + *out = make([]Variable, len(*in)) + copy(*out, *in) + } + if in.Mutations != nil { + in, out := &in.Mutations, &out.Mutations + *out = make([]Mutation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.FailurePolicy != nil { + in, out := &in.FailurePolicy, &out.FailurePolicy + *out = new(FailurePolicyType) + **out = **in + } + if in.MatchConditions != nil { + in, out := &in.MatchConditions, &out.MatchConditions + *out = make([]MatchCondition, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicySpec. +func (in *MutatingAdmissionPolicySpec) DeepCopy() *MutatingAdmissionPolicySpec { + if in == nil { + return nil + } + out := new(MutatingAdmissionPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Mutation) DeepCopyInto(out *Mutation) { + *out = *in + if in.ApplyConfiguration != nil { + in, out := &in.ApplyConfiguration, &out.ApplyConfiguration + *out = new(ApplyConfiguration) + **out = **in + } + if in.JSONPatch != nil { + in, out := &in.JSONPatch, &out.JSONPatch + *out = new(JSONPatch) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mutation. +func (in *Mutation) DeepCopy() *Mutation { + if in == nil { + return nil + } + out := new(Mutation) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) { *out = *in diff --git a/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 0000000000..91c813d5f7 --- /dev/null +++ b/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,166 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 prerelease-lifecycle-gen. DO NOT EDIT. + +package v1alpha1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *MutatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *MutatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *MutatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *MutatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *MutatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *MutatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *MutatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *MutatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *MutatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *MutatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *MutatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *MutatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ValidatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { + return 1, 26 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ValidatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) { + return 1, 29 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ValidatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { + return 1, 32 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ValidatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { + return 1, 26 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ValidatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) { + return 1, 29 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ValidatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { + return 1, 32 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ValidatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { + return 1, 26 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ValidatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) { + return 1, 29 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ValidatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { + return 1, 32 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ValidatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 26 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ValidatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 29 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ValidatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 32 +} diff --git a/vendor/k8s.io/api/apps/v1/generated.proto b/vendor/k8s.io/api/apps/v1/generated.proto index d864f2eebf..388e638f4d 100644 --- a/vendor/k8s.io/api/apps/v1/generated.proto +++ b/vendor/k8s.io/api/apps/v1/generated.proto @@ -737,8 +737,7 @@ message StatefulSetSpec { // volume claims are created as needed and retained until manually deleted. This // policy allows the lifecycle to be altered, for example by deleting persistent // volume claims when their stateful set is deleted, or when their pod is scaled - // down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, - // which is beta. + // down. // +optional optional StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy = 10; diff --git a/vendor/k8s.io/api/apps/v1/types.go b/vendor/k8s.io/api/apps/v1/types.go index e942cd526e..a68690b447 100644 --- a/vendor/k8s.io/api/apps/v1/types.go +++ b/vendor/k8s.io/api/apps/v1/types.go @@ -142,7 +142,7 @@ const ( // PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates // will not be deleted. RetainPersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Retain" - // RetentionPersistentVolumeClaimRetentionPolicyType specifies that + // DeletePersistentVolumeClaimRetentionPolicyType specifies that // PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates // will be deleted in the scenario specified in // StatefulSetPersistentVolumeClaimRetentionPolicy. @@ -255,8 +255,7 @@ type StatefulSetSpec struct { // volume claims are created as needed and retained until manually deleted. This // policy allows the lifecycle to be altered, for example by deleting persistent // volume claims when their stateful set is deleted, or when their pod is scaled - // down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, - // which is beta. + // down. // +optional PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaimRetentionPolicy"` diff --git a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go index f3e221a0e9..341ecdadb2 100644 --- a/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -354,7 +354,7 @@ var map_StatefulSetSpec = map[string]string{ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", "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)", - "persistentVolumeClaimRetentionPolicy": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is beta.", + "persistentVolumeClaimRetentionPolicy": "persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down.", "ordinals": "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", } diff --git a/vendor/k8s.io/api/apps/v1beta1/generated.proto b/vendor/k8s.io/api/apps/v1beta1/generated.proto index 4b0fa366cf..46d7bfdf92 100644 --- a/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -486,8 +486,7 @@ message StatefulSetSpec { optional int32 minReadySeconds = 9; // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. This requires the - // StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. + // the StatefulSet VolumeClaimTemplates. // +optional optional StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy = 10; diff --git a/vendor/k8s.io/api/apps/v1beta1/types.go b/vendor/k8s.io/api/apps/v1beta1/types.go index 07bfa88c5f..bc48519578 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/vendor/k8s.io/api/apps/v1beta1/types.go @@ -181,11 +181,11 @@ const ( // PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates // will not be deleted. RetainPersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Retain" - // RetentionPersistentVolumeClaimRetentionPolicyType specifies that + // DeletePersistentVolumeClaimRetentionPolicyType specifies that // PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates // will be deleted in the scenario specified in // StatefulSetPersistentVolumeClaimRetentionPolicy. - RetentionPersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Delete" + DeletePersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Delete" ) // StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs @@ -290,8 +290,7 @@ type StatefulSetSpec struct { MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,9,opt,name=minReadySeconds"` // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. This requires the - // StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. + // the StatefulSet VolumeClaimTemplates. // +optional PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaimRetentionPolicy"` diff --git a/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go index 9e7fb1adc2..1381d75dc0 100644 --- a/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go @@ -258,7 +258,7 @@ var map_StatefulSetSpec = map[string]string{ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", "minReadySeconds": "minReadySeconds is the 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)", - "persistentVolumeClaimRetentionPolicy": "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.", + "persistentVolumeClaimRetentionPolicy": "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", "ordinals": "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", } diff --git a/vendor/k8s.io/api/apps/v1beta2/generated.proto b/vendor/k8s.io/api/apps/v1beta2/generated.proto index d3db8956e8..c08a4c78bc 100644 --- a/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ b/vendor/k8s.io/api/apps/v1beta2/generated.proto @@ -778,8 +778,7 @@ message StatefulSetSpec { optional int32 minReadySeconds = 9; // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. This requires the - // StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. + // the StatefulSet VolumeClaimTemplates. // +optional optional StatefulSetPersistentVolumeClaimRetentionPolicy persistentVolumeClaimRetentionPolicy = 10; diff --git a/vendor/k8s.io/api/apps/v1beta2/types.go b/vendor/k8s.io/api/apps/v1beta2/types.go index f93a5bea7e..c2624a941d 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/vendor/k8s.io/api/apps/v1beta2/types.go @@ -191,11 +191,11 @@ const ( // PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates // will not be deleted. RetainPersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Retain" - // RetentionPersistentVolumeClaimRetentionPolicyType specifies that + // DeletePersistentVolumeClaimRetentionPolicyType specifies that // PersistentVolumeClaims associated with StatefulSet VolumeClaimTemplates // will be deleted in the scenario specified in // StatefulSetPersistentVolumeClaimRetentionPolicy. - RetentionPersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Delete" + DeletePersistentVolumeClaimRetentionPolicyType PersistentVolumeClaimRetentionPolicyType = "Delete" ) // StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs @@ -300,8 +300,7 @@ type StatefulSetSpec struct { MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,9,opt,name=minReadySeconds"` // PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from - // the StatefulSet VolumeClaimTemplates. This requires the - // StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha. + // the StatefulSet VolumeClaimTemplates. // +optional PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaimRetentionPolicy"` diff --git a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index 0b8fe34af1..beec4b7555 100644 --- a/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -382,7 +382,7 @@ var map_StatefulSetSpec = map[string]string{ "updateStrategy": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", "revisionHistoryLimit": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", "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)", - "persistentVolumeClaimRetentionPolicy": "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.", + "persistentVolumeClaimRetentionPolicy": "PersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.", "ordinals": "ordinals controls the numbering of replica indices in a StatefulSet. The default ordinals behavior assigns a \"0\" index to the first replica and increments the index by one for each additional replica requested.", } diff --git a/vendor/k8s.io/api/autoscaling/v1/generated.proto b/vendor/k8s.io/api/autoscaling/v1/generated.proto index 0a961312f4..68c35b6b22 100644 --- a/vendor/k8s.io/api/autoscaling/v1/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v1/generated.proto @@ -241,8 +241,6 @@ message HorizontalPodAutoscalerStatus { message MetricSpec { // type is the type of metric source. It should be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object @@ -269,7 +267,6 @@ message MetricSpec { // 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional optional ContainerResourceMetricSource containerResource = 7; @@ -286,8 +283,6 @@ message MetricSpec { message MetricStatus { // type is the type of metric source. It will be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v1/types.go b/vendor/k8s.io/api/autoscaling/v1/types.go index b31425b3b7..85c609e5c7 100644 --- a/vendor/k8s.io/api/autoscaling/v1/types.go +++ b/vendor/k8s.io/api/autoscaling/v1/types.go @@ -193,8 +193,6 @@ const ( type MetricSpec struct { // type is the type of metric source. It should be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object @@ -221,7 +219,6 @@ type MetricSpec struct { // 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"` @@ -355,8 +352,6 @@ type ExternalMetricSource struct { type MetricStatus struct { // type is the type of metric source. It will be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go index 37c2b36a51..ba43d06c10 100644 --- a/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go @@ -147,11 +147,11 @@ func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "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.", - "containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + "containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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.", "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } @@ -161,7 +161,7 @@ func (MetricSpec) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "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.", diff --git a/vendor/k8s.io/api/autoscaling/v2/generated.proto b/vendor/k8s.io/api/autoscaling/v2/generated.proto index 8f2ee58031..4e6dc0592a 100644 --- a/vendor/k8s.io/api/autoscaling/v2/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2/generated.proto @@ -301,8 +301,6 @@ message MetricIdentifier { message MetricSpec { // type is the type of metric source. It should be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object @@ -329,7 +327,6 @@ message MetricSpec { // each pod of 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional optional ContainerResourceMetricSource containerResource = 7; @@ -346,8 +343,6 @@ message MetricSpec { message MetricStatus { // type is the type of metric source. It will be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v2/types.go b/vendor/k8s.io/api/autoscaling/v2/types.go index 69a7b27012..99e8db09dc 100644 --- a/vendor/k8s.io/api/autoscaling/v2/types.go +++ b/vendor/k8s.io/api/autoscaling/v2/types.go @@ -102,8 +102,6 @@ type CrossVersionObjectReference struct { type MetricSpec struct { // type is the type of metric source. It should be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object @@ -130,7 +128,6 @@ type MetricSpec struct { // each pod of 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"` @@ -453,8 +450,6 @@ type HorizontalPodAutoscalerCondition struct { type MetricStatus struct { // type is the type of metric source. It will be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go index 1941b1ef57..649cd04a03 100644 --- a/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2/types_swagger_doc_generated.go @@ -185,11 +185,11 @@ func (MetricIdentifier) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "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.", - "containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + "containerResource": "containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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.", "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } @@ -199,7 +199,7 @@ func (MetricSpec) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "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.", diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto index 232a598158..4b71732ab9 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -260,8 +260,6 @@ message HorizontalPodAutoscalerStatus { message MetricSpec { // type is the type of metric source. It should be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object @@ -288,7 +286,6 @@ message MetricSpec { // each pod of 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional optional ContainerResourceMetricSource containerResource = 7; @@ -305,8 +302,6 @@ message MetricSpec { message MetricStatus { // type is the type of metric source. It will be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/vendor/k8s.io/api/autoscaling/v2beta1/types.go index 193cc43549..c3abdd9bd9 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types.go @@ -96,8 +96,6 @@ const ( type MetricSpec struct { // type is the type of metric source. It should be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object @@ -121,7 +119,6 @@ type MetricSpec struct { // each pod of 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"` // external refers to a global metric that is not associated @@ -311,8 +308,6 @@ type HorizontalPodAutoscalerCondition struct { type MetricStatus struct { // type is the type of metric source. It will be one of "ContainerResource", // "External", "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go index d656ee416d..c7c72bf356 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go @@ -148,11 +148,11 @@ func (HorizontalPodAutoscalerStatus) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "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.", - "containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + "containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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.", "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } @@ -162,7 +162,7 @@ func (MetricSpec) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "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.", diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto index c88fc1fe26..941d9752ae 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -297,8 +297,6 @@ message MetricIdentifier { message MetricSpec { // type is the type of metric source. It should be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object @@ -325,7 +323,6 @@ message MetricSpec { // each pod of 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional optional ContainerResourceMetricSource containerResource = 7; @@ -342,8 +339,6 @@ message MetricSpec { message MetricStatus { // type is the type of metric source. It will be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled optional string type = 1; // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/vendor/k8s.io/api/autoscaling/v2beta2/types.go index 2fee0b8a0f..bc9677b147 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -104,8 +104,6 @@ type CrossVersionObjectReference struct { type MetricSpec struct { // type is the type of metric source. It should be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each mapping to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object @@ -132,7 +130,6 @@ type MetricSpec struct { // each pod of 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. - // This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. // +optional ContainerResource *ContainerResourceMetricSource `json:"containerResource,omitempty" protobuf:"bytes,7,opt,name=containerResource"` @@ -449,8 +446,6 @@ type HorizontalPodAutoscalerCondition struct { type MetricStatus struct { // type is the type of metric source. It will be one of "ContainerResource", "External", // "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - // Note: "ContainerResource" type is available on when the feature-gate - // HPAContainerMetrics is enabled Type MetricSourceType `json:"type" protobuf:"bytes,1,name=type"` // object refers to a metric describing a single kubernetes object diff --git a/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go b/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go index 4af7d0ec0d..5d4bb86b83 100644 --- a/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/autoscaling/v2beta2/types_swagger_doc_generated.go @@ -185,11 +185,11 @@ func (MetricIdentifier) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It should be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each mapping to a matching field in the object.", "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.", - "containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.", + "containerResource": "container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of 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.", "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } @@ -199,7 +199,7 @@ func (MetricSpec) SwaggerDoc() map[string]string { 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 be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object. Note: \"ContainerResource\" type is available on when the feature-gate HPAContainerMetrics is enabled", + "type": "type is the type of metric source. It will be one of \"ContainerResource\", \"External\", \"Object\", \"Pods\" or \"Resource\", each corresponds to a matching field in the object.", "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.", diff --git a/vendor/k8s.io/api/batch/v1/generated.proto b/vendor/k8s.io/api/batch/v1/generated.proto index f5a9385f5e..361ebdca12 100644 --- a/vendor/k8s.io/api/batch/v1/generated.proto +++ b/vendor/k8s.io/api/batch/v1/generated.proto @@ -350,8 +350,8 @@ message JobSpec { // characters as defined by RFC 3986. The value cannot exceed 63 characters. // This field is immutable. // - // This field is alpha-level. The job controller accepts setting the field - // when the feature gate JobManagedBy is enabled (disabled by default). + // This field is beta-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (enabled by default). // +optional optional string managedBy = 15; } diff --git a/vendor/k8s.io/api/batch/v1/types.go b/vendor/k8s.io/api/batch/v1/types.go index b42ec231e4..8e9a761b95 100644 --- a/vendor/k8s.io/api/batch/v1/types.go +++ b/vendor/k8s.io/api/batch/v1/types.go @@ -29,7 +29,6 @@ const ( // CronJobScheduledTimestampAnnotation is the scheduled timestamp annotation for the Job. // It records the original/expected scheduled timestamp for the running job, represented in RFC3339. - // The CronJob controller adds this annotation if the CronJobsScheduledAnnotation feature gate (beta in 1.28) is enabled. CronJobScheduledTimestampAnnotation = labelPrefix + "cronjob-scheduled-timestamp" JobCompletionIndexAnnotation = labelPrefix + "job-completion-index" @@ -480,8 +479,8 @@ type JobSpec struct { // characters as defined by RFC 3986. The value cannot exceed 63 characters. // This field is immutable. // - // This field is alpha-level. The job controller accepts setting the field - // when the feature gate JobManagedBy is enabled (disabled by default). + // This field is beta-level. The job controller accepts setting the field + // when the feature gate JobManagedBy is enabled (enabled by default). // +optional ManagedBy *string `json:"managedBy,omitempty" protobuf:"bytes,15,opt,name=managedBy"` } diff --git a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go index d504887884..893f3371f0 100644 --- a/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -127,7 +127,7 @@ var map_JobSpec = map[string]string{ "completionMode": "completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nMore completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.", "suspend": "suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.", "podReplacementPolicy": "podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods\n when they are terminating (has a metadata.deletionTimestamp) or failed.\n- Failed means to wait until a previously created Pod is fully terminated (has phase\n Failed or Succeeded) before creating a replacement Pod.\n\nWhen using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.", - "managedBy": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default).", + "managedBy": "ManagedBy field indicates the controller that manages a Job. The k8s Job controller reconciles jobs which don't have this field at all or the field value is the reserved string `kubernetes.io/job-controller`, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.\n\nThis field is beta-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (enabled by default).", } func (JobSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/certificates/v1alpha1/types.go b/vendor/k8s.io/api/certificates/v1alpha1/types.go index 1a9fda0112..beef02599d 100644 --- a/vendor/k8s.io/api/certificates/v1alpha1/types.go +++ b/vendor/k8s.io/api/certificates/v1alpha1/types.go @@ -23,6 +23,7 @@ import ( // +genclient // +genclient:nonNamespaced // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.34 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors @@ -90,6 +91,7 @@ type ClusterTrustBundleSpec struct { } // +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:deprecated=1.34 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ClusterTrustBundleList is a collection of ClusterTrustBundle objects diff --git a/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go index dfafa656cc..3121a87d08 100644 --- a/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/vendor/k8s.io/api/certificates/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -30,13 +30,13 @@ func (in *ClusterTrustBundle) APILifecycleIntroduced() (major, minor int) { // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ClusterTrustBundle) APILifecycleDeprecated() (major, minor int) { - return 1, 29 + return 1, 34 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ClusterTrustBundle) APILifecycleRemoved() (major, minor int) { - return 1, 32 + return 1, 37 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. @@ -48,11 +48,11 @@ func (in *ClusterTrustBundleList) APILifecycleIntroduced() (major, minor int) { // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ClusterTrustBundleList) APILifecycleDeprecated() (major, minor int) { - return 1, 29 + return 1, 34 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ClusterTrustBundleList) APILifecycleRemoved() (major, minor int) { - return 1, 32 + return 1, 37 } diff --git a/vendor/k8s.io/api/coordination/v1alpha1/doc.go b/vendor/k8s.io/api/coordination/v1alpha2/doc.go similarity index 92% rename from vendor/k8s.io/api/coordination/v1alpha1/doc.go rename to vendor/k8s.io/api/coordination/v1alpha2/doc.go index 33a0b0ea97..5e6d655302 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/doc.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/doc.go @@ -21,4 +21,4 @@ limitations under the License. // +groupName=coordination.k8s.io -package v1alpha1 // import "k8s.io/api/coordination/v1alpha1" +package v1alpha2 // import "k8s.io/api/coordination/v1alpha2" diff --git a/vendor/k8s.io/api/coordination/v1alpha1/generated.pb.go b/vendor/k8s.io/api/coordination/v1alpha2/generated.pb.go similarity index 82% rename from vendor/k8s.io/api/coordination/v1alpha1/generated.pb.go rename to vendor/k8s.io/api/coordination/v1alpha2/generated.pb.go index 9e072e62d0..85ceea1f25 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/generated.pb.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/generated.pb.go @@ -15,9 +15,9 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/api/coordination/v1alpha1/generated.proto +// source: k8s.io/api/coordination/v1alpha2/generated.proto -package v1alpha1 +package v1alpha2 import ( fmt "fmt" @@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } func (*LeaseCandidate) ProtoMessage() {} func (*LeaseCandidate) Descriptor() ([]byte, []int) { - return fileDescriptor_cb9e87df9da593c2, []int{0} + return fileDescriptor_c1ec5c989d262916, []int{0} } func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } func (*LeaseCandidateList) ProtoMessage() {} func (*LeaseCandidateList) Descriptor() ([]byte, []int) { - return fileDescriptor_cb9e87df9da593c2, []int{1} + return fileDescriptor_c1ec5c989d262916, []int{1} } func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +105,7 @@ var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } func (*LeaseCandidateSpec) ProtoMessage() {} func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cb9e87df9da593c2, []int{2} + return fileDescriptor_c1ec5c989d262916, []int{2} } func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -131,53 +131,52 @@ func (m *LeaseCandidateSpec) XXX_DiscardUnknown() { var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo func init() { - proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha1.LeaseCandidate") - proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha1.LeaseCandidateList") - proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha1.LeaseCandidateSpec") + proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidate") + proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateList") + proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateSpec") } func init() { - proto.RegisterFile("k8s.io/api/coordination/v1alpha1/generated.proto", fileDescriptor_cb9e87df9da593c2) + proto.RegisterFile("k8s.io/api/coordination/v1alpha2/generated.proto", fileDescriptor_c1ec5c989d262916) } -var fileDescriptor_cb9e87df9da593c2 = []byte{ - // 570 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcb, 0x6e, 0xd3, 0x4c, - 0x14, 0xc7, 0xe3, 0x36, 0xf9, 0x94, 0xcc, 0xd7, 0xa0, 0x30, 0x15, 0x92, 0x95, 0x85, 0x13, 0x65, - 0x55, 0x21, 0x31, 0x6e, 0xa0, 0x42, 0x48, 0xec, 0x5c, 0x40, 0x42, 0x4a, 0x4b, 0xe5, 0x42, 0x25, - 0x50, 0x17, 0x4c, 0xec, 0x53, 0x67, 0x48, 0x7c, 0xd1, 0x78, 0x52, 0x94, 0x5d, 0x17, 0x3c, 0x00, - 0x8f, 0x15, 0x58, 0x75, 0xd9, 0x55, 0x44, 0xcc, 0x5b, 0xb0, 0x42, 0x33, 0xb1, 0x73, 0x6d, 0x94, - 0x88, 0x5d, 0xce, 0xe5, 0xf7, 0x3f, 0xe7, 0x7f, 0xac, 0x0c, 0x3a, 0xec, 0xbe, 0x88, 0x09, 0x0b, - 0x4d, 0x1a, 0x31, 0xd3, 0x09, 0x43, 0xee, 0xb2, 0x80, 0x0a, 0x16, 0x06, 0xe6, 0x75, 0x93, 0xf6, - 0xa2, 0x0e, 0x6d, 0x9a, 0x1e, 0x04, 0xc0, 0xa9, 0x00, 0x97, 0x44, 0x3c, 0x14, 0x21, 0xae, 0x4f, - 0x08, 0x42, 0x23, 0x46, 0xe6, 0x09, 0x92, 0x11, 0xd5, 0x27, 0x1e, 0x13, 0x9d, 0x7e, 0x9b, 0x38, - 0xa1, 0x6f, 0x7a, 0xa1, 0x17, 0x9a, 0x0a, 0x6c, 0xf7, 0xaf, 0x54, 0xa4, 0x02, 0xf5, 0x6b, 0x22, - 0x58, 0x7d, 0xbc, 0x7e, 0x85, 0xe5, 0xe1, 0xd5, 0xa3, 0x59, 0xaf, 0x4f, 0x9d, 0x0e, 0x0b, 0x80, - 0x0f, 0xcc, 0xa8, 0xeb, 0xc9, 0x44, 0x6c, 0xfa, 0x20, 0xe8, 0x7d, 0x94, 0xb9, 0x8e, 0xe2, 0xfd, - 0x40, 0x30, 0x1f, 0x56, 0x80, 0xe7, 0x9b, 0x80, 0xd8, 0xe9, 0x80, 0x4f, 0x97, 0xb9, 0xc6, 0x4f, - 0x0d, 0x3d, 0x68, 0x01, 0x8d, 0xe1, 0x98, 0x06, 0x2e, 0x73, 0xa9, 0x00, 0xfc, 0x19, 0x15, 0xe5, - 0x5a, 0x2e, 0x15, 0x54, 0xd7, 0xea, 0xda, 0xc1, 0xff, 0x4f, 0x0f, 0xc9, 0xec, 0x82, 0x53, 0x75, - 0x12, 0x75, 0x3d, 0x99, 0x88, 0x89, 0xec, 0x26, 0xd7, 0x4d, 0xf2, 0xae, 0xfd, 0x05, 0x1c, 0x71, - 0x02, 0x82, 0x5a, 0x78, 0x38, 0xaa, 0xe5, 0x92, 0x51, 0x0d, 0xcd, 0x72, 0xf6, 0x54, 0x15, 0x5f, - 0xa0, 0x7c, 0x1c, 0x81, 0xa3, 0xef, 0x28, 0xf5, 0x23, 0xb2, 0xe9, 0xfb, 0x90, 0xc5, 0x0d, 0xcf, - 0x23, 0x70, 0xac, 0xbd, 0x74, 0x42, 0x5e, 0x46, 0xb6, 0xd2, 0x6b, 0xfc, 0xd0, 0x10, 0x5e, 0x6c, - 0x6d, 0xb1, 0x58, 0xe0, 0xcb, 0x15, 0x43, 0x64, 0x3b, 0x43, 0x92, 0x56, 0x76, 0x2a, 0xe9, 0xb0, - 0x62, 0x96, 0x99, 0x33, 0xf3, 0x01, 0x15, 0x98, 0x00, 0x3f, 0xd6, 0x77, 0xea, 0xbb, 0x4b, 0xb7, - 0xda, 0xca, 0x8d, 0x55, 0x4e, 0xc5, 0x0b, 0x6f, 0xa5, 0x8c, 0x3d, 0x51, 0x6b, 0x7c, 0xcb, 0x2f, - 0x7b, 0x91, 0x46, 0xb1, 0x89, 0x4a, 0x3d, 0x99, 0x3d, 0xa5, 0x3e, 0x28, 0x33, 0x25, 0xeb, 0x61, - 0xca, 0x97, 0x5a, 0x59, 0xc1, 0x9e, 0xf5, 0xe0, 0x8f, 0xa8, 0x18, 0xb1, 0xc0, 0x7b, 0xcf, 0x7c, - 0x48, 0xef, 0x6d, 0x6e, 0x67, 0xfe, 0x84, 0x39, 0x3c, 0x94, 0x98, 0xb5, 0x27, 0x9d, 0x9f, 0xa5, - 0x22, 0xf6, 0x54, 0x0e, 0x5f, 0xa2, 0x12, 0x87, 0x00, 0xbe, 0x2a, 0xed, 0xdd, 0x7f, 0xd3, 0x2e, - 0xcb, 0xc5, 0xed, 0x4c, 0xc5, 0x9e, 0x09, 0xe2, 0x97, 0xa8, 0xdc, 0x66, 0x01, 0xe5, 0x83, 0x0b, - 0xe0, 0x31, 0x0b, 0x03, 0x3d, 0xaf, 0xdc, 0x3e, 0x4a, 0xdd, 0x96, 0xad, 0xf9, 0xa2, 0xbd, 0xd8, - 0x8b, 0x5f, 0xa1, 0x0a, 0xf8, 0xfd, 0x9e, 0x3a, 0x7c, 0xc6, 0x17, 0x14, 0xaf, 0xa7, 0x7c, 0xe5, - 0xf5, 0x52, 0xdd, 0x5e, 0x21, 0xf0, 0x8d, 0x86, 0xf6, 0x23, 0x0e, 0x57, 0xc0, 0x39, 0xb8, 0xe7, - 0x42, 0xfe, 0x6f, 0x3c, 0x06, 0xb1, 0xfe, 0x5f, 0x7d, 0xf7, 0xa0, 0x64, 0x9d, 0x26, 0xa3, 0xda, - 0xfe, 0xd9, 0x6a, 0xf9, 0xcf, 0xa8, 0xf6, 0x6c, 0xfd, 0x03, 0x41, 0x8e, 0xb3, 0x18, 0x5c, 0xf5, - 0xc1, 0x52, 0x70, 0x60, 0xdf, 0x37, 0xca, 0x7a, 0x33, 0x1c, 0x1b, 0xb9, 0xdb, 0xb1, 0x91, 0xbb, - 0x1b, 0x1b, 0xb9, 0x9b, 0xc4, 0xd0, 0x86, 0x89, 0xa1, 0xdd, 0x26, 0x86, 0x76, 0x97, 0x18, 0xda, - 0xaf, 0xc4, 0xd0, 0xbe, 0xff, 0x36, 0x72, 0x9f, 0xea, 0x9b, 0xde, 0xc4, 0xbf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x05, 0x28, 0x49, 0xd9, 0x36, 0x05, 0x00, 0x00, +var fileDescriptor_c1ec5c989d262916 = []byte{ + // 555 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x8b, 0xd3, 0x4e, + 0x18, 0xc7, 0x9b, 0xdd, 0xf6, 0x47, 0x3b, 0xbf, 0xad, 0xd4, 0x01, 0x21, 0xf4, 0x90, 0x96, 0x9e, + 0x44, 0x70, 0x66, 0x77, 0x5d, 0x44, 0xf0, 0x96, 0xf5, 0x0f, 0x42, 0x57, 0x25, 0xab, 0x0b, 0xca, + 0x1e, 0x9c, 0x26, 0x8f, 0xe9, 0xd8, 0x26, 0x13, 0x92, 0xe9, 0x4a, 0x6f, 0xbe, 0x04, 0x5f, 0x56, + 0xf5, 0xb4, 0xc7, 0x3d, 0x15, 0x1b, 0xc1, 0x17, 0xe1, 0x49, 0x66, 0x9a, 0xf4, 0xaf, 0xa5, 0xc5, + 0x5b, 0xe7, 0x99, 0xe7, 0xf3, 0x99, 0xf9, 0x3e, 0x69, 0x82, 0x0e, 0x7b, 0x8f, 0x12, 0xc2, 0x05, + 0x65, 0x11, 0xa7, 0xae, 0x10, 0xb1, 0xc7, 0x43, 0x26, 0xb9, 0x08, 0xe9, 0xd5, 0x11, 0xeb, 0x47, + 0x5d, 0x76, 0x4c, 0x7d, 0x08, 0x21, 0x66, 0x12, 0x3c, 0x12, 0xc5, 0x42, 0x0a, 0xdc, 0x9c, 0x12, + 0x84, 0x45, 0x9c, 0x2c, 0x12, 0x24, 0x27, 0xea, 0xf7, 0x7d, 0x2e, 0xbb, 0x83, 0x0e, 0x71, 0x45, + 0x40, 0x7d, 0xe1, 0x0b, 0xaa, 0xc1, 0xce, 0xe0, 0xa3, 0x5e, 0xe9, 0x85, 0xfe, 0x35, 0x15, 0xd6, + 0xef, 0x6d, 0xbe, 0xc2, 0xea, 0xe1, 0xf5, 0x93, 0x79, 0x6f, 0xc0, 0xdc, 0x2e, 0x0f, 0x21, 0x1e, + 0xd2, 0xa8, 0xe7, 0xab, 0x42, 0x42, 0x03, 0x90, 0xec, 0x6f, 0x14, 0xdd, 0x44, 0xc5, 0x83, 0x50, + 0xf2, 0x00, 0xd6, 0x80, 0x87, 0xdb, 0x80, 0xc4, 0xed, 0x42, 0xc0, 0x56, 0xb9, 0xd6, 0x77, 0x03, + 0xdd, 0x6a, 0x03, 0x4b, 0xe0, 0x94, 0x85, 0x1e, 0xf7, 0x98, 0x04, 0xfc, 0x01, 0x95, 0xd5, 0xb5, + 0x3c, 0x26, 0x99, 0x69, 0x34, 0x8d, 0xbb, 0xff, 0x1f, 0x1f, 0x92, 0xf9, 0x04, 0x67, 0x76, 0x12, + 0xf5, 0x7c, 0x55, 0x48, 0x88, 0xea, 0x26, 0x57, 0x47, 0xe4, 0x55, 0xe7, 0x13, 0xb8, 0xf2, 0x0c, + 0x24, 0xb3, 0xf1, 0x68, 0xdc, 0x28, 0xa4, 0xe3, 0x06, 0x9a, 0xd7, 0x9c, 0x99, 0x15, 0x5f, 0xa0, + 0x62, 0x12, 0x81, 0x6b, 0xee, 0x69, 0xfb, 0x09, 0xd9, 0xf6, 0x7c, 0xc8, 0xf2, 0x0d, 0xcf, 0x23, + 0x70, 0xed, 0x83, 0xec, 0x84, 0xa2, 0x5a, 0x39, 0xda, 0xd7, 0xfa, 0x66, 0x20, 0xbc, 0xdc, 0xda, + 0xe6, 0x89, 0xc4, 0x97, 0x6b, 0x81, 0xc8, 0x6e, 0x81, 0x14, 0xad, 0xe3, 0xd4, 0xb2, 0xc3, 0xca, + 0x79, 0x65, 0x21, 0xcc, 0x5b, 0x54, 0xe2, 0x12, 0x82, 0xc4, 0xdc, 0x6b, 0xee, 0xaf, 0xcc, 0x6a, + 0xa7, 0x34, 0x76, 0x35, 0x93, 0x97, 0x5e, 0x28, 0x8d, 0x33, 0xb5, 0xb5, 0x7e, 0xed, 0xaf, 0x66, + 0x51, 0x41, 0x31, 0x45, 0x95, 0xbe, 0xaa, 0xbe, 0x64, 0x01, 0xe8, 0x30, 0x15, 0xfb, 0x76, 0xc6, + 0x57, 0xda, 0xf9, 0x86, 0x33, 0xef, 0xc1, 0xef, 0x50, 0x39, 0xe2, 0xa1, 0xff, 0x86, 0x07, 0x90, + 0xcd, 0x9b, 0xee, 0x16, 0xfe, 0x8c, 0xbb, 0xb1, 0x50, 0x98, 0x7d, 0xa0, 0x92, 0xbf, 0xce, 0x24, + 0xce, 0x4c, 0x87, 0x2f, 0x51, 0x25, 0x86, 0x10, 0x3e, 0x6b, 0xf7, 0xfe, 0xbf, 0xb9, 0xab, 0xea, + 0xe2, 0x4e, 0x6e, 0x71, 0xe6, 0x42, 0xfc, 0x18, 0x55, 0x3b, 0x3c, 0x64, 0xf1, 0xf0, 0x02, 0xe2, + 0x84, 0x8b, 0xd0, 0x2c, 0xea, 0xb4, 0x77, 0xb2, 0xb4, 0x55, 0x7b, 0x71, 0xd3, 0x59, 0xee, 0xc5, + 0x4f, 0x50, 0x0d, 0x82, 0x41, 0x5f, 0x0f, 0x3e, 0xe7, 0x4b, 0x9a, 0x37, 0x33, 0xbe, 0xf6, 0x74, + 0x65, 0xdf, 0x59, 0x23, 0xb0, 0x8b, 0xca, 0x89, 0x54, 0x6f, 0x8b, 0x3f, 0x34, 0xff, 0xd3, 0xf4, + 0xf3, 0xfc, 0x8f, 0x70, 0x9e, 0xd5, 0x7f, 0x8f, 0x1b, 0x0f, 0x36, 0x7f, 0x0d, 0xc8, 0x69, 0xbe, + 0x06, 0x4f, 0x3f, 0x9d, 0x1c, 0x73, 0x66, 0x62, 0xfb, 0xd9, 0x68, 0x62, 0x15, 0xae, 0x27, 0x56, + 0xe1, 0x66, 0x62, 0x15, 0xbe, 0xa4, 0x96, 0x31, 0x4a, 0x2d, 0xe3, 0x3a, 0xb5, 0x8c, 0x9b, 0xd4, + 0x32, 0x7e, 0xa4, 0x96, 0xf1, 0xf5, 0xa7, 0x55, 0x78, 0xdf, 0xdc, 0xf6, 0xd5, 0xfb, 0x13, 0x00, + 0x00, 0xff, 0xff, 0x7f, 0x15, 0x63, 0xd0, 0x18, 0x05, 0x00, 0x00, } func (m *LeaseCandidate) Marshal() (dAtA []byte, err error) { @@ -290,15 +289,11 @@ func (m *LeaseCandidateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.PreferredStrategies) > 0 { - for iNdEx := len(m.PreferredStrategies) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PreferredStrategies[iNdEx]) - copy(dAtA[i:], m.PreferredStrategies[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PreferredStrategies[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } + i -= len(m.Strategy) + copy(dAtA[i:], m.Strategy) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) + i-- + dAtA[i] = 0x32 i -= len(m.EmulationVersion) copy(dAtA[i:], m.EmulationVersion) i = encodeVarintGenerated(dAtA, i, uint64(len(m.EmulationVersion))) @@ -402,12 +397,8 @@ func (m *LeaseCandidateSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.EmulationVersion) n += 1 + l + sovGenerated(uint64(l)) - if len(m.PreferredStrategies) > 0 { - for _, s := range m.PreferredStrategies { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } + l = len(m.Strategy) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -454,7 +445,7 @@ func (this *LeaseCandidateSpec) String() string { `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`, `BinaryVersion:` + fmt.Sprintf("%v", this.BinaryVersion) + `,`, `EmulationVersion:` + fmt.Sprintf("%v", this.EmulationVersion) + `,`, - `PreferredStrategies:` + fmt.Sprintf("%v", this.PreferredStrategies) + `,`, + `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, `}`, }, "") return s @@ -899,7 +890,7 @@ func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreferredStrategies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -927,7 +918,7 @@ func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PreferredStrategies = append(m.PreferredStrategies, k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex])) + m.Strategy = k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/vendor/k8s.io/api/coordination/v1alpha1/generated.proto b/vendor/k8s.io/api/coordination/v1alpha2/generated.proto similarity index 79% rename from vendor/k8s.io/api/coordination/v1alpha1/generated.proto rename to vendor/k8s.io/api/coordination/v1alpha2/generated.proto index 57895ad569..7e56cd7f96 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/coordination/v1alpha2/generated.proto @@ -19,7 +19,7 @@ limitations under the License. syntax = "proto2"; -package k8s.io.api.coordination.v1alpha1; +package k8s.io.api.coordination.v1alpha2; import "k8s.io/api/coordination/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/coordination/v1alpha1"; +option go_package = "k8s.io/api/coordination/v1alpha2"; // LeaseCandidate defines a candidate for a Lease object. // Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. @@ -78,8 +78,8 @@ message LeaseCandidateSpec { optional .k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 3; // BinaryVersion is the binary version. It must be in a semver format without leading `v`. - // This field is required when strategy is "OldestEmulationVersion" - // +optional + // This field is required. + // +required optional string binaryVersion = 4; // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. @@ -88,18 +88,13 @@ message LeaseCandidateSpec { // +optional optional string emulationVersion = 5; - // PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. - // The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated - // leader election to make a decision about the final election strategy. This follows as - // - If all clients have strategy X as the first element in this list, strategy X will be used. - // - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y - // will be used. - // - If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader - // election will not operate the Lease until resolved. + // Strategy is the strategy that coordinated leader election will use for picking the leader. + // If multiple candidates for the same Lease return different strategies, the strategy provided + // by the candidate with the latest BinaryVersion will be used. If there is still conflict, + // this is a user error and coordinated leader election will not operate the Lease until resolved. // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. // +featureGate=CoordinatedLeaderElection - // +listType=atomic // +required - repeated string preferredStrategies = 6; + optional string strategy = 6; } diff --git a/vendor/k8s.io/api/coordination/v1alpha1/register.go b/vendor/k8s.io/api/coordination/v1alpha2/register.go similarity index 95% rename from vendor/k8s.io/api/coordination/v1alpha1/register.go rename to vendor/k8s.io/api/coordination/v1alpha2/register.go index 6e57905a19..86bb8e0f2e 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/register.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2024 The 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,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1alpha2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -26,7 +26,7 @@ import ( const GroupName = "coordination.k8s.io" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { diff --git a/vendor/k8s.io/api/coordination/v1alpha1/types.go b/vendor/k8s.io/api/coordination/v1alpha2/types.go similarity index 75% rename from vendor/k8s.io/api/coordination/v1alpha1/types.go rename to vendor/k8s.io/api/coordination/v1alpha2/types.go index 14066600cf..2f53b097a2 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/types.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/types.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2024 The 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,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1alpha2 import ( v1 "k8s.io/api/coordination/v1" @@ -23,7 +23,7 @@ import ( // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:introduced=1.32 // LeaseCandidate defines a candidate for a Lease object. // Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. @@ -61,31 +61,26 @@ type LeaseCandidateSpec struct { // +optional RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,3,opt,name=renewTime"` // BinaryVersion is the binary version. It must be in a semver format without leading `v`. - // This field is required when strategy is "OldestEmulationVersion" - // +optional - BinaryVersion string `json:"binaryVersion,omitempty" protobuf:"bytes,4,opt,name=binaryVersion"` + // This field is required. + // +required + BinaryVersion string `json:"binaryVersion" protobuf:"bytes,4,name=binaryVersion"` // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. // EmulationVersion must be less than or equal to BinaryVersion. // This field is required when strategy is "OldestEmulationVersion" // +optional EmulationVersion string `json:"emulationVersion,omitempty" protobuf:"bytes,5,opt,name=emulationVersion"` - // PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. - // The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated - // leader election to make a decision about the final election strategy. This follows as - // - If all clients have strategy X as the first element in this list, strategy X will be used. - // - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y - // will be used. - // - If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader - // election will not operate the Lease until resolved. + // Strategy is the strategy that coordinated leader election will use for picking the leader. + // If multiple candidates for the same Lease return different strategies, the strategy provided + // by the candidate with the latest BinaryVersion will be used. If there is still conflict, + // this is a user error and coordinated leader election will not operate the Lease until resolved. // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. // +featureGate=CoordinatedLeaderElection - // +listType=atomic // +required - PreferredStrategies []v1.CoordinatedLeaseStrategy `json:"preferredStrategies,omitempty" protobuf:"bytes,6,opt,name=preferredStrategies"` + Strategy v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:introduced=1.32 // LeaseCandidateList is a list of Lease objects. type LeaseCandidateList struct { diff --git a/vendor/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go similarity index 51% rename from vendor/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go rename to vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go index 0e52809c8c..39534e6adb 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/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 v1alpha2 // 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 @@ -48,13 +48,13 @@ func (LeaseCandidateList) SwaggerDoc() map[string]string { } var map_LeaseCandidateSpec = map[string]string{ - "": "LeaseCandidateSpec is a specification of a Lease.", - "leaseName": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.", - "pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", - "renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", - "binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"", - "emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"", - "preferredStrategies": "PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y\n will be used.\n- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader\n election will not operate the Lease until resolved.\n(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", + "": "LeaseCandidateSpec is a specification of a Lease.", + "leaseName": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.", + "pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", + "renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", + "binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", + "emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"", + "strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", } func (LeaseCandidateSpec) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/api/coordination/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go similarity index 93% rename from vendor/k8s.io/api/coordination/v1alpha1/zz_generated.deepcopy.go rename to vendor/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go index 9cf15d21dc..a202847973 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go @@ -19,10 +19,9 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( - v1 "k8s.io/api/coordination/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -97,11 +96,6 @@ func (in *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec) { in, out := &in.RenewTime, &out.RenewTime *out = (*in).DeepCopy() } - if in.PreferredStrategies != nil { - in, out := &in.PreferredStrategies, &out.PreferredStrategies - *out = make([]v1.CoordinatedLeaseStrategy, len(*in)) - copy(*out, *in) - } return } diff --git a/vendor/k8s.io/api/coordination/v1alpha1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go similarity index 96% rename from vendor/k8s.io/api/coordination/v1alpha1/zz_generated.prerelease-lifecycle.go rename to vendor/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go index f42bef65c9..a99b9ab5bf 100644 --- a/vendor/k8s.io/api/coordination/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/vendor/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go @@ -19,40 +19,40 @@ limitations under the License. // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. -package v1alpha1 +package v1alpha2 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int) { - return 1, 31 + return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int) { - return 1, 34 + return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int) { - return 1, 37 + return 1, 38 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int) { - return 1, 31 + return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int) { - return 1, 34 + return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int) { - return 1, 37 + return 1, 38 } diff --git a/vendor/k8s.io/api/core/v1/annotation_key_constants.go b/vendor/k8s.io/api/core/v1/annotation_key_constants.go index 5cf6f329f1..62e86402e1 100644 --- a/vendor/k8s.io/api/core/v1/annotation_key_constants.go +++ b/vendor/k8s.io/api/core/v1/annotation_key_constants.go @@ -23,7 +23,7 @@ const ( // webhook backend fails. ImagePolicyFailedOpenKey string = "alpha.image-policy.k8s.io/failed-open" - // MirrorAnnotationKey represents the annotation key set by kubelets when creating mirror pods + // MirrorPodAnnotationKey represents the annotation key set by kubelets when creating mirror pods MirrorPodAnnotationKey string = "kubernetes.io/config.mirror" // TolerationsAnnotationKey represents the key of tolerations data (json serialized) @@ -80,7 +80,7 @@ const ( // This annotation can be attached to node. ObjectTTLAnnotationKey string = "node.alpha.kubernetes.io/ttl" - // annotation key prefix used to identify non-convertible json paths. + // NonConvertibleAnnotationPrefix is the annotation key prefix used to identify non-convertible json paths. NonConvertibleAnnotationPrefix = "non-convertible.kubernetes.io" kubectlPrefix = "kubectl.kubernetes.io/" diff --git a/vendor/k8s.io/api/core/v1/generated.pb.go b/vendor/k8s.io/api/core/v1/generated.pb.go index 5654ee4829..9d466c6d79 100644 --- a/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/vendor/k8s.io/api/core/v1/generated.pb.go @@ -6758,1011 +6758,1015 @@ func init() { } var fileDescriptor_6c07b07c062484ab = []byte{ - // 16056 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x79, 0x90, 0x1c, 0xd7, - 0x79, 0x18, 0xae, 0x9e, 0xd9, 0xf3, 0xdb, 0xfb, 0x2d, 0x8e, 0xc5, 0x12, 0xc0, 0x80, 0x4d, 0x12, - 0x04, 0xaf, 0x85, 0xc0, 0x43, 0x84, 0x48, 0x8a, 0xe6, 0x9e, 0xc0, 0x12, 0xd8, 0xc5, 0xf0, 0xcd, - 0x02, 0x90, 0x28, 0x4a, 0x56, 0x63, 0xe6, 0xed, 0x6e, 0x6b, 0x67, 0xba, 0x87, 0xdd, 0x3d, 0x0b, - 0x2c, 0x7e, 0x72, 0xd9, 0x96, 0x7f, 0x96, 0x2d, 0xd9, 0xa9, 0x52, 0xb9, 0x9c, 0x38, 0x25, 0xbb, - 0x5c, 0x29, 0xc7, 0xf1, 0x11, 0xc5, 0x4e, 0x14, 0x39, 0xb6, 0x63, 0xf9, 0xca, 0x55, 0x65, 0x27, - 0x29, 0xc7, 0x71, 0x55, 0x24, 0x57, 0x5c, 0x59, 0x47, 0xeb, 0x54, 0xb9, 0xfc, 0x47, 0x6c, 0x97, - 0x93, 0x3f, 0x92, 0x2d, 0x27, 0x4e, 0xbd, 0xb3, 0xdf, 0xeb, 0x63, 0x66, 0x16, 0x04, 0x56, 0x14, - 0x8b, 0xff, 0xcd, 0xbc, 0xef, 0x7b, 0xdf, 0x7b, 0xfd, 0xce, 0xef, 0x7d, 0x27, 0xd8, 0x5b, 0x17, - 0xc3, 0x19, 0xd7, 0x3f, 0xef, 0x34, 0xdd, 0xf3, 0x55, 0x3f, 0x20, 0xe7, 0xb7, 0x2f, 0x9c, 0xdf, - 0x20, 0x1e, 0x09, 0x9c, 0x88, 0xd4, 0x66, 0x9a, 0x81, 0x1f, 0xf9, 0x08, 0x71, 0x9c, 0x19, 0xa7, - 0xe9, 0xce, 0x50, 0x9c, 0x99, 0xed, 0x0b, 0xd3, 0xcf, 0x6c, 0xb8, 0xd1, 0x66, 0xeb, 0xd6, 0x4c, - 0xd5, 0x6f, 0x9c, 0xdf, 0xf0, 0x37, 0xfc, 0xf3, 0x0c, 0xf5, 0x56, 0x6b, 0x9d, 0xfd, 0x63, 0x7f, - 0xd8, 0x2f, 0x4e, 0x62, 0xfa, 0xf9, 0xb8, 0x99, 0x86, 0x53, 0xdd, 0x74, 0x3d, 0x12, 0xec, 0x9c, - 0x6f, 0x6e, 0x6d, 0xb0, 0x76, 0x03, 0x12, 0xfa, 0xad, 0xa0, 0x4a, 0x92, 0x0d, 0xb7, 0xad, 0x15, - 0x9e, 0x6f, 0x90, 0xc8, 0xc9, 0xe8, 0xee, 0xf4, 0xf9, 0xbc, 0x5a, 0x41, 0xcb, 0x8b, 0xdc, 0x46, - 0xba, 0x99, 0x0f, 0x75, 0xaa, 0x10, 0x56, 0x37, 0x49, 0xc3, 0x49, 0xd5, 0x7b, 0x2e, 0xaf, 0x5e, - 0x2b, 0x72, 0xeb, 0xe7, 0x5d, 0x2f, 0x0a, 0xa3, 0x20, 0x59, 0xc9, 0xfe, 0x86, 0x05, 0x67, 0x66, - 0x6f, 0x56, 0x16, 0xeb, 0x4e, 0x18, 0xb9, 0xd5, 0xb9, 0xba, 0x5f, 0xdd, 0xaa, 0x44, 0x7e, 0x40, - 0x6e, 0xf8, 0xf5, 0x56, 0x83, 0x54, 0xd8, 0x40, 0xa0, 0xa7, 0x61, 0x60, 0x9b, 0xfd, 0x5f, 0x5e, - 0x98, 0xb2, 0xce, 0x58, 0xe7, 0x06, 0xe7, 0xc6, 0x7f, 0x67, 0xb7, 0xf4, 0x81, 0xbd, 0xdd, 0xd2, - 0xc0, 0x0d, 0x51, 0x8e, 0x15, 0x06, 0x3a, 0x0b, 0x7d, 0xeb, 0xe1, 0xda, 0x4e, 0x93, 0x4c, 0x15, - 0x18, 0xee, 0xa8, 0xc0, 0xed, 0x5b, 0xaa, 0xd0, 0x52, 0x2c, 0xa0, 0xe8, 0x3c, 0x0c, 0x36, 0x9d, - 0x20, 0x72, 0x23, 0xd7, 0xf7, 0xa6, 0x8a, 0x67, 0xac, 0x73, 0xbd, 0x73, 0x13, 0x02, 0x75, 0xb0, - 0x2c, 0x01, 0x38, 0xc6, 0xa1, 0xdd, 0x08, 0x88, 0x53, 0xbb, 0xe6, 0xd5, 0x77, 0xa6, 0x7a, 0xce, - 0x58, 0xe7, 0x06, 0xe2, 0x6e, 0x60, 0x51, 0x8e, 0x15, 0x86, 0xfd, 0xa5, 0x02, 0x0c, 0xcc, 0xae, - 0xaf, 0xbb, 0x9e, 0x1b, 0xed, 0xa0, 0x1b, 0x30, 0xec, 0xf9, 0x35, 0x22, 0xff, 0xb3, 0xaf, 0x18, - 0x7a, 0xf6, 0xcc, 0x4c, 0x7a, 0x29, 0xcd, 0xac, 0x6a, 0x78, 0x73, 0xe3, 0x7b, 0xbb, 0xa5, 0x61, - 0xbd, 0x04, 0x1b, 0x74, 0x10, 0x86, 0xa1, 0xa6, 0x5f, 0x53, 0x64, 0x0b, 0x8c, 0x6c, 0x29, 0x8b, - 0x6c, 0x39, 0x46, 0x9b, 0x1b, 0xdb, 0xdb, 0x2d, 0x0d, 0x69, 0x05, 0x58, 0x27, 0x82, 0x6e, 0xc1, - 0x18, 0xfd, 0xeb, 0x45, 0xae, 0xa2, 0x5b, 0x64, 0x74, 0x1f, 0xc9, 0xa3, 0xab, 0xa1, 0xce, 0x4d, - 0xee, 0xed, 0x96, 0xc6, 0x12, 0x85, 0x38, 0x49, 0xd0, 0xfe, 0x61, 0x0b, 0xc6, 0x66, 0x9b, 0xcd, - 0xd9, 0xa0, 0xe1, 0x07, 0xe5, 0xc0, 0x5f, 0x77, 0xeb, 0x04, 0xbd, 0x08, 0x3d, 0x11, 0x9d, 0x35, - 0x3e, 0xc3, 0x8f, 0x88, 0xa1, 0xed, 0xa1, 0x73, 0xb5, 0xbf, 0x5b, 0x9a, 0x4c, 0xa0, 0xb3, 0xa9, - 0x64, 0x15, 0xd0, 0x6b, 0x30, 0x5e, 0xf7, 0xab, 0x4e, 0x7d, 0xd3, 0x0f, 0x23, 0x01, 0x15, 0x53, - 0x7f, 0x64, 0x6f, 0xb7, 0x34, 0x7e, 0x35, 0x01, 0xc3, 0x29, 0x6c, 0xfb, 0x2e, 0x8c, 0xce, 0x46, - 0x91, 0x53, 0xdd, 0x24, 0x35, 0xbe, 0xa0, 0xd0, 0xf3, 0xd0, 0xe3, 0x39, 0x0d, 0xd9, 0x99, 0x33, - 0xb2, 0x33, 0xab, 0x4e, 0x83, 0x76, 0x66, 0xfc, 0xba, 0xe7, 0xbe, 0xdd, 0x12, 0x8b, 0x94, 0x96, - 0x61, 0x86, 0x8d, 0x9e, 0x05, 0xa8, 0x91, 0x6d, 0xb7, 0x4a, 0xca, 0x4e, 0xb4, 0x29, 0xfa, 0x80, - 0x44, 0x5d, 0x58, 0x50, 0x10, 0xac, 0x61, 0xd9, 0x77, 0x60, 0x70, 0x76, 0xdb, 0x77, 0x6b, 0x65, - 0xbf, 0x16, 0xa2, 0x2d, 0x18, 0x6b, 0x06, 0x64, 0x9d, 0x04, 0xaa, 0x68, 0xca, 0x3a, 0x53, 0x3c, - 0x37, 0xf4, 0xec, 0xb9, 0xcc, 0xb1, 0x37, 0x51, 0x17, 0xbd, 0x28, 0xd8, 0x99, 0x3b, 0x2e, 0xda, - 0x1b, 0x4b, 0x40, 0x71, 0x92, 0xb2, 0xfd, 0xaf, 0x0b, 0x70, 0x74, 0xf6, 0x6e, 0x2b, 0x20, 0x0b, - 0x6e, 0xb8, 0x95, 0xdc, 0x70, 0x35, 0x37, 0xdc, 0x5a, 0x8d, 0x47, 0x40, 0xad, 0xf4, 0x05, 0x51, - 0x8e, 0x15, 0x06, 0x7a, 0x06, 0xfa, 0xe9, 0xef, 0xeb, 0x78, 0x59, 0x7c, 0xf2, 0xa4, 0x40, 0x1e, - 0x5a, 0x70, 0x22, 0x67, 0x81, 0x83, 0xb0, 0xc4, 0x41, 0x2b, 0x30, 0x54, 0x65, 0xe7, 0xc3, 0xc6, - 0x8a, 0x5f, 0x23, 0x6c, 0x6d, 0x0d, 0xce, 0x3d, 0x45, 0xd1, 0xe7, 0xe3, 0xe2, 0xfd, 0xdd, 0xd2, - 0x14, 0xef, 0x9b, 0x20, 0xa1, 0xc1, 0xb0, 0x5e, 0x1f, 0xd9, 0x6a, 0xbb, 0xf7, 0x30, 0x4a, 0x90, - 0xb1, 0xd5, 0xcf, 0x69, 0x3b, 0xb7, 0x97, 0xed, 0xdc, 0xe1, 0xec, 0x5d, 0x8b, 0x2e, 0x40, 0xcf, - 0x96, 0xeb, 0xd5, 0xa6, 0xfa, 0x18, 0xad, 0x53, 0x74, 0xce, 0xaf, 0xb8, 0x5e, 0x6d, 0x7f, 0xb7, - 0x34, 0x61, 0x74, 0x87, 0x16, 0x62, 0x86, 0x6a, 0xff, 0x0f, 0x0b, 0x4a, 0x0c, 0xb6, 0xe4, 0xd6, - 0x49, 0x99, 0x04, 0xa1, 0x1b, 0x46, 0xc4, 0x8b, 0x8c, 0x01, 0x7d, 0x16, 0x20, 0x24, 0xd5, 0x80, - 0x44, 0xda, 0x90, 0xaa, 0x85, 0x51, 0x51, 0x10, 0xac, 0x61, 0xd1, 0xf3, 0x29, 0xdc, 0x74, 0x02, - 0xb6, 0xbe, 0xc4, 0xc0, 0xaa, 0xf3, 0xa9, 0x22, 0x01, 0x38, 0xc6, 0x31, 0xce, 0xa7, 0x62, 0xa7, - 0xf3, 0x09, 0x7d, 0x04, 0xc6, 0xe2, 0xc6, 0xc2, 0xa6, 0x53, 0x95, 0x03, 0xc8, 0x76, 0x70, 0xc5, - 0x04, 0xe1, 0x24, 0xae, 0xfd, 0x0f, 0x2d, 0xb1, 0x78, 0xe8, 0x57, 0xbf, 0xcb, 0xbf, 0xd5, 0xfe, - 0x55, 0x0b, 0xfa, 0xe7, 0x5c, 0xaf, 0xe6, 0x7a, 0x1b, 0xe8, 0x53, 0x30, 0x40, 0xaf, 0xca, 0x9a, - 0x13, 0x39, 0xe2, 0x18, 0xfe, 0xa0, 0xb6, 0xb7, 0xd4, 0xcd, 0x35, 0xd3, 0xdc, 0xda, 0xa0, 0x05, - 0xe1, 0x0c, 0xc5, 0xa6, 0xbb, 0xed, 0xda, 0xad, 0x4f, 0x93, 0x6a, 0xb4, 0x42, 0x22, 0x27, 0xfe, - 0x9c, 0xb8, 0x0c, 0x2b, 0xaa, 0xe8, 0x0a, 0xf4, 0x45, 0x4e, 0xb0, 0x41, 0x22, 0x71, 0x1e, 0x67, - 0x9e, 0x9b, 0xbc, 0x26, 0xa6, 0x3b, 0x92, 0x78, 0x55, 0x12, 0xdf, 0x52, 0x6b, 0xac, 0x2a, 0x16, - 0x24, 0xec, 0xff, 0xd3, 0x0f, 0x27, 0xe6, 0x2b, 0xcb, 0x39, 0xeb, 0xea, 0x2c, 0xf4, 0xd5, 0x02, - 0x77, 0x9b, 0x04, 0x62, 0x9c, 0x15, 0x95, 0x05, 0x56, 0x8a, 0x05, 0x14, 0x5d, 0x84, 0x61, 0x7e, - 0x3f, 0x5e, 0x76, 0xbc, 0x5a, 0x7c, 0x3c, 0x0a, 0xec, 0xe1, 0x1b, 0x1a, 0x0c, 0x1b, 0x98, 0x07, - 0x5c, 0x54, 0x67, 0x13, 0x9b, 0x31, 0xef, 0xee, 0xfd, 0xbc, 0x05, 0xe3, 0xbc, 0x99, 0xd9, 0x28, - 0x0a, 0xdc, 0x5b, 0xad, 0x88, 0x84, 0x53, 0xbd, 0xec, 0xa4, 0x9b, 0xcf, 0x1a, 0xad, 0xdc, 0x11, - 0x98, 0xb9, 0x91, 0xa0, 0xc2, 0x0f, 0xc1, 0x29, 0xd1, 0xee, 0x78, 0x12, 0x8c, 0x53, 0xcd, 0xa2, - 0xef, 0xb3, 0x60, 0xba, 0xea, 0x7b, 0x51, 0xe0, 0xd7, 0xeb, 0x24, 0x28, 0xb7, 0x6e, 0xd5, 0xdd, - 0x70, 0x93, 0xaf, 0x53, 0x4c, 0xd6, 0xd9, 0x49, 0x90, 0x33, 0x87, 0x0a, 0x49, 0xcc, 0xe1, 0xe9, - 0xbd, 0xdd, 0xd2, 0xf4, 0x7c, 0x2e, 0x29, 0xdc, 0xa6, 0x19, 0xb4, 0x05, 0x88, 0xde, 0xec, 0x95, - 0xc8, 0xd9, 0x20, 0x71, 0xe3, 0xfd, 0xdd, 0x37, 0x7e, 0x6c, 0x6f, 0xb7, 0x84, 0x56, 0x53, 0x24, - 0x70, 0x06, 0x59, 0xf4, 0x36, 0x1c, 0xa1, 0xa5, 0xa9, 0x6f, 0x1d, 0xe8, 0xbe, 0xb9, 0xa9, 0xbd, - 0xdd, 0xd2, 0x91, 0xd5, 0x0c, 0x22, 0x38, 0x93, 0x34, 0xfa, 0x1e, 0x0b, 0x4e, 0xc4, 0x9f, 0xbf, - 0x78, 0xa7, 0xe9, 0x78, 0xb5, 0xb8, 0xe1, 0xc1, 0xee, 0x1b, 0xa6, 0x67, 0xf2, 0x89, 0xf9, 0x3c, - 0x4a, 0x38, 0xbf, 0x11, 0xe4, 0xc1, 0x24, 0xed, 0x5a, 0xb2, 0x6d, 0xe8, 0xbe, 0xed, 0xe3, 0x7b, - 0xbb, 0xa5, 0xc9, 0xd5, 0x34, 0x0d, 0x9c, 0x45, 0x78, 0x7a, 0x1e, 0x8e, 0x66, 0xae, 0x4e, 0x34, - 0x0e, 0xc5, 0x2d, 0xc2, 0x99, 0xc0, 0x41, 0x4c, 0x7f, 0xa2, 0x23, 0xd0, 0xbb, 0xed, 0xd4, 0x5b, - 0x62, 0x63, 0x62, 0xfe, 0xe7, 0xa5, 0xc2, 0x45, 0xcb, 0xfe, 0x37, 0x45, 0x18, 0x9b, 0xaf, 0x2c, - 0xdf, 0xd3, 0xae, 0xd7, 0xaf, 0xbd, 0x42, 0xdb, 0x6b, 0x2f, 0xbe, 0x44, 0x8b, 0xb9, 0x97, 0xe8, - 0x77, 0x67, 0x6c, 0xd9, 0x1e, 0xb6, 0x65, 0x3f, 0x9c, 0xb3, 0x65, 0xef, 0xf3, 0x46, 0xdd, 0xce, - 0x59, 0xb5, 0xbd, 0x6c, 0x02, 0x33, 0x39, 0x24, 0xc6, 0xfb, 0x25, 0x8f, 0xda, 0x03, 0x2e, 0xdd, - 0xfb, 0x33, 0x8f, 0x55, 0x18, 0x9e, 0x77, 0x9a, 0xce, 0x2d, 0xb7, 0xee, 0x46, 0x2e, 0x09, 0xd1, - 0xe3, 0x50, 0x74, 0x6a, 0x35, 0xc6, 0xdd, 0x0d, 0xce, 0x1d, 0xdd, 0xdb, 0x2d, 0x15, 0x67, 0x6b, - 0x94, 0xcd, 0x00, 0x85, 0xb5, 0x83, 0x29, 0x06, 0x7a, 0x12, 0x7a, 0x6a, 0x81, 0xdf, 0x9c, 0x2a, - 0x30, 0x4c, 0xba, 0xcb, 0x7b, 0x16, 0x02, 0xbf, 0x99, 0x40, 0x65, 0x38, 0xf6, 0x6f, 0x17, 0xe0, - 0xe4, 0x3c, 0x69, 0x6e, 0x2e, 0x55, 0x72, 0xee, 0x8b, 0x73, 0x30, 0xd0, 0xf0, 0x3d, 0x37, 0xf2, - 0x83, 0x50, 0x34, 0xcd, 0x56, 0xc4, 0x8a, 0x28, 0xc3, 0x0a, 0x8a, 0xce, 0x40, 0x4f, 0x33, 0x66, - 0x62, 0x87, 0x25, 0x03, 0xcc, 0xd8, 0x57, 0x06, 0xa1, 0x18, 0xad, 0x90, 0x04, 0x62, 0xc5, 0x28, - 0x8c, 0xeb, 0x21, 0x09, 0x30, 0x83, 0xc4, 0x9c, 0x00, 0xe5, 0x11, 0xc4, 0x8d, 0x90, 0xe0, 0x04, - 0x28, 0x04, 0x6b, 0x58, 0xa8, 0x0c, 0x83, 0x61, 0x62, 0x66, 0xbb, 0xda, 0x9a, 0x23, 0x8c, 0x55, - 0x50, 0x33, 0x19, 0x13, 0x31, 0x6e, 0xb0, 0xbe, 0x8e, 0xac, 0xc2, 0xd7, 0x0a, 0x80, 0xf8, 0x10, - 0x7e, 0x9b, 0x0d, 0xdc, 0xf5, 0xf4, 0xc0, 0x75, 0xbf, 0x25, 0xee, 0xd7, 0xe8, 0xfd, 0x4f, 0x0b, - 0x4e, 0xce, 0xbb, 0x5e, 0x8d, 0x04, 0x39, 0x0b, 0xf0, 0xc1, 0x3c, 0xe5, 0x0f, 0xc6, 0xa4, 0x18, - 0x4b, 0xac, 0xe7, 0x3e, 0x2c, 0x31, 0xfb, 0x2f, 0x2c, 0x40, 0xfc, 0xb3, 0xdf, 0x75, 0x1f, 0x7b, - 0x3d, 0xfd, 0xb1, 0xf7, 0x61, 0x59, 0xd8, 0x57, 0x61, 0x74, 0xbe, 0xee, 0x12, 0x2f, 0x5a, 0x2e, - 0xcf, 0xfb, 0xde, 0xba, 0xbb, 0x81, 0x5e, 0x82, 0xd1, 0xc8, 0x6d, 0x10, 0xbf, 0x15, 0x55, 0x48, - 0xd5, 0xf7, 0xd8, 0xcb, 0xd5, 0x3a, 0xd7, 0x3b, 0x87, 0xf6, 0x76, 0x4b, 0xa3, 0x6b, 0x06, 0x04, - 0x27, 0x30, 0xed, 0x9f, 0xa1, 0xe7, 0x56, 0xbd, 0x15, 0x46, 0x24, 0x58, 0x0b, 0x5a, 0x61, 0x34, - 0xd7, 0xa2, 0xbc, 0x67, 0x39, 0xf0, 0x69, 0x77, 0x5c, 0xdf, 0x43, 0x27, 0x8d, 0xe7, 0xf8, 0x80, - 0x7c, 0x8a, 0x8b, 0x67, 0xf7, 0x0c, 0x40, 0xe8, 0x6e, 0x78, 0x24, 0xd0, 0x9e, 0x0f, 0xa3, 0x6c, - 0xab, 0xa8, 0x52, 0xac, 0x61, 0xa0, 0x3a, 0x8c, 0xd4, 0x9d, 0x5b, 0xa4, 0x5e, 0x21, 0x75, 0x52, - 0x8d, 0xfc, 0x40, 0xc8, 0x37, 0x9e, 0xeb, 0xee, 0x1d, 0x70, 0x55, 0xaf, 0x3a, 0x37, 0xb1, 0xb7, - 0x5b, 0x1a, 0x31, 0x8a, 0xb0, 0x49, 0x9c, 0x1e, 0x1d, 0x7e, 0x93, 0x7e, 0x85, 0x53, 0xd7, 0x1f, - 0x9f, 0xd7, 0x44, 0x19, 0x56, 0x50, 0x75, 0x74, 0xf4, 0xe4, 0x1d, 0x1d, 0xf6, 0x1f, 0xd1, 0x85, - 0xe6, 0x37, 0x9a, 0xbe, 0x47, 0xbc, 0x68, 0xde, 0xf7, 0x6a, 0x5c, 0x32, 0xf5, 0x92, 0x21, 0x3a, - 0x39, 0x9b, 0x10, 0x9d, 0x1c, 0x4b, 0xd7, 0xd0, 0xa4, 0x27, 0x1f, 0x86, 0xbe, 0x30, 0x72, 0xa2, - 0x56, 0x28, 0x06, 0xee, 0x61, 0xb9, 0xec, 0x2a, 0xac, 0x74, 0x7f, 0xb7, 0x34, 0xa6, 0xaa, 0xf1, - 0x22, 0x2c, 0x2a, 0xa0, 0x27, 0xa0, 0xbf, 0x41, 0xc2, 0xd0, 0xd9, 0x90, 0x6c, 0xc3, 0x98, 0xa8, - 0xdb, 0xbf, 0xc2, 0x8b, 0xb1, 0x84, 0xa3, 0x47, 0xa0, 0x97, 0x04, 0x81, 0x1f, 0x88, 0x6f, 0x1b, - 0x11, 0x88, 0xbd, 0x8b, 0xb4, 0x10, 0x73, 0x98, 0xfd, 0x1f, 0x2c, 0x18, 0x53, 0x7d, 0xe5, 0x6d, - 0x1d, 0xc2, 0x73, 0xed, 0x4d, 0x80, 0xaa, 0xfc, 0xc0, 0x90, 0x5d, 0xb3, 0x43, 0xcf, 0x9e, 0xcd, - 0xe4, 0x68, 0x52, 0xc3, 0x18, 0x53, 0x56, 0x45, 0x21, 0xd6, 0xa8, 0xd9, 0xbf, 0x61, 0xc1, 0x64, - 0xe2, 0x8b, 0xae, 0xba, 0x61, 0x84, 0xde, 0x4a, 0x7d, 0xd5, 0x4c, 0x97, 0x8b, 0xcf, 0x0d, 0xf9, - 0x37, 0xa9, 0x3d, 0x2f, 0x4b, 0xb4, 0x2f, 0xba, 0x0c, 0xbd, 0x6e, 0x44, 0x1a, 0xf2, 0x63, 0x1e, - 0x69, 0xfb, 0x31, 0xbc, 0x57, 0xf1, 0x8c, 0x2c, 0xd3, 0x9a, 0x98, 0x13, 0xb0, 0x7f, 0xbb, 0x08, - 0x83, 0x7c, 0x7f, 0xaf, 0x38, 0xcd, 0x43, 0x98, 0x8b, 0xa7, 0x60, 0xd0, 0x6d, 0x34, 0x5a, 0x91, - 0x73, 0x4b, 0xdc, 0x7b, 0x03, 0xfc, 0x0c, 0x5a, 0x96, 0x85, 0x38, 0x86, 0xa3, 0x65, 0xe8, 0x61, - 0x5d, 0xe1, 0x5f, 0xf9, 0x78, 0xf6, 0x57, 0x8a, 0xbe, 0xcf, 0x2c, 0x38, 0x91, 0xc3, 0x59, 0x4e, - 0xb5, 0xaf, 0x68, 0x11, 0x66, 0x24, 0x90, 0x03, 0x70, 0xcb, 0xf5, 0x9c, 0x60, 0x87, 0x96, 0x4d, - 0x15, 0x19, 0xc1, 0x67, 0xda, 0x13, 0x9c, 0x53, 0xf8, 0x9c, 0xac, 0xfa, 0xb0, 0x18, 0x80, 0x35, - 0xa2, 0xd3, 0x2f, 0xc2, 0xa0, 0x42, 0x3e, 0x08, 0xe7, 0x38, 0xfd, 0x11, 0x18, 0x4b, 0xb4, 0xd5, - 0xa9, 0xfa, 0xb0, 0xce, 0x78, 0xfe, 0x1a, 0x3b, 0x32, 0x44, 0xaf, 0x17, 0xbd, 0x6d, 0x71, 0x37, - 0xdd, 0x85, 0x23, 0xf5, 0x8c, 0x23, 0x5f, 0xcc, 0x6b, 0xf7, 0x57, 0xc4, 0x49, 0xf1, 0xd9, 0x47, - 0xb2, 0xa0, 0x38, 0xb3, 0x0d, 0xe3, 0x44, 0x2c, 0xb4, 0x3b, 0x11, 0xe9, 0x79, 0x77, 0x44, 0x75, - 0xfe, 0x0a, 0xd9, 0x51, 0x87, 0xea, 0xb7, 0xb2, 0xfb, 0xa7, 0xf8, 0xe8, 0xf3, 0xe3, 0x72, 0x48, - 0x10, 0x28, 0x5e, 0x21, 0x3b, 0x7c, 0x2a, 0xf4, 0xaf, 0x2b, 0xb6, 0xfd, 0xba, 0xaf, 0x58, 0x30, - 0xa2, 0xbe, 0xee, 0x10, 0xce, 0x85, 0x39, 0xf3, 0x5c, 0x38, 0xd5, 0x76, 0x81, 0xe7, 0x9c, 0x08, - 0x5f, 0x2b, 0xc0, 0x09, 0x85, 0x43, 0x1f, 0x51, 0xfc, 0x8f, 0x58, 0x55, 0xe7, 0x61, 0xd0, 0x53, - 0xe2, 0x44, 0xcb, 0x94, 0xe3, 0xc5, 0xc2, 0xc4, 0x18, 0x87, 0x5e, 0x79, 0x5e, 0x7c, 0x69, 0x0f, - 0xeb, 0x72, 0x76, 0x71, 0xb9, 0xcf, 0x41, 0xb1, 0xe5, 0xd6, 0xc4, 0x05, 0xf3, 0x41, 0x39, 0xda, - 0xd7, 0x97, 0x17, 0xf6, 0x77, 0x4b, 0x0f, 0xe7, 0xa9, 0x9c, 0xe8, 0xcd, 0x16, 0xce, 0x5c, 0x5f, - 0x5e, 0xc0, 0xb4, 0x32, 0x9a, 0x85, 0x31, 0xa9, 0x55, 0xbb, 0x41, 0xf9, 0x52, 0xdf, 0x13, 0xf7, - 0x90, 0x12, 0x96, 0x63, 0x13, 0x8c, 0x93, 0xf8, 0x68, 0x01, 0xc6, 0xb7, 0x5a, 0xb7, 0x48, 0x9d, - 0x44, 0xfc, 0x83, 0xaf, 0x10, 0x2e, 0x4a, 0x1e, 0x8c, 0x9f, 0xb0, 0x57, 0x12, 0x70, 0x9c, 0xaa, - 0x61, 0xff, 0x0d, 0xbb, 0x0f, 0xc4, 0xe8, 0x69, 0xfc, 0xcd, 0xb7, 0x72, 0x39, 0x77, 0xb3, 0x2a, - 0xae, 0x90, 0x9d, 0x35, 0x9f, 0xf2, 0x21, 0xd9, 0xab, 0xc2, 0x58, 0xf3, 0x3d, 0x6d, 0xd7, 0xfc, - 0x2f, 0x15, 0xe0, 0xa8, 0x1a, 0x01, 0x83, 0x5b, 0xfe, 0x76, 0x1f, 0x83, 0x0b, 0x30, 0x54, 0x23, - 0xeb, 0x4e, 0xab, 0x1e, 0x29, 0xbd, 0x46, 0x2f, 0x57, 0xb5, 0x2d, 0xc4, 0xc5, 0x58, 0xc7, 0x39, - 0xc0, 0xb0, 0xfd, 0xc2, 0x08, 0xbb, 0x88, 0x23, 0x87, 0xae, 0x71, 0xb5, 0x6b, 0xac, 0xdc, 0x5d, - 0xf3, 0x08, 0xf4, 0xba, 0x0d, 0xca, 0x98, 0x15, 0x4c, 0x7e, 0x6b, 0x99, 0x16, 0x62, 0x0e, 0x43, - 0x8f, 0x41, 0x7f, 0xd5, 0x6f, 0x34, 0x1c, 0xaf, 0xc6, 0xae, 0xbc, 0xc1, 0xb9, 0x21, 0xca, 0xbb, - 0xcd, 0xf3, 0x22, 0x2c, 0x61, 0x94, 0xf9, 0x76, 0x82, 0x0d, 0x2e, 0xec, 0x11, 0xcc, 0xf7, 0x6c, - 0xb0, 0x11, 0x62, 0x56, 0x4a, 0xdf, 0xaa, 0xb7, 0xfd, 0x60, 0xcb, 0xf5, 0x36, 0x16, 0xdc, 0x40, - 0x6c, 0x09, 0x75, 0x17, 0xde, 0x54, 0x10, 0xac, 0x61, 0xa1, 0x25, 0xe8, 0x6d, 0xfa, 0x41, 0x14, - 0x4e, 0xf5, 0xb1, 0xe1, 0x7e, 0x38, 0xe7, 0x20, 0xe2, 0x5f, 0x5b, 0xf6, 0x83, 0x28, 0xfe, 0x00, - 0xfa, 0x2f, 0xc4, 0xbc, 0x3a, 0xba, 0x0a, 0xfd, 0xc4, 0xdb, 0x5e, 0x0a, 0xfc, 0xc6, 0xd4, 0x64, - 0x3e, 0xa5, 0x45, 0x8e, 0xc2, 0x97, 0x59, 0xcc, 0xa3, 0x8a, 0x62, 0x2c, 0x49, 0xa0, 0x0f, 0x43, - 0x91, 0x78, 0xdb, 0x53, 0xfd, 0x8c, 0xd2, 0x74, 0x0e, 0xa5, 0x1b, 0x4e, 0x10, 0x9f, 0xf9, 0x8b, - 0xde, 0x36, 0xa6, 0x75, 0xd0, 0xc7, 0x60, 0x50, 0x1e, 0x18, 0xa1, 0x90, 0xa2, 0x66, 0x2e, 0x58, - 0x79, 0xcc, 0x60, 0xf2, 0x76, 0xcb, 0x0d, 0x48, 0x83, 0x78, 0x51, 0x18, 0x9f, 0x90, 0x12, 0x1a, - 0xe2, 0x98, 0x1a, 0xaa, 0xc2, 0x70, 0x40, 0x42, 0xf7, 0x2e, 0x29, 0xfb, 0x75, 0xb7, 0xba, 0x33, - 0x75, 0x9c, 0x75, 0xef, 0x89, 0xb6, 0x43, 0x86, 0xb5, 0x0a, 0xb1, 0x94, 0x5f, 0x2f, 0xc5, 0x06, - 0x51, 0xf4, 0x06, 0x8c, 0x04, 0x24, 0x8c, 0x9c, 0x20, 0x12, 0xad, 0x4c, 0x29, 0xad, 0xdc, 0x08, - 0xd6, 0x01, 0xfc, 0x39, 0x11, 0x37, 0x13, 0x43, 0xb0, 0x49, 0x01, 0x7d, 0x4c, 0xaa, 0x1c, 0x56, - 0xfc, 0x96, 0x17, 0x85, 0x53, 0x83, 0xac, 0xdf, 0x99, 0xba, 0xe9, 0x1b, 0x31, 0x5e, 0x52, 0x27, - 0xc1, 0x2b, 0x63, 0x83, 0x14, 0xfa, 0x04, 0x8c, 0xf0, 0xff, 0x5c, 0xa5, 0x1a, 0x4e, 0x1d, 0x65, - 0xb4, 0xcf, 0xe4, 0xd3, 0xe6, 0x88, 0x73, 0x47, 0x05, 0xf1, 0x11, 0xbd, 0x34, 0xc4, 0x26, 0x35, - 0x84, 0x61, 0xa4, 0xee, 0x6e, 0x13, 0x8f, 0x84, 0x61, 0x39, 0xf0, 0x6f, 0x11, 0x21, 0x21, 0x3e, - 0x91, 0xad, 0x82, 0xf5, 0x6f, 0x11, 0xf1, 0x08, 0xd4, 0xeb, 0x60, 0x93, 0x04, 0xba, 0x0e, 0xa3, - 0xf4, 0x49, 0xee, 0xc6, 0x44, 0x87, 0x3a, 0x11, 0x65, 0x0f, 0x67, 0x6c, 0x54, 0xc2, 0x09, 0x22, - 0xe8, 0x1a, 0x0c, 0xb3, 0x31, 0x6f, 0x35, 0x39, 0xd1, 0x63, 0x9d, 0x88, 0x32, 0x83, 0x82, 0x8a, - 0x56, 0x05, 0x1b, 0x04, 0xd0, 0xeb, 0x30, 0x58, 0x77, 0xd7, 0x49, 0x75, 0xa7, 0x5a, 0x27, 0x53, - 0xc3, 0x8c, 0x5a, 0xe6, 0x61, 0x78, 0x55, 0x22, 0x71, 0xfe, 0x5c, 0xfd, 0xc5, 0x71, 0x75, 0x74, - 0x03, 0x8e, 0x45, 0x24, 0x68, 0xb8, 0x9e, 0x43, 0x0f, 0x31, 0xf1, 0x24, 0x64, 0x9a, 0xf1, 0x11, - 0xb6, 0xba, 0x4e, 0x8b, 0xd9, 0x38, 0xb6, 0x96, 0x89, 0x85, 0x73, 0x6a, 0xa3, 0x3b, 0x30, 0x95, - 0x01, 0xe1, 0xeb, 0xf6, 0x08, 0xa3, 0xfc, 0x8a, 0xa0, 0x3c, 0xb5, 0x96, 0x83, 0xb7, 0xdf, 0x06, - 0x86, 0x73, 0xa9, 0xa3, 0x6b, 0x30, 0xc6, 0x4e, 0xce, 0x72, 0xab, 0x5e, 0x17, 0x0d, 0x8e, 0xb2, - 0x06, 0x1f, 0x93, 0x7c, 0xc4, 0xb2, 0x09, 0xde, 0xdf, 0x2d, 0x41, 0xfc, 0x0f, 0x27, 0x6b, 0xa3, - 0x5b, 0x4c, 0x09, 0xdb, 0x0a, 0xdc, 0x68, 0x87, 0xee, 0x2a, 0x72, 0x27, 0x9a, 0x1a, 0x6b, 0x2b, - 0x90, 0xd2, 0x51, 0x95, 0xa6, 0x56, 0x2f, 0xc4, 0x49, 0x82, 0xf4, 0x2a, 0x08, 0xa3, 0x9a, 0xeb, - 0x4d, 0x8d, 0xf3, 0xf7, 0x94, 0x3c, 0x49, 0x2b, 0xb4, 0x10, 0x73, 0x18, 0x53, 0xc0, 0xd2, 0x1f, - 0xd7, 0xe8, 0x8d, 0x3b, 0xc1, 0x10, 0x63, 0x05, 0xac, 0x04, 0xe0, 0x18, 0x87, 0x32, 0xc1, 0x51, - 0xb4, 0x33, 0x85, 0x18, 0xaa, 0x3a, 0x10, 0xd7, 0xd6, 0x3e, 0x86, 0x69, 0xb9, 0x7d, 0x0b, 0x46, - 0xd5, 0x31, 0xc1, 0xc6, 0x04, 0x95, 0xa0, 0x97, 0xb1, 0x7d, 0x42, 0x7c, 0x3a, 0x48, 0xbb, 0xc0, - 0x58, 0x42, 0xcc, 0xcb, 0x59, 0x17, 0xdc, 0xbb, 0x64, 0x6e, 0x27, 0x22, 0x5c, 0x16, 0x51, 0xd4, - 0xba, 0x20, 0x01, 0x38, 0xc6, 0xb1, 0xff, 0x2f, 0x67, 0x9f, 0xe3, 0x5b, 0xa2, 0x8b, 0x7b, 0xf1, - 0x69, 0x18, 0x60, 0x86, 0x1f, 0x7e, 0xc0, 0xb5, 0xb3, 0xbd, 0x31, 0xc3, 0x7c, 0x59, 0x94, 0x63, - 0x85, 0x81, 0x5e, 0x86, 0x91, 0xaa, 0xde, 0x80, 0xb8, 0xd4, 0xd5, 0x31, 0x62, 0xb4, 0x8e, 0x4d, - 0x5c, 0x74, 0x11, 0x06, 0x98, 0x8d, 0x53, 0xd5, 0xaf, 0x0b, 0x6e, 0x53, 0x72, 0x26, 0x03, 0x65, - 0x51, 0xbe, 0xaf, 0xfd, 0xc6, 0x0a, 0x1b, 0x9d, 0x85, 0x3e, 0xda, 0x85, 0xe5, 0xb2, 0xb8, 0x4e, - 0x95, 0x24, 0xf0, 0x32, 0x2b, 0xc5, 0x02, 0x6a, 0xff, 0x86, 0xc5, 0x78, 0xa9, 0xf4, 0x99, 0x8f, - 0x2e, 0xb3, 0x4b, 0x83, 0xdd, 0x20, 0x9a, 0x16, 0xfe, 0x51, 0xed, 0x26, 0x50, 0xb0, 0xfd, 0xc4, - 0x7f, 0x6c, 0xd4, 0x44, 0x6f, 0x26, 0x6f, 0x06, 0xce, 0x50, 0x3c, 0x2f, 0x87, 0x20, 0x79, 0x3b, - 0x3c, 0x14, 0x5f, 0x71, 0xb4, 0x3f, 0xed, 0xae, 0x08, 0xfb, 0x47, 0x0a, 0xda, 0x2a, 0xa9, 0x44, - 0x4e, 0x44, 0x50, 0x19, 0xfa, 0x6f, 0x3b, 0x6e, 0xe4, 0x7a, 0x1b, 0x82, 0xef, 0x6b, 0x7f, 0xd1, - 0xb1, 0x4a, 0x37, 0x79, 0x05, 0xce, 0xbd, 0x88, 0x3f, 0x58, 0x92, 0xa1, 0x14, 0x83, 0x96, 0xe7, - 0x51, 0x8a, 0x85, 0x6e, 0x29, 0x62, 0x5e, 0x81, 0x53, 0x14, 0x7f, 0xb0, 0x24, 0x83, 0xde, 0x02, - 0x90, 0x27, 0x04, 0xa9, 0x09, 0xd9, 0xe1, 0xd3, 0x9d, 0x89, 0xae, 0xa9, 0x3a, 0x5c, 0x38, 0x19, - 0xff, 0xc7, 0x1a, 0x3d, 0x3b, 0xd2, 0xe6, 0x54, 0xef, 0x0c, 0xfa, 0x38, 0xdd, 0xa2, 0x4e, 0x10, - 0x91, 0xda, 0x6c, 0x24, 0x06, 0xe7, 0xc9, 0xee, 0x1e, 0x87, 0x6b, 0x6e, 0x83, 0xe8, 0xdb, 0x59, - 0x10, 0xc1, 0x31, 0x3d, 0xfb, 0x57, 0x8a, 0x30, 0x95, 0xd7, 0x5d, 0xba, 0x69, 0xc8, 0x1d, 0x37, - 0x9a, 0xa7, 0x6c, 0xad, 0x65, 0x6e, 0x9a, 0x45, 0x51, 0x8e, 0x15, 0x06, 0x5d, 0xbd, 0xa1, 0xbb, - 0x21, 0xdf, 0xf6, 0xbd, 0xf1, 0xea, 0xad, 0xb0, 0x52, 0x2c, 0xa0, 0x14, 0x2f, 0x20, 0x4e, 0x28, - 0x8c, 0xef, 0xb4, 0x55, 0x8e, 0x59, 0x29, 0x16, 0x50, 0x5d, 0xca, 0xd8, 0xd3, 0x41, 0xca, 0x68, - 0x0c, 0x51, 0xef, 0xfd, 0x1d, 0x22, 0xf4, 0x49, 0x80, 0x75, 0xd7, 0x73, 0xc3, 0x4d, 0x46, 0xbd, - 0xef, 0xc0, 0xd4, 0x15, 0x53, 0xbc, 0xa4, 0xa8, 0x60, 0x8d, 0x22, 0x7a, 0x01, 0x86, 0xd4, 0x01, - 0xb2, 0xbc, 0xc0, 0x54, 0xff, 0x9a, 0x29, 0x55, 0x7c, 0x9a, 0x2e, 0x60, 0x1d, 0xcf, 0xfe, 0x74, - 0x72, 0xbd, 0x88, 0x1d, 0xa0, 0x8d, 0xaf, 0xd5, 0xed, 0xf8, 0x16, 0xda, 0x8f, 0xaf, 0xfd, 0x63, - 0x83, 0x30, 0x66, 0x34, 0xd6, 0x0a, 0xbb, 0x38, 0x73, 0x2f, 0xd1, 0x0b, 0xc8, 0x89, 0x88, 0xd8, - 0x7f, 0x76, 0xe7, 0xad, 0xa2, 0x5f, 0x52, 0x74, 0x07, 0xf0, 0xfa, 0xe8, 0x93, 0x30, 0x58, 0x77, - 0x42, 0x26, 0xb1, 0x24, 0x62, 0xdf, 0x75, 0x43, 0x2c, 0x7e, 0x10, 0x3a, 0x61, 0xa4, 0xdd, 0xfa, - 0x9c, 0x76, 0x4c, 0x92, 0xde, 0x94, 0x94, 0xbf, 0x92, 0xd6, 0x9d, 0xaa, 0x13, 0x94, 0x09, 0xdb, - 0xc1, 0x1c, 0x86, 0x2e, 0xb2, 0xa3, 0x95, 0xae, 0x8a, 0x79, 0xca, 0x8d, 0xb2, 0x65, 0xd6, 0x6b, - 0x30, 0xd9, 0x0a, 0x86, 0x0d, 0xcc, 0xf8, 0x4d, 0xd6, 0xd7, 0xe6, 0x4d, 0xf6, 0x04, 0xf4, 0xb3, - 0x1f, 0x6a, 0x05, 0xa8, 0xd9, 0x58, 0xe6, 0xc5, 0x58, 0xc2, 0x93, 0x0b, 0x66, 0xa0, 0xbb, 0x05, - 0x43, 0x5f, 0x7d, 0x62, 0x51, 0x33, 0xb3, 0x8b, 0x01, 0x7e, 0xca, 0x89, 0x25, 0x8f, 0x25, 0x0c, - 0xfd, 0xac, 0x05, 0xc8, 0xa9, 0xd3, 0xd7, 0x32, 0x2d, 0x56, 0x8f, 0x1b, 0x60, 0xac, 0xf6, 0xcb, - 0x1d, 0x87, 0xbd, 0x15, 0xce, 0xcc, 0xa6, 0x6a, 0x73, 0x49, 0xe9, 0x4b, 0xa2, 0x8b, 0x28, 0x8d, - 0xa0, 0x5f, 0x46, 0x57, 0xdd, 0x30, 0xfa, 0xec, 0x1f, 0x27, 0x2e, 0xa7, 0x8c, 0x2e, 0xa1, 0xeb, - 0xfa, 0xe3, 0x6b, 0xe8, 0x80, 0x8f, 0xaf, 0x91, 0xdc, 0x87, 0xd7, 0x77, 0x26, 0x1e, 0x30, 0xc3, - 0xec, 0xcb, 0x1f, 0xeb, 0xf0, 0x80, 0x11, 0xe2, 0xf4, 0x6e, 0x9e, 0x31, 0x65, 0xa1, 0x07, 0x1e, - 0x61, 0x5d, 0x6e, 0xff, 0x08, 0xbe, 0x1e, 0x92, 0x60, 0xee, 0x84, 0x54, 0x13, 0xef, 0xeb, 0xbc, - 0x87, 0xa6, 0x37, 0xfe, 0x1e, 0x0b, 0xa6, 0xd2, 0x03, 0xc4, 0xbb, 0x34, 0x35, 0xca, 0xfa, 0x6f, - 0xb7, 0x1b, 0x19, 0xd1, 0x79, 0x69, 0xee, 0x3a, 0x35, 0x9b, 0x43, 0x0b, 0xe7, 0xb6, 0x32, 0xdd, - 0x82, 0xe3, 0x39, 0xf3, 0x9e, 0x21, 0xb5, 0x5e, 0xd0, 0xa5, 0xd6, 0x1d, 0x64, 0x9d, 0x33, 0x72, - 0x66, 0x66, 0xde, 0x68, 0x39, 0x5e, 0xe4, 0x46, 0x3b, 0xba, 0x94, 0xdb, 0x03, 0x73, 0x40, 0xd0, - 0x27, 0xa0, 0xb7, 0xee, 0x7a, 0xad, 0x3b, 0xe2, 0xa6, 0x3c, 0x9b, 0xfd, 0x88, 0xf1, 0x5a, 0x77, - 0xcc, 0x21, 0x2e, 0xd1, 0x0d, 0xc9, 0xca, 0xf7, 0x77, 0x4b, 0x28, 0x8d, 0x80, 0x39, 0x55, 0xfb, - 0x49, 0x18, 0x5d, 0x70, 0x48, 0xc3, 0xf7, 0x16, 0xbd, 0x5a, 0xd3, 0x77, 0xbd, 0x08, 0x4d, 0x41, - 0x0f, 0x63, 0x11, 0xf9, 0x05, 0xd9, 0x43, 0x87, 0x10, 0xb3, 0x12, 0x7b, 0x03, 0x8e, 0x2e, 0xf8, - 0xb7, 0xbd, 0xdb, 0x4e, 0x50, 0x9b, 0x2d, 0x2f, 0x6b, 0x52, 0xbf, 0x55, 0x29, 0x75, 0xb2, 0xf2, - 0xdf, 0xf4, 0x5a, 0x4d, 0xbe, 0x94, 0x96, 0xdc, 0x3a, 0xc9, 0x91, 0xcd, 0xfe, 0x58, 0xc1, 0x68, - 0x29, 0xc6, 0x57, 0x9a, 0x45, 0x2b, 0xd7, 0x28, 0xe1, 0x0d, 0x18, 0x58, 0x77, 0x49, 0xbd, 0x86, - 0xc9, 0xba, 0x98, 0x8d, 0xc7, 0xf3, 0xcd, 0x16, 0x97, 0x28, 0xa6, 0x52, 0x81, 0x32, 0x99, 0xd5, - 0x92, 0xa8, 0x8c, 0x15, 0x19, 0xb4, 0x05, 0xe3, 0x72, 0xce, 0x24, 0x54, 0x9c, 0xda, 0x4f, 0xb4, - 0x5b, 0x84, 0x26, 0x71, 0x66, 0xc2, 0x8d, 0x13, 0x64, 0x70, 0x8a, 0x30, 0x3a, 0x09, 0x3d, 0x0d, - 0xca, 0x9f, 0xf4, 0xb0, 0xe1, 0x67, 0x42, 0x2a, 0x26, 0x6f, 0x63, 0xa5, 0xf6, 0x4f, 0x58, 0x70, - 0x3c, 0x35, 0x32, 0x42, 0xee, 0x78, 0x9f, 0x67, 0x21, 0x29, 0x07, 0x2c, 0x74, 0x96, 0x03, 0xda, - 0xff, 0xc8, 0x82, 0x23, 0x8b, 0x8d, 0x66, 0xb4, 0xb3, 0xe0, 0x9a, 0x16, 0x04, 0x2f, 0x42, 0x5f, - 0x83, 0xd4, 0xdc, 0x56, 0x43, 0xcc, 0x5c, 0x49, 0xde, 0xe1, 0x2b, 0xac, 0x94, 0x9e, 0x03, 0x95, - 0xc8, 0x0f, 0x9c, 0x0d, 0xc2, 0x0b, 0xb0, 0x40, 0x67, 0x9c, 0x90, 0x7b, 0x97, 0x5c, 0x75, 0x1b, - 0x6e, 0x74, 0x6f, 0xbb, 0x4b, 0x28, 0xff, 0x25, 0x11, 0x1c, 0xd3, 0xb3, 0xbf, 0x61, 0xc1, 0x98, - 0x5c, 0xf7, 0xb3, 0xb5, 0x5a, 0x40, 0xc2, 0x10, 0x4d, 0x43, 0xc1, 0x6d, 0x8a, 0x5e, 0x82, 0xe8, - 0x65, 0x61, 0xb9, 0x8c, 0x0b, 0x6e, 0x53, 0x3e, 0xba, 0x18, 0x9b, 0x50, 0x34, 0xed, 0x20, 0x2e, - 0x8b, 0x72, 0xac, 0x30, 0xd0, 0x39, 0x18, 0xf0, 0xfc, 0x1a, 0x7f, 0xb7, 0x08, 0x4d, 0x38, 0xc5, - 0x5c, 0x15, 0x65, 0x58, 0x41, 0x51, 0x19, 0x06, 0xb9, 0x95, 0x6c, 0xbc, 0x68, 0xbb, 0xb2, 0xb5, - 0x65, 0x5f, 0xb6, 0x26, 0x6b, 0xe2, 0x98, 0x88, 0xfd, 0x5b, 0x16, 0x0c, 0xcb, 0x2f, 0xeb, 0xf2, - 0x45, 0x49, 0xb7, 0x56, 0xfc, 0x9a, 0x8c, 0xb7, 0x16, 0x7d, 0x11, 0x32, 0x88, 0xf1, 0x10, 0x2c, - 0x1e, 0xe8, 0x21, 0x78, 0x01, 0x86, 0x9c, 0x66, 0xb3, 0x6c, 0xbe, 0x22, 0xd9, 0x52, 0x9a, 0x8d, - 0x8b, 0xb1, 0x8e, 0x63, 0xff, 0x78, 0x01, 0x46, 0xe5, 0x17, 0x54, 0x5a, 0xb7, 0x42, 0x12, 0xa1, - 0x35, 0x18, 0x74, 0xf8, 0x2c, 0x11, 0xb9, 0xc8, 0x1f, 0xc9, 0x96, 0x6e, 0x1a, 0x53, 0x1a, 0xb3, - 0xc3, 0xb3, 0xb2, 0x36, 0x8e, 0x09, 0xa1, 0x3a, 0x4c, 0x78, 0x7e, 0xc4, 0x58, 0x23, 0x05, 0x6f, - 0xa7, 0x70, 0x4e, 0x52, 0x3f, 0x21, 0xa8, 0x4f, 0xac, 0x26, 0xa9, 0xe0, 0x34, 0x61, 0xb4, 0x28, - 0x25, 0xc6, 0xc5, 0x7c, 0x51, 0x9f, 0x3e, 0x71, 0xd9, 0x02, 0x63, 0xfb, 0xd7, 0x2d, 0x18, 0x94, - 0x68, 0x87, 0x61, 0x5b, 0xb0, 0x02, 0xfd, 0x21, 0x9b, 0x04, 0x39, 0x34, 0x76, 0xbb, 0x8e, 0xf3, - 0xf9, 0x8a, 0x39, 0x3e, 0xfe, 0x3f, 0xc4, 0x92, 0x06, 0x53, 0x18, 0xaa, 0xee, 0xbf, 0x4b, 0x14, - 0x86, 0xaa, 0x3f, 0x39, 0x97, 0xd2, 0x9f, 0xb2, 0x3e, 0x6b, 0x12, 0x78, 0xfa, 0x30, 0x69, 0x06, - 0x64, 0xdd, 0xbd, 0x93, 0x7c, 0x98, 0x94, 0x59, 0x29, 0x16, 0x50, 0xf4, 0x16, 0x0c, 0x57, 0xa5, - 0xa6, 0x28, 0xde, 0xe1, 0x67, 0xdb, 0x6a, 0x2d, 0x95, 0x82, 0x9b, 0x4b, 0x3a, 0xe7, 0xb5, 0xfa, - 0xd8, 0xa0, 0x66, 0x5a, 0x81, 0x15, 0x3b, 0x59, 0x81, 0xc5, 0x74, 0xf3, 0x6d, 0xa2, 0x7e, 0xd2, - 0x82, 0x3e, 0xae, 0x21, 0xe8, 0x4e, 0x41, 0xa3, 0xe9, 0xfb, 0xe3, 0xb1, 0xbb, 0x41, 0x0b, 0x05, - 0x67, 0x83, 0x56, 0x60, 0x90, 0xfd, 0x60, 0x1a, 0x8e, 0x62, 0xbe, 0xcf, 0x18, 0x6f, 0x55, 0xef, - 0xe0, 0x0d, 0x59, 0x0d, 0xc7, 0x14, 0xec, 0x1f, 0x2d, 0xd2, 0xd3, 0x2d, 0x46, 0x35, 0x2e, 0x7d, - 0xeb, 0xc1, 0x5d, 0xfa, 0x85, 0x07, 0x75, 0xe9, 0x6f, 0xc0, 0x58, 0x55, 0xb3, 0x0e, 0x88, 0x67, - 0xf2, 0x5c, 0xdb, 0x45, 0xa2, 0x19, 0x12, 0x70, 0x19, 0xea, 0xbc, 0x49, 0x04, 0x27, 0xa9, 0xa2, - 0x8f, 0xc3, 0x30, 0x9f, 0x67, 0xd1, 0x0a, 0x37, 0xa4, 0x7b, 0x2c, 0x7f, 0xbd, 0xe8, 0x4d, 0x70, - 0x99, 0xbb, 0x56, 0x1d, 0x1b, 0xc4, 0xec, 0xbf, 0xb4, 0x00, 0x2d, 0x36, 0x37, 0x49, 0x83, 0x04, - 0x4e, 0x3d, 0x56, 0xf2, 0x7d, 0xc1, 0x82, 0x29, 0x92, 0x2a, 0x9e, 0xf7, 0x1b, 0x0d, 0xf1, 0xa4, - 0xcf, 0x91, 0x3a, 0x2d, 0xe6, 0xd4, 0x89, 0xd9, 0xfa, 0x3c, 0x0c, 0x9c, 0xdb, 0x1e, 0x5a, 0x81, - 0x49, 0x7e, 0x4b, 0x2a, 0x80, 0x66, 0x6b, 0xf7, 0x90, 0x20, 0x3c, 0xb9, 0x96, 0x46, 0xc1, 0x59, - 0xf5, 0xec, 0x5f, 0x1f, 0x81, 0xdc, 0x5e, 0xbc, 0xaf, 0xdd, 0x7c, 0x5f, 0xbb, 0xf9, 0xbe, 0x76, - 0xf3, 0x7d, 0xed, 0xe6, 0xfb, 0xda, 0xcd, 0xf7, 0xb5, 0x9b, 0xef, 0x52, 0xed, 0xe6, 0xdf, 0xb6, - 0xe0, 0xa8, 0xba, 0xbe, 0x8c, 0x07, 0xfb, 0x67, 0x60, 0x92, 0x6f, 0xb7, 0xf9, 0xba, 0xe3, 0x36, - 0xd6, 0x48, 0xa3, 0x59, 0x77, 0x22, 0x69, 0xc3, 0x74, 0x21, 0x73, 0xe5, 0x26, 0x1c, 0x25, 0x8c, - 0x8a, 0xdc, 0xe3, 0x2c, 0x03, 0x80, 0xb3, 0x9a, 0xb1, 0x7f, 0x65, 0x00, 0x7a, 0x17, 0xb7, 0x89, - 0x17, 0x1d, 0xc2, 0xd3, 0xa6, 0x0a, 0xa3, 0xae, 0xb7, 0xed, 0xd7, 0xb7, 0x49, 0x8d, 0xc3, 0x0f, - 0xf2, 0x02, 0x3f, 0x26, 0x48, 0x8f, 0x2e, 0x1b, 0x24, 0x70, 0x82, 0xe4, 0x83, 0xd0, 0x11, 0x5d, - 0x82, 0x3e, 0x7e, 0xf9, 0x08, 0x05, 0x51, 0xe6, 0x99, 0xcd, 0x06, 0x51, 0x5c, 0xa9, 0xb1, 0xfe, - 0x8a, 0x5f, 0x6e, 0xa2, 0x3a, 0xfa, 0x34, 0x8c, 0xae, 0xbb, 0x41, 0x18, 0xad, 0xb9, 0x0d, 0x7a, - 0x35, 0x34, 0x9a, 0xf7, 0xa0, 0x13, 0x52, 0xe3, 0xb0, 0x64, 0x50, 0xc2, 0x09, 0xca, 0x68, 0x03, - 0x46, 0xea, 0x8e, 0xde, 0x54, 0xff, 0x81, 0x9b, 0x52, 0xb7, 0xc3, 0x55, 0x9d, 0x10, 0x36, 0xe9, - 0xd2, 0xed, 0x54, 0x65, 0x6a, 0x8d, 0x01, 0x26, 0xce, 0x50, 0xdb, 0x89, 0xeb, 0x33, 0x38, 0x8c, - 0x32, 0x68, 0xcc, 0xdd, 0x60, 0xd0, 0x64, 0xd0, 0x34, 0xa7, 0x82, 0x4f, 0xc1, 0x20, 0xa1, 0x43, - 0x48, 0x09, 0x8b, 0x0b, 0xe6, 0x7c, 0x77, 0x7d, 0x5d, 0x71, 0xab, 0x81, 0x6f, 0x6a, 0xe3, 0x16, - 0x25, 0x25, 0x1c, 0x13, 0x45, 0xf3, 0xd0, 0x17, 0x92, 0xc0, 0x55, 0x12, 0xff, 0x36, 0xd3, 0xc8, - 0xd0, 0xb8, 0x4b, 0x23, 0xff, 0x8d, 0x45, 0x55, 0xba, 0xbc, 0x1c, 0x26, 0x8a, 0x65, 0x97, 0x81, - 0xb6, 0xbc, 0x66, 0x59, 0x29, 0x16, 0x50, 0xf4, 0x3a, 0xf4, 0x07, 0xa4, 0xce, 0xd4, 0xbd, 0x23, - 0xdd, 0x2f, 0x72, 0xae, 0x3d, 0xe6, 0xf5, 0xb0, 0x24, 0x80, 0xae, 0x00, 0x0a, 0x08, 0x65, 0xf0, - 0x5c, 0x6f, 0x43, 0x19, 0xe1, 0x8b, 0x83, 0x56, 0x31, 0xd2, 0x38, 0xc6, 0x90, 0xde, 0xac, 0x38, - 0xa3, 0x1a, 0xba, 0x04, 0x13, 0xaa, 0x74, 0xd9, 0x0b, 0x23, 0x87, 0x1e, 0x70, 0x63, 0x8c, 0x96, - 0x92, 0xaf, 0xe0, 0x24, 0x02, 0x4e, 0xd7, 0xb1, 0x7f, 0xde, 0x02, 0x3e, 0xce, 0x87, 0x20, 0x55, - 0x78, 0xd5, 0x94, 0x2a, 0x9c, 0xc8, 0x9d, 0xb9, 0x1c, 0x89, 0xc2, 0xcf, 0x5b, 0x30, 0xa4, 0xcd, - 0x6c, 0xbc, 0x66, 0xad, 0x36, 0x6b, 0xb6, 0x05, 0xe3, 0x74, 0xa5, 0x5f, 0xbb, 0x15, 0x92, 0x60, - 0x9b, 0xd4, 0xd8, 0xc2, 0x2c, 0xdc, 0xdb, 0xc2, 0x54, 0x06, 0xbf, 0x57, 0x13, 0x04, 0x71, 0xaa, - 0x09, 0xfb, 0x53, 0xb2, 0xab, 0xca, 0x3e, 0xba, 0xaa, 0xe6, 0x3c, 0x61, 0x1f, 0xad, 0x66, 0x15, - 0xc7, 0x38, 0x74, 0xab, 0x6d, 0xfa, 0x61, 0x94, 0xb4, 0x8f, 0xbe, 0xec, 0x87, 0x11, 0x66, 0x10, - 0xfb, 0x39, 0x80, 0xc5, 0x3b, 0xa4, 0xca, 0x57, 0xac, 0xfe, 0xe8, 0xb1, 0xf2, 0x1f, 0x3d, 0xf6, - 0x1f, 0x58, 0x30, 0xba, 0x34, 0x6f, 0xdc, 0x5c, 0x33, 0x00, 0xfc, 0xa5, 0x76, 0xf3, 0xe6, 0xaa, - 0x34, 0xd2, 0xe1, 0x76, 0x0a, 0xaa, 0x14, 0x6b, 0x18, 0xe8, 0x04, 0x14, 0xeb, 0x2d, 0x4f, 0x88, - 0x3d, 0xfb, 0xe9, 0xf5, 0x78, 0xb5, 0xe5, 0x61, 0x5a, 0xa6, 0x79, 0xb2, 0x15, 0xbb, 0xf6, 0x64, - 0xeb, 0x18, 0x50, 0x07, 0x95, 0xa0, 0xf7, 0xf6, 0x6d, 0xb7, 0xc6, 0xe3, 0x04, 0x08, 0x03, 0xa2, - 0x9b, 0x37, 0x97, 0x17, 0x42, 0xcc, 0xcb, 0xed, 0x2f, 0x16, 0x61, 0x7a, 0xa9, 0x4e, 0xee, 0xbc, - 0xc3, 0x58, 0x09, 0xdd, 0xfa, 0xe1, 0x1d, 0x4c, 0x80, 0x74, 0x50, 0x5f, 0xcb, 0xce, 0xe3, 0xb1, - 0x0e, 0xfd, 0xdc, 0x3c, 0x58, 0x46, 0x4e, 0xc8, 0x54, 0xca, 0xe6, 0x0f, 0xc8, 0x0c, 0x37, 0x33, - 0x16, 0x4a, 0x59, 0x75, 0x61, 0x8a, 0x52, 0x2c, 0x89, 0x4f, 0xbf, 0x04, 0xc3, 0x3a, 0xe6, 0x81, - 0xbc, 0x9e, 0xbf, 0xb7, 0x08, 0xe3, 0xb4, 0x07, 0x0f, 0x74, 0x22, 0xae, 0xa7, 0x27, 0xe2, 0x7e, - 0x7b, 0xbe, 0x76, 0x9e, 0x8d, 0xb7, 0x92, 0xb3, 0x71, 0x21, 0x6f, 0x36, 0x0e, 0x7b, 0x0e, 0xbe, - 0xcf, 0x82, 0xc9, 0xa5, 0xba, 0x5f, 0xdd, 0x4a, 0x78, 0xa7, 0xbe, 0x00, 0x43, 0xf4, 0x38, 0x0e, - 0x8d, 0x40, 0x2d, 0x46, 0xe8, 0x1e, 0x01, 0xc2, 0x3a, 0x9e, 0x56, 0xed, 0xfa, 0xf5, 0xe5, 0x85, - 0xac, 0x88, 0x3f, 0x02, 0x84, 0x75, 0x3c, 0xfb, 0xf7, 0x2c, 0x38, 0x75, 0x69, 0x7e, 0x31, 0x5e, - 0x8a, 0xa9, 0xa0, 0x43, 0x67, 0xa1, 0xaf, 0x59, 0xd3, 0xba, 0x12, 0x8b, 0x85, 0x17, 0x58, 0x2f, - 0x04, 0xf4, 0xdd, 0x12, 0xdf, 0xeb, 0x3a, 0xc0, 0x25, 0x5c, 0x9e, 0x17, 0xe7, 0xae, 0xd4, 0x02, - 0x59, 0xb9, 0x5a, 0xa0, 0xc7, 0xa0, 0x9f, 0xde, 0x0b, 0x6e, 0x55, 0xf6, 0x9b, 0x9b, 0x5d, 0xf0, - 0x22, 0x2c, 0x61, 0xf6, 0xcf, 0x59, 0x30, 0x79, 0xc9, 0x8d, 0xe8, 0xa5, 0x9d, 0x8c, 0xaa, 0x43, - 0x6f, 0xed, 0xd0, 0x8d, 0xfc, 0x60, 0x27, 0x19, 0x55, 0x07, 0x2b, 0x08, 0xd6, 0xb0, 0xf8, 0x07, - 0x6d, 0xbb, 0xcc, 0xdf, 0xa5, 0x60, 0xea, 0xdd, 0xb0, 0x28, 0xc7, 0x0a, 0x83, 0x8e, 0x57, 0xcd, - 0x0d, 0x98, 0xc8, 0x72, 0x47, 0x1c, 0xdc, 0x6a, 0xbc, 0x16, 0x24, 0x00, 0xc7, 0x38, 0xf6, 0x9f, - 0x5b, 0x50, 0xba, 0xc4, 0xbd, 0x76, 0xd7, 0xc3, 0x9c, 0x43, 0xf7, 0x39, 0x18, 0x24, 0x52, 0x41, - 0x20, 0x7a, 0xad, 0x18, 0x51, 0xa5, 0x39, 0xe0, 0xc1, 0x7d, 0x14, 0x5e, 0x17, 0x2e, 0xf4, 0x07, - 0xf3, 0x81, 0x5e, 0x02, 0x44, 0xf4, 0xb6, 0xf4, 0x68, 0x47, 0x2c, 0x6c, 0xca, 0x62, 0x0a, 0x8a, - 0x33, 0x6a, 0xd8, 0x3f, 0x61, 0xc1, 0x51, 0xf5, 0xc1, 0xef, 0xba, 0xcf, 0xb4, 0xbf, 0x5a, 0x80, - 0x91, 0xcb, 0x6b, 0x6b, 0xe5, 0x4b, 0x24, 0xd2, 0x56, 0x65, 0x7b, 0xb5, 0x3f, 0xd6, 0xb4, 0x97, - 0xed, 0xde, 0x88, 0xad, 0xc8, 0xad, 0xcf, 0xf0, 0x18, 0x7e, 0x33, 0xcb, 0x5e, 0x74, 0x2d, 0xa8, - 0x44, 0x81, 0xeb, 0x6d, 0x64, 0xae, 0x74, 0xc9, 0xb3, 0x14, 0xf3, 0x78, 0x16, 0xf4, 0x1c, 0xf4, - 0xb1, 0x20, 0x82, 0x72, 0x12, 0x1e, 0x52, 0x4f, 0x2c, 0x56, 0xba, 0xbf, 0x5b, 0x1a, 0xbc, 0x8e, - 0x97, 0xf9, 0x1f, 0x2c, 0x50, 0xd1, 0x75, 0x18, 0xda, 0x8c, 0xa2, 0xe6, 0x65, 0xe2, 0xd4, 0x48, - 0x20, 0x4f, 0xd9, 0xd3, 0x59, 0xa7, 0x2c, 0x1d, 0x04, 0x8e, 0x16, 0x1f, 0x4c, 0x71, 0x59, 0x88, - 0x75, 0x3a, 0x76, 0x05, 0x20, 0x86, 0xdd, 0x27, 0xc5, 0x8d, 0xbd, 0x06, 0x83, 0xf4, 0x73, 0x67, - 0xeb, 0xae, 0xd3, 0x5e, 0x35, 0xfe, 0x14, 0x0c, 0x4a, 0xc5, 0x77, 0x28, 0x42, 0x7c, 0xb0, 0x1b, - 0x49, 0xea, 0xc5, 0x43, 0x1c, 0xc3, 0xed, 0x47, 0x41, 0x58, 0x00, 0xb7, 0x23, 0x69, 0xaf, 0xc3, - 0x11, 0x66, 0xca, 0xec, 0x44, 0x9b, 0xc6, 0x1a, 0xed, 0xbc, 0x18, 0x9e, 0x16, 0xef, 0x3a, 0xfe, - 0x65, 0x53, 0x9a, 0x0b, 0xf9, 0xb0, 0xa4, 0x18, 0xbf, 0xf1, 0xec, 0x3f, 0xeb, 0x81, 0x87, 0x96, - 0x2b, 0xf9, 0xb1, 0xa9, 0x2e, 0xc2, 0x30, 0x67, 0x17, 0xe9, 0xd2, 0x70, 0xea, 0xa2, 0x5d, 0x25, - 0x01, 0x5d, 0xd3, 0x60, 0xd8, 0xc0, 0x44, 0xa7, 0xa0, 0xe8, 0xbe, 0xed, 0x25, 0x1d, 0x2c, 0x97, - 0xdf, 0x58, 0xc5, 0xb4, 0x9c, 0x82, 0x29, 0xe7, 0xc9, 0x8f, 0x74, 0x05, 0x56, 0xdc, 0xe7, 0xab, - 0x30, 0xea, 0x86, 0xd5, 0xd0, 0x5d, 0xf6, 0xe8, 0x3e, 0xd5, 0x76, 0xba, 0x92, 0x39, 0xd0, 0x4e, - 0x2b, 0x28, 0x4e, 0x60, 0x6b, 0xf7, 0x4b, 0x6f, 0xd7, 0xdc, 0x6b, 0xc7, 0xc8, 0x18, 0xf4, 0xf8, - 0x6f, 0xb2, 0xaf, 0x0b, 0x99, 0x08, 0x5e, 0x1c, 0xff, 0xfc, 0x83, 0x43, 0x2c, 0x61, 0xf4, 0x41, - 0x57, 0xdd, 0x74, 0x9a, 0xb3, 0xad, 0x68, 0x73, 0xc1, 0x0d, 0xab, 0xfe, 0x36, 0x09, 0x76, 0xd8, - 0x5b, 0x7c, 0x20, 0x7e, 0xd0, 0x29, 0xc0, 0xfc, 0xe5, 0xd9, 0x32, 0xc5, 0xc4, 0xe9, 0x3a, 0x68, - 0x16, 0xc6, 0x64, 0x61, 0x85, 0x84, 0xec, 0x0a, 0x18, 0x62, 0x64, 0x94, 0xcb, 0xa3, 0x28, 0x56, - 0x44, 0x92, 0xf8, 0x26, 0x83, 0x0b, 0xf7, 0x83, 0xc1, 0x7d, 0x11, 0x46, 0x5c, 0xcf, 0x8d, 0x5c, - 0x27, 0xf2, 0xb9, 0xfe, 0x88, 0x3f, 0xbb, 0x99, 0x80, 0x79, 0x59, 0x07, 0x60, 0x13, 0xcf, 0xfe, - 0x6f, 0x3d, 0x30, 0xc1, 0xa6, 0xed, 0xfd, 0x15, 0xf6, 0x5e, 0x5a, 0x61, 0xd7, 0xd3, 0x2b, 0xec, - 0x7e, 0x70, 0xee, 0xf7, 0xbc, 0xcc, 0x3e, 0x67, 0xc1, 0x04, 0x93, 0x71, 0x1b, 0xcb, 0xec, 0x3c, - 0x0c, 0x06, 0x86, 0x37, 0xea, 0xa0, 0xae, 0xd4, 0x92, 0x8e, 0xa5, 0x31, 0x0e, 0x7a, 0x0d, 0xa0, - 0x19, 0xcb, 0xd0, 0x0b, 0x46, 0x08, 0x51, 0xc8, 0x15, 0x9f, 0x6b, 0x75, 0xec, 0x4f, 0xc3, 0xa0, - 0x72, 0x37, 0x95, 0xfe, 0xe6, 0x56, 0x8e, 0xbf, 0x79, 0x67, 0x36, 0x42, 0xda, 0xc6, 0x15, 0x33, - 0x6d, 0xe3, 0xbe, 0x6c, 0x41, 0xac, 0xe1, 0x40, 0x6f, 0xc0, 0x60, 0xd3, 0x67, 0x06, 0xd1, 0x81, - 0xf4, 0x32, 0x78, 0xb4, 0xad, 0x8a, 0x84, 0xc7, 0x09, 0x0c, 0xf8, 0x74, 0x94, 0x65, 0x55, 0x1c, - 0x53, 0x41, 0x57, 0xa0, 0xbf, 0x19, 0x90, 0x4a, 0xc4, 0x82, 0x58, 0x75, 0x4f, 0x90, 0x2f, 0x5f, - 0x5e, 0x11, 0x4b, 0x0a, 0xf6, 0x2f, 0x16, 0x60, 0x3c, 0x89, 0x8a, 0x5e, 0x81, 0x1e, 0x72, 0x87, - 0x54, 0x45, 0x7f, 0x33, 0x79, 0x82, 0x58, 0x46, 0xc2, 0x07, 0x80, 0xfe, 0xc7, 0xac, 0x16, 0xba, - 0x0c, 0xfd, 0x94, 0x21, 0xb8, 0xa4, 0x02, 0x36, 0x3e, 0x9c, 0xc7, 0x54, 0x28, 0xce, 0x8a, 0x77, - 0x4e, 0x14, 0x61, 0x59, 0x9d, 0x19, 0xa4, 0x55, 0x9b, 0x15, 0xfa, 0xd6, 0x8a, 0xda, 0x89, 0x04, - 0xd6, 0xe6, 0xcb, 0x1c, 0x49, 0x50, 0xe3, 0x06, 0x69, 0xb2, 0x10, 0xc7, 0x44, 0xd0, 0x6b, 0xd0, - 0x1b, 0xd6, 0x09, 0x69, 0x0a, 0x8b, 0x83, 0x4c, 0x29, 0x67, 0x85, 0x22, 0x08, 0x4a, 0x4c, 0x2a, - 0xc2, 0x0a, 0x30, 0xaf, 0x68, 0xff, 0x92, 0x05, 0xc0, 0x2d, 0xf8, 0x1c, 0x6f, 0x83, 0x1c, 0x82, - 0x62, 0x60, 0x01, 0x7a, 0xc2, 0x26, 0xa9, 0xb6, 0xb3, 0xf6, 0x8f, 0xfb, 0x53, 0x69, 0x92, 0x6a, - 0xbc, 0x66, 0xe9, 0x3f, 0xcc, 0x6a, 0xdb, 0xdf, 0x0f, 0x30, 0x1a, 0xa3, 0x2d, 0x47, 0xa4, 0x81, - 0x9e, 0x31, 0xa2, 0xdc, 0x9c, 0x48, 0x44, 0xb9, 0x19, 0x64, 0xd8, 0x9a, 0x0c, 0xfa, 0xd3, 0x50, - 0x6c, 0x38, 0x77, 0x84, 0x90, 0xf1, 0xa9, 0xf6, 0xdd, 0xa0, 0xf4, 0x67, 0x56, 0x9c, 0x3b, 0xfc, - 0x1d, 0xfe, 0x94, 0xdc, 0x63, 0x2b, 0xce, 0x9d, 0x8e, 0x16, 0xe9, 0xb4, 0x11, 0xd6, 0x96, 0xeb, - 0x09, 0xe3, 0xb4, 0xae, 0xda, 0x72, 0xbd, 0x64, 0x5b, 0xae, 0xd7, 0x45, 0x5b, 0xae, 0x87, 0xee, - 0x42, 0xbf, 0xb0, 0x1d, 0x15, 0xe1, 0xf7, 0xce, 0x77, 0xd1, 0x9e, 0x30, 0x3d, 0xe5, 0x6d, 0x9e, - 0x97, 0x72, 0x06, 0x51, 0xda, 0xb1, 0x5d, 0xd9, 0x20, 0xfa, 0x3b, 0x16, 0x8c, 0x8a, 0xdf, 0x98, - 0xbc, 0xdd, 0x22, 0x61, 0x24, 0xf8, 0xf0, 0x0f, 0x75, 0xdf, 0x07, 0x51, 0x91, 0x77, 0xe5, 0x43, - 0xf2, 0xca, 0x34, 0x81, 0x1d, 0x7b, 0x94, 0xe8, 0x05, 0xfa, 0x45, 0x0b, 0x8e, 0x34, 0x9c, 0x3b, - 0xbc, 0x45, 0x5e, 0x86, 0x9d, 0xc8, 0xf5, 0x85, 0x0d, 0xc6, 0x2b, 0xdd, 0x4d, 0x7f, 0xaa, 0x3a, - 0xef, 0xa4, 0x54, 0xb8, 0x1e, 0xc9, 0x42, 0xe9, 0xd8, 0xd5, 0xcc, 0x7e, 0x4d, 0xaf, 0xc3, 0x80, - 0x5c, 0x6f, 0x0f, 0xd2, 0x30, 0x9e, 0xb5, 0x23, 0xd6, 0xda, 0x03, 0x6d, 0xe7, 0xd3, 0x30, 0xac, - 0xaf, 0xb1, 0x07, 0xda, 0xd6, 0xdb, 0x30, 0x99, 0xb1, 0x96, 0x1e, 0x68, 0x93, 0xb7, 0xe1, 0x44, - 0xee, 0xfa, 0x78, 0xa0, 0x8e, 0x0d, 0x5f, 0xb5, 0xf4, 0x73, 0xf0, 0x10, 0xb4, 0x33, 0xf3, 0xa6, - 0x76, 0xe6, 0x74, 0xfb, 0x9d, 0x93, 0xa3, 0xa2, 0x79, 0x4b, 0xef, 0x34, 0x3d, 0xd5, 0xd1, 0xeb, - 0xd0, 0x57, 0xa7, 0x25, 0xd2, 0x02, 0xd9, 0xee, 0xbc, 0x23, 0x63, 0xbe, 0x98, 0x95, 0x87, 0x58, - 0x50, 0xb0, 0xbf, 0x64, 0x41, 0x86, 0x6b, 0x06, 0xe5, 0x93, 0x5a, 0x6e, 0x8d, 0x0d, 0x49, 0x31, - 0xe6, 0x93, 0x54, 0x10, 0x98, 0x53, 0x50, 0xdc, 0x70, 0x6b, 0xc2, 0xb3, 0x58, 0x81, 0x2f, 0x51, - 0xf0, 0x86, 0x5b, 0x43, 0x4b, 0x80, 0xc2, 0x56, 0xb3, 0x59, 0x67, 0x66, 0x4b, 0x4e, 0xfd, 0x52, - 0xe0, 0xb7, 0x9a, 0xdc, 0xdc, 0xb8, 0xc8, 0x85, 0x44, 0x95, 0x14, 0x14, 0x67, 0xd4, 0xb0, 0x7f, - 0xd5, 0x82, 0x9e, 0x43, 0x98, 0x26, 0x6c, 0x4e, 0xd3, 0x33, 0xb9, 0xa4, 0x45, 0xd6, 0x86, 0x19, - 0xec, 0xdc, 0x5e, 0xbc, 0x13, 0x11, 0x2f, 0x64, 0x0c, 0x47, 0xe6, 0xac, 0xed, 0x5a, 0x30, 0x79, - 0xd5, 0x77, 0x6a, 0x73, 0x4e, 0xdd, 0xf1, 0xaa, 0x24, 0x58, 0xf6, 0x36, 0x0e, 0x64, 0xdb, 0x5f, - 0xe8, 0x68, 0xdb, 0x7f, 0x11, 0xfa, 0xdc, 0xa6, 0x16, 0xf6, 0xfd, 0x0c, 0x9d, 0xdd, 0xe5, 0xb2, - 0x88, 0xf8, 0x8e, 0x8c, 0xc6, 0x59, 0x29, 0x16, 0xf8, 0x74, 0x59, 0x72, 0xa3, 0xba, 0x9e, 0xfc, - 0x65, 0x49, 0xdf, 0x3a, 0xc9, 0x70, 0x66, 0x86, 0xf9, 0xf7, 0x26, 0x18, 0x4d, 0x08, 0x0f, 0x46, - 0x0c, 0xfd, 0x2e, 0xff, 0x52, 0xb1, 0x36, 0x1f, 0xcf, 0x7e, 0x83, 0xa4, 0x06, 0x46, 0xf3, 0xcd, - 0xe3, 0x05, 0x58, 0x12, 0xb2, 0x2f, 0x42, 0x66, 0xf8, 0x99, 0xce, 0xf2, 0x25, 0xfb, 0x63, 0x30, - 0xc1, 0x6a, 0x1e, 0x50, 0x76, 0x63, 0x27, 0xa4, 0xe2, 0x19, 0x11, 0x7c, 0xed, 0xff, 0x6c, 0x01, - 0x5a, 0xf1, 0x6b, 0xee, 0xfa, 0x8e, 0x20, 0xce, 0xbf, 0xff, 0x6d, 0x28, 0xf1, 0xc7, 0x71, 0x32, - 0xca, 0xed, 0x7c, 0xdd, 0x09, 0x43, 0x4d, 0x22, 0xff, 0xb8, 0x68, 0xb7, 0xb4, 0xd6, 0x1e, 0x1d, - 0x77, 0xa2, 0x87, 0xde, 0x48, 0x04, 0x1d, 0xfc, 0x70, 0x2a, 0xe8, 0xe0, 0xe3, 0x99, 0x76, 0x31, - 0xe9, 0xde, 0xcb, 0x60, 0x84, 0xf6, 0xe7, 0x2d, 0x18, 0x5b, 0x4d, 0x44, 0x6d, 0x3d, 0xcb, 0x8c, - 0x04, 0x32, 0x34, 0x4d, 0x15, 0x56, 0x8a, 0x05, 0xf4, 0xbe, 0x4b, 0x62, 0xff, 0xc6, 0x82, 0x38, - 0xdc, 0xd5, 0x21, 0xb0, 0xdc, 0xf3, 0x06, 0xcb, 0x9d, 0xf9, 0x7c, 0x51, 0xdd, 0xc9, 0xe3, 0xb8, - 0xd1, 0x15, 0x35, 0x27, 0x6d, 0x5e, 0x2e, 0x31, 0x19, 0xbe, 0xcf, 0x46, 0xcd, 0x89, 0x53, 0xb3, - 0xf1, 0xf5, 0x02, 0x20, 0x85, 0xdb, 0x75, 0xa0, 0xca, 0x74, 0x8d, 0xfb, 0x13, 0xa8, 0x72, 0x1b, - 0x10, 0x33, 0x73, 0x09, 0x1c, 0x2f, 0xe4, 0x64, 0x5d, 0x21, 0x7b, 0x3e, 0x98, 0x0d, 0xcd, 0xb4, - 0xf4, 0x5c, 0xbd, 0x9a, 0xa2, 0x86, 0x33, 0x5a, 0xd0, 0xcc, 0x97, 0x7a, 0xbb, 0x35, 0x5f, 0xea, - 0xeb, 0xe0, 0x82, 0xfd, 0x15, 0x0b, 0x46, 0xd4, 0x30, 0xbd, 0x4b, 0x5c, 0x40, 0x54, 0x7f, 0x72, - 0xee, 0x95, 0xb2, 0xd6, 0x65, 0xc6, 0x0c, 0x7c, 0x07, 0x73, 0xa5, 0x77, 0xea, 0xee, 0x5d, 0xa2, - 0xe2, 0x29, 0x97, 0x84, 0x6b, 0xbc, 0x28, 0xdd, 0xdf, 0x2d, 0x8d, 0xa8, 0x7f, 0x3c, 0x82, 0x6b, - 0x5c, 0xc5, 0xfe, 0x69, 0xba, 0xd9, 0xcd, 0xa5, 0x88, 0x5e, 0x80, 0xde, 0xe6, 0xa6, 0x13, 0x92, - 0x84, 0xab, 0x5c, 0x6f, 0x99, 0x16, 0xee, 0xef, 0x96, 0x46, 0x55, 0x05, 0x56, 0x82, 0x39, 0x76, - 0xf7, 0xe1, 0x3f, 0xd3, 0x8b, 0xb3, 0x63, 0xf8, 0xcf, 0xbf, 0xb4, 0xa0, 0x67, 0x95, 0xde, 0x5e, - 0x0f, 0xfe, 0x08, 0x78, 0xd5, 0x38, 0x02, 0x4e, 0xe6, 0x65, 0x16, 0xca, 0xdd, 0xfd, 0x4b, 0x89, - 0xdd, 0x7f, 0x3a, 0x97, 0x42, 0xfb, 0x8d, 0xdf, 0x80, 0x21, 0x96, 0xaf, 0x48, 0xb8, 0x05, 0x3e, - 0x67, 0x6c, 0xf8, 0x52, 0x62, 0xc3, 0x8f, 0x69, 0xa8, 0xda, 0x4e, 0x7f, 0x02, 0xfa, 0x85, 0x9f, - 0x59, 0x32, 0x22, 0x81, 0xc0, 0xc5, 0x12, 0x6e, 0xff, 0x64, 0x11, 0x8c, 0xfc, 0x48, 0xe8, 0xd7, - 0x2d, 0x98, 0x09, 0xb8, 0xfd, 0x79, 0x6d, 0xa1, 0x15, 0xb8, 0xde, 0x46, 0xa5, 0xba, 0x49, 0x6a, - 0xad, 0xba, 0xeb, 0x6d, 0x2c, 0x6f, 0x78, 0xbe, 0x2a, 0x5e, 0xbc, 0x43, 0xaa, 0x2d, 0xa6, 0x1b, - 0xee, 0x90, 0x8c, 0x49, 0xf9, 0x71, 0x3c, 0xbb, 0xb7, 0x5b, 0x9a, 0xc1, 0x07, 0xa2, 0x8d, 0x0f, - 0xd8, 0x17, 0xf4, 0x7b, 0x16, 0x9c, 0xe7, 0x79, 0x7a, 0xba, 0xef, 0x7f, 0x1b, 0x09, 0x47, 0x59, - 0x92, 0x8a, 0x89, 0xac, 0x91, 0xa0, 0x31, 0xf7, 0xa2, 0x18, 0xd0, 0xf3, 0xe5, 0x83, 0xb5, 0x85, - 0x0f, 0xda, 0x39, 0xfb, 0x5f, 0x14, 0x61, 0x44, 0x84, 0x89, 0x14, 0x77, 0xc0, 0x0b, 0xc6, 0x92, - 0x78, 0x38, 0xb1, 0x24, 0x26, 0x0c, 0xe4, 0xfb, 0x73, 0xfc, 0x87, 0x30, 0x41, 0x0f, 0xe7, 0xcb, - 0xc4, 0x09, 0xa2, 0x5b, 0xc4, 0xe1, 0x56, 0x89, 0xc5, 0x03, 0x9f, 0xfe, 0x4a, 0x3c, 0x7e, 0x35, - 0x49, 0x0c, 0xa7, 0xe9, 0xbf, 0x97, 0xee, 0x1c, 0x0f, 0xc6, 0x53, 0x91, 0x3e, 0xdf, 0x84, 0x41, - 0xe5, 0x24, 0x25, 0x0e, 0x9d, 0xf6, 0x01, 0x73, 0x93, 0x14, 0xb8, 0xd0, 0x33, 0x76, 0xd0, 0x8b, - 0xc9, 0xd9, 0xff, 0xa4, 0x60, 0x34, 0xc8, 0x27, 0x71, 0x15, 0x06, 0x9c, 0x90, 0x05, 0xf1, 0xae, - 0xb5, 0x93, 0x4b, 0xa7, 0x9a, 0x61, 0x8e, 0x6a, 0xb3, 0xa2, 0x26, 0x56, 0x34, 0xd0, 0x65, 0x6e, - 0xfb, 0xb9, 0x4d, 0xda, 0x09, 0xa5, 0x53, 0xd4, 0x40, 0x5a, 0x87, 0x6e, 0x13, 0x2c, 0xea, 0xa3, - 0x4f, 0x70, 0xe3, 0xdc, 0x2b, 0x9e, 0x7f, 0xdb, 0xbb, 0xe4, 0xfb, 0x32, 0x24, 0x50, 0x77, 0x04, - 0x27, 0xa4, 0x49, 0xae, 0xaa, 0x8e, 0x4d, 0x6a, 0xdd, 0x85, 0xce, 0xfe, 0x0c, 0xb0, 0xbc, 0x24, - 0x66, 0x4c, 0x82, 0x10, 0x11, 0x18, 0x13, 0x31, 0x48, 0x65, 0x99, 0x18, 0xbb, 0xcc, 0xe7, 0xb7, - 0x59, 0x3b, 0xd6, 0xe3, 0x5c, 0x31, 0x49, 0xe0, 0x24, 0x4d, 0x7b, 0x93, 0x1f, 0xc2, 0x4b, 0xc4, - 0x89, 0x5a, 0x01, 0x09, 0xd1, 0x47, 0x61, 0x2a, 0xfd, 0x32, 0x16, 0xea, 0x10, 0x8b, 0x71, 0xcf, - 0x27, 0xf7, 0x76, 0x4b, 0x53, 0x95, 0x1c, 0x1c, 0x9c, 0x5b, 0xdb, 0xfe, 0x59, 0x0b, 0x98, 0x27, - 0xf8, 0x21, 0x70, 0x3e, 0x1f, 0x31, 0x39, 0x9f, 0xa9, 0xbc, 0xe9, 0xcc, 0x61, 0x7a, 0x9e, 0xe7, - 0x6b, 0xb8, 0x1c, 0xf8, 0x77, 0x76, 0x84, 0xed, 0x56, 0xe7, 0x67, 0x9c, 0xfd, 0x45, 0x0b, 0x58, - 0x12, 0x1f, 0xcc, 0x5f, 0xed, 0x52, 0xc1, 0xd1, 0xd9, 0x2c, 0xe1, 0xa3, 0x30, 0xb0, 0x2e, 0x86, - 0x3f, 0x43, 0xe8, 0x64, 0x74, 0xd8, 0xa4, 0x2d, 0x27, 0x4d, 0x78, 0x74, 0x8a, 0x7f, 0x58, 0x51, - 0xb3, 0xff, 0xb1, 0x05, 0xd3, 0xf9, 0xd5, 0xd0, 0x75, 0x38, 0x1e, 0x90, 0x6a, 0x2b, 0x08, 0xe9, - 0x96, 0x10, 0x0f, 0x20, 0xe1, 0x14, 0xc5, 0xa7, 0xfa, 0xa1, 0xbd, 0xdd, 0xd2, 0x71, 0x9c, 0x8d, - 0x82, 0xf3, 0xea, 0xa2, 0x97, 0x60, 0xb4, 0x15, 0x72, 0xce, 0x8f, 0x31, 0x5d, 0xa1, 0x88, 0x14, - 0xcd, 0xfc, 0x86, 0xae, 0x1b, 0x10, 0x9c, 0xc0, 0xb4, 0xbf, 0x8b, 0x2f, 0x47, 0x15, 0x2c, 0xba, - 0x01, 0x13, 0x9e, 0xf6, 0x9f, 0xde, 0x80, 0xf2, 0xa9, 0xff, 0x68, 0xa7, 0x5b, 0x9f, 0x5d, 0x97, - 0x9a, 0xaf, 0x7a, 0x82, 0x0c, 0x4e, 0x53, 0xb6, 0x7f, 0xca, 0x82, 0xe3, 0x3a, 0xa2, 0xe6, 0x0e, - 0xd7, 0x49, 0x97, 0xb7, 0x00, 0x03, 0x7e, 0x93, 0x04, 0x4e, 0xe4, 0x07, 0xe2, 0x9a, 0x3b, 0x27, - 0x57, 0xe8, 0x35, 0x51, 0xbe, 0x2f, 0x92, 0xd7, 0x48, 0xea, 0xb2, 0x1c, 0xab, 0x9a, 0xc8, 0x86, - 0x3e, 0x26, 0x40, 0x0c, 0x85, 0xe3, 0x23, 0x3b, 0xb4, 0x98, 0x7d, 0x4a, 0x88, 0x05, 0xc4, 0xfe, - 0x33, 0x8b, 0xaf, 0x4f, 0xbd, 0xeb, 0xe8, 0x6d, 0x18, 0x6f, 0x38, 0x51, 0x75, 0x73, 0xf1, 0x4e, - 0x33, 0xe0, 0x2a, 0x5a, 0x39, 0x4e, 0x4f, 0x75, 0x1a, 0x27, 0xed, 0x23, 0x63, 0x03, 0xe9, 0x95, - 0x04, 0x31, 0x9c, 0x22, 0x8f, 0x6e, 0xc1, 0x10, 0x2b, 0x63, 0x3e, 0xbd, 0x61, 0x3b, 0x5e, 0x26, - 0xaf, 0x35, 0x65, 0xe2, 0xb3, 0x12, 0xd3, 0xc1, 0x3a, 0x51, 0xfb, 0xcb, 0x45, 0x7e, 0x68, 0xb0, - 0xb7, 0xc7, 0x13, 0xd0, 0xdf, 0xf4, 0x6b, 0xf3, 0xcb, 0x0b, 0x58, 0xcc, 0x82, 0xba, 0xf7, 0xca, - 0xbc, 0x18, 0x4b, 0x38, 0x3a, 0x07, 0x03, 0xe2, 0xa7, 0x54, 0xa9, 0xb3, 0x3d, 0x22, 0xf0, 0x42, - 0xac, 0xa0, 0xe8, 0x59, 0x80, 0x66, 0xe0, 0x6f, 0xbb, 0x35, 0x16, 0x89, 0xa9, 0x68, 0x5a, 0xe7, - 0x95, 0x15, 0x04, 0x6b, 0x58, 0xe8, 0x65, 0x18, 0x69, 0x79, 0x21, 0xe7, 0x9f, 0xb4, 0x78, 0xf7, - 0xca, 0x6e, 0xec, 0xba, 0x0e, 0xc4, 0x26, 0x2e, 0x9a, 0x85, 0xbe, 0xc8, 0x61, 0xd6, 0x66, 0xbd, - 0xf9, 0x46, 0xf4, 0x6b, 0x14, 0x43, 0xcf, 0x2c, 0x47, 0x2b, 0x60, 0x51, 0x11, 0xbd, 0x29, 0xdd, - 0xeb, 0xf9, 0x4d, 0x24, 0xbc, 0x57, 0xba, 0xbb, 0xb5, 0x34, 0xe7, 0x7a, 0xe1, 0x15, 0x63, 0xd0, - 0x42, 0x2f, 0x01, 0x90, 0x3b, 0x11, 0x09, 0x3c, 0xa7, 0xae, 0x6c, 0x44, 0x15, 0x23, 0xb3, 0xe0, - 0xaf, 0xfa, 0xd1, 0xf5, 0x90, 0x2c, 0x2a, 0x0c, 0xac, 0x61, 0xdb, 0xdf, 0x3f, 0x04, 0x10, 0x3f, - 0x34, 0xd0, 0x5d, 0x18, 0xa8, 0x3a, 0x4d, 0xa7, 0xca, 0xd3, 0xa6, 0x16, 0xf3, 0xbc, 0x9e, 0xe3, - 0x1a, 0x33, 0xf3, 0x02, 0x9d, 0x2b, 0x6f, 0x64, 0xc8, 0xf0, 0x01, 0x59, 0xdc, 0x51, 0x61, 0xa3, - 0xda, 0x43, 0x9f, 0xb3, 0x60, 0x48, 0x44, 0x3a, 0x62, 0x33, 0x54, 0xc8, 0xd7, 0xb7, 0x69, 0xed, - 0xcf, 0xc6, 0x35, 0x78, 0x17, 0x9e, 0x93, 0x2b, 0x54, 0x83, 0x74, 0xec, 0x85, 0xde, 0x30, 0xfa, - 0xa0, 0x7c, 0xdb, 0x16, 0x8d, 0xa1, 0x54, 0x6f, 0xdb, 0x41, 0x76, 0xd5, 0xe8, 0xcf, 0xda, 0xeb, - 0xc6, 0xb3, 0xb6, 0x27, 0xdf, 0x7f, 0xd8, 0xe0, 0xb7, 0x3b, 0xbd, 0x68, 0x51, 0x59, 0x8f, 0x25, - 0xd2, 0x9b, 0xef, 0xf4, 0xaa, 0x3d, 0xec, 0x3a, 0xc4, 0x11, 0xf9, 0x34, 0x8c, 0xd5, 0x4c, 0xae, - 0x45, 0xac, 0xc4, 0xc7, 0xf3, 0xe8, 0x26, 0x98, 0x9c, 0x98, 0x4f, 0x49, 0x00, 0x70, 0x92, 0x30, - 0x2a, 0xf3, 0xd0, 0x32, 0xcb, 0xde, 0xba, 0x2f, 0x3c, 0xa8, 0xec, 0xdc, 0xb9, 0xdc, 0x09, 0x23, - 0xd2, 0xa0, 0x98, 0x31, 0x93, 0xb0, 0x2a, 0xea, 0x62, 0x45, 0x05, 0xbd, 0x0e, 0x7d, 0xcc, 0xeb, - 0x31, 0x9c, 0x1a, 0xc8, 0x57, 0x6b, 0x98, 0x91, 0x50, 0xe3, 0x0d, 0xc9, 0xfe, 0x86, 0x58, 0x50, - 0x40, 0x97, 0xa5, 0x4f, 0x71, 0xb8, 0xec, 0x5d, 0x0f, 0x09, 0xf3, 0x29, 0x1e, 0x9c, 0x7b, 0x34, - 0x76, 0x17, 0xe6, 0xe5, 0x99, 0xf9, 0x67, 0x8d, 0x9a, 0x94, 0xed, 0x13, 0xff, 0x65, 0x5a, 0x5b, - 0x11, 0xb7, 0x2d, 0xb3, 0x7b, 0x66, 0xea, 0xdb, 0x78, 0x38, 0x6f, 0x98, 0x24, 0x70, 0x92, 0x26, - 0x65, 0xa1, 0xf9, 0xae, 0x17, 0x3e, 0x58, 0x9d, 0xce, 0x0e, 0x2e, 0x39, 0x60, 0xb7, 0x11, 0x2f, - 0xc1, 0xa2, 0x3e, 0x72, 0x61, 0x2c, 0x30, 0xd8, 0x0b, 0x19, 0x6e, 0xed, 0x6c, 0x77, 0x4c, 0x8c, - 0x16, 0xc8, 0xdf, 0x24, 0x83, 0x93, 0x74, 0xd1, 0xeb, 0x1a, 0xa3, 0x34, 0xd2, 0xfe, 0xe5, 0xdf, - 0x89, 0x35, 0x9a, 0xde, 0x82, 0x11, 0xe3, 0xb0, 0x79, 0xa0, 0x2a, 0x48, 0x0f, 0xc6, 0x93, 0x27, - 0xcb, 0x03, 0xd5, 0x3c, 0xfe, 0x49, 0x0f, 0x8c, 0x9a, 0x3b, 0x01, 0x9d, 0x87, 0x41, 0x41, 0x44, - 0x65, 0xb4, 0x52, 0x9b, 0x7b, 0x45, 0x02, 0x70, 0x8c, 0xc3, 0x12, 0x99, 0xb1, 0xea, 0x9a, 0xaf, - 0x40, 0x9c, 0xc8, 0x4c, 0x41, 0xb0, 0x86, 0x45, 0x1f, 0xb0, 0xb7, 0x7c, 0x3f, 0x52, 0xf7, 0xa8, - 0xda, 0x2e, 0x73, 0xac, 0x14, 0x0b, 0x28, 0xbd, 0x3f, 0xb7, 0x48, 0xe0, 0x91, 0xba, 0x99, 0xd2, - 0x41, 0xdd, 0x9f, 0x57, 0x74, 0x20, 0x36, 0x71, 0x29, 0x17, 0xe0, 0x87, 0x6c, 0xff, 0x89, 0x67, - 0x72, 0xec, 0x7b, 0x51, 0xe1, 0x51, 0x24, 0x24, 0x1c, 0x7d, 0x0c, 0x8e, 0xab, 0xf0, 0x89, 0x62, - 0x75, 0xc9, 0x16, 0xfb, 0x0c, 0xa9, 0xd6, 0xf1, 0xf9, 0x6c, 0x34, 0x9c, 0x57, 0x1f, 0xbd, 0x0a, - 0xa3, 0xe2, 0x29, 0x25, 0x29, 0xf6, 0x9b, 0x86, 0x84, 0x57, 0x0c, 0x28, 0x4e, 0x60, 0xcb, 0xa4, - 0x14, 0xec, 0x8d, 0x21, 0x29, 0x0c, 0xa4, 0x93, 0x52, 0xe8, 0x70, 0x9c, 0xaa, 0x81, 0x66, 0x61, - 0x8c, 0xb3, 0x8e, 0xae, 0xb7, 0xc1, 0xe7, 0x44, 0x78, 0x76, 0xaa, 0x4d, 0x75, 0xcd, 0x04, 0xe3, - 0x24, 0x3e, 0xba, 0x08, 0xc3, 0x4e, 0x50, 0xdd, 0x74, 0x23, 0x52, 0xa5, 0x3b, 0x83, 0xd9, 0xf2, - 0x69, 0x96, 0x98, 0xb3, 0x1a, 0x0c, 0x1b, 0x98, 0xf6, 0x5d, 0x98, 0xcc, 0x08, 0x2f, 0x43, 0x17, - 0x8e, 0xd3, 0x74, 0xe5, 0x37, 0x25, 0xdc, 0x1d, 0x66, 0xcb, 0xcb, 0xf2, 0x6b, 0x34, 0x2c, 0xba, - 0x3a, 0x59, 0x18, 0x1a, 0x2d, 0xf9, 0xb6, 0x5a, 0x9d, 0x4b, 0x12, 0x80, 0x63, 0x1c, 0xfb, 0xaf, - 0x0a, 0x30, 0x96, 0xa1, 0xa0, 0x63, 0x09, 0xa0, 0x13, 0x2f, 0xad, 0x38, 0xdf, 0xb3, 0x99, 0xe3, - 0xa4, 0x70, 0x80, 0x1c, 0x27, 0xc5, 0x4e, 0x39, 0x4e, 0x7a, 0xde, 0x49, 0x8e, 0x13, 0x73, 0xc4, - 0x7a, 0xbb, 0x1a, 0xb1, 0x8c, 0xbc, 0x28, 0x7d, 0x07, 0xcc, 0x8b, 0x62, 0x0c, 0x7a, 0x7f, 0x17, - 0x83, 0xfe, 0xa3, 0x05, 0x18, 0x4f, 0xea, 0xf6, 0x0e, 0x41, 0x3e, 0xfe, 0xba, 0x21, 0x1f, 0x3f, - 0xd7, 0x8d, 0x27, 0x7e, 0xae, 0xac, 0x1c, 0x27, 0x64, 0xe5, 0x4f, 0x76, 0x45, 0xad, 0xbd, 0xdc, - 0xfc, 0xef, 0x17, 0xe0, 0x68, 0xa6, 0xca, 0xf3, 0x10, 0xc6, 0xe6, 0x9a, 0x31, 0x36, 0xcf, 0x74, - 0x1d, 0xa5, 0x20, 0x77, 0x80, 0x6e, 0x26, 0x06, 0xe8, 0x7c, 0xf7, 0x24, 0xdb, 0x8f, 0xd2, 0x37, - 0x8a, 0x70, 0x3a, 0xb3, 0x5e, 0x2c, 0x5e, 0x5e, 0x32, 0xc4, 0xcb, 0xcf, 0x26, 0xc4, 0xcb, 0x76, - 0xfb, 0xda, 0xf7, 0x47, 0xde, 0x2c, 0xbc, 0xf5, 0x59, 0xcc, 0x91, 0x7b, 0x94, 0x35, 0x1b, 0xde, - 0xfa, 0x8a, 0x10, 0x36, 0xe9, 0xbe, 0x97, 0x64, 0xcc, 0xbf, 0x6b, 0xc1, 0x89, 0xcc, 0xb9, 0x39, - 0x04, 0x49, 0xdf, 0xaa, 0x29, 0xe9, 0x7b, 0xa2, 0xeb, 0xd5, 0x9a, 0x23, 0xfa, 0xfb, 0x7c, 0x5f, - 0xce, 0xb7, 0x30, 0x01, 0xc4, 0x35, 0x18, 0x72, 0xaa, 0x55, 0x12, 0x86, 0x2b, 0x7e, 0x4d, 0xa5, - 0x43, 0x78, 0x86, 0x3d, 0x0f, 0xe3, 0xe2, 0xfd, 0xdd, 0xd2, 0x74, 0x92, 0x44, 0x0c, 0xc6, 0x3a, - 0x05, 0xf4, 0x09, 0x18, 0x08, 0x65, 0x26, 0xcb, 0x9e, 0x7b, 0xcf, 0x64, 0xc9, 0x98, 0x5c, 0x25, - 0x60, 0x51, 0x24, 0xd1, 0x77, 0xea, 0xd1, 0x9f, 0xda, 0x88, 0x16, 0x79, 0x27, 0xef, 0x21, 0x06, - 0xd4, 0xb3, 0x00, 0xdb, 0xea, 0x25, 0x93, 0x14, 0x9e, 0x68, 0x6f, 0x1c, 0x0d, 0x0b, 0xbd, 0x06, - 0xe3, 0x21, 0x0f, 0x7c, 0x1a, 0x1b, 0xa9, 0xf0, 0xb5, 0xc8, 0x62, 0xc7, 0x55, 0x12, 0x30, 0x9c, - 0xc2, 0x46, 0x4b, 0xb2, 0x55, 0x66, 0x8e, 0xc4, 0x97, 0xe7, 0xd9, 0xb8, 0x45, 0x61, 0x92, 0x74, - 0x24, 0x39, 0x09, 0x6c, 0xf8, 0xb5, 0x9a, 0xe8, 0x13, 0x00, 0x74, 0x11, 0x09, 0x21, 0x4a, 0x7f, - 0xfe, 0x11, 0x4a, 0xcf, 0x96, 0x5a, 0xa6, 0x27, 0x03, 0x73, 0xb3, 0x5f, 0x50, 0x44, 0xb0, 0x46, - 0x10, 0x39, 0x30, 0x12, 0xff, 0x8b, 0x73, 0xb4, 0x9f, 0xcb, 0x6d, 0x21, 0x49, 0x9c, 0x29, 0x18, - 0x16, 0x74, 0x12, 0xd8, 0xa4, 0x88, 0x3e, 0x0e, 0x27, 0xb6, 0x73, 0x2d, 0x7f, 0x38, 0x27, 0xc8, - 0x92, 0xae, 0xe7, 0xdb, 0xfb, 0xe4, 0xd7, 0xb7, 0xff, 0x2d, 0xc0, 0x43, 0x6d, 0x4e, 0x7a, 0x34, - 0x6b, 0x6a, 0xed, 0x9f, 0x4a, 0x4a, 0x36, 0xa6, 0x33, 0x2b, 0x1b, 0xa2, 0x8e, 0xc4, 0x86, 0x2a, - 0xbc, 0xe3, 0x0d, 0xf5, 0x43, 0x96, 0x26, 0x73, 0xe2, 0x36, 0xdd, 0x1f, 0x39, 0xe0, 0x0d, 0x76, - 0x1f, 0x85, 0x50, 0xeb, 0x19, 0x92, 0x9c, 0x67, 0xbb, 0xee, 0x4e, 0xf7, 0xa2, 0x9d, 0xaf, 0x66, - 0x07, 0x7c, 0xe7, 0x42, 0x9e, 0x4b, 0x07, 0xfd, 0xfe, 0xc3, 0x0a, 0xfe, 0xfe, 0x75, 0x0b, 0x4e, - 0xa4, 0x8a, 0x79, 0x1f, 0x48, 0x28, 0xa2, 0xdd, 0xad, 0xbe, 0xe3, 0xce, 0x4b, 0x82, 0xfc, 0x1b, - 0x2e, 0x8b, 0x6f, 0x38, 0x91, 0x8b, 0x97, 0xec, 0xfa, 0x17, 0xfe, 0xb8, 0x34, 0xc9, 0x1a, 0x30, - 0x11, 0x71, 0x7e, 0xd7, 0x51, 0x13, 0xce, 0x54, 0x5b, 0x41, 0x10, 0x2f, 0xd6, 0x8c, 0xcd, 0xc9, - 0xdf, 0x7a, 0x8f, 0xee, 0xed, 0x96, 0xce, 0xcc, 0x77, 0xc0, 0xc5, 0x1d, 0xa9, 0x21, 0x0f, 0x50, - 0x23, 0x65, 0x5f, 0xc7, 0x0e, 0x80, 0x1c, 0x39, 0x4c, 0xda, 0x1a, 0x8f, 0x5b, 0xca, 0x66, 0x58, - 0xe9, 0x65, 0x50, 0x3e, 0x5c, 0xe9, 0xc9, 0xb7, 0x26, 0x2e, 0xfd, 0xf4, 0x55, 0x38, 0xdd, 0x7e, - 0x31, 0x1d, 0x28, 0x94, 0xc3, 0x1f, 0x58, 0x70, 0xaa, 0x6d, 0xbc, 0xb0, 0x6f, 0xc3, 0xc7, 0x82, - 0xfd, 0x59, 0x0b, 0x1e, 0xce, 0xac, 0x91, 0x74, 0xc2, 0xab, 0xd2, 0x42, 0xcd, 0x1c, 0x35, 0x8e, - 0x9c, 0x23, 0x01, 0x38, 0xc6, 0x31, 0x2c, 0x36, 0x0b, 0x1d, 0x2d, 0x36, 0x7f, 0xcb, 0x82, 0xd4, - 0x55, 0x7f, 0x08, 0x9c, 0xe7, 0xb2, 0xc9, 0x79, 0x3e, 0xda, 0xcd, 0x68, 0xe6, 0x30, 0x9d, 0x7f, - 0x31, 0x06, 0xc7, 0x72, 0x3c, 0xb1, 0xb7, 0x61, 0x62, 0xa3, 0x4a, 0xcc, 0xd0, 0x1b, 0xed, 0x42, - 0xd2, 0xb5, 0x8d, 0xd3, 0x31, 0x77, 0x74, 0x6f, 0xb7, 0x34, 0x91, 0x42, 0xc1, 0xe9, 0x26, 0xd0, - 0x67, 0x2d, 0x38, 0xe2, 0xdc, 0x0e, 0x17, 0xe9, 0x0b, 0xc2, 0xad, 0xce, 0xd5, 0xfd, 0xea, 0x16, - 0x65, 0xcc, 0xe4, 0xb6, 0x7a, 0x3e, 0x53, 0x18, 0x7d, 0xb3, 0x92, 0xc2, 0x37, 0x9a, 0x9f, 0xda, - 0xdb, 0x2d, 0x1d, 0xc9, 0xc2, 0xc2, 0x99, 0x6d, 0x21, 0x2c, 0x32, 0x7e, 0x39, 0xd1, 0x66, 0xbb, - 0xe0, 0x30, 0x59, 0x2e, 0xf3, 0x9c, 0x25, 0x96, 0x10, 0xac, 0xe8, 0xa0, 0x4f, 0xc1, 0xe0, 0x86, - 0x8c, 0x03, 0x91, 0xc1, 0x72, 0xc7, 0x03, 0xd9, 0x3e, 0x3a, 0x06, 0x37, 0x81, 0x51, 0x48, 0x38, - 0x26, 0x8a, 0x5e, 0x85, 0xa2, 0xb7, 0x1e, 0x8a, 0x10, 0x75, 0xd9, 0x96, 0xb8, 0xa6, 0xad, 0x33, - 0x0f, 0xc1, 0xb4, 0xba, 0x54, 0xc1, 0xb4, 0x22, 0xba, 0x0c, 0xc5, 0xe0, 0x56, 0x4d, 0x68, 0x52, - 0x32, 0x37, 0x29, 0x9e, 0x5b, 0xc8, 0xe9, 0x15, 0xa3, 0x84, 0xe7, 0x16, 0x30, 0x25, 0x81, 0xca, - 0xd0, 0xcb, 0xdc, 0x97, 0x05, 0x6b, 0x9b, 0xf9, 0x94, 0x6f, 0x13, 0x06, 0x80, 0x7b, 0x24, 0x32, - 0x04, 0xcc, 0x09, 0xa1, 0x35, 0xe8, 0xab, 0xba, 0x5e, 0x8d, 0x04, 0x82, 0x97, 0xfd, 0x60, 0xa6, - 0xce, 0x84, 0x61, 0xe4, 0xd0, 0xe4, 0x2a, 0x04, 0x86, 0x81, 0x05, 0x2d, 0x46, 0x95, 0x34, 0x37, - 0xd7, 0xe5, 0x8d, 0x95, 0x4d, 0x95, 0x34, 0x37, 0x97, 0x2a, 0x6d, 0xa9, 0x32, 0x0c, 0x2c, 0x68, - 0xa1, 0x97, 0xa0, 0xb0, 0x5e, 0x15, 0xae, 0xc9, 0x99, 0xca, 0x13, 0x33, 0x8a, 0xd6, 0x5c, 0xdf, - 0xde, 0x6e, 0xa9, 0xb0, 0x34, 0x8f, 0x0b, 0xeb, 0x55, 0xb4, 0x0a, 0xfd, 0xeb, 0x3c, 0xee, 0x8e, - 0xd0, 0x8f, 0x3c, 0x9e, 0x1d, 0x12, 0x28, 0x15, 0x9a, 0x87, 0x7b, 0x97, 0x0a, 0x00, 0x96, 0x44, - 0x58, 0x02, 0x2a, 0x15, 0x3f, 0x48, 0x84, 0x2f, 0x9d, 0x39, 0x58, 0xcc, 0x27, 0xfe, 0xd4, 0x88, - 0xa3, 0x10, 0x61, 0x8d, 0x22, 0x5d, 0xd5, 0xce, 0xdd, 0x56, 0xc0, 0x72, 0x5b, 0x08, 0xd5, 0x48, - 0xe6, 0xaa, 0x9e, 0x95, 0x48, 0xed, 0x56, 0xb5, 0x42, 0xc2, 0x31, 0x51, 0xb4, 0x05, 0x23, 0xdb, - 0x61, 0x73, 0x93, 0xc8, 0x2d, 0xcd, 0xc2, 0xde, 0xe5, 0x70, 0xb3, 0x37, 0x04, 0xa2, 0x1b, 0x44, - 0x2d, 0xa7, 0x9e, 0x3a, 0x85, 0xd8, 0xb3, 0xe6, 0x86, 0x4e, 0x0c, 0x9b, 0xb4, 0xe9, 0xf0, 0xbf, - 0xdd, 0xf2, 0x6f, 0xed, 0x44, 0x44, 0x44, 0x1d, 0xcd, 0x1c, 0xfe, 0x37, 0x38, 0x4a, 0x7a, 0xf8, - 0x05, 0x00, 0x4b, 0x22, 0xe8, 0x86, 0x18, 0x1e, 0x76, 0x7a, 0x8e, 0xe7, 0x87, 0x34, 0x9f, 0x95, - 0x48, 0x39, 0x83, 0xc2, 0x4e, 0xcb, 0x98, 0x14, 0x3b, 0x25, 0x9b, 0x9b, 0x7e, 0xe4, 0x7b, 0x89, - 0x13, 0x7a, 0x22, 0xff, 0x94, 0x2c, 0x67, 0xe0, 0xa7, 0x4f, 0xc9, 0x2c, 0x2c, 0x9c, 0xd9, 0x16, - 0xaa, 0xc1, 0x68, 0xd3, 0x0f, 0xa2, 0xdb, 0x7e, 0x20, 0xd7, 0x17, 0x6a, 0x23, 0x28, 0x35, 0x30, - 0x45, 0x8b, 0xcc, 0x30, 0xc7, 0x84, 0xe0, 0x04, 0x4d, 0xf4, 0x51, 0xe8, 0x0f, 0xab, 0x4e, 0x9d, - 0x2c, 0x5f, 0x9b, 0x9a, 0xcc, 0xbf, 0x7e, 0x2a, 0x1c, 0x25, 0x67, 0x75, 0xf1, 0xb0, 0x49, 0x1c, - 0x05, 0x4b, 0x72, 0x68, 0x09, 0x7a, 0x59, 0x62, 0x67, 0x16, 0x22, 0x37, 0x27, 0x32, 0x7b, 0xca, - 0xad, 0x86, 0x9f, 0x4d, 0xac, 0x18, 0xf3, 0xea, 0x74, 0x0f, 0x08, 0x49, 0x81, 0x1f, 0x4e, 0x1d, - 0xcd, 0xdf, 0x03, 0x42, 0xc0, 0x70, 0xad, 0xd2, 0x6e, 0x0f, 0x28, 0x24, 0x1c, 0x13, 0xa5, 0x27, - 0x33, 0x3d, 0x4d, 0x8f, 0xb5, 0x31, 0x99, 0xcc, 0x3d, 0x4b, 0xd9, 0xc9, 0x4c, 0x4f, 0x52, 0x4a, - 0xc2, 0xfe, 0x8d, 0x81, 0x34, 0xcf, 0xc2, 0x24, 0x4c, 0xff, 0xbf, 0x95, 0xb2, 0x99, 0xf8, 0x50, - 0xb7, 0x02, 0xef, 0xfb, 0xf8, 0x70, 0xfd, 0xac, 0x05, 0xc7, 0x9a, 0x99, 0x1f, 0x22, 0x18, 0x80, - 0xee, 0xe4, 0xe6, 0xfc, 0xd3, 0x55, 0x38, 0xe5, 0x6c, 0x38, 0xce, 0x69, 0x29, 0x29, 0x1c, 0x28, - 0xbe, 0x63, 0xe1, 0xc0, 0x0a, 0x0c, 0x54, 0xf9, 0x4b, 0x4e, 0xa6, 0x01, 0xe8, 0x2a, 0x18, 0x28, - 0x63, 0x25, 0xc4, 0x13, 0x70, 0x1d, 0x2b, 0x12, 0xe8, 0x87, 0x2d, 0x38, 0x95, 0xec, 0x3a, 0x26, - 0x0c, 0x2c, 0x0c, 0x26, 0xb9, 0x58, 0x6b, 0x49, 0x7c, 0x7f, 0x8a, 0xff, 0x37, 0x90, 0xf7, 0x3b, - 0x21, 0xe0, 0xf6, 0x8d, 0xa1, 0x85, 0x0c, 0xb9, 0x5a, 0x9f, 0xa9, 0x51, 0xec, 0x42, 0xb6, 0xf6, - 0x3c, 0x0c, 0x37, 0xfc, 0x96, 0x17, 0x09, 0xbb, 0x47, 0x61, 0x3c, 0xc5, 0x8c, 0x86, 0x56, 0xb4, - 0x72, 0x6c, 0x60, 0x25, 0x24, 0x72, 0x03, 0xf7, 0x2c, 0x91, 0x7b, 0x0b, 0x86, 0x3d, 0xcd, 0x25, - 0xa0, 0xdd, 0x0b, 0x56, 0x48, 0x17, 0x35, 0x6c, 0xde, 0x4b, 0xbd, 0x04, 0x1b, 0xd4, 0xda, 0x4b, - 0xcb, 0xe0, 0x9d, 0x49, 0xcb, 0x0e, 0xf5, 0x49, 0x6c, 0xff, 0x42, 0x21, 0xe3, 0xc5, 0xc0, 0xa5, - 0x72, 0xaf, 0x98, 0x52, 0xb9, 0xb3, 0x49, 0xa9, 0x5c, 0x4a, 0x55, 0x65, 0x08, 0xe4, 0xba, 0xcf, - 0x28, 0xd9, 0x75, 0x80, 0xe7, 0xef, 0xb5, 0xe0, 0x38, 0xd3, 0x7d, 0xd0, 0x06, 0xde, 0xb1, 0xbe, - 0x83, 0x99, 0xa4, 0x5e, 0xcd, 0x26, 0x87, 0xf3, 0xda, 0xb1, 0xeb, 0x70, 0xa6, 0xd3, 0xbd, 0xcb, - 0x2c, 0x7c, 0x6b, 0xca, 0x38, 0x22, 0xb6, 0xf0, 0xad, 0x2d, 0x2f, 0x60, 0x06, 0xe9, 0x36, 0x7c, - 0xa1, 0xfd, 0xdf, 0x2d, 0x28, 0x96, 0xfd, 0xda, 0x21, 0xbc, 0xe8, 0x3f, 0x62, 0xbc, 0xe8, 0x1f, - 0xca, 0xbe, 0xf1, 0x6b, 0xb9, 0xca, 0xbe, 0xc5, 0x84, 0xb2, 0xef, 0x54, 0x1e, 0x81, 0xf6, 0xaa, - 0xbd, 0x9f, 0x2e, 0xc2, 0x50, 0xd9, 0xaf, 0xa9, 0x7d, 0xf6, 0xaf, 0xee, 0xc5, 0x91, 0x27, 0x37, - 0xfb, 0x94, 0x46, 0x99, 0x59, 0xf4, 0xca, 0xb8, 0x13, 0xdf, 0x66, 0xfe, 0x3c, 0x37, 0x89, 0xbb, - 0xb1, 0x19, 0x91, 0x5a, 0xf2, 0x73, 0x0e, 0xcf, 0x9f, 0xe7, 0x9b, 0x45, 0x18, 0x4b, 0xb4, 0x8e, - 0xea, 0x30, 0x52, 0xd7, 0x55, 0x49, 0x62, 0x9d, 0xde, 0x93, 0x16, 0x4a, 0xf8, 0x43, 0x68, 0x45, - 0xd8, 0x24, 0x8e, 0x66, 0x00, 0x3c, 0xdd, 0x2a, 0x5c, 0x05, 0x2a, 0xd6, 0x2c, 0xc2, 0x35, 0x0c, - 0xf4, 0x02, 0x0c, 0x45, 0x7e, 0xd3, 0xaf, 0xfb, 0x1b, 0x3b, 0x57, 0x88, 0x8c, 0x6c, 0xa9, 0x8c, - 0x86, 0xd7, 0x62, 0x10, 0xd6, 0xf1, 0xd0, 0x1d, 0x98, 0x50, 0x44, 0x2a, 0xf7, 0x41, 0xbd, 0xc6, - 0xc4, 0x26, 0xab, 0x49, 0x8a, 0x38, 0xdd, 0x08, 0x7a, 0x09, 0x46, 0x99, 0xf5, 0x32, 0xab, 0x7f, - 0x85, 0xec, 0xc8, 0x88, 0xc7, 0x8c, 0xc3, 0x5e, 0x31, 0x20, 0x38, 0x81, 0x89, 0xe6, 0x61, 0xa2, - 0xe1, 0x86, 0x89, 0xea, 0x7d, 0xac, 0x3a, 0xeb, 0xc0, 0x4a, 0x12, 0x88, 0xd3, 0xf8, 0xf6, 0xcf, - 0x89, 0x39, 0xf6, 0x22, 0xf7, 0xfd, 0xed, 0xf8, 0xee, 0xde, 0x8e, 0xdf, 0xb0, 0x60, 0x9c, 0xb6, - 0xce, 0x4c, 0x32, 0x25, 0x23, 0xa5, 0x72, 0x62, 0x58, 0x6d, 0x72, 0x62, 0x9c, 0xa5, 0xc7, 0x76, - 0xcd, 0x6f, 0x45, 0x42, 0x3a, 0xaa, 0x9d, 0xcb, 0xb4, 0x14, 0x0b, 0xa8, 0xc0, 0x23, 0x41, 0x20, - 0xfc, 0xde, 0x75, 0x3c, 0x12, 0x04, 0x58, 0x40, 0x65, 0xca, 0x8c, 0x9e, 0xec, 0x94, 0x19, 0x3c, - 0xf2, 0xb9, 0xb0, 0x82, 0x13, 0x2c, 0xad, 0x16, 0xf9, 0x5c, 0x9a, 0xc7, 0xc5, 0x38, 0xf6, 0x57, - 0x8b, 0x30, 0x5c, 0xf6, 0x6b, 0xb1, 0x61, 0xc7, 0xf3, 0x86, 0x61, 0xc7, 0x99, 0x84, 0x61, 0xc7, - 0xb8, 0x8e, 0xfb, 0xbe, 0x19, 0xc7, 0xb7, 0xca, 0x8c, 0xe3, 0x37, 0x2d, 0x36, 0x6b, 0x0b, 0xab, - 0x15, 0x6e, 0xe1, 0x8b, 0x2e, 0xc0, 0x10, 0x3b, 0xe1, 0x58, 0xa0, 0x05, 0x69, 0xed, 0xc0, 0x52, - 0x58, 0xae, 0xc6, 0xc5, 0x58, 0xc7, 0x41, 0xe7, 0x60, 0x20, 0x24, 0x4e, 0x50, 0xdd, 0x54, 0xc7, - 0xbb, 0x30, 0x4d, 0xe0, 0x65, 0x58, 0x41, 0xd1, 0x1b, 0x71, 0xd0, 0xed, 0x62, 0xbe, 0xb9, 0xb0, - 0xde, 0x1f, 0xbe, 0x45, 0xf2, 0x23, 0x6d, 0xdb, 0x37, 0x01, 0xa5, 0xf1, 0xbb, 0xf0, 0xbf, 0x2a, - 0x99, 0x61, 0x61, 0x07, 0x53, 0x21, 0x61, 0xff, 0xda, 0x82, 0xd1, 0xb2, 0x5f, 0xa3, 0x5b, 0xf7, - 0xbd, 0xb4, 0x4f, 0xf5, 0x8c, 0x03, 0x7d, 0x6d, 0x32, 0x0e, 0x3c, 0x02, 0xbd, 0x65, 0xbf, 0xd6, - 0x21, 0x74, 0xed, 0x3f, 0xb0, 0xa0, 0xbf, 0xec, 0xd7, 0x0e, 0x41, 0xf1, 0xf2, 0x8a, 0xa9, 0x78, - 0x39, 0x9e, 0xb3, 0x6e, 0x72, 0x74, 0x2d, 0x7f, 0xaf, 0x07, 0x46, 0x68, 0x3f, 0xfd, 0x0d, 0x39, - 0x95, 0xc6, 0xb0, 0x59, 0x5d, 0x0c, 0x1b, 0x7d, 0x06, 0xf8, 0xf5, 0xba, 0x7f, 0x3b, 0x39, 0xad, - 0x4b, 0xac, 0x14, 0x0b, 0x28, 0x7a, 0x1a, 0x06, 0x9a, 0x01, 0xd9, 0x76, 0x7d, 0xc1, 0x5f, 0x6b, - 0x6a, 0xac, 0xb2, 0x28, 0xc7, 0x0a, 0x83, 0x3e, 0xbc, 0x43, 0xd7, 0xa3, 0xbc, 0x44, 0xd5, 0xf7, - 0x6a, 0x5c, 0x37, 0x51, 0x14, 0x69, 0xb1, 0xb4, 0x72, 0x6c, 0x60, 0xa1, 0x9b, 0x30, 0xc8, 0xfe, - 0xb3, 0x63, 0xa7, 0xf7, 0xc0, 0xc7, 0x8e, 0x48, 0x14, 0x2c, 0x08, 0xe0, 0x98, 0x16, 0x7a, 0x16, - 0x20, 0x92, 0xa9, 0x65, 0x42, 0x11, 0xc2, 0x54, 0xbd, 0x45, 0x54, 0xd2, 0x99, 0x10, 0x6b, 0x58, - 0xe8, 0x29, 0x18, 0x8c, 0x1c, 0xb7, 0x7e, 0xd5, 0xf5, 0x98, 0xfe, 0x9e, 0xf6, 0x5f, 0xe4, 0xeb, - 0x15, 0x85, 0x38, 0x86, 0x53, 0x5e, 0x90, 0xc5, 0x84, 0x9a, 0xdb, 0x89, 0x44, 0x6a, 0xba, 0x22, - 0xe7, 0x05, 0xaf, 0xaa, 0x52, 0xac, 0x61, 0xa0, 0x4d, 0x38, 0xe9, 0x7a, 0x2c, 0x85, 0x14, 0xa9, - 0x6c, 0xb9, 0xcd, 0xb5, 0xab, 0x95, 0x1b, 0x24, 0x70, 0xd7, 0x77, 0xe6, 0x9c, 0xea, 0x16, 0xf1, - 0x64, 0x42, 0xfc, 0x47, 0x45, 0x17, 0x4f, 0x2e, 0xb7, 0xc1, 0xc5, 0x6d, 0x29, 0xd9, 0xcf, 0xb1, - 0xf5, 0x7e, 0xad, 0x82, 0x9e, 0x34, 0x8e, 0x8e, 0x63, 0xfa, 0xd1, 0xb1, 0xbf, 0x5b, 0xea, 0xbb, - 0x56, 0xd1, 0x62, 0xff, 0x5c, 0x84, 0xa3, 0x65, 0xbf, 0x56, 0xf6, 0x83, 0x68, 0xc9, 0x0f, 0x6e, - 0x3b, 0x41, 0x4d, 0x2e, 0xaf, 0x92, 0x8c, 0x7e, 0x44, 0xcf, 0xcf, 0x5e, 0x7e, 0xba, 0x18, 0x91, - 0x8d, 0x9e, 0x63, 0x1c, 0xdb, 0x01, 0x9d, 0x4d, 0xab, 0x8c, 0x77, 0x50, 0x49, 0xd8, 0x2e, 0x39, - 0x11, 0x41, 0xd7, 0x60, 0xa4, 0xaa, 0x5f, 0xa3, 0xa2, 0xfa, 0x13, 0xf2, 0x22, 0x33, 0xee, 0xd8, - 0xcc, 0x7b, 0xd7, 0xac, 0x6f, 0x7f, 0xdd, 0x12, 0xad, 0x70, 0x49, 0x04, 0xb7, 0x69, 0xed, 0x7c, - 0x9e, 0xce, 0xc3, 0x44, 0xa0, 0x57, 0xd1, 0x6c, 0xc3, 0x8e, 0xf2, 0xac, 0x36, 0x09, 0x20, 0x4e, - 0xe3, 0xa3, 0x8f, 0xc3, 0x09, 0xa3, 0x50, 0xaa, 0xc9, 0xb5, 0xdc, 0xd2, 0x4c, 0x56, 0x83, 0xf3, - 0x90, 0x70, 0x7e, 0x7d, 0xfb, 0xbb, 0xe1, 0x58, 0xf2, 0xbb, 0x84, 0xf4, 0xe4, 0x1e, 0xbf, 0xae, - 0x70, 0xb0, 0xaf, 0xb3, 0x5f, 0x80, 0x09, 0xfa, 0xac, 0x56, 0x2c, 0x22, 0x9b, 0xbf, 0xce, 0x01, - 0xa6, 0xfe, 0x5d, 0x3f, 0xbb, 0xe2, 0x12, 0x99, 0xd5, 0xd0, 0x27, 0x61, 0x34, 0x24, 0x2c, 0xaa, - 0x9a, 0x94, 0xda, 0xb5, 0xf1, 0x14, 0xaf, 0x2c, 0xea, 0x98, 0xfc, 0x65, 0x62, 0x96, 0xe1, 0x04, - 0x35, 0xd4, 0x80, 0xd1, 0xdb, 0xae, 0x57, 0xf3, 0x6f, 0x87, 0x92, 0xfe, 0x40, 0xbe, 0x0a, 0xe0, - 0x26, 0xc7, 0x4c, 0xf4, 0xd1, 0x68, 0xee, 0xa6, 0x41, 0x0c, 0x27, 0x88, 0xd3, 0x63, 0x24, 0x68, - 0x79, 0xb3, 0xe1, 0xf5, 0x90, 0x04, 0x22, 0xe6, 0x1b, 0x3b, 0x46, 0xb0, 0x2c, 0xc4, 0x31, 0x9c, - 0x1e, 0x23, 0xec, 0x0f, 0x73, 0x35, 0x67, 0xe7, 0x94, 0x38, 0x46, 0xb0, 0x2a, 0xc5, 0x1a, 0x06, - 0x3d, 0x66, 0xd9, 0xbf, 0x55, 0xdf, 0xc3, 0xbe, 0x1f, 0xc9, 0x83, 0x99, 0xa5, 0xa1, 0xd4, 0xca, - 0xb1, 0x81, 0x95, 0x13, 0x61, 0xae, 0xe7, 0xa0, 0x11, 0xe6, 0x50, 0xd4, 0xc6, 0xbb, 0x9e, 0x47, - 0x3a, 0xbe, 0xd8, 0xce, 0xbb, 0x7e, 0xff, 0x9e, 0x3c, 0xef, 0xe9, 0x3d, 0xbf, 0x2e, 0x06, 0xa8, - 0x97, 0x87, 0xd0, 0x63, 0x4a, 0xca, 0x0a, 0x1f, 0x1d, 0x09, 0x43, 0x8b, 0xd0, 0x1f, 0xee, 0x84, - 0xd5, 0xa8, 0x1e, 0xb6, 0x4b, 0x35, 0x5a, 0x61, 0x28, 0x5a, 0xa6, 0x6b, 0x5e, 0x05, 0xcb, 0xba, - 0xa8, 0x0a, 0x93, 0x82, 0xe2, 0xfc, 0xa6, 0xe3, 0xa9, 0x04, 0x88, 0xdc, 0x1a, 0xf1, 0xc2, 0xde, - 0x6e, 0x69, 0x52, 0xb4, 0xac, 0x83, 0xf7, 0x77, 0x4b, 0x74, 0x4b, 0x66, 0x40, 0x70, 0x16, 0x35, - 0xbe, 0xe4, 0xab, 0x55, 0xbf, 0xd1, 0x2c, 0x07, 0xfe, 0xba, 0x5b, 0x27, 0xed, 0x14, 0xbd, 0x15, - 0x03, 0x53, 0x2c, 0x79, 0xa3, 0x0c, 0x27, 0xa8, 0xa1, 0x5b, 0x30, 0xe6, 0x34, 0x9b, 0xb3, 0x41, - 0xc3, 0x0f, 0x64, 0x03, 0x43, 0xf9, 0x1a, 0x83, 0x59, 0x13, 0x95, 0xe7, 0x3f, 0x4c, 0x14, 0xe2, - 0x24, 0x41, 0xfb, 0xbb, 0x18, 0xbf, 0x5d, 0x71, 0x37, 0x3c, 0xe6, 0x93, 0x86, 0x1a, 0x30, 0xd2, - 0x64, 0x27, 0xb2, 0x48, 0x1b, 0x26, 0x76, 0xf1, 0xf3, 0x5d, 0xca, 0x0c, 0x6f, 0xb3, 0xc4, 0xa7, - 0x86, 0xed, 0x68, 0x59, 0x27, 0x87, 0x4d, 0xea, 0xf6, 0xbf, 0x3f, 0xc1, 0x38, 0xb6, 0x0a, 0x17, - 0x04, 0xf6, 0x0b, 0x0f, 0x41, 0xf1, 0xf4, 0x9f, 0xce, 0x17, 0xb9, 0xc7, 0x53, 0x2f, 0xbc, 0x0c, - 0xb1, 0xac, 0x8b, 0x3e, 0x01, 0xa3, 0xf4, 0x25, 0xad, 0xb8, 0xa6, 0x70, 0xea, 0x48, 0x7e, 0xe8, - 0x29, 0x85, 0xa5, 0xa7, 0x14, 0xd4, 0x2b, 0xe3, 0x04, 0x31, 0xf4, 0x06, 0x33, 0xa7, 0x94, 0xa4, - 0x0b, 0xdd, 0x90, 0xd6, 0x2d, 0x27, 0x25, 0x59, 0x8d, 0x08, 0x6a, 0xc1, 0x64, 0x3a, 0x71, 0x72, - 0x38, 0x65, 0xe7, 0x3f, 0x49, 0xd2, 0xb9, 0x8f, 0xe3, 0xdc, 0x6f, 0x69, 0x58, 0x88, 0xb3, 0xe8, - 0xa3, 0xab, 0xc9, 0xb4, 0xb6, 0x45, 0x43, 0x58, 0x9f, 0x4a, 0x6d, 0x3b, 0xd2, 0x36, 0xa3, 0xed, - 0x06, 0x9c, 0xd2, 0x32, 0x83, 0x5e, 0x0a, 0x1c, 0x66, 0xce, 0xe3, 0xb2, 0x8b, 0x42, 0xe3, 0x25, - 0x1f, 0xde, 0xdb, 0x2d, 0x9d, 0x5a, 0x6b, 0x87, 0x88, 0xdb, 0xd3, 0x41, 0xd7, 0xe0, 0x28, 0x0f, - 0x9c, 0xb2, 0x40, 0x9c, 0x5a, 0xdd, 0xf5, 0x14, 0xb3, 0xca, 0x8f, 0x95, 0x13, 0x7b, 0xbb, 0xa5, - 0xa3, 0xb3, 0x59, 0x08, 0x38, 0xbb, 0x1e, 0x7a, 0x05, 0x06, 0x6b, 0x9e, 0x3c, 0x00, 0xfb, 0x8c, - 0xe4, 0xab, 0x83, 0x0b, 0xab, 0x15, 0xf5, 0xfd, 0xf1, 0x1f, 0x1c, 0x57, 0x40, 0x1b, 0x5c, 0x5b, - 0xa4, 0x44, 0x7c, 0xfd, 0xa9, 0x78, 0x9a, 0x49, 0x29, 0xb8, 0x11, 0x89, 0x80, 0xab, 0x49, 0x95, - 0xa7, 0x9b, 0x11, 0xa4, 0xc0, 0x20, 0x8c, 0x5e, 0x07, 0x24, 0x92, 0xfc, 0xcc, 0x56, 0x59, 0x4e, - 0x3a, 0xcd, 0x84, 0x53, 0xbd, 0xdc, 0x2b, 0x29, 0x0c, 0x9c, 0x51, 0x0b, 0x5d, 0xa6, 0x27, 0x97, - 0x5e, 0x2a, 0x4e, 0x46, 0x95, 0xe2, 0x7b, 0x81, 0x34, 0x03, 0xc2, 0xac, 0x0e, 0x4d, 0x8a, 0x38, - 0x51, 0x0f, 0xd5, 0xe0, 0xa4, 0xd3, 0x8a, 0x7c, 0xa6, 0x88, 0x33, 0x51, 0xd7, 0xfc, 0x2d, 0xe2, - 0x31, 0x1d, 0xf8, 0x00, 0x8b, 0xd3, 0x79, 0x72, 0xb6, 0x0d, 0x1e, 0x6e, 0x4b, 0x85, 0xbe, 0x62, - 0xe8, 0x58, 0x68, 0x3a, 0x32, 0xc3, 0xa9, 0x9a, 0x2b, 0x8e, 0x25, 0x06, 0x7a, 0x01, 0x86, 0x36, - 0xfd, 0x30, 0x5a, 0x25, 0xd1, 0x6d, 0x3f, 0xd8, 0x12, 0x59, 0x05, 0xe2, 0x4c, 0x2e, 0x31, 0x08, - 0xeb, 0x78, 0xe8, 0x09, 0xe8, 0x67, 0x16, 0x5a, 0xcb, 0x0b, 0xec, 0x1a, 0x1c, 0x88, 0xcf, 0x98, - 0xcb, 0xbc, 0x18, 0x4b, 0xb8, 0x44, 0x5d, 0x2e, 0xcf, 0x33, 0x43, 0x97, 0x04, 0xea, 0x72, 0x79, - 0x1e, 0x4b, 0x38, 0x5d, 0xae, 0xe1, 0xa6, 0x13, 0x90, 0x72, 0xe0, 0x57, 0x49, 0xa8, 0xe5, 0x0f, - 0x7a, 0x88, 0xe7, 0x4c, 0xa0, 0xcb, 0xb5, 0x92, 0x85, 0x80, 0xb3, 0xeb, 0x21, 0x92, 0xce, 0x8a, - 0x3b, 0x9a, 0xaf, 0xa1, 0x4c, 0x73, 0x6a, 0x5d, 0x26, 0xc6, 0xf5, 0x60, 0x5c, 0xe5, 0xe3, 0xe5, - 0x59, 0x12, 0xc2, 0xa9, 0x31, 0xb6, 0xb6, 0xbb, 0x4f, 0xb1, 0xa0, 0x74, 0xbe, 0xcb, 0x09, 0x4a, - 0x38, 0x45, 0xdb, 0x08, 0x04, 0x3b, 0xde, 0x31, 0x10, 0xec, 0x79, 0x18, 0x0c, 0x5b, 0xb7, 0x6a, - 0x7e, 0xc3, 0x71, 0x3d, 0x66, 0xe8, 0xa2, 0xbd, 0x97, 0x2b, 0x12, 0x80, 0x63, 0x1c, 0xb4, 0x04, - 0x03, 0x8e, 0x54, 0xe8, 0xa2, 0xfc, 0x18, 0x77, 0x4a, 0x8d, 0xcb, 0xc3, 0x3e, 0x49, 0x15, 0xae, - 0xaa, 0x8b, 0x5e, 0x86, 0x11, 0x11, 0x47, 0x43, 0xa4, 0xb0, 0x9f, 0x34, 0xbd, 0x86, 0x2b, 0x3a, - 0x10, 0x9b, 0xb8, 0xe8, 0x3a, 0x0c, 0x45, 0x7e, 0x9d, 0xb9, 0xbe, 0x52, 0x06, 0xf6, 0x58, 0x7e, - 0x28, 0xda, 0x35, 0x85, 0xa6, 0xab, 0x1a, 0x54, 0x55, 0xac, 0xd3, 0x41, 0x6b, 0x7c, 0xbd, 0xb3, - 0x6c, 0x41, 0x24, 0x14, 0x39, 0xd0, 0x4f, 0xe5, 0x59, 0x29, 0x32, 0x34, 0x73, 0x3b, 0x88, 0x9a, - 0x58, 0x27, 0x83, 0x2e, 0xc1, 0x44, 0x33, 0x70, 0x7d, 0xb6, 0x26, 0x94, 0x82, 0x7a, 0xca, 0xcc, - 0x0d, 0x5a, 0x4e, 0x22, 0xe0, 0x74, 0x1d, 0x16, 0x06, 0x45, 0x14, 0x4e, 0x9d, 0xe0, 0xf9, 0xcd, - 0xb8, 0xf8, 0x81, 0x97, 0x61, 0x05, 0x45, 0x2b, 0xec, 0x24, 0xe6, 0x92, 0xb3, 0xa9, 0xe9, 0x7c, - 0xe7, 0x7a, 0x5d, 0xc2, 0xc6, 0xd9, 0x72, 0xf5, 0x17, 0xc7, 0x14, 0x50, 0x4d, 0x4b, 0x2b, 0x4e, - 0x1f, 0x37, 0xe1, 0xd4, 0xc9, 0x36, 0x66, 0xb2, 0x89, 0x97, 0x6c, 0xcc, 0x10, 0x18, 0xc5, 0x21, - 0x4e, 0xd0, 0x44, 0xaf, 0xc1, 0xb8, 0x88, 0x11, 0x10, 0x0f, 0xd3, 0xa9, 0xd8, 0x95, 0x08, 0x27, - 0x60, 0x38, 0x85, 0xcd, 0xf3, 0x8b, 0x39, 0xb7, 0xea, 0x44, 0x1c, 0x7d, 0x57, 0x5d, 0x6f, 0x2b, - 0x9c, 0x3a, 0xcd, 0xce, 0x07, 0x91, 0x5f, 0x2c, 0x09, 0xc5, 0x19, 0x35, 0xd0, 0x1a, 0x8c, 0x37, - 0x03, 0x42, 0x1a, 0xec, 0x09, 0x23, 0xee, 0xb3, 0x12, 0x8f, 0x02, 0x44, 0x7b, 0x52, 0x4e, 0xc0, - 0xf6, 0x33, 0xca, 0x70, 0x8a, 0x02, 0xba, 0x0d, 0x03, 0xfe, 0x36, 0x09, 0x36, 0x89, 0x53, 0x9b, - 0x3a, 0xd3, 0xc6, 0xc1, 0x4d, 0x5c, 0x6e, 0xd7, 0x04, 0x6e, 0xc2, 0xfe, 0x47, 0x16, 0x77, 0xb6, - 0xff, 0x91, 0x8d, 0xa1, 0xbf, 0x65, 0xc1, 0x09, 0xa9, 0x51, 0xab, 0x34, 0xe9, 0xa8, 0xcf, 0xfb, - 0x5e, 0x18, 0x05, 0x3c, 0x6e, 0xcd, 0xc3, 0xf9, 0xb1, 0x5c, 0xd6, 0x72, 0x2a, 0x29, 0xe1, 0xfd, - 0x89, 0x3c, 0x8c, 0x10, 0xe7, 0xb7, 0x48, 0x1f, 0xdd, 0x21, 0x89, 0xe4, 0x61, 0x34, 0x1b, 0x2e, - 0xbd, 0xb1, 0xb0, 0x3a, 0xf5, 0x08, 0x0f, 0xba, 0x43, 0x37, 0x43, 0x25, 0x09, 0xc4, 0x69, 0x7c, - 0x74, 0x01, 0x0a, 0x7e, 0x38, 0xf5, 0x68, 0x9b, 0x4c, 0xf4, 0x7e, 0xed, 0x5a, 0x85, 0xdb, 0x81, - 0x5e, 0xab, 0xe0, 0x82, 0x1f, 0xca, 0x1c, 0x5f, 0xf4, 0xa5, 0x19, 0x4e, 0x3d, 0xc6, 0x45, 0xbd, - 0x32, 0xc7, 0x17, 0x2b, 0xc4, 0x31, 0x1c, 0x6d, 0xc2, 0x58, 0x68, 0xbc, 0xe8, 0xc3, 0xa9, 0xb3, - 0x6c, 0xa4, 0x1e, 0xcb, 0x9b, 0x34, 0x03, 0x5b, 0x4b, 0xbe, 0x63, 0x52, 0xc1, 0x49, 0xb2, 0x7c, - 0x77, 0x69, 0x32, 0x85, 0x70, 0xea, 0xf1, 0x0e, 0xbb, 0x4b, 0x43, 0xd6, 0x77, 0x97, 0x4e, 0x03, - 0x27, 0x68, 0x4e, 0x7f, 0x07, 0x4c, 0xa4, 0xd8, 0xa5, 0x83, 0xf8, 0x3c, 0x4c, 0x6f, 0xc1, 0x88, - 0xb1, 0x24, 0x1f, 0xa8, 0x49, 0xcc, 0xef, 0x0e, 0xc2, 0xa0, 0x32, 0x55, 0x40, 0xe7, 0x4d, 0x2b, - 0x98, 0x13, 0x49, 0x2b, 0x98, 0x81, 0xb2, 0x5f, 0x33, 0x0c, 0x5f, 0xd6, 0x32, 0x62, 0xc9, 0xe6, - 0x1d, 0x80, 0xdd, 0x3b, 0x66, 0x69, 0xea, 0x97, 0x62, 0xd7, 0xe6, 0x34, 0x3d, 0x6d, 0x35, 0x3a, - 0x97, 0x60, 0xc2, 0xf3, 0x19, 0x8f, 0x4e, 0x6a, 0x92, 0x01, 0x63, 0x7c, 0xd6, 0xa0, 0x1e, 0xeb, - 0x2c, 0x81, 0x80, 0xd3, 0x75, 0x68, 0x83, 0x9c, 0x51, 0x4a, 0xaa, 0x90, 0x38, 0x1f, 0x85, 0x05, - 0x94, 0xbe, 0x0d, 0xf9, 0xaf, 0x70, 0x6a, 0x3c, 0xff, 0x6d, 0xc8, 0x2b, 0x25, 0x99, 0xb1, 0x50, - 0x32, 0x63, 0x4c, 0x63, 0xd2, 0xf4, 0x6b, 0xcb, 0x65, 0xc1, 0xe6, 0x6b, 0x51, 0xde, 0x6b, 0xcb, - 0x65, 0xcc, 0x61, 0x68, 0x16, 0xfa, 0xd8, 0x0f, 0x19, 0x43, 0x26, 0x6f, 0x9b, 0x2e, 0x97, 0xb5, - 0x1c, 0xa3, 0xac, 0x02, 0x16, 0x15, 0x99, 0x44, 0x9c, 0xbe, 0x8d, 0x98, 0x44, 0xbc, 0xff, 0x1e, - 0x25, 0xe2, 0x92, 0x00, 0x8e, 0x69, 0xa1, 0x3b, 0x70, 0xd4, 0x78, 0x8f, 0x2a, 0x4f, 0x35, 0xc8, - 0x57, 0x96, 0x27, 0x90, 0xe7, 0x4e, 0x89, 0x4e, 0x1f, 0x5d, 0xce, 0xa2, 0x84, 0xb3, 0x1b, 0x40, - 0x75, 0x98, 0xa8, 0xa6, 0x5a, 0x1d, 0xe8, 0xbe, 0x55, 0xb5, 0x2e, 0xd2, 0x2d, 0xa6, 0x09, 0xa3, - 0x97, 0x61, 0xe0, 0x6d, 0x9f, 0x1b, 0xb6, 0x89, 0xa7, 0x89, 0x8c, 0x92, 0x32, 0xf0, 0xc6, 0xb5, - 0x0a, 0x2b, 0xdf, 0xdf, 0x2d, 0x0d, 0x95, 0xfd, 0x9a, 0xfc, 0x8b, 0x55, 0x05, 0xf4, 0x03, 0x16, - 0x4c, 0xa7, 0x1f, 0xbc, 0xaa, 0xd3, 0x23, 0xdd, 0x77, 0xda, 0x16, 0x8d, 0x4e, 0x2f, 0xe6, 0x92, - 0xc3, 0x6d, 0x9a, 0x42, 0x1f, 0xa6, 0xfb, 0x29, 0x74, 0xef, 0x12, 0x91, 0xa0, 0xfd, 0xe1, 0x78, - 0x3f, 0xd1, 0xd2, 0xfd, 0xdd, 0xd2, 0x18, 0x3f, 0x19, 0xdd, 0xbb, 0x2a, 0x1e, 0x3d, 0xaf, 0x80, - 0xbe, 0x1b, 0x8e, 0x06, 0x69, 0xd9, 0x30, 0x91, 0x4c, 0xf8, 0x93, 0xdd, 0x9c, 0xb2, 0xc9, 0x09, - 0xc7, 0x59, 0x04, 0x71, 0x76, 0x3b, 0xf6, 0xaf, 0x59, 0x4c, 0x27, 0x20, 0xba, 0x45, 0xc2, 0x56, - 0x3d, 0x3a, 0x04, 0x63, 0xb2, 0x45, 0x43, 0xdf, 0x7e, 0xcf, 0xd6, 0x60, 0xff, 0xd2, 0x62, 0xd6, - 0x60, 0x87, 0xe8, 0xd7, 0xf6, 0x06, 0x0c, 0x44, 0xa2, 0x35, 0xd1, 0xf5, 0x3c, 0xcb, 0x15, 0xd9, - 0x29, 0x66, 0x11, 0xa7, 0x1e, 0x39, 0xb2, 0x14, 0x2b, 0x32, 0xf6, 0x3f, 0xe3, 0x33, 0x20, 0x21, - 0x87, 0xa0, 0xd6, 0x5c, 0x30, 0xd5, 0x9a, 0xa5, 0x0e, 0x5f, 0x90, 0xa3, 0xde, 0xfc, 0xa7, 0x66, - 0xbf, 0x99, 0x70, 0xef, 0xdd, 0x6e, 0x86, 0x68, 0x7f, 0xde, 0x02, 0x88, 0x13, 0x80, 0x74, 0x91, - 0x90, 0xf9, 0x22, 0x7d, 0xd6, 0xf8, 0x91, 0x5f, 0xf5, 0xeb, 0x42, 0xf5, 0x72, 0x32, 0xd6, 0xac, - 0xf2, 0xf2, 0x7d, 0xed, 0x37, 0x56, 0xd8, 0xa8, 0x24, 0x23, 0xf2, 0x16, 0x63, 0x5d, 0xbf, 0x11, - 0x8d, 0xf7, 0x4b, 0x16, 0x1c, 0xc9, 0x72, 0x92, 0xa0, 0x8f, 0x64, 0x2e, 0xe6, 0x54, 0x26, 0xa2, - 0x6a, 0x36, 0x6f, 0x88, 0x72, 0xac, 0x30, 0xba, 0xce, 0x74, 0x7d, 0xb0, 0xe4, 0x14, 0xd7, 0x60, - 0xa4, 0x1c, 0x10, 0x8d, 0xbf, 0x78, 0x35, 0xce, 0x9b, 0x33, 0x38, 0xf7, 0xf4, 0x81, 0x23, 0x0f, - 0xd9, 0x5f, 0x2e, 0xc0, 0x11, 0x6e, 0xe8, 0x34, 0xbb, 0xed, 0xbb, 0xb5, 0xb2, 0x5f, 0x13, 0xae, - 0xad, 0x6f, 0xc2, 0x70, 0x53, 0x93, 0x4d, 0xb7, 0x0b, 0xb4, 0xae, 0xcb, 0xb0, 0x63, 0x69, 0x9a, - 0x5e, 0x8a, 0x0d, 0x5a, 0xa8, 0x06, 0xc3, 0x64, 0xdb, 0xad, 0x2a, 0x6b, 0x99, 0xc2, 0x81, 0x2f, - 0x69, 0xd5, 0xca, 0xa2, 0x46, 0x07, 0x1b, 0x54, 0xbb, 0x36, 0x4f, 0xd6, 0x58, 0xb4, 0x9e, 0x0e, - 0x16, 0x32, 0x3f, 0x6e, 0xc1, 0xf1, 0x9c, 0xb0, 0xec, 0xb4, 0xb9, 0xdb, 0xcc, 0xa4, 0x4c, 0x2c, - 0x5b, 0xd5, 0x1c, 0x37, 0x34, 0xc3, 0x02, 0x8a, 0x3e, 0x0a, 0xd0, 0x8c, 0x53, 0x52, 0x76, 0x88, - 0x5f, 0x6d, 0x44, 0xb2, 0xd5, 0x82, 0x92, 0xaa, 0xcc, 0x95, 0x1a, 0x2d, 0xfb, 0x4b, 0x3d, 0xd0, - 0xcb, 0x0c, 0x93, 0x50, 0x19, 0xfa, 0x37, 0x79, 0xcc, 0xbc, 0xb6, 0xf3, 0x46, 0x71, 0x65, 0x10, - 0xbe, 0x78, 0xde, 0xb4, 0x52, 0x2c, 0xc9, 0xa0, 0x15, 0x98, 0xe4, 0xe9, 0x36, 0xeb, 0x0b, 0xa4, - 0xee, 0xec, 0x48, 0xb1, 0x6f, 0x81, 0x7d, 0xaa, 0x12, 0x7f, 0x2f, 0xa7, 0x51, 0x70, 0x56, 0x3d, - 0xf4, 0x2a, 0x8c, 0xd2, 0x67, 0xb8, 0xdf, 0x8a, 0x24, 0x25, 0x9e, 0xdf, 0x52, 0xbd, 0x4c, 0xd6, - 0x0c, 0x28, 0x4e, 0x60, 0xa3, 0x97, 0x61, 0xa4, 0x99, 0x12, 0x70, 0xf7, 0xc6, 0x92, 0x20, 0x53, - 0xa8, 0x6d, 0xe2, 0x32, 0x3f, 0x89, 0x16, 0xf3, 0x0a, 0x59, 0xdb, 0x0c, 0x48, 0xb8, 0xe9, 0xd7, - 0x6b, 0x8c, 0x03, 0xee, 0xd5, 0xfc, 0x24, 0x12, 0x70, 0x9c, 0xaa, 0x41, 0xa9, 0xac, 0x3b, 0x6e, - 0xbd, 0x15, 0x90, 0x98, 0x4a, 0x9f, 0x49, 0x65, 0x29, 0x01, 0xc7, 0xa9, 0x1a, 0x9d, 0x25, 0xf7, - 0xfd, 0xf7, 0x47, 0x72, 0x6f, 0xff, 0x4c, 0x01, 0x8c, 0xa9, 0x7d, 0x0f, 0xe7, 0xdd, 0x7c, 0x05, - 0x7a, 0x36, 0x82, 0x66, 0x55, 0x18, 0xe1, 0x65, 0x7e, 0x59, 0x9c, 0xfd, 0x9f, 0x7f, 0x19, 0xfd, - 0x8f, 0x59, 0x2d, 0xba, 0xc7, 0x8f, 0x96, 0x03, 0x9f, 0x5e, 0x72, 0x32, 0xac, 0xa6, 0x72, 0x47, - 0xea, 0x97, 0x81, 0x35, 0xda, 0x04, 0xa0, 0x16, 0x3e, 0x15, 0x9c, 0x82, 0x61, 0xaf, 0x56, 0x11, - 0xe1, 0x73, 0x24, 0x15, 0x74, 0x01, 0x86, 0x44, 0x2a, 0x44, 0xe6, 0x35, 0xc3, 0x37, 0x13, 0xb3, - 0xaf, 0x5b, 0x88, 0x8b, 0xb1, 0x8e, 0x63, 0xff, 0x60, 0x01, 0x26, 0x33, 0xdc, 0x1e, 0xf9, 0x35, - 0xb2, 0xe1, 0x86, 0x51, 0xb0, 0x93, 0xbc, 0x9c, 0xb0, 0x28, 0xc7, 0x0a, 0x83, 0x9e, 0x55, 0xfc, - 0xa2, 0x4a, 0x5e, 0x4e, 0xc2, 0xad, 0x48, 0x40, 0x0f, 0x98, 0xaa, 0xff, 0x0c, 0xf4, 0xb4, 0x42, - 0x22, 0x63, 0xdd, 0xab, 0x6b, 0x9b, 0x29, 0xec, 0x19, 0x84, 0x3e, 0x01, 0x37, 0x94, 0x16, 0x5a, - 0x7b, 0x02, 0x72, 0x3d, 0x34, 0x87, 0xd1, 0xce, 0x45, 0xc4, 0x73, 0xbc, 0x48, 0x3c, 0x14, 0xe3, - 0x18, 0xc8, 0xac, 0x14, 0x0b, 0xa8, 0xfd, 0xc5, 0x22, 0x9c, 0xc8, 0x75, 0x84, 0xa6, 0x5d, 0x6f, - 0xf8, 0x9e, 0x1b, 0xf9, 0xca, 0x70, 0x91, 0xc7, 0x3d, 0x26, 0xcd, 0xcd, 0x15, 0x51, 0x8e, 0x15, - 0x06, 0x3a, 0x0b, 0xbd, 0x4c, 0x28, 0x9e, 0x4c, 0x83, 0x86, 0xe7, 0x16, 0x78, 0x44, 0x49, 0x0e, - 0xd6, 0x6e, 0xf5, 0x62, 0xdb, 0x5b, 0xfd, 0x11, 0xca, 0xc1, 0xf8, 0xf5, 0xe4, 0x85, 0x42, 0xbb, - 0xeb, 0xfb, 0x75, 0xcc, 0x80, 0xe8, 0x31, 0x31, 0x5e, 0x09, 0x4b, 0x3d, 0xec, 0xd4, 0xfc, 0x50, - 0x1b, 0xb4, 0x27, 0xa0, 0x7f, 0x8b, 0xec, 0x04, 0xae, 0xb7, 0x91, 0xb4, 0xe0, 0xbc, 0xc2, 0x8b, - 0xb1, 0x84, 0x9b, 0x59, 0xbf, 0xfb, 0xef, 0x47, 0xd6, 0x6f, 0x7d, 0x05, 0x0c, 0x74, 0x64, 0x4f, - 0x7e, 0xa8, 0x08, 0x63, 0x78, 0x6e, 0xe1, 0xfd, 0x89, 0xb8, 0x9e, 0x9e, 0x88, 0xfb, 0x91, 0x1c, - 0xfb, 0x60, 0xb3, 0xf1, 0xcb, 0x16, 0x8c, 0xb1, 0x84, 0x8c, 0x22, 0x8a, 0x89, 0xeb, 0x7b, 0x87, - 0xf0, 0x14, 0x78, 0x04, 0x7a, 0x03, 0xda, 0xa8, 0x98, 0x41, 0xb5, 0xc7, 0x59, 0x4f, 0x30, 0x87, - 0xa1, 0x93, 0xd0, 0xc3, 0xba, 0x40, 0x27, 0x6f, 0x98, 0x1f, 0xc1, 0x0b, 0x4e, 0xe4, 0x60, 0x56, - 0xca, 0xe2, 0x29, 0x62, 0xd2, 0xac, 0xbb, 0xbc, 0xd3, 0xb1, 0xc9, 0xc2, 0xbb, 0x23, 0x44, 0x4a, - 0x66, 0xd7, 0xde, 0x59, 0x3c, 0xc5, 0x6c, 0x92, 0xed, 0x9f, 0xd9, 0x7f, 0x5e, 0x80, 0xd3, 0x99, - 0xf5, 0xba, 0x8e, 0xa7, 0xd8, 0xbe, 0xf6, 0x83, 0x4c, 0xdf, 0x56, 0x3c, 0x44, 0xfb, 0xf8, 0x9e, - 0x6e, 0xb9, 0xff, 0xde, 0x2e, 0xc2, 0x1c, 0x66, 0x0e, 0xd9, 0xbb, 0x24, 0xcc, 0x61, 0x66, 0xdf, - 0x72, 0xc4, 0x04, 0x7f, 0x53, 0xc8, 0xf9, 0x16, 0x26, 0x30, 0x38, 0x47, 0xcf, 0x19, 0x06, 0x0c, - 0xe5, 0x23, 0x9c, 0x9f, 0x31, 0xbc, 0x0c, 0x2b, 0x28, 0x9a, 0x85, 0xb1, 0x86, 0xeb, 0xd1, 0xc3, - 0x67, 0xc7, 0x64, 0xc5, 0x95, 0x2e, 0x63, 0xc5, 0x04, 0xe3, 0x24, 0x3e, 0x72, 0xb5, 0x10, 0x88, - 0xfc, 0xeb, 0x5e, 0x3e, 0xd0, 0xae, 0x9b, 0x31, 0xcd, 0x39, 0xd4, 0x28, 0x66, 0x84, 0x43, 0x5c, - 0xd1, 0xe4, 0x44, 0xc5, 0xee, 0xe5, 0x44, 0xc3, 0xd9, 0x32, 0xa2, 0xe9, 0x97, 0x61, 0xe4, 0x9e, - 0x75, 0x23, 0xf6, 0x37, 0x8a, 0xf0, 0x50, 0x9b, 0x6d, 0xcf, 0xcf, 0x7a, 0x63, 0x0e, 0xb4, 0xb3, - 0x3e, 0x35, 0x0f, 0x65, 0x38, 0xb2, 0xde, 0xaa, 0xd7, 0x77, 0x98, 0x23, 0x18, 0xa9, 0x49, 0x0c, - 0xc1, 0x53, 0x4a, 0xe1, 0xc8, 0x91, 0xa5, 0x0c, 0x1c, 0x9c, 0x59, 0x93, 0x3e, 0xb1, 0xe8, 0x4d, - 0xb2, 0xa3, 0x48, 0x25, 0x9e, 0x58, 0x58, 0x07, 0x62, 0x13, 0x17, 0x5d, 0x82, 0x09, 0x67, 0xdb, - 0x71, 0x79, 0xfa, 0x0b, 0x49, 0x80, 0xbf, 0xb1, 0x94, 0x2c, 0x7a, 0x36, 0x89, 0x80, 0xd3, 0x75, - 0xd0, 0xeb, 0x80, 0xfc, 0x5b, 0xcc, 0xb9, 0xa4, 0x76, 0x89, 0x78, 0x42, 0xeb, 0xce, 0xe6, 0xae, - 0x18, 0x1f, 0x09, 0xd7, 0x52, 0x18, 0x38, 0xa3, 0x56, 0x22, 0x18, 0x5f, 0x5f, 0x7e, 0x30, 0xbe, - 0xf6, 0xe7, 0x62, 0xc7, 0xcc, 0x81, 0x6f, 0xc1, 0xc8, 0x41, 0x2d, 0xa6, 0x9f, 0x80, 0xfe, 0x40, - 0xe4, 0x64, 0x4f, 0x78, 0x5d, 0xcb, 0x8c, 0xd5, 0x12, 0x6e, 0xff, 0x17, 0x0b, 0x94, 0x2c, 0xd9, - 0x8c, 0xbb, 0xfd, 0x32, 0x33, 0xff, 0xe6, 0x52, 0x70, 0x2d, 0xd4, 0xd6, 0x51, 0xcd, 0xfc, 0x3b, - 0x06, 0x62, 0x13, 0x97, 0x2f, 0xb7, 0x30, 0x8e, 0xf0, 0x60, 0x3c, 0x20, 0x44, 0x58, 0x50, 0x85, - 0x81, 0x3e, 0x06, 0xfd, 0x35, 0x77, 0xdb, 0x0d, 0x85, 0x1c, 0xed, 0xc0, 0x7a, 0xbb, 0xf8, 0xfb, - 0x16, 0x38, 0x19, 0x2c, 0xe9, 0xd9, 0x3f, 0x62, 0x81, 0xd2, 0x4b, 0x5e, 0x26, 0x4e, 0x3d, 0xda, - 0x44, 0xaf, 0x01, 0x48, 0x0a, 0x4a, 0xf6, 0x26, 0xad, 0xa5, 0x00, 0x2b, 0xc8, 0xbe, 0xf1, 0x0f, - 0x6b, 0x75, 0xd0, 0xab, 0xd0, 0xb7, 0xc9, 0x68, 0x89, 0x6f, 0x3b, 0xab, 0x54, 0x5d, 0xac, 0x74, - 0x7f, 0xb7, 0x74, 0xc4, 0x6c, 0x53, 0xde, 0x62, 0xbc, 0x96, 0xfd, 0x43, 0x85, 0x78, 0x4e, 0xdf, - 0x68, 0xf9, 0x91, 0x73, 0x08, 0x9c, 0xc8, 0x25, 0x83, 0x13, 0x79, 0x2c, 0x7b, 0xa1, 0x6a, 0x5d, - 0xca, 0xe5, 0x40, 0xae, 0x25, 0x38, 0x90, 0xc7, 0x3b, 0x93, 0x6a, 0xcf, 0x79, 0xfc, 0x73, 0x0b, - 0x26, 0x0c, 0xfc, 0x43, 0xb8, 0x00, 0x97, 0xcc, 0x0b, 0xf0, 0xe1, 0x8e, 0xdf, 0x90, 0x73, 0xf1, - 0x7d, 0x7f, 0x31, 0xd1, 0x77, 0x76, 0xe1, 0xbd, 0x0d, 0x3d, 0x9b, 0x4e, 0x50, 0x13, 0xef, 0xfa, - 0xf3, 0x5d, 0x8d, 0xf5, 0xcc, 0x65, 0x27, 0x10, 0x96, 0x16, 0x4f, 0xcb, 0x51, 0xa7, 0x45, 0x1d, - 0xad, 0x2c, 0x58, 0x53, 0xe8, 0x22, 0xf4, 0x85, 0x55, 0xbf, 0xa9, 0xfc, 0xe4, 0x58, 0x3a, 0xed, - 0x0a, 0x2b, 0xd9, 0xdf, 0x2d, 0x21, 0xb3, 0x39, 0x5a, 0x8c, 0x05, 0x3e, 0x7a, 0x13, 0x46, 0xd8, - 0x2f, 0x65, 0xf6, 0x58, 0xcc, 0x97, 0xc0, 0x54, 0x74, 0x44, 0x6e, 0x13, 0x6c, 0x14, 0x61, 0x93, - 0xd4, 0xf4, 0x06, 0x0c, 0xaa, 0xcf, 0x7a, 0xa0, 0xda, 0xfa, 0xff, 0x58, 0x84, 0xc9, 0x8c, 0x35, - 0x87, 0x42, 0x63, 0x26, 0x2e, 0x74, 0xb9, 0x54, 0xdf, 0xe1, 0x5c, 0x84, 0xec, 0x01, 0x58, 0x13, - 0x6b, 0xab, 0xeb, 0x46, 0xaf, 0x87, 0x24, 0xd9, 0x28, 0x2d, 0xea, 0xdc, 0x28, 0x6d, 0xec, 0xd0, - 0x86, 0x9a, 0x36, 0xa4, 0x7a, 0xfa, 0x40, 0xe7, 0xf4, 0x37, 0x7b, 0xe0, 0x48, 0x56, 0x0c, 0x69, - 0xf4, 0x19, 0x10, 0xe9, 0xff, 0xc5, 0xb4, 0x3e, 0xdf, 0x6e, 0x84, 0xf5, 0x9a, 0x33, 0xcc, 0x17, - 0x4c, 0x84, 0x6e, 0x9d, 0x91, 0xc7, 0x11, 0x2f, 0xec, 0x38, 0xcc, 0xa2, 0x4d, 0x16, 0x52, 0x49, - 0xdc, 0x9e, 0xf2, 0xf8, 0xf8, 0x50, 0xd7, 0x1d, 0x10, 0xf7, 0x6f, 0x98, 0x30, 0xa9, 0x92, 0xc5, - 0x9d, 0x4d, 0xaa, 0x64, 0xcb, 0x68, 0x19, 0xfa, 0xaa, 0xdc, 0x56, 0xa7, 0xd8, 0xf9, 0x08, 0xe3, - 0x86, 0x3a, 0xea, 0x00, 0x16, 0x06, 0x3a, 0x82, 0xc0, 0xb4, 0x0b, 0x43, 0xda, 0xc0, 0x3c, 0xd0, - 0xc5, 0xb3, 0x45, 0x2f, 0x3e, 0x6d, 0x08, 0x1e, 0xe8, 0x02, 0xfa, 0x31, 0xed, 0xee, 0x17, 0xe7, - 0xc1, 0x07, 0x0d, 0xde, 0xe9, 0x64, 0xc2, 0x05, 0x2f, 0xb1, 0xaf, 0x18, 0x2f, 0x55, 0x31, 0x63, - 0x9e, 0xe7, 0xa6, 0x4e, 0x32, 0x2f, 0xfc, 0xf6, 0x71, 0xce, 0xed, 0x1f, 0xb7, 0x20, 0xe1, 0x24, - 0xa5, 0xc4, 0x9d, 0x56, 0xae, 0xb8, 0xf3, 0x0c, 0xf4, 0x04, 0x7e, 0x9d, 0x24, 0x53, 0xd3, 0x63, - 0xbf, 0x4e, 0x30, 0x83, 0x50, 0x8c, 0x28, 0x16, 0x62, 0x0d, 0xeb, 0x0f, 0x74, 0xf1, 0xf4, 0x7e, - 0x04, 0x7a, 0xeb, 0x64, 0x9b, 0xd4, 0x93, 0x19, 0x44, 0xaf, 0xd2, 0x42, 0xcc, 0x61, 0xf6, 0x2f, - 0xf7, 0xc0, 0xa9, 0xb6, 0x91, 0xd7, 0x28, 0x83, 0xb9, 0xe1, 0x44, 0xe4, 0xb6, 0xb3, 0x93, 0xcc, - 0x9c, 0x77, 0x89, 0x17, 0x63, 0x09, 0x67, 0xce, 0xc8, 0x3c, 0x93, 0x4c, 0x42, 0x38, 0x2c, 0x12, - 0xc8, 0x08, 0xa8, 0x29, 0x6c, 0x2c, 0xde, 0x0f, 0x61, 0xe3, 0xb3, 0x00, 0x61, 0x58, 0xe7, 0x06, - 0x97, 0x35, 0xe1, 0xe5, 0x1c, 0x67, 0x1c, 0xaa, 0x5c, 0x15, 0x10, 0xac, 0x61, 0xa1, 0x05, 0x18, - 0x6f, 0x06, 0x7e, 0xc4, 0x65, 0xed, 0x0b, 0xdc, 0x26, 0xb9, 0xd7, 0x0c, 0x7a, 0x55, 0x4e, 0xc0, - 0x71, 0xaa, 0x06, 0x7a, 0x01, 0x86, 0x44, 0x20, 0xac, 0xb2, 0xef, 0xd7, 0x85, 0x78, 0x4f, 0x99, - 0xe9, 0x56, 0x62, 0x10, 0xd6, 0xf1, 0xb4, 0x6a, 0x4c, 0x80, 0xdf, 0x9f, 0x59, 0x8d, 0x0b, 0xf1, - 0x35, 0xbc, 0x44, 0xd0, 0xfc, 0x81, 0xae, 0x82, 0xe6, 0xc7, 0x02, 0xcf, 0xc1, 0xae, 0xf5, 0xc9, - 0xd0, 0x51, 0x44, 0xf8, 0x95, 0x1e, 0x98, 0x14, 0x0b, 0xe7, 0x41, 0x2f, 0x97, 0xeb, 0xe9, 0xe5, - 0x72, 0x3f, 0x44, 0xa2, 0xef, 0xaf, 0x99, 0xc3, 0x5e, 0x33, 0x3f, 0x6c, 0x81, 0xc9, 0x43, 0xa2, - 0xff, 0x2f, 0x37, 0xf5, 0xe8, 0x0b, 0xb9, 0x3c, 0x69, 0x1c, 0x51, 0xfb, 0x9d, 0x25, 0x21, 0xb5, - 0xff, 0x93, 0x05, 0x0f, 0x77, 0xa4, 0x88, 0x16, 0x61, 0x90, 0x31, 0xba, 0xda, 0xbb, 0xf8, 0x71, - 0xe5, 0xb3, 0x20, 0x01, 0x39, 0x7c, 0x77, 0x5c, 0x13, 0x2d, 0xa6, 0x72, 0xbc, 0x3e, 0x91, 0x91, - 0xe3, 0xf5, 0xa8, 0x31, 0x3c, 0xf7, 0x98, 0xe4, 0xf5, 0x0b, 0xf4, 0xc6, 0x31, 0x7d, 0x12, 0x3f, - 0x64, 0x88, 0x73, 0xed, 0x84, 0x38, 0x17, 0x99, 0xd8, 0xda, 0x1d, 0xf2, 0x1a, 0x8c, 0xb3, 0x08, - 0x99, 0xcc, 0x83, 0x46, 0x38, 0x33, 0x16, 0x62, 0x2b, 0xf9, 0xab, 0x09, 0x18, 0x4e, 0x61, 0xdb, - 0x7f, 0x5a, 0x84, 0x3e, 0xbe, 0xfd, 0x0e, 0xe1, 0xe1, 0xfb, 0x14, 0x0c, 0xba, 0x8d, 0x46, 0x8b, - 0xa7, 0xed, 0xec, 0x8d, 0x6d, 0xae, 0x97, 0x65, 0x21, 0x8e, 0xe1, 0x68, 0x49, 0x68, 0x12, 0xda, - 0x04, 0xe1, 0xe6, 0x1d, 0x9f, 0x59, 0x70, 0x22, 0x87, 0x73, 0x71, 0xea, 0x9e, 0x8d, 0x75, 0x0e, - 0xe8, 0x93, 0x00, 0x61, 0x14, 0xb8, 0xde, 0x06, 0x2d, 0x13, 0x99, 0x1a, 0x9e, 0x6c, 0x43, 0xad, - 0xa2, 0x90, 0x39, 0xcd, 0xf8, 0xcc, 0x51, 0x00, 0xac, 0x51, 0x44, 0x33, 0xc6, 0x4d, 0x3f, 0x9d, - 0x98, 0x3b, 0xe0, 0x54, 0xe3, 0x39, 0x9b, 0x7e, 0x11, 0x06, 0x15, 0xf1, 0x4e, 0x72, 0xc5, 0x61, - 0x9d, 0x61, 0xfb, 0x08, 0x8c, 0x25, 0xfa, 0x76, 0x20, 0xb1, 0xe4, 0xaf, 0x58, 0x30, 0xc6, 0x3b, - 0xb3, 0xe8, 0x6d, 0x8b, 0xdb, 0xe0, 0x2e, 0x1c, 0xa9, 0x67, 0x9c, 0xca, 0x62, 0xfa, 0xbb, 0x3f, - 0xc5, 0x95, 0x18, 0x32, 0x0b, 0x8a, 0x33, 0xdb, 0x40, 0xe7, 0xe8, 0x8e, 0xa3, 0xa7, 0xae, 0x53, - 0x17, 0xd1, 0x36, 0x86, 0xf9, 0x6e, 0xe3, 0x65, 0x58, 0x41, 0xed, 0x3f, 0xb4, 0x60, 0x82, 0xf7, - 0xfc, 0x0a, 0xd9, 0x51, 0x67, 0xd3, 0xb7, 0xb2, 0xef, 0x22, 0x61, 0x74, 0x21, 0x27, 0x61, 0xb4, - 0xfe, 0x69, 0xc5, 0xb6, 0x9f, 0xf6, 0x65, 0x0b, 0xc4, 0x0a, 0x39, 0x04, 0x49, 0xcb, 0x77, 0x98, - 0x92, 0x96, 0xe9, 0xfc, 0x4d, 0x90, 0x23, 0x62, 0xf9, 0x6b, 0x0b, 0xc6, 0x39, 0x42, 0x6c, 0x05, - 0xf1, 0x2d, 0x9d, 0x87, 0x39, 0xf3, 0x8b, 0x32, 0xcd, 0x5a, 0xaf, 0x90, 0x9d, 0x35, 0xbf, 0xec, - 0x44, 0x9b, 0xd9, 0x1f, 0x65, 0x4c, 0x56, 0x4f, 0xdb, 0xc9, 0xaa, 0xc9, 0x0d, 0x64, 0x24, 0x26, - 0xec, 0x20, 0x00, 0x3e, 0x68, 0x62, 0x42, 0xfb, 0xcf, 0x2c, 0x40, 0xbc, 0x19, 0x83, 0x71, 0xa3, - 0xec, 0x10, 0x2b, 0xd5, 0x2e, 0xba, 0xf8, 0x68, 0x52, 0x10, 0xac, 0x61, 0xdd, 0x97, 0xe1, 0x49, - 0x98, 0xb2, 0x14, 0x3b, 0x9b, 0xb2, 0x1c, 0x60, 0x44, 0xbf, 0xdc, 0x0f, 0x49, 0x9f, 0x49, 0x74, - 0x03, 0x86, 0xab, 0x4e, 0xd3, 0xb9, 0xe5, 0xd6, 0xdd, 0xc8, 0x25, 0x61, 0x3b, 0x3b, 0xb7, 0x79, - 0x0d, 0x4f, 0x18, 0x1f, 0x68, 0x25, 0xd8, 0xa0, 0x83, 0x66, 0x00, 0x9a, 0x81, 0xbb, 0xed, 0xd6, - 0xc9, 0x06, 0x13, 0x08, 0xb1, 0xf8, 0x3e, 0xdc, 0xe8, 0x4e, 0x96, 0x62, 0x0d, 0x23, 0x23, 0xf4, - 0x46, 0xf1, 0x01, 0x87, 0xde, 0x80, 0x43, 0x0b, 0xbd, 0xd1, 0x73, 0xa0, 0xd0, 0x1b, 0x03, 0x07, - 0x0e, 0xbd, 0xd1, 0xdb, 0x55, 0xe8, 0x0d, 0x0c, 0xc7, 0x24, 0xef, 0x49, 0xff, 0x2f, 0xb9, 0x75, - 0x22, 0x1e, 0x1c, 0x3c, 0x28, 0xd1, 0xf4, 0xde, 0x6e, 0xe9, 0x18, 0xce, 0xc4, 0xc0, 0x39, 0x35, - 0xd1, 0x47, 0x61, 0xca, 0xa9, 0xd7, 0xfd, 0xdb, 0x6a, 0x52, 0x17, 0xc3, 0xaa, 0x53, 0xe7, 0xca, - 0xa5, 0x7e, 0x46, 0xf5, 0xe4, 0xde, 0x6e, 0x69, 0x6a, 0x36, 0x07, 0x07, 0xe7, 0xd6, 0x46, 0xaf, - 0xc0, 0x60, 0x33, 0xf0, 0xab, 0x2b, 0x9a, 0x63, 0xf7, 0x69, 0x3a, 0x80, 0x65, 0x59, 0xb8, 0xbf, - 0x5b, 0x1a, 0x51, 0x7f, 0xd8, 0x85, 0x1f, 0x57, 0xc8, 0x88, 0x6a, 0x31, 0xf4, 0xa0, 0xa3, 0x5a, - 0x0c, 0xdf, 0xef, 0xa8, 0x16, 0x5b, 0x30, 0x59, 0x21, 0x81, 0xeb, 0xd4, 0xdd, 0xbb, 0x94, 0x27, - 0x97, 0x67, 0xe0, 0x1a, 0x0c, 0x06, 0x89, 0x53, 0xbf, 0xab, 0xe0, 0xdb, 0x9a, 0x5c, 0x46, 0x9e, - 0xf2, 0x31, 0x21, 0xfb, 0x7f, 0x5b, 0xd0, 0x2f, 0xfc, 0x30, 0x0f, 0x81, 0x33, 0x9d, 0x35, 0x54, - 0x32, 0xa5, 0xec, 0x49, 0x61, 0x9d, 0xc9, 0x55, 0xc6, 0x2c, 0x27, 0x94, 0x31, 0x0f, 0xb7, 0x23, - 0xd2, 0x5e, 0x0d, 0xf3, 0x77, 0x8b, 0xf4, 0x85, 0x60, 0x44, 0x04, 0x78, 0xf0, 0x43, 0xb0, 0x0a, - 0xfd, 0xa1, 0xf0, 0x48, 0x2f, 0xe4, 0xfb, 0xf2, 0x24, 0x27, 0x31, 0xb6, 0x81, 0x14, 0x3e, 0xe8, - 0x92, 0x48, 0xa6, 0xab, 0x7b, 0xf1, 0x01, 0xba, 0xba, 0x77, 0x8a, 0x99, 0xd0, 0x73, 0x3f, 0x62, - 0x26, 0xd8, 0x5f, 0x63, 0xb7, 0xb3, 0x5e, 0x7e, 0x08, 0x8c, 0xdb, 0x25, 0xf3, 0x1e, 0xb7, 0xdb, - 0xac, 0x2c, 0xd1, 0xa9, 0x1c, 0x06, 0xee, 0x97, 0x2c, 0x38, 0x95, 0xf1, 0x55, 0x1a, 0x37, 0xf7, - 0x34, 0x0c, 0x38, 0xad, 0x9a, 0xab, 0xf6, 0xb2, 0xa6, 0x2d, 0x9e, 0x15, 0xe5, 0x58, 0x61, 0xa0, - 0x79, 0x98, 0x20, 0x77, 0x9a, 0x2e, 0x57, 0xc3, 0xeb, 0xa6, 0xe3, 0x45, 0xee, 0xbc, 0xbb, 0x98, - 0x04, 0xe2, 0x34, 0xbe, 0x0a, 0x89, 0x56, 0xcc, 0x0d, 0x89, 0xf6, 0x0b, 0x16, 0x0c, 0x29, 0x9f, - 0xec, 0x07, 0x3e, 0xda, 0xaf, 0x99, 0xa3, 0xfd, 0x50, 0x9b, 0xd1, 0xce, 0x19, 0xe6, 0x3f, 0x28, - 0xa8, 0xfe, 0x96, 0xfd, 0x20, 0xea, 0x82, 0x4b, 0xbc, 0x77, 0xb7, 0x97, 0x0b, 0x30, 0xe4, 0x34, - 0x9b, 0x12, 0x20, 0xed, 0x17, 0x59, 0x2a, 0x85, 0xb8, 0x18, 0xeb, 0x38, 0xca, 0x0b, 0xa7, 0x98, - 0xeb, 0x85, 0x53, 0x03, 0x88, 0x9c, 0x60, 0x83, 0x44, 0xb4, 0x4c, 0x98, 0x5b, 0xe7, 0x9f, 0x37, - 0xad, 0xc8, 0xad, 0xcf, 0xb8, 0x5e, 0x14, 0x46, 0xc1, 0xcc, 0xb2, 0x17, 0x5d, 0x0b, 0xf8, 0x33, - 0x55, 0x0b, 0x2a, 0xa8, 0x68, 0x61, 0x8d, 0xae, 0x8c, 0x3f, 0xc2, 0xda, 0xe8, 0x35, 0x0d, 0x61, - 0x56, 0x45, 0x39, 0x56, 0x18, 0xf6, 0x8b, 0xec, 0xf6, 0x61, 0x63, 0x7a, 0xb0, 0x80, 0x7a, 0x7f, - 0x3e, 0xac, 0x66, 0x83, 0xa9, 0x84, 0x17, 0xf4, 0xb0, 0x7d, 0xed, 0x0f, 0x7b, 0xda, 0xb0, 0xee, - 0xcf, 0x1a, 0xc7, 0xf6, 0x43, 0x1f, 0x4f, 0x19, 0x37, 0x3d, 0xd3, 0xe1, 0xd6, 0x38, 0x80, 0x39, - 0x13, 0xcb, 0xab, 0xc6, 0xb2, 0x4e, 0x2d, 0x97, 0xc5, 0xbe, 0xd0, 0xf2, 0xaa, 0x09, 0x00, 0x8e, - 0x71, 0x28, 0xc3, 0xa6, 0xfe, 0x84, 0x53, 0x28, 0x0e, 0xbf, 0xad, 0xb0, 0x43, 0xac, 0x61, 0xa0, - 0xf3, 0x42, 0x68, 0xc1, 0x75, 0x0f, 0x0f, 0x25, 0x84, 0x16, 0x72, 0xb8, 0x34, 0x49, 0xd3, 0x05, - 0x18, 0x22, 0x77, 0x22, 0x12, 0x78, 0x4e, 0x9d, 0xb6, 0xd0, 0x1b, 0x47, 0x8c, 0x5d, 0x8c, 0x8b, - 0xb1, 0x8e, 0x83, 0xd6, 0x60, 0x2c, 0xe4, 0xb2, 0x3c, 0x95, 0xf4, 0x81, 0xcb, 0x44, 0x9f, 0x54, - 0xde, 0xf0, 0x26, 0x78, 0x9f, 0x15, 0xf1, 0xd3, 0x49, 0xc6, 0x08, 0x49, 0x92, 0x40, 0xaf, 0xc2, - 0x68, 0xdd, 0x77, 0x6a, 0x73, 0x4e, 0xdd, 0xf1, 0xaa, 0x6c, 0x7c, 0x06, 0xcc, 0xec, 0xfc, 0x57, - 0x0d, 0x28, 0x4e, 0x60, 0x53, 0x06, 0x51, 0x2f, 0x11, 0x89, 0x4a, 0x1c, 0x6f, 0x83, 0x84, 0x53, - 0x83, 0xec, 0xab, 0x18, 0x83, 0x78, 0x35, 0x07, 0x07, 0xe7, 0xd6, 0x46, 0x17, 0x61, 0x58, 0x7e, - 0xbe, 0x16, 0x52, 0x27, 0x76, 0x68, 0xd2, 0x60, 0xd8, 0xc0, 0x44, 0x21, 0x1c, 0x95, 0xff, 0xd7, - 0x02, 0x67, 0x7d, 0xdd, 0xad, 0x8a, 0x38, 0x13, 0xdc, 0xf9, 0xfb, 0x23, 0xd2, 0xd3, 0x74, 0x31, - 0x0b, 0x69, 0x7f, 0xb7, 0x74, 0x52, 0x8c, 0x5a, 0x26, 0x1c, 0x67, 0xd3, 0x46, 0x2b, 0x30, 0xc9, - 0x6d, 0x60, 0xe6, 0x37, 0x49, 0x75, 0x4b, 0x6e, 0x38, 0xc6, 0x35, 0x6a, 0x8e, 0x3f, 0x97, 0xd3, - 0x28, 0x38, 0xab, 0x1e, 0x7a, 0x0b, 0xa6, 0x9a, 0xad, 0x5b, 0x75, 0x37, 0xdc, 0x5c, 0xf5, 0x23, - 0x66, 0x42, 0x36, 0x5b, 0xab, 0x05, 0x24, 0xe4, 0xbe, 0xc1, 0xec, 0xea, 0x95, 0x61, 0x90, 0xca, - 0x39, 0x78, 0x38, 0x97, 0x02, 0xba, 0x0b, 0x47, 0x13, 0x0b, 0x41, 0xc4, 0x33, 0x19, 0xcd, 0x4f, - 0xf9, 0x54, 0xc9, 0xaa, 0x20, 0x42, 0x03, 0x65, 0x81, 0x70, 0x76, 0x13, 0xe8, 0x25, 0x00, 0xb7, - 0xb9, 0xe4, 0x34, 0xdc, 0x3a, 0x7d, 0x8e, 0x4e, 0xb2, 0x35, 0x42, 0x9f, 0x26, 0xb0, 0x5c, 0x96, - 0xa5, 0xf4, 0x6c, 0x16, 0xff, 0x76, 0xb0, 0x86, 0x8d, 0xae, 0xc2, 0xa8, 0xf8, 0xb7, 0x23, 0xa6, - 0x74, 0x42, 0x65, 0x07, 0x1d, 0x95, 0x35, 0xd4, 0x3c, 0x26, 0x4a, 0x70, 0xa2, 0x2e, 0xda, 0x80, - 0x53, 0x32, 0x35, 0xa9, 0xbe, 0x3e, 0xe5, 0x1c, 0x84, 0x2c, 0xcf, 0xd2, 0x00, 0xf7, 0x29, 0x9a, - 0x6d, 0x87, 0x88, 0xdb, 0xd3, 0xa1, 0xf7, 0xba, 0xbe, 0xcc, 0xb9, 0xc7, 0xf8, 0xd1, 0x38, 0x12, - 0xe6, 0xd5, 0x24, 0x10, 0xa7, 0xf1, 0x91, 0x0f, 0x47, 0x5d, 0x2f, 0x6b, 0x55, 0x1f, 0x63, 0x84, - 0x3e, 0xcc, 0x9d, 0xe5, 0xdb, 0xaf, 0xe8, 0x4c, 0x38, 0xce, 0xa6, 0x8b, 0x96, 0x61, 0x32, 0xe2, - 0x05, 0x0b, 0x6e, 0xc8, 0xd3, 0xb8, 0xd0, 0x67, 0xdf, 0x71, 0xd6, 0xdc, 0x71, 0xba, 0x9a, 0xd7, - 0xd2, 0x60, 0x9c, 0x55, 0xe7, 0x9d, 0x19, 0x80, 0x7e, 0xdd, 0xa2, 0xb5, 0x35, 0x46, 0x1f, 0x7d, - 0x0a, 0x86, 0xf5, 0xf1, 0x11, 0x4c, 0xcb, 0xd9, 0x6c, 0x3e, 0x58, 0x3b, 0x5e, 0xf8, 0x33, 0x41, - 0x1d, 0x21, 0x3a, 0x0c, 0x1b, 0x14, 0x51, 0x35, 0x23, 0xc8, 0xc5, 0xf9, 0xee, 0x98, 0xa2, 0xee, - 0xed, 0x1f, 0x09, 0x64, 0xef, 0x1c, 0x74, 0x15, 0x06, 0xaa, 0x75, 0x97, 0x78, 0xd1, 0x72, 0xb9, - 0x5d, 0x80, 0xd2, 0x79, 0x81, 0x23, 0xb6, 0xa2, 0xc8, 0xbe, 0xc4, 0xcb, 0xb0, 0xa2, 0x60, 0x5f, - 0x84, 0xa1, 0x4a, 0x9d, 0x90, 0x26, 0xf7, 0xe3, 0x42, 0x4f, 0xb0, 0x87, 0x09, 0x63, 0x2d, 0x2d, - 0xc6, 0x5a, 0xea, 0x6f, 0x0e, 0xc6, 0x54, 0x4a, 0xb8, 0xfd, 0xdb, 0x05, 0x28, 0x75, 0x48, 0x02, - 0x96, 0xd0, 0xb7, 0x59, 0x5d, 0xe9, 0xdb, 0x66, 0x61, 0x2c, 0xfe, 0xa7, 0x8b, 0xf2, 0x94, 0x31, - 0xf4, 0x0d, 0x13, 0x8c, 0x93, 0xf8, 0x5d, 0xfb, 0xb5, 0xe8, 0x2a, 0xbb, 0x9e, 0x8e, 0x9e, 0x59, - 0x86, 0xaa, 0xbe, 0xb7, 0xfb, 0xb7, 0x77, 0xae, 0xda, 0xd5, 0xfe, 0x5a, 0x01, 0x8e, 0xaa, 0x21, - 0x7c, 0xef, 0x0e, 0xdc, 0xf5, 0xf4, 0xc0, 0xdd, 0x07, 0xa5, 0xb5, 0x7d, 0x0d, 0xfa, 0x78, 0xd4, - 0xd4, 0x2e, 0x78, 0xfe, 0x47, 0xcc, 0xe0, 0xf4, 0x8a, 0xcd, 0x34, 0x02, 0xd4, 0xff, 0x80, 0x05, - 0x63, 0x09, 0x07, 0x49, 0x84, 0x35, 0x2f, 0xfa, 0x7b, 0xe1, 0xcb, 0xb3, 0x38, 0xfe, 0x33, 0xd0, - 0xb3, 0xe9, 0x2b, 0x23, 0x65, 0x85, 0x71, 0xd9, 0x0f, 0x23, 0xcc, 0x20, 0xf6, 0x1f, 0x59, 0xd0, - 0xbb, 0xe6, 0xb8, 0x5e, 0x24, 0xb5, 0x1f, 0x56, 0x8e, 0xf6, 0xa3, 0x9b, 0xef, 0x42, 0x2f, 0x40, - 0x1f, 0x59, 0x5f, 0x27, 0xd5, 0x48, 0xcc, 0xaa, 0x8c, 0xa6, 0xd1, 0xb7, 0xc8, 0x4a, 0x29, 0x13, - 0xca, 0x1a, 0xe3, 0x7f, 0xb1, 0x40, 0x46, 0x37, 0x61, 0x30, 0x72, 0x1b, 0x64, 0xb6, 0x56, 0x13, - 0x36, 0x01, 0xf7, 0x10, 0x02, 0x66, 0x4d, 0x12, 0xc0, 0x31, 0x2d, 0xfb, 0x8b, 0x05, 0x80, 0x38, - 0x14, 0x5c, 0xa7, 0x4f, 0x9c, 0x4b, 0x69, 0x8b, 0xcf, 0x66, 0x68, 0x8b, 0x51, 0x4c, 0x30, 0x43, - 0x55, 0xac, 0x86, 0xa9, 0xd8, 0xd5, 0x30, 0xf5, 0x1c, 0x64, 0x98, 0xe6, 0x61, 0x22, 0x0e, 0x65, - 0x67, 0x46, 0xf2, 0x64, 0xf7, 0xf7, 0x5a, 0x12, 0x88, 0xd3, 0xf8, 0x36, 0x81, 0x33, 0x2a, 0xa2, - 0x97, 0xb8, 0x0b, 0x99, 0x2b, 0x81, 0xae, 0x7d, 0xef, 0x30, 0x4e, 0xb1, 0x3a, 0xbc, 0x90, 0xab, - 0x0e, 0xff, 0x29, 0x0b, 0x8e, 0x24, 0xdb, 0x61, 0x7e, 0xf7, 0x9f, 0xb7, 0xe0, 0x68, 0x9c, 0x03, - 0x27, 0x6d, 0x82, 0xf0, 0x7c, 0xdb, 0x28, 0x65, 0x39, 0x3d, 0x8e, 0xc3, 0xb6, 0xac, 0x64, 0x91, - 0xc6, 0xd9, 0x2d, 0xda, 0xff, 0xab, 0x07, 0xa6, 0xf2, 0xc2, 0x9b, 0x31, 0x4f, 0x23, 0xe7, 0x4e, - 0x65, 0x8b, 0xdc, 0x16, 0xfe, 0x1c, 0xb1, 0xa7, 0x11, 0x2f, 0xc6, 0x12, 0x9e, 0x4c, 0x7b, 0x54, - 0xe8, 0x32, 0xed, 0xd1, 0x26, 0x4c, 0xdc, 0xde, 0x24, 0xde, 0x75, 0x2f, 0x74, 0x22, 0x37, 0x5c, - 0x77, 0x99, 0x02, 0x9d, 0xaf, 0x1b, 0x99, 0xba, 0x7f, 0xe2, 0x66, 0x12, 0x61, 0x7f, 0xb7, 0x74, - 0xca, 0x28, 0x88, 0xbb, 0xcc, 0x0f, 0x12, 0x9c, 0x26, 0x9a, 0xce, 0x1a, 0xd5, 0xf3, 0x80, 0xb3, - 0x46, 0x35, 0x5c, 0x61, 0x76, 0x23, 0xdd, 0x48, 0xd8, 0xb3, 0x75, 0x45, 0x95, 0x62, 0x0d, 0x03, - 0x7d, 0x02, 0x90, 0x9e, 0xf6, 0xcf, 0x88, 0x2e, 0xfb, 0xcc, 0xde, 0x6e, 0x09, 0xad, 0xa6, 0xa0, - 0xfb, 0xbb, 0xa5, 0x49, 0x5a, 0xba, 0xec, 0xd1, 0xe7, 0x6f, 0x1c, 0x92, 0x2f, 0x83, 0x10, 0xba, - 0x09, 0xe3, 0xb4, 0x94, 0xed, 0x28, 0x19, 0xba, 0x96, 0x3f, 0x59, 0x9f, 0xda, 0xdb, 0x2d, 0x8d, - 0xaf, 0x26, 0x60, 0x79, 0xa4, 0x53, 0x44, 0x32, 0x92, 0x47, 0x0d, 0x74, 0x9b, 0x3c, 0xca, 0xfe, - 0xbc, 0x05, 0x27, 0xe8, 0x05, 0x57, 0xbb, 0x9a, 0xa3, 0x45, 0x77, 0x9a, 0x2e, 0xd7, 0xd3, 0x88, - 0xab, 0x86, 0xc9, 0xea, 0xca, 0xcb, 0x5c, 0x4b, 0xa3, 0xa0, 0xf4, 0x84, 0xdf, 0x72, 0xbd, 0x5a, - 0xf2, 0x84, 0xbf, 0xe2, 0x7a, 0x35, 0xcc, 0x20, 0xea, 0xca, 0x2a, 0xe6, 0x46, 0xa9, 0xff, 0x0a, - 0xdd, 0xab, 0xb4, 0x2f, 0xdf, 0xd2, 0x6e, 0xa0, 0xa7, 0x74, 0x9d, 0xaa, 0x30, 0x9f, 0xcc, 0xd5, - 0xa7, 0x7e, 0xce, 0x02, 0xe1, 0xfd, 0xde, 0xc5, 0x9d, 0xfc, 0x26, 0x0c, 0x6f, 0xa7, 0x53, 0xa2, - 0x9e, 0xc9, 0x0f, 0x07, 0x20, 0x12, 0xa1, 0x2a, 0x16, 0xdd, 0x48, 0x7f, 0x6a, 0xd0, 0xb2, 0x6b, - 0x20, 0xa0, 0x0b, 0x84, 0x69, 0x35, 0x3a, 0xf7, 0xe6, 0x59, 0x80, 0x1a, 0xc3, 0x65, 0x79, 0xd2, - 0x0b, 0x26, 0xc7, 0xb5, 0xa0, 0x20, 0x58, 0xc3, 0xb2, 0x7f, 0xae, 0x08, 0x43, 0x32, 0x05, 0x67, - 0xcb, 0xeb, 0x46, 0xf6, 0x78, 0xa0, 0x9c, 0xfc, 0xe8, 0x2d, 0x98, 0x08, 0x48, 0xb5, 0x15, 0x84, - 0xee, 0x36, 0x91, 0x60, 0xb1, 0x49, 0x66, 0x78, 0x92, 0x84, 0x04, 0x70, 0x9f, 0x85, 0xc8, 0x4a, - 0x14, 0x32, 0xa5, 0x71, 0x9a, 0x10, 0x3a, 0x0f, 0x83, 0x4c, 0xf4, 0x5e, 0x8e, 0x05, 0xc2, 0x4a, - 0xf0, 0xb5, 0x22, 0x01, 0x38, 0xc6, 0x61, 0x8f, 0x83, 0xd6, 0x2d, 0x86, 0x9e, 0xf0, 0x04, 0xaf, - 0xf0, 0x62, 0x2c, 0xe1, 0xe8, 0xa3, 0x30, 0xce, 0xeb, 0x05, 0x7e, 0xd3, 0xd9, 0xe0, 0x2a, 0xc1, - 0x5e, 0x15, 0x5e, 0x67, 0x7c, 0x25, 0x01, 0xdb, 0xdf, 0x2d, 0x1d, 0x49, 0x96, 0xb1, 0x6e, 0xa7, - 0xa8, 0x30, 0xcb, 0x3f, 0xde, 0x08, 0xbd, 0x33, 0x52, 0x06, 0x83, 0x31, 0x08, 0xeb, 0x78, 0xf6, - 0x5f, 0x59, 0x30, 0xa1, 0x4d, 0x55, 0xd7, 0x79, 0x2a, 0x8c, 0x41, 0x2a, 0x74, 0x31, 0x48, 0x07, - 0x8b, 0xf6, 0x90, 0x39, 0xc3, 0x3d, 0xf7, 0x69, 0x86, 0xed, 0x4f, 0x01, 0x4a, 0xe7, 0x77, 0x45, - 0xaf, 0x73, 0x43, 0x7e, 0x37, 0x20, 0xb5, 0x76, 0x0a, 0x7f, 0x3d, 0x72, 0x8e, 0xf4, 0x5c, 0xe5, - 0xb5, 0xb0, 0xaa, 0x6f, 0xff, 0x60, 0x0f, 0x8c, 0x27, 0x63, 0x75, 0xa0, 0xcb, 0xd0, 0xc7, 0xb9, - 0x74, 0x41, 0xbe, 0x8d, 0x3d, 0x99, 0x16, 0xe1, 0x83, 0xf1, 0x2b, 0x82, 0xd1, 0x17, 0xf5, 0xd1, - 0x5b, 0x30, 0x54, 0xf3, 0x6f, 0x7b, 0xb7, 0x9d, 0xa0, 0x36, 0x5b, 0x5e, 0x16, 0x27, 0x44, 0xa6, - 0x00, 0x6a, 0x21, 0x46, 0xd3, 0xa3, 0x86, 0x30, 0xdb, 0x89, 0x18, 0x84, 0x75, 0x72, 0x68, 0x8d, - 0xa5, 0x2c, 0x5a, 0x77, 0x37, 0x56, 0x9c, 0x66, 0x3b, 0xaf, 0xae, 0x79, 0x89, 0xa4, 0x51, 0x1e, - 0x11, 0x79, 0x8d, 0x38, 0x00, 0xc7, 0x84, 0xd0, 0x67, 0x60, 0x32, 0xcc, 0x51, 0x89, 0xe5, 0xa5, - 0xfb, 0x6e, 0xa7, 0x25, 0xe2, 0xc2, 0x94, 0x2c, 0xe5, 0x59, 0x56, 0x33, 0xe8, 0x0e, 0x20, 0x21, - 0x7a, 0x5e, 0x0b, 0x5a, 0x61, 0x34, 0xd7, 0xf2, 0x6a, 0x75, 0x99, 0xd2, 0xe8, 0x83, 0xd9, 0x72, - 0x82, 0x24, 0xb6, 0xd6, 0x36, 0x8b, 0xdd, 0x9b, 0xc6, 0xc0, 0x19, 0x6d, 0xd8, 0x9f, 0xeb, 0x81, - 0x69, 0x99, 0x50, 0x39, 0xc3, 0x7b, 0xe5, 0xb3, 0x56, 0xc2, 0x7d, 0xe5, 0xa5, 0xfc, 0x83, 0xfe, - 0x81, 0x39, 0xb1, 0x7c, 0x21, 0xed, 0xc4, 0xf2, 0xca, 0x01, 0xbb, 0x71, 0xdf, 0x5c, 0x59, 0xde, - 0xb3, 0xfe, 0x27, 0x7b, 0x47, 0xc0, 0xb8, 0x9a, 0x11, 0xe6, 0x81, 0xd1, 0xcb, 0x52, 0x75, 0x94, - 0xf3, 0xfc, 0xbf, 0x2c, 0x70, 0x8c, 0xcb, 0x7e, 0x58, 0x86, 0x4f, 0x67, 0xe7, 0xac, 0xa2, 0x43, - 0x69, 0x92, 0x46, 0x33, 0xda, 0x59, 0x70, 0x03, 0xd1, 0xe3, 0x4c, 0x9a, 0x8b, 0x02, 0x27, 0x4d, - 0x53, 0x42, 0xb0, 0xa2, 0x83, 0xb6, 0x61, 0x62, 0x83, 0x45, 0x7c, 0xd2, 0x72, 0x1b, 0x8b, 0x73, - 0x21, 0x73, 0xdf, 0x5e, 0x9a, 0x5f, 0xcc, 0x4f, 0x84, 0xcc, 0x1f, 0x7f, 0x29, 0x14, 0x9c, 0x6e, - 0x82, 0x6e, 0x8d, 0x23, 0xce, 0xed, 0x70, 0xb1, 0xee, 0x84, 0x91, 0x5b, 0x9d, 0xab, 0xfb, 0xd5, - 0xad, 0x4a, 0xe4, 0x07, 0x32, 0x01, 0x62, 0xe6, 0xdb, 0x6b, 0xf6, 0x66, 0x25, 0x85, 0x6f, 0x34, - 0x3f, 0xb5, 0xb7, 0x5b, 0x3a, 0x92, 0x85, 0x85, 0x33, 0xdb, 0x42, 0xab, 0xd0, 0xbf, 0xe1, 0x46, - 0x98, 0x34, 0x7d, 0x71, 0x5a, 0x64, 0x1e, 0x85, 0x97, 0x38, 0x8a, 0xd1, 0x12, 0x8b, 0x48, 0x25, - 0x00, 0x58, 0x12, 0x41, 0xaf, 0xab, 0x4b, 0xa0, 0x2f, 0x5f, 0x00, 0x9b, 0xb6, 0xbd, 0xcb, 0xbc, - 0x06, 0x5e, 0x85, 0xa2, 0xb7, 0x1e, 0xb6, 0x8b, 0xc5, 0xb3, 0xba, 0x64, 0xc8, 0xcf, 0xe6, 0xfa, - 0xe9, 0xd3, 0x78, 0x75, 0xa9, 0x82, 0x69, 0x45, 0xe6, 0xf6, 0x1a, 0x56, 0x43, 0x57, 0x24, 0x5c, - 0xca, 0xf4, 0x02, 0x5e, 0xae, 0xcc, 0x57, 0x96, 0x0d, 0x1a, 0x2c, 0xaa, 0x21, 0x2b, 0xc6, 0xbc, - 0x3a, 0xba, 0x01, 0x83, 0x1b, 0xfc, 0xe0, 0x5b, 0x0f, 0x45, 0x52, 0xf5, 0xcc, 0xcb, 0xe8, 0x92, - 0x44, 0x32, 0xe8, 0xb1, 0x2b, 0x43, 0x81, 0x70, 0x4c, 0x0a, 0x7d, 0xce, 0x82, 0xa3, 0xc9, 0xac, - 0xf4, 0xcc, 0x59, 0x4d, 0x98, 0xa9, 0x65, 0x3a, 0x00, 0x94, 0xb3, 0x2a, 0x18, 0x0d, 0x32, 0xf5, - 0x4b, 0x26, 0x1a, 0xce, 0x6e, 0x8e, 0x0e, 0x74, 0x70, 0xab, 0xd6, 0x2e, 0x47, 0x4f, 0x22, 0x30, - 0x11, 0x1f, 0x68, 0x3c, 0xb7, 0x80, 0x69, 0x45, 0xb4, 0x06, 0xb0, 0x5e, 0x27, 0x22, 0xe2, 0xa3, - 0x30, 0x8a, 0xca, 0xbc, 0xfd, 0x97, 0x14, 0x96, 0xa0, 0xc3, 0x5e, 0xa2, 0x71, 0x29, 0xd6, 0xe8, - 0xd0, 0xa5, 0x54, 0x75, 0xbd, 0x1a, 0x09, 0x98, 0x72, 0x2b, 0x67, 0x29, 0xcd, 0x33, 0x8c, 0xf4, - 0x52, 0xe2, 0xe5, 0x58, 0x50, 0x60, 0xb4, 0x48, 0x73, 0x73, 0x3d, 0x6c, 0x97, 0x72, 0x62, 0x9e, - 0x34, 0x37, 0x13, 0x0b, 0x8a, 0xd3, 0x62, 0xe5, 0x58, 0x50, 0xa0, 0x5b, 0x66, 0x9d, 0x6e, 0x20, - 0x12, 0x4c, 0x8d, 0xe5, 0x6f, 0x99, 0x25, 0x8e, 0x92, 0xde, 0x32, 0x02, 0x80, 0x25, 0x11, 0xf4, - 0x49, 0x93, 0xdb, 0x19, 0x67, 0x34, 0x9f, 0xea, 0xc0, 0xed, 0x18, 0x74, 0xdb, 0xf3, 0x3b, 0x2f, - 0x41, 0x61, 0xbd, 0xca, 0x94, 0x62, 0x39, 0x3a, 0x83, 0xa5, 0x79, 0x83, 0x1a, 0x0b, 0xe1, 0xbe, - 0x34, 0x8f, 0x0b, 0xeb, 0x55, 0xba, 0xf4, 0x9d, 0xbb, 0xad, 0x80, 0x2c, 0xb9, 0x75, 0x22, 0xd2, - 0x4f, 0x64, 0x2e, 0xfd, 0x59, 0x89, 0x94, 0x5e, 0xfa, 0x0a, 0x84, 0x63, 0x52, 0x94, 0x6e, 0xcc, - 0x83, 0x4d, 0xe6, 0xd3, 0x55, 0xac, 0x56, 0x9a, 0x6e, 0x26, 0x17, 0xb6, 0x05, 0x23, 0xdb, 0x61, - 0x73, 0x93, 0xc8, 0x53, 0x91, 0xa9, 0xeb, 0x72, 0x22, 0x55, 0xdc, 0x10, 0x88, 0x6e, 0x10, 0xb5, - 0x9c, 0x7a, 0xea, 0x20, 0x67, 0xa2, 0x95, 0x1b, 0x3a, 0x31, 0x6c, 0xd2, 0xa6, 0x0b, 0xe1, 0x6d, - 0x1e, 0x4e, 0x8e, 0x29, 0xee, 0x72, 0x16, 0x42, 0x46, 0xc4, 0x39, 0xbe, 0x10, 0x04, 0x00, 0x4b, - 0x22, 0x6a, 0xb0, 0xd9, 0x05, 0x74, 0xac, 0xc3, 0x60, 0xa7, 0xfa, 0x1b, 0x0f, 0x36, 0xbb, 0x70, - 0x62, 0x52, 0xec, 0xa2, 0x69, 0x66, 0x24, 0xf0, 0x67, 0x6a, 0xbb, 0x9c, 0x8b, 0xa6, 0x53, 0xc2, - 0x7f, 0x7e, 0xd1, 0x64, 0x61, 0xe1, 0xcc, 0xb6, 0xe8, 0xc7, 0x35, 0x65, 0x64, 0x40, 0x91, 0x22, - 0xe3, 0x89, 0x9c, 0xc0, 0x9a, 0xe9, 0xf0, 0x81, 0xfc, 0xe3, 0x14, 0x08, 0xc7, 0xa4, 0x50, 0x0d, - 0x46, 0x9b, 0x46, 0xc4, 0x59, 0x96, 0xea, 0x23, 0x87, 0x2f, 0xc8, 0x8a, 0x4d, 0xcb, 0x25, 0x44, - 0x26, 0x04, 0x27, 0x68, 0x32, 0xcb, 0x3d, 0xee, 0xea, 0xc7, 0x32, 0x81, 0xe4, 0x4c, 0x75, 0x86, - 0x37, 0x20, 0x9f, 0x6a, 0x01, 0xc0, 0x92, 0x08, 0x1d, 0x0d, 0xe1, 0xa0, 0xe6, 0x87, 0x2c, 0xa1, - 0x4e, 0x9e, 0x82, 0x3d, 0x4b, 0x4d, 0x24, 0xc3, 0xac, 0x0b, 0x10, 0x8e, 0x49, 0xd1, 0x93, 0x9c, - 0x5e, 0x78, 0x27, 0xf3, 0x4f, 0xf2, 0xe4, 0x75, 0xc7, 0x4e, 0x72, 0x7a, 0xd9, 0x15, 0xc5, 0x55, - 0xa7, 0xa2, 0x82, 0xb3, 0x64, 0x20, 0x39, 0xfd, 0x52, 0x61, 0xc5, 0xd3, 0xfd, 0x52, 0x20, 0x1c, - 0x93, 0x62, 0x57, 0x31, 0x0b, 0x4d, 0x77, 0xba, 0xcd, 0x55, 0x4c, 0x11, 0x32, 0xae, 0x62, 0x2d, - 0x74, 0x9d, 0xfd, 0x83, 0x05, 0x38, 0xdd, 0x7e, 0xdf, 0xc6, 0x3a, 0xb4, 0x72, 0x6c, 0xb3, 0x94, - 0xd0, 0xa1, 0x71, 0x89, 0x4e, 0x8c, 0xd5, 0x75, 0xc0, 0xe1, 0x4b, 0x30, 0xa1, 0xdc, 0x11, 0xeb, - 0x6e, 0x75, 0x47, 0x4b, 0xce, 0xa9, 0x42, 0xf3, 0x54, 0x92, 0x08, 0x38, 0x5d, 0x07, 0xcd, 0xc2, - 0x98, 0x51, 0xb8, 0xbc, 0x20, 0x9e, 0xff, 0x71, 0x1a, 0x0b, 0x13, 0x8c, 0x93, 0xf8, 0xf6, 0xcf, - 0x5b, 0x70, 0x3c, 0x27, 0x0f, 0x7b, 0xd7, 0xf1, 0x74, 0xd7, 0x61, 0xac, 0x69, 0x56, 0xed, 0x10, - 0x02, 0xdc, 0xc8, 0xf6, 0xae, 0xfa, 0x9a, 0x00, 0xe0, 0x24, 0x51, 0xfb, 0x67, 0x0b, 0x70, 0xaa, - 0xad, 0x7d, 0x3d, 0xc2, 0x70, 0x6c, 0xa3, 0x11, 0x3a, 0xf3, 0x01, 0xa9, 0x11, 0x2f, 0x72, 0x9d, - 0x7a, 0xa5, 0x49, 0xaa, 0x9a, 0x16, 0x94, 0x19, 0xaa, 0x5f, 0x5a, 0xa9, 0xcc, 0xa6, 0x31, 0x70, - 0x4e, 0x4d, 0xb4, 0x04, 0x28, 0x0d, 0x11, 0x33, 0xcc, 0x9e, 0xb8, 0x69, 0x7a, 0x38, 0xa3, 0x06, - 0x7a, 0x11, 0x46, 0x94, 0xdd, 0xbe, 0x36, 0xe3, 0xec, 0x82, 0xc0, 0x3a, 0x00, 0x9b, 0x78, 0xe8, - 0x02, 0xcf, 0x6f, 0x24, 0x32, 0x61, 0x09, 0x95, 0xe9, 0x98, 0x4c, 0x5e, 0x24, 0x8a, 0xb1, 0x8e, - 0x33, 0x77, 0xf1, 0x77, 0xbe, 0x79, 0xfa, 0x03, 0xbf, 0xff, 0xcd, 0xd3, 0x1f, 0xf8, 0xc3, 0x6f, - 0x9e, 0xfe, 0xc0, 0xf7, 0xec, 0x9d, 0xb6, 0x7e, 0x67, 0xef, 0xb4, 0xf5, 0xfb, 0x7b, 0xa7, 0xad, - 0x3f, 0xdc, 0x3b, 0x6d, 0xfd, 0xd7, 0xbd, 0xd3, 0xd6, 0x17, 0xff, 0xe4, 0xf4, 0x07, 0xde, 0x44, - 0x71, 0x84, 0xea, 0xf3, 0x74, 0x76, 0xce, 0x6f, 0x5f, 0xf8, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x67, 0xd5, 0x38, 0x2d, 0xc3, 0x23, 0x01, 0x00, + // 16114 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x90, 0x64, 0xd9, + 0x59, 0x28, 0xa6, 0x9b, 0x59, 0xeb, 0x57, 0xfb, 0xa9, 0x5e, 0xaa, 0x6b, 0xba, 0x3b, 0x7b, 0xee, + 0xcc, 0xf4, 0xf4, 0x6c, 0xd5, 0xea, 0x59, 0x34, 0xad, 0x99, 0xd1, 0x30, 0xb5, 0x76, 0xd7, 0x74, + 0x57, 0x75, 0xce, 0xc9, 0xaa, 0x6e, 0x69, 0x34, 0x12, 0xba, 0x9d, 0x79, 0xaa, 0xea, 0xaa, 0x32, + 0xef, 0xcd, 0xb9, 0xf7, 0x66, 0x75, 0x57, 0x5b, 0x04, 0x20, 0x8c, 0x40, 0x02, 0x47, 0x28, 0x08, + 0x6c, 0x1c, 0x82, 0xe0, 0x07, 0x60, 0x16, 0xcb, 0x60, 0x64, 0x61, 0xc0, 0x88, 0xcd, 0x36, 0x8e, + 0x00, 0xff, 0xc0, 0x98, 0x08, 0x4b, 0x84, 0x09, 0x17, 0x56, 0xe1, 0x08, 0x82, 0x1f, 0x06, 0x82, + 0xf7, 0x7e, 0xbc, 0x57, 0xc1, 0x7b, 0xbc, 0x38, 0xeb, 0x3d, 0xe7, 0x2e, 0x99, 0x59, 0x3d, 0xdd, + 0xa5, 0x91, 0x62, 0xfe, 0x65, 0x9e, 0xef, 0x3b, 0xdf, 0x39, 0xf7, 0xac, 0xdf, 0xf9, 0x56, 0xb0, + 0xb7, 0x2f, 0x87, 0x33, 0xae, 0x7f, 0xd1, 0x69, 0xba, 0x17, 0xab, 0x7e, 0x40, 0x2e, 0xee, 0x5c, + 0xba, 0xb8, 0x49, 0x3c, 0x12, 0x38, 0x11, 0xa9, 0xcd, 0x34, 0x03, 0x3f, 0xf2, 0x11, 0xe2, 0x38, + 0x33, 0x4e, 0xd3, 0x9d, 0xa1, 0x38, 0x33, 0x3b, 0x97, 0xa6, 0x9f, 0xdb, 0x74, 0xa3, 0xad, 0xd6, + 0xed, 0x99, 0xaa, 0xdf, 0xb8, 0xb8, 0xe9, 0x6f, 0xfa, 0x17, 0x19, 0xea, 0xed, 0xd6, 0x06, 0xfb, + 0xc7, 0xfe, 0xb0, 0x5f, 0x9c, 0xc4, 0xf4, 0x8b, 0x71, 0x33, 0x0d, 0xa7, 0xba, 0xe5, 0x7a, 0x24, + 0xd8, 0xbd, 0xd8, 0xdc, 0xde, 0x64, 0xed, 0x06, 0x24, 0xf4, 0x5b, 0x41, 0x95, 0x24, 0x1b, 0x6e, + 0x5b, 0x2b, 0xbc, 0xd8, 0x20, 0x91, 0x93, 0xd1, 0xdd, 0xe9, 0x8b, 0x79, 0xb5, 0x82, 0x96, 0x17, + 0xb9, 0x8d, 0x74, 0x33, 0x1f, 0xe9, 0x54, 0x21, 0xac, 0x6e, 0x91, 0x86, 0x93, 0xaa, 0xf7, 0x42, + 0x5e, 0xbd, 0x56, 0xe4, 0xd6, 0x2f, 0xba, 0x5e, 0x14, 0x46, 0x41, 0xb2, 0x92, 0xfd, 0x2d, 0x0b, + 0xce, 0xcd, 0xde, 0xaa, 0x2c, 0xd6, 0x9d, 0x30, 0x72, 0xab, 0x73, 0x75, 0xbf, 0xba, 0x5d, 0x89, + 0xfc, 0x80, 0xdc, 0xf4, 0xeb, 0xad, 0x06, 0xa9, 0xb0, 0x81, 0x40, 0xcf, 0xc2, 0xc0, 0x0e, 0xfb, + 0xbf, 0xbc, 0x30, 0x65, 0x9d, 0xb3, 0x2e, 0x0c, 0xce, 0x8d, 0xff, 0xe9, 0x5e, 0xe9, 0x43, 0xfb, + 0x7b, 0xa5, 0x81, 0x9b, 0xa2, 0x1c, 0x2b, 0x0c, 0x74, 0x1e, 0xfa, 0x36, 0xc2, 0xb5, 0xdd, 0x26, + 0x99, 0x2a, 0x30, 0xdc, 0x51, 0x81, 0xdb, 0xb7, 0x54, 0xa1, 0xa5, 0x58, 0x40, 0xd1, 0x45, 0x18, + 0x6c, 0x3a, 0x41, 0xe4, 0x46, 0xae, 0xef, 0x4d, 0x15, 0xcf, 0x59, 0x17, 0x7a, 0xe7, 0x26, 0x04, + 0xea, 0x60, 0x59, 0x02, 0x70, 0x8c, 0x43, 0xbb, 0x11, 0x10, 0xa7, 0x76, 0xc3, 0xab, 0xef, 0x4e, + 0xf5, 0x9c, 0xb3, 0x2e, 0x0c, 0xc4, 0xdd, 0xc0, 0xa2, 0x1c, 0x2b, 0x0c, 0xfb, 0x2b, 0x05, 0x18, + 0x98, 0xdd, 0xd8, 0x70, 0x3d, 0x37, 0xda, 0x45, 0x37, 0x61, 0xd8, 0xf3, 0x6b, 0x44, 0xfe, 0x67, + 0x5f, 0x31, 0xf4, 0xfc, 0xb9, 0x99, 0xf4, 0x52, 0x9a, 0x59, 0xd5, 0xf0, 0xe6, 0xc6, 0xf7, 0xf7, + 0x4a, 0xc3, 0x7a, 0x09, 0x36, 0xe8, 0x20, 0x0c, 0x43, 0x4d, 0xbf, 0xa6, 0xc8, 0x16, 0x18, 0xd9, + 0x52, 0x16, 0xd9, 0x72, 0x8c, 0x36, 0x37, 0xb6, 0xbf, 0x57, 0x1a, 0xd2, 0x0a, 0xb0, 0x4e, 0x04, + 0xdd, 0x86, 0x31, 0xfa, 0xd7, 0x8b, 0x5c, 0x45, 0xb7, 0xc8, 0xe8, 0x3e, 0x96, 0x47, 0x57, 0x43, + 0x9d, 0x9b, 0xdc, 0xdf, 0x2b, 0x8d, 0x25, 0x0a, 0x71, 0x92, 0xa0, 0xfd, 0x93, 0x16, 0x8c, 0xcd, + 0x36, 0x9b, 0xb3, 0x41, 0xc3, 0x0f, 0xca, 0x81, 0xbf, 0xe1, 0xd6, 0x09, 0x7a, 0x19, 0x7a, 0x22, + 0x3a, 0x6b, 0x7c, 0x86, 0x1f, 0x13, 0x43, 0xdb, 0x43, 0xe7, 0xea, 0x60, 0xaf, 0x34, 0x99, 0x40, + 0x67, 0x53, 0xc9, 0x2a, 0xa0, 0x37, 0x60, 0xbc, 0xee, 0x57, 0x9d, 0xfa, 0x96, 0x1f, 0x46, 0x02, + 0x2a, 0xa6, 0xfe, 0xd8, 0xfe, 0x5e, 0x69, 0xfc, 0x7a, 0x02, 0x86, 0x53, 0xd8, 0xf6, 0x3d, 0x18, + 0x9d, 0x8d, 0x22, 0xa7, 0xba, 0x45, 0x6a, 0x7c, 0x41, 0xa1, 0x17, 0xa1, 0xc7, 0x73, 0x1a, 0xb2, + 0x33, 0xe7, 0x64, 0x67, 0x56, 0x9d, 0x06, 0xed, 0xcc, 0xf8, 0xba, 0xe7, 0xbe, 0xdb, 0x12, 0x8b, + 0x94, 0x96, 0x61, 0x86, 0x8d, 0x9e, 0x07, 0xa8, 0x91, 0x1d, 0xb7, 0x4a, 0xca, 0x4e, 0xb4, 0x25, + 0xfa, 0x80, 0x44, 0x5d, 0x58, 0x50, 0x10, 0xac, 0x61, 0xd9, 0x77, 0x61, 0x70, 0x76, 0xc7, 0x77, + 0x6b, 0x65, 0xbf, 0x16, 0xa2, 0x6d, 0x18, 0x6b, 0x06, 0x64, 0x83, 0x04, 0xaa, 0x68, 0xca, 0x3a, + 0x57, 0xbc, 0x30, 0xf4, 0xfc, 0x85, 0xcc, 0xb1, 0x37, 0x51, 0x17, 0xbd, 0x28, 0xd8, 0x9d, 0x3b, + 0x29, 0xda, 0x1b, 0x4b, 0x40, 0x71, 0x92, 0xb2, 0xfd, 0x27, 0x05, 0x38, 0x3e, 0x7b, 0xaf, 0x15, + 0x90, 0x05, 0x37, 0xdc, 0x4e, 0x6e, 0xb8, 0x9a, 0x1b, 0x6e, 0xaf, 0xc6, 0x23, 0xa0, 0x56, 0xfa, + 0x82, 0x28, 0xc7, 0x0a, 0x03, 0x3d, 0x07, 0xfd, 0xf4, 0xf7, 0x3a, 0x5e, 0x16, 0x9f, 0x3c, 0x29, + 0x90, 0x87, 0x16, 0x9c, 0xc8, 0x59, 0xe0, 0x20, 0x2c, 0x71, 0xd0, 0x0a, 0x0c, 0x55, 0xd9, 0xf9, + 0xb0, 0xb9, 0xe2, 0xd7, 0x08, 0x5b, 0x5b, 0x83, 0x73, 0xcf, 0x50, 0xf4, 0xf9, 0xb8, 0xf8, 0x60, + 0xaf, 0x34, 0xc5, 0xfb, 0x26, 0x48, 0x68, 0x30, 0xac, 0xd7, 0x47, 0xb6, 0xda, 0xee, 0x3d, 0x8c, + 0x12, 0x64, 0x6c, 0xf5, 0x0b, 0xda, 0xce, 0xed, 0x65, 0x3b, 0x77, 0x38, 0x7b, 0xd7, 0xa2, 0x4b, + 0xd0, 0xb3, 0xed, 0x7a, 0xb5, 0xa9, 0x3e, 0x46, 0xeb, 0x0c, 0x9d, 0xf3, 0x6b, 0xae, 0x57, 0x3b, + 0xd8, 0x2b, 0x4d, 0x18, 0xdd, 0xa1, 0x85, 0x98, 0xa1, 0xda, 0xff, 0xc6, 0x82, 0x12, 0x83, 0x2d, + 0xb9, 0x75, 0x52, 0x26, 0x41, 0xe8, 0x86, 0x11, 0xf1, 0x22, 0x63, 0x40, 0x9f, 0x07, 0x08, 0x49, + 0x35, 0x20, 0x91, 0x36, 0xa4, 0x6a, 0x61, 0x54, 0x14, 0x04, 0x6b, 0x58, 0xf4, 0x7c, 0x0a, 0xb7, + 0x9c, 0x80, 0xad, 0x2f, 0x31, 0xb0, 0xea, 0x7c, 0xaa, 0x48, 0x00, 0x8e, 0x71, 0x8c, 0xf3, 0xa9, + 0xd8, 0xe9, 0x7c, 0x42, 0x1f, 0x83, 0xb1, 0xb8, 0xb1, 0xb0, 0xe9, 0x54, 0xe5, 0x00, 0xb2, 0x1d, + 0x5c, 0x31, 0x41, 0x38, 0x89, 0x6b, 0xff, 0xb7, 0x96, 0x58, 0x3c, 0xf4, 0xab, 0xdf, 0xe7, 0xdf, + 0x6a, 0xff, 0xae, 0x05, 0xfd, 0x73, 0xae, 0x57, 0x73, 0xbd, 0x4d, 0xf4, 0x19, 0x18, 0xa0, 0x57, + 0x65, 0xcd, 0x89, 0x1c, 0x71, 0x0c, 0x7f, 0x58, 0xdb, 0x5b, 0xea, 0xe6, 0x9a, 0x69, 0x6e, 0x6f, + 0xd2, 0x82, 0x70, 0x86, 0x62, 0xd3, 0xdd, 0x76, 0xe3, 0xf6, 0x67, 0x49, 0x35, 0x5a, 0x21, 0x91, + 0x13, 0x7f, 0x4e, 0x5c, 0x86, 0x15, 0x55, 0x74, 0x0d, 0xfa, 0x22, 0x27, 0xd8, 0x24, 0x91, 0x38, + 0x8f, 0x33, 0xcf, 0x4d, 0x5e, 0x13, 0xd3, 0x1d, 0x49, 0xbc, 0x2a, 0x89, 0x6f, 0xa9, 0x35, 0x56, + 0x15, 0x0b, 0x12, 0xf6, 0x7f, 0xe8, 0x87, 0x53, 0xf3, 0x95, 0xe5, 0x9c, 0x75, 0x75, 0x1e, 0xfa, + 0x6a, 0x81, 0xbb, 0x43, 0x02, 0x31, 0xce, 0x8a, 0xca, 0x02, 0x2b, 0xc5, 0x02, 0x8a, 0x2e, 0xc3, + 0x30, 0xbf, 0x1f, 0xaf, 0x3a, 0x5e, 0x2d, 0x3e, 0x1e, 0x05, 0xf6, 0xf0, 0x4d, 0x0d, 0x86, 0x0d, + 0xcc, 0x43, 0x2e, 0xaa, 0xf3, 0x89, 0xcd, 0x98, 0x77, 0xf7, 0x7e, 0xd1, 0x82, 0x71, 0xde, 0xcc, + 0x6c, 0x14, 0x05, 0xee, 0xed, 0x56, 0x44, 0xc2, 0xa9, 0x5e, 0x76, 0xd2, 0xcd, 0x67, 0x8d, 0x56, + 0xee, 0x08, 0xcc, 0xdc, 0x4c, 0x50, 0xe1, 0x87, 0xe0, 0x94, 0x68, 0x77, 0x3c, 0x09, 0xc6, 0xa9, + 0x66, 0xd1, 0x8f, 0x58, 0x30, 0x5d, 0xf5, 0xbd, 0x28, 0xf0, 0xeb, 0x75, 0x12, 0x94, 0x5b, 0xb7, + 0xeb, 0x6e, 0xb8, 0xc5, 0xd7, 0x29, 0x26, 0x1b, 0xec, 0x24, 0xc8, 0x99, 0x43, 0x85, 0x24, 0xe6, + 0xf0, 0xec, 0xfe, 0x5e, 0x69, 0x7a, 0x3e, 0x97, 0x14, 0x6e, 0xd3, 0x0c, 0xda, 0x06, 0x44, 0x6f, + 0xf6, 0x4a, 0xe4, 0x6c, 0x92, 0xb8, 0xf1, 0xfe, 0xee, 0x1b, 0x3f, 0xb1, 0xbf, 0x57, 0x42, 0xab, + 0x29, 0x12, 0x38, 0x83, 0x2c, 0x7a, 0x17, 0x8e, 0xd1, 0xd2, 0xd4, 0xb7, 0x0e, 0x74, 0xdf, 0xdc, + 0xd4, 0xfe, 0x5e, 0xe9, 0xd8, 0x6a, 0x06, 0x11, 0x9c, 0x49, 0x1a, 0xfd, 0x90, 0x05, 0xa7, 0xe2, + 0xcf, 0x5f, 0xbc, 0xdb, 0x74, 0xbc, 0x5a, 0xdc, 0xf0, 0x60, 0xf7, 0x0d, 0xd3, 0x33, 0xf9, 0xd4, + 0x7c, 0x1e, 0x25, 0x9c, 0xdf, 0x08, 0xf2, 0x60, 0x92, 0x76, 0x2d, 0xd9, 0x36, 0x74, 0xdf, 0xf6, + 0xc9, 0xfd, 0xbd, 0xd2, 0xe4, 0x6a, 0x9a, 0x06, 0xce, 0x22, 0x3c, 0x3d, 0x0f, 0xc7, 0x33, 0x57, + 0x27, 0x1a, 0x87, 0xe2, 0x36, 0xe1, 0x4c, 0xe0, 0x20, 0xa6, 0x3f, 0xd1, 0x31, 0xe8, 0xdd, 0x71, + 0xea, 0x2d, 0xb1, 0x31, 0x31, 0xff, 0xf3, 0x4a, 0xe1, 0xb2, 0x65, 0xff, 0x6f, 0x45, 0x18, 0x9b, + 0xaf, 0x2c, 0xdf, 0xd7, 0xae, 0xd7, 0xaf, 0xbd, 0x42, 0xdb, 0x6b, 0x2f, 0xbe, 0x44, 0x8b, 0xb9, + 0x97, 0xe8, 0x0f, 0x66, 0x6c, 0xd9, 0x1e, 0xb6, 0x65, 0x3f, 0x9a, 0xb3, 0x65, 0x1f, 0xf0, 0x46, + 0xdd, 0xc9, 0x59, 0xb5, 0xbd, 0x6c, 0x02, 0x33, 0x39, 0x24, 0xc6, 0xfb, 0x25, 0x8f, 0xda, 0x43, + 0x2e, 0xdd, 0x07, 0x33, 0x8f, 0x55, 0x18, 0x9e, 0x77, 0x9a, 0xce, 0x6d, 0xb7, 0xee, 0x46, 0x2e, + 0x09, 0xd1, 0x93, 0x50, 0x74, 0x6a, 0x35, 0xc6, 0xdd, 0x0d, 0xce, 0x1d, 0xdf, 0xdf, 0x2b, 0x15, + 0x67, 0x6b, 0x94, 0xcd, 0x00, 0x85, 0xb5, 0x8b, 0x29, 0x06, 0x7a, 0x1a, 0x7a, 0x6a, 0x81, 0xdf, + 0x9c, 0x2a, 0x30, 0x4c, 0xba, 0xcb, 0x7b, 0x16, 0x02, 0xbf, 0x99, 0x40, 0x65, 0x38, 0xf6, 0x1f, + 0x17, 0xe0, 0xf4, 0x3c, 0x69, 0x6e, 0x2d, 0x55, 0x72, 0xee, 0x8b, 0x0b, 0x30, 0xd0, 0xf0, 0x3d, + 0x37, 0xf2, 0x83, 0x50, 0x34, 0xcd, 0x56, 0xc4, 0x8a, 0x28, 0xc3, 0x0a, 0x8a, 0xce, 0x41, 0x4f, + 0x33, 0x66, 0x62, 0x87, 0x25, 0x03, 0xcc, 0xd8, 0x57, 0x06, 0xa1, 0x18, 0xad, 0x90, 0x04, 0x62, + 0xc5, 0x28, 0x8c, 0xf5, 0x90, 0x04, 0x98, 0x41, 0x62, 0x4e, 0x80, 0xf2, 0x08, 0xe2, 0x46, 0x48, + 0x70, 0x02, 0x14, 0x82, 0x35, 0x2c, 0x54, 0x86, 0xc1, 0x30, 0x31, 0xb3, 0x5d, 0x6d, 0xcd, 0x11, + 0xc6, 0x2a, 0xa8, 0x99, 0x8c, 0x89, 0x18, 0x37, 0x58, 0x5f, 0x47, 0x56, 0xe1, 0x1b, 0x05, 0x40, + 0x7c, 0x08, 0xbf, 0xcb, 0x06, 0x6e, 0x3d, 0x3d, 0x70, 0xdd, 0x6f, 0x89, 0x07, 0x35, 0x7a, 0xff, + 0xd6, 0x82, 0xd3, 0xf3, 0xae, 0x57, 0x23, 0x41, 0xce, 0x02, 0x7c, 0x38, 0x4f, 0xf9, 0xc3, 0x31, + 0x29, 0xc6, 0x12, 0xeb, 0x79, 0x00, 0x4b, 0xcc, 0xfe, 0x47, 0x0b, 0x10, 0xff, 0xec, 0xf7, 0xdd, + 0xc7, 0xae, 0xa7, 0x3f, 0xf6, 0x01, 0x2c, 0x0b, 0xfb, 0x3a, 0x8c, 0xce, 0xd7, 0x5d, 0xe2, 0x45, + 0xcb, 0xe5, 0x79, 0xdf, 0xdb, 0x70, 0x37, 0xd1, 0x2b, 0x30, 0x1a, 0xb9, 0x0d, 0xe2, 0xb7, 0xa2, + 0x0a, 0xa9, 0xfa, 0x1e, 0x7b, 0xb9, 0x5a, 0x17, 0x7a, 0xe7, 0xd0, 0xfe, 0x5e, 0x69, 0x74, 0xcd, + 0x80, 0xe0, 0x04, 0xa6, 0xfd, 0xcb, 0xf4, 0xdc, 0xaa, 0xb7, 0xc2, 0x88, 0x04, 0x6b, 0x41, 0x2b, + 0x8c, 0xe6, 0x5a, 0x94, 0xf7, 0x2c, 0x07, 0x3e, 0xed, 0x8e, 0xeb, 0x7b, 0xe8, 0xb4, 0xf1, 0x1c, + 0x1f, 0x90, 0x4f, 0x71, 0xf1, 0xec, 0x9e, 0x01, 0x08, 0xdd, 0x4d, 0x8f, 0x04, 0xda, 0xf3, 0x61, + 0x94, 0x6d, 0x15, 0x55, 0x8a, 0x35, 0x0c, 0x54, 0x87, 0x91, 0xba, 0x73, 0x9b, 0xd4, 0x2b, 0xa4, + 0x4e, 0xaa, 0x91, 0x1f, 0x08, 0xf9, 0xc6, 0x0b, 0xdd, 0xbd, 0x03, 0xae, 0xeb, 0x55, 0xe7, 0x26, + 0xf6, 0xf7, 0x4a, 0x23, 0x46, 0x11, 0x36, 0x89, 0xd3, 0xa3, 0xc3, 0x6f, 0xd2, 0xaf, 0x70, 0xea, + 0xfa, 0xe3, 0xf3, 0x86, 0x28, 0xc3, 0x0a, 0xaa, 0x8e, 0x8e, 0x9e, 0xbc, 0xa3, 0xc3, 0xfe, 0x6b, + 0xba, 0xd0, 0xfc, 0x46, 0xd3, 0xf7, 0x88, 0x17, 0xcd, 0xfb, 0x5e, 0x8d, 0x4b, 0xa6, 0x5e, 0x31, + 0x44, 0x27, 0xe7, 0x13, 0xa2, 0x93, 0x13, 0xe9, 0x1a, 0x9a, 0xf4, 0xe4, 0xa3, 0xd0, 0x17, 0x46, + 0x4e, 0xd4, 0x0a, 0xc5, 0xc0, 0x3d, 0x2a, 0x97, 0x5d, 0x85, 0x95, 0x1e, 0xec, 0x95, 0xc6, 0x54, + 0x35, 0x5e, 0x84, 0x45, 0x05, 0xf4, 0x14, 0xf4, 0x37, 0x48, 0x18, 0x3a, 0x9b, 0x92, 0x6d, 0x18, + 0x13, 0x75, 0xfb, 0x57, 0x78, 0x31, 0x96, 0x70, 0xf4, 0x18, 0xf4, 0x92, 0x20, 0xf0, 0x03, 0xf1, + 0x6d, 0x23, 0x02, 0xb1, 0x77, 0x91, 0x16, 0x62, 0x0e, 0xb3, 0xff, 0x0f, 0x0b, 0xc6, 0x54, 0x5f, + 0x79, 0x5b, 0x47, 0xf0, 0x5c, 0x7b, 0x1b, 0xa0, 0x2a, 0x3f, 0x30, 0x64, 0xd7, 0xec, 0xd0, 0xf3, + 0xe7, 0x33, 0x39, 0x9a, 0xd4, 0x30, 0xc6, 0x94, 0x55, 0x51, 0x88, 0x35, 0x6a, 0xf6, 0x1f, 0x58, + 0x30, 0x99, 0xf8, 0xa2, 0xeb, 0x6e, 0x18, 0xa1, 0x77, 0x52, 0x5f, 0x35, 0xd3, 0xe5, 0xe2, 0x73, + 0x43, 0xfe, 0x4d, 0x6a, 0xcf, 0xcb, 0x12, 0xed, 0x8b, 0xae, 0x42, 0xaf, 0x1b, 0x91, 0x86, 0xfc, + 0x98, 0xc7, 0xda, 0x7e, 0x0c, 0xef, 0x55, 0x3c, 0x23, 0xcb, 0xb4, 0x26, 0xe6, 0x04, 0xec, 0x3f, + 0x2e, 0xc2, 0x20, 0xdf, 0xdf, 0x2b, 0x4e, 0xf3, 0x08, 0xe6, 0xe2, 0x19, 0x18, 0x74, 0x1b, 0x8d, + 0x56, 0xe4, 0xdc, 0x16, 0xf7, 0xde, 0x00, 0x3f, 0x83, 0x96, 0x65, 0x21, 0x8e, 0xe1, 0x68, 0x19, + 0x7a, 0x58, 0x57, 0xf8, 0x57, 0x3e, 0x99, 0xfd, 0x95, 0xa2, 0xef, 0x33, 0x0b, 0x4e, 0xe4, 0x70, + 0x96, 0x53, 0xed, 0x2b, 0x5a, 0x84, 0x19, 0x09, 0xe4, 0x00, 0xdc, 0x76, 0x3d, 0x27, 0xd8, 0xa5, + 0x65, 0x53, 0x45, 0x46, 0xf0, 0xb9, 0xf6, 0x04, 0xe7, 0x14, 0x3e, 0x27, 0xab, 0x3e, 0x2c, 0x06, + 0x60, 0x8d, 0xe8, 0xf4, 0xcb, 0x30, 0xa8, 0x90, 0x0f, 0xc3, 0x39, 0x4e, 0x7f, 0x0c, 0xc6, 0x12, + 0x6d, 0x75, 0xaa, 0x3e, 0xac, 0x33, 0x9e, 0xbf, 0xc7, 0x8e, 0x0c, 0xd1, 0xeb, 0x45, 0x6f, 0x47, + 0xdc, 0x4d, 0xf7, 0xe0, 0x58, 0x3d, 0xe3, 0xc8, 0x17, 0xf3, 0xda, 0xfd, 0x15, 0x71, 0x5a, 0x7c, + 0xf6, 0xb1, 0x2c, 0x28, 0xce, 0x6c, 0xc3, 0x38, 0x11, 0x0b, 0xed, 0x4e, 0x44, 0x7a, 0xde, 0x1d, + 0x53, 0x9d, 0xbf, 0x46, 0x76, 0xd5, 0xa1, 0xfa, 0x9d, 0xec, 0xfe, 0x19, 0x3e, 0xfa, 0xfc, 0xb8, + 0x1c, 0x12, 0x04, 0x8a, 0xd7, 0xc8, 0x2e, 0x9f, 0x0a, 0xfd, 0xeb, 0x8a, 0x6d, 0xbf, 0xee, 0x6b, + 0x16, 0x8c, 0xa8, 0xaf, 0x3b, 0x82, 0x73, 0x61, 0xce, 0x3c, 0x17, 0xce, 0xb4, 0x5d, 0xe0, 0x39, + 0x27, 0xc2, 0x37, 0x0a, 0x70, 0x4a, 0xe1, 0xd0, 0x47, 0x14, 0xff, 0x23, 0x56, 0xd5, 0x45, 0x18, + 0xf4, 0x94, 0x38, 0xd1, 0x32, 0xe5, 0x78, 0xb1, 0x30, 0x31, 0xc6, 0xa1, 0x57, 0x9e, 0x17, 0x5f, + 0xda, 0xc3, 0xba, 0x9c, 0x5d, 0x5c, 0xee, 0x73, 0x50, 0x6c, 0xb9, 0x35, 0x71, 0xc1, 0x7c, 0x58, + 0x8e, 0xf6, 0xfa, 0xf2, 0xc2, 0xc1, 0x5e, 0xe9, 0xd1, 0x3c, 0x95, 0x13, 0xbd, 0xd9, 0xc2, 0x99, + 0xf5, 0xe5, 0x05, 0x4c, 0x2b, 0xa3, 0x59, 0x18, 0x93, 0x5a, 0xb5, 0x9b, 0x94, 0x2f, 0xf5, 0x3d, + 0x71, 0x0f, 0x29, 0x61, 0x39, 0x36, 0xc1, 0x38, 0x89, 0x8f, 0x16, 0x60, 0x7c, 0xbb, 0x75, 0x9b, + 0xd4, 0x49, 0xc4, 0x3f, 0xf8, 0x1a, 0xe1, 0xa2, 0xe4, 0xc1, 0xf8, 0x09, 0x7b, 0x2d, 0x01, 0xc7, + 0xa9, 0x1a, 0xf6, 0xbf, 0xb2, 0xfb, 0x40, 0x8c, 0x9e, 0xc6, 0xdf, 0x7c, 0x27, 0x97, 0x73, 0x37, + 0xab, 0xe2, 0x1a, 0xd9, 0x5d, 0xf3, 0x29, 0x1f, 0x92, 0xbd, 0x2a, 0x8c, 0x35, 0xdf, 0xd3, 0x76, + 0xcd, 0xff, 0x56, 0x01, 0x8e, 0xab, 0x11, 0x30, 0xb8, 0xe5, 0xef, 0xf6, 0x31, 0xb8, 0x04, 0x43, + 0x35, 0xb2, 0xe1, 0xb4, 0xea, 0x91, 0xd2, 0x6b, 0xf4, 0x72, 0x55, 0xdb, 0x42, 0x5c, 0x8c, 0x75, + 0x9c, 0x43, 0x0c, 0xdb, 0xaf, 0x8f, 0xb0, 0x8b, 0x38, 0x72, 0xe8, 0x1a, 0x57, 0xbb, 0xc6, 0xca, + 0xdd, 0x35, 0x8f, 0x41, 0xaf, 0xdb, 0xa0, 0x8c, 0x59, 0xc1, 0xe4, 0xb7, 0x96, 0x69, 0x21, 0xe6, + 0x30, 0xf4, 0x04, 0xf4, 0x57, 0xfd, 0x46, 0xc3, 0xf1, 0x6a, 0xec, 0xca, 0x1b, 0x9c, 0x1b, 0xa2, + 0xbc, 0xdb, 0x3c, 0x2f, 0xc2, 0x12, 0x46, 0x99, 0x6f, 0x27, 0xd8, 0xe4, 0xc2, 0x1e, 0xc1, 0x7c, + 0xcf, 0x06, 0x9b, 0x21, 0x66, 0xa5, 0xf4, 0xad, 0x7a, 0xc7, 0x0f, 0xb6, 0x5d, 0x6f, 0x73, 0xc1, + 0x0d, 0xc4, 0x96, 0x50, 0x77, 0xe1, 0x2d, 0x05, 0xc1, 0x1a, 0x16, 0x5a, 0x82, 0xde, 0xa6, 0x1f, + 0x44, 0xe1, 0x54, 0x1f, 0x1b, 0xee, 0x47, 0x73, 0x0e, 0x22, 0xfe, 0xb5, 0x65, 0x3f, 0x88, 0xe2, + 0x0f, 0xa0, 0xff, 0x42, 0xcc, 0xab, 0xa3, 0xeb, 0xd0, 0x4f, 0xbc, 0x9d, 0xa5, 0xc0, 0x6f, 0x4c, + 0x4d, 0xe6, 0x53, 0x5a, 0xe4, 0x28, 0x7c, 0x99, 0xc5, 0x3c, 0xaa, 0x28, 0xc6, 0x92, 0x04, 0xfa, + 0x28, 0x14, 0x89, 0xb7, 0x33, 0xd5, 0xcf, 0x28, 0x4d, 0xe7, 0x50, 0xba, 0xe9, 0x04, 0xf1, 0x99, + 0xbf, 0xe8, 0xed, 0x60, 0x5a, 0x07, 0x7d, 0x02, 0x06, 0xe5, 0x81, 0x11, 0x0a, 0x29, 0x6a, 0xe6, + 0x82, 0x95, 0xc7, 0x0c, 0x26, 0xef, 0xb6, 0xdc, 0x80, 0x34, 0x88, 0x17, 0x85, 0xf1, 0x09, 0x29, + 0xa1, 0x21, 0x8e, 0xa9, 0xa1, 0x2a, 0x0c, 0x07, 0x24, 0x74, 0xef, 0x91, 0xb2, 0x5f, 0x77, 0xab, + 0xbb, 0x53, 0x27, 0x59, 0xf7, 0x9e, 0x6a, 0x3b, 0x64, 0x58, 0xab, 0x10, 0x4b, 0xf9, 0xf5, 0x52, + 0x6c, 0x10, 0x45, 0x6f, 0xc1, 0x48, 0x40, 0xc2, 0xc8, 0x09, 0x22, 0xd1, 0xca, 0x94, 0xd2, 0xca, + 0x8d, 0x60, 0x1d, 0xc0, 0x9f, 0x13, 0x71, 0x33, 0x31, 0x04, 0x9b, 0x14, 0xd0, 0x27, 0xa4, 0xca, + 0x61, 0xc5, 0x6f, 0x79, 0x51, 0x38, 0x35, 0xc8, 0xfa, 0x9d, 0xa9, 0x9b, 0xbe, 0x19, 0xe3, 0x25, + 0x75, 0x12, 0xbc, 0x32, 0x36, 0x48, 0xa1, 0x4f, 0xc1, 0x08, 0xff, 0xcf, 0x55, 0xaa, 0xe1, 0xd4, + 0x71, 0x46, 0xfb, 0x5c, 0x3e, 0x6d, 0x8e, 0x38, 0x77, 0x5c, 0x10, 0x1f, 0xd1, 0x4b, 0x43, 0x6c, + 0x52, 0x43, 0x18, 0x46, 0xea, 0xee, 0x0e, 0xf1, 0x48, 0x18, 0x96, 0x03, 0xff, 0x36, 0x11, 0x12, + 0xe2, 0x53, 0xd9, 0x2a, 0x58, 0xff, 0x36, 0x11, 0x8f, 0x40, 0xbd, 0x0e, 0x36, 0x49, 0xa0, 0x75, + 0x18, 0xa5, 0x4f, 0x72, 0x37, 0x26, 0x3a, 0xd4, 0x89, 0x28, 0x7b, 0x38, 0x63, 0xa3, 0x12, 0x4e, + 0x10, 0x41, 0x37, 0x60, 0x98, 0x8d, 0x79, 0xab, 0xc9, 0x89, 0x9e, 0xe8, 0x44, 0x94, 0x19, 0x14, + 0x54, 0xb4, 0x2a, 0xd8, 0x20, 0x80, 0xde, 0x84, 0xc1, 0xba, 0xbb, 0x41, 0xaa, 0xbb, 0xd5, 0x3a, + 0x99, 0x1a, 0x66, 0xd4, 0x32, 0x0f, 0xc3, 0xeb, 0x12, 0x89, 0xf3, 0xe7, 0xea, 0x2f, 0x8e, 0xab, + 0xa3, 0x9b, 0x70, 0x22, 0x22, 0x41, 0xc3, 0xf5, 0x1c, 0x7a, 0x88, 0x89, 0x27, 0x21, 0xd3, 0x8c, + 0x8f, 0xb0, 0xd5, 0x75, 0x56, 0xcc, 0xc6, 0x89, 0xb5, 0x4c, 0x2c, 0x9c, 0x53, 0x1b, 0xdd, 0x85, + 0xa9, 0x0c, 0x08, 0x5f, 0xb7, 0xc7, 0x18, 0xe5, 0xd7, 0x04, 0xe5, 0xa9, 0xb5, 0x1c, 0xbc, 0x83, + 0x36, 0x30, 0x9c, 0x4b, 0x1d, 0xdd, 0x80, 0x31, 0x76, 0x72, 0x96, 0x5b, 0xf5, 0xba, 0x68, 0x70, + 0x94, 0x35, 0xf8, 0x84, 0xe4, 0x23, 0x96, 0x4d, 0xf0, 0xc1, 0x5e, 0x09, 0xe2, 0x7f, 0x38, 0x59, + 0x1b, 0xdd, 0x66, 0x4a, 0xd8, 0x56, 0xe0, 0x46, 0xbb, 0x74, 0x57, 0x91, 0xbb, 0xd1, 0xd4, 0x58, + 0x5b, 0x81, 0x94, 0x8e, 0xaa, 0x34, 0xb5, 0x7a, 0x21, 0x4e, 0x12, 0xa4, 0x57, 0x41, 0x18, 0xd5, + 0x5c, 0x6f, 0x6a, 0x9c, 0xbf, 0xa7, 0xe4, 0x49, 0x5a, 0xa1, 0x85, 0x98, 0xc3, 0x98, 0x02, 0x96, + 0xfe, 0xb8, 0x41, 0x6f, 0xdc, 0x09, 0x86, 0x18, 0x2b, 0x60, 0x25, 0x00, 0xc7, 0x38, 0x94, 0x09, + 0x8e, 0xa2, 0xdd, 0x29, 0xc4, 0x50, 0xd5, 0x81, 0xb8, 0xb6, 0xf6, 0x09, 0x4c, 0xcb, 0xed, 0xdb, + 0x30, 0xaa, 0x8e, 0x09, 0x36, 0x26, 0xa8, 0x04, 0xbd, 0x8c, 0xed, 0x13, 0xe2, 0xd3, 0x41, 0xda, + 0x05, 0xc6, 0x12, 0x62, 0x5e, 0xce, 0xba, 0xe0, 0xde, 0x23, 0x73, 0xbb, 0x11, 0xe1, 0xb2, 0x88, + 0xa2, 0xd6, 0x05, 0x09, 0xc0, 0x31, 0x8e, 0xfd, 0x1f, 0x39, 0xfb, 0x1c, 0xdf, 0x12, 0x5d, 0xdc, + 0x8b, 0xcf, 0xc2, 0x00, 0x33, 0xfc, 0xf0, 0x03, 0xae, 0x9d, 0xed, 0x8d, 0x19, 0xe6, 0xab, 0xa2, + 0x1c, 0x2b, 0x0c, 0xf4, 0x2a, 0x8c, 0x54, 0xf5, 0x06, 0xc4, 0xa5, 0xae, 0x8e, 0x11, 0xa3, 0x75, + 0x6c, 0xe2, 0xa2, 0xcb, 0x30, 0xc0, 0x6c, 0x9c, 0xaa, 0x7e, 0x5d, 0x70, 0x9b, 0x92, 0x33, 0x19, + 0x28, 0x8b, 0xf2, 0x03, 0xed, 0x37, 0x56, 0xd8, 0xe8, 0x3c, 0xf4, 0xd1, 0x2e, 0x2c, 0x97, 0xc5, + 0x75, 0xaa, 0x24, 0x81, 0x57, 0x59, 0x29, 0x16, 0x50, 0xfb, 0x0f, 0x2c, 0xc6, 0x4b, 0xa5, 0xcf, + 0x7c, 0x74, 0x95, 0x5d, 0x1a, 0xec, 0x06, 0xd1, 0xb4, 0xf0, 0x8f, 0x6b, 0x37, 0x81, 0x82, 0x1d, + 0x24, 0xfe, 0x63, 0xa3, 0x26, 0x7a, 0x3b, 0x79, 0x33, 0x70, 0x86, 0xe2, 0x45, 0x39, 0x04, 0xc9, + 0xdb, 0xe1, 0x91, 0xf8, 0x8a, 0xa3, 0xfd, 0x69, 0x77, 0x45, 0xd8, 0x3f, 0x55, 0xd0, 0x56, 0x49, + 0x25, 0x72, 0x22, 0x82, 0xca, 0xd0, 0x7f, 0xc7, 0x71, 0x23, 0xd7, 0xdb, 0x14, 0x7c, 0x5f, 0xfb, + 0x8b, 0x8e, 0x55, 0xba, 0xc5, 0x2b, 0x70, 0xee, 0x45, 0xfc, 0xc1, 0x92, 0x0c, 0xa5, 0x18, 0xb4, + 0x3c, 0x8f, 0x52, 0x2c, 0x74, 0x4b, 0x11, 0xf3, 0x0a, 0x9c, 0xa2, 0xf8, 0x83, 0x25, 0x19, 0xf4, + 0x0e, 0x80, 0x3c, 0x21, 0x48, 0x4d, 0xc8, 0x0e, 0x9f, 0xed, 0x4c, 0x74, 0x4d, 0xd5, 0xe1, 0xc2, + 0xc9, 0xf8, 0x3f, 0xd6, 0xe8, 0xd9, 0x91, 0x36, 0xa7, 0x7a, 0x67, 0xd0, 0x27, 0xe9, 0x16, 0x75, + 0x82, 0x88, 0xd4, 0x66, 0x23, 0x31, 0x38, 0x4f, 0x77, 0xf7, 0x38, 0x5c, 0x73, 0x1b, 0x44, 0xdf, + 0xce, 0x82, 0x08, 0x8e, 0xe9, 0xd9, 0xbf, 0x53, 0x84, 0xa9, 0xbc, 0xee, 0xd2, 0x4d, 0x43, 0xee, + 0xba, 0xd1, 0x3c, 0x65, 0x6b, 0x2d, 0x73, 0xd3, 0x2c, 0x8a, 0x72, 0xac, 0x30, 0xe8, 0xea, 0x0d, + 0xdd, 0x4d, 0xf9, 0xb6, 0xef, 0x8d, 0x57, 0x6f, 0x85, 0x95, 0x62, 0x01, 0xa5, 0x78, 0x01, 0x71, + 0x42, 0x61, 0x7c, 0xa7, 0xad, 0x72, 0xcc, 0x4a, 0xb1, 0x80, 0xea, 0x52, 0xc6, 0x9e, 0x0e, 0x52, + 0x46, 0x63, 0x88, 0x7a, 0x1f, 0xec, 0x10, 0xa1, 0x4f, 0x03, 0x6c, 0xb8, 0x9e, 0x1b, 0x6e, 0x31, + 0xea, 0x7d, 0x87, 0xa6, 0xae, 0x98, 0xe2, 0x25, 0x45, 0x05, 0x6b, 0x14, 0xd1, 0x4b, 0x30, 0xa4, + 0x0e, 0x90, 0xe5, 0x05, 0xa6, 0xfa, 0xd7, 0x4c, 0xa9, 0xe2, 0xd3, 0x74, 0x01, 0xeb, 0x78, 0xf6, + 0x67, 0x93, 0xeb, 0x45, 0xec, 0x00, 0x6d, 0x7c, 0xad, 0x6e, 0xc7, 0xb7, 0xd0, 0x7e, 0x7c, 0xed, + 0x9f, 0x19, 0x84, 0x31, 0xa3, 0xb1, 0x56, 0xd8, 0xc5, 0x99, 0x7b, 0x85, 0x5e, 0x40, 0x4e, 0x44, + 0xc4, 0xfe, 0xb3, 0x3b, 0x6f, 0x15, 0xfd, 0x92, 0xa2, 0x3b, 0x80, 0xd7, 0x47, 0x9f, 0x86, 0xc1, + 0xba, 0x13, 0x32, 0x89, 0x25, 0x11, 0xfb, 0xae, 0x1b, 0x62, 0xf1, 0x83, 0xd0, 0x09, 0x23, 0xed, + 0xd6, 0xe7, 0xb4, 0x63, 0x92, 0xf4, 0xa6, 0xa4, 0xfc, 0x95, 0xb4, 0xee, 0x54, 0x9d, 0xa0, 0x4c, + 0xd8, 0x2e, 0xe6, 0x30, 0x74, 0x99, 0x1d, 0xad, 0x74, 0x55, 0xcc, 0x53, 0x6e, 0x94, 0x2d, 0xb3, + 0x5e, 0x83, 0xc9, 0x56, 0x30, 0x6c, 0x60, 0xc6, 0x6f, 0xb2, 0xbe, 0x36, 0x6f, 0xb2, 0xa7, 0xa0, + 0x9f, 0xfd, 0x50, 0x2b, 0x40, 0xcd, 0xc6, 0x32, 0x2f, 0xc6, 0x12, 0x9e, 0x5c, 0x30, 0x03, 0xdd, + 0x2d, 0x18, 0xfa, 0xea, 0x13, 0x8b, 0x9a, 0x99, 0x5d, 0x0c, 0xf0, 0x53, 0x4e, 0x2c, 0x79, 0x2c, + 0x61, 0xe8, 0x57, 0x2c, 0x40, 0x4e, 0x9d, 0xbe, 0x96, 0x69, 0xb1, 0x7a, 0xdc, 0x00, 0x63, 0xb5, + 0x5f, 0xed, 0x38, 0xec, 0xad, 0x70, 0x66, 0x36, 0x55, 0x9b, 0x4b, 0x4a, 0x5f, 0x11, 0x5d, 0x44, + 0x69, 0x04, 0xfd, 0x32, 0xba, 0xee, 0x86, 0xd1, 0xe7, 0xff, 0x26, 0x71, 0x39, 0x65, 0x74, 0x09, + 0xad, 0xeb, 0x8f, 0xaf, 0xa1, 0x43, 0x3e, 0xbe, 0x46, 0x72, 0x1f, 0x5e, 0xdf, 0x9f, 0x78, 0xc0, + 0x0c, 0xb3, 0x2f, 0x7f, 0xa2, 0xc3, 0x03, 0x46, 0x88, 0xd3, 0xbb, 0x79, 0xc6, 0x94, 0x85, 0x1e, + 0x78, 0x84, 0x75, 0xb9, 0xfd, 0x23, 0x78, 0x3d, 0x24, 0xc1, 0xdc, 0x29, 0xa9, 0x26, 0x3e, 0xd0, + 0x79, 0x0f, 0x4d, 0x6f, 0xfc, 0x43, 0x16, 0x4c, 0xa5, 0x07, 0x88, 0x77, 0x69, 0x6a, 0x94, 0xf5, + 0xdf, 0x6e, 0x37, 0x32, 0xa2, 0xf3, 0xd2, 0xdc, 0x75, 0x6a, 0x36, 0x87, 0x16, 0xce, 0x6d, 0x65, + 0xba, 0x05, 0x27, 0x73, 0xe6, 0x3d, 0x43, 0x6a, 0xbd, 0xa0, 0x4b, 0xad, 0x3b, 0xc8, 0x3a, 0x67, + 0xe4, 0xcc, 0xcc, 0xbc, 0xd5, 0x72, 0xbc, 0xc8, 0x8d, 0x76, 0x75, 0x29, 0xb7, 0x07, 0xe6, 0x80, + 0xa0, 0x4f, 0x41, 0x6f, 0xdd, 0xf5, 0x5a, 0x77, 0xc5, 0x4d, 0x79, 0x3e, 0xfb, 0x11, 0xe3, 0xb5, + 0xee, 0x9a, 0x43, 0x5c, 0xa2, 0x1b, 0x92, 0x95, 0x1f, 0xec, 0x95, 0x50, 0x1a, 0x01, 0x73, 0xaa, + 0xf6, 0xd3, 0x30, 0xba, 0xe0, 0x90, 0x86, 0xef, 0x2d, 0x7a, 0xb5, 0xa6, 0xef, 0x7a, 0x11, 0x9a, + 0x82, 0x1e, 0xc6, 0x22, 0xf2, 0x0b, 0xb2, 0x87, 0x0e, 0x21, 0x66, 0x25, 0xf6, 0x26, 0x1c, 0x5f, + 0xf0, 0xef, 0x78, 0x77, 0x9c, 0xa0, 0x36, 0x5b, 0x5e, 0xd6, 0xa4, 0x7e, 0xab, 0x52, 0xea, 0x64, + 0xe5, 0xbf, 0xe9, 0xb5, 0x9a, 0x7c, 0x29, 0x2d, 0xb9, 0x75, 0x92, 0x23, 0x9b, 0xfd, 0x99, 0x82, + 0xd1, 0x52, 0x8c, 0xaf, 0x34, 0x8b, 0x56, 0xae, 0x51, 0xc2, 0x5b, 0x30, 0xb0, 0xe1, 0x92, 0x7a, + 0x0d, 0x93, 0x0d, 0x31, 0x1b, 0x4f, 0xe6, 0x9b, 0x2d, 0x2e, 0x51, 0x4c, 0xa5, 0x02, 0x65, 0x32, + 0xab, 0x25, 0x51, 0x19, 0x2b, 0x32, 0x68, 0x1b, 0xc6, 0xe5, 0x9c, 0x49, 0xa8, 0x38, 0xb5, 0x9f, + 0x6a, 0xb7, 0x08, 0x4d, 0xe2, 0xcc, 0x84, 0x1b, 0x27, 0xc8, 0xe0, 0x14, 0x61, 0x74, 0x1a, 0x7a, + 0x1a, 0x94, 0x3f, 0xe9, 0x61, 0xc3, 0xcf, 0x84, 0x54, 0x4c, 0xde, 0xc6, 0x4a, 0xed, 0x9f, 0xb3, + 0xe0, 0x64, 0x6a, 0x64, 0x84, 0xdc, 0xf1, 0x01, 0xcf, 0x42, 0x52, 0x0e, 0x58, 0xe8, 0x2c, 0x07, + 0xb4, 0xff, 0x3b, 0x0b, 0x8e, 0x2d, 0x36, 0x9a, 0xd1, 0xee, 0x82, 0x6b, 0x5a, 0x10, 0xbc, 0x0c, + 0x7d, 0x0d, 0x52, 0x73, 0x5b, 0x0d, 0x31, 0x73, 0x25, 0x79, 0x87, 0xaf, 0xb0, 0x52, 0x7a, 0x0e, + 0x54, 0x22, 0x3f, 0x70, 0x36, 0x09, 0x2f, 0xc0, 0x02, 0x9d, 0x71, 0x42, 0xee, 0x3d, 0x72, 0xdd, + 0x6d, 0xb8, 0xd1, 0xfd, 0xed, 0x2e, 0xa1, 0xfc, 0x97, 0x44, 0x70, 0x4c, 0xcf, 0xfe, 0x96, 0x05, + 0x63, 0x72, 0xdd, 0xcf, 0xd6, 0x6a, 0x01, 0x09, 0x43, 0x34, 0x0d, 0x05, 0xb7, 0x29, 0x7a, 0x09, + 0xa2, 0x97, 0x85, 0xe5, 0x32, 0x2e, 0xb8, 0x4d, 0xf9, 0xe8, 0x62, 0x6c, 0x42, 0xd1, 0xb4, 0x83, + 0xb8, 0x2a, 0xca, 0xb1, 0xc2, 0x40, 0x17, 0x60, 0xc0, 0xf3, 0x6b, 0xfc, 0xdd, 0x22, 0x34, 0xe1, + 0x14, 0x73, 0x55, 0x94, 0x61, 0x05, 0x45, 0x65, 0x18, 0xe4, 0x56, 0xb2, 0xf1, 0xa2, 0xed, 0xca, + 0xd6, 0x96, 0x7d, 0xd9, 0x9a, 0xac, 0x89, 0x63, 0x22, 0xf6, 0x1f, 0x59, 0x30, 0x2c, 0xbf, 0xac, + 0xcb, 0x17, 0x25, 0xdd, 0x5a, 0xf1, 0x6b, 0x32, 0xde, 0x5a, 0xf4, 0x45, 0xc8, 0x20, 0xc6, 0x43, + 0xb0, 0x78, 0xa8, 0x87, 0xe0, 0x25, 0x18, 0x72, 0x9a, 0xcd, 0xb2, 0xf9, 0x8a, 0x64, 0x4b, 0x69, + 0x36, 0x2e, 0xc6, 0x3a, 0x8e, 0xfd, 0xb3, 0x05, 0x18, 0x95, 0x5f, 0x50, 0x69, 0xdd, 0x0e, 0x49, + 0x84, 0xd6, 0x60, 0xd0, 0xe1, 0xb3, 0x44, 0xe4, 0x22, 0x7f, 0x2c, 0x5b, 0xba, 0x69, 0x4c, 0x69, + 0xcc, 0x0e, 0xcf, 0xca, 0xda, 0x38, 0x26, 0x84, 0xea, 0x30, 0xe1, 0xf9, 0x11, 0x63, 0x8d, 0x14, + 0xbc, 0x9d, 0xc2, 0x39, 0x49, 0xfd, 0x94, 0xa0, 0x3e, 0xb1, 0x9a, 0xa4, 0x82, 0xd3, 0x84, 0xd1, + 0xa2, 0x94, 0x18, 0x17, 0xf3, 0x45, 0x7d, 0xfa, 0xc4, 0x65, 0x0b, 0x8c, 0xed, 0xdf, 0xb7, 0x60, + 0x50, 0xa2, 0x1d, 0x85, 0x6d, 0xc1, 0x0a, 0xf4, 0x87, 0x6c, 0x12, 0xe4, 0xd0, 0xd8, 0xed, 0x3a, + 0xce, 0xe7, 0x2b, 0xe6, 0xf8, 0xf8, 0xff, 0x10, 0x4b, 0x1a, 0x4c, 0x61, 0xa8, 0xba, 0xff, 0x3e, + 0x51, 0x18, 0xaa, 0xfe, 0xe4, 0x5c, 0x4a, 0x7f, 0xc7, 0xfa, 0xac, 0x49, 0xe0, 0xe9, 0xc3, 0xa4, + 0x19, 0x90, 0x0d, 0xf7, 0x6e, 0xf2, 0x61, 0x52, 0x66, 0xa5, 0x58, 0x40, 0xd1, 0x3b, 0x30, 0x5c, + 0x95, 0x9a, 0xa2, 0x78, 0x87, 0x9f, 0x6f, 0xab, 0xb5, 0x54, 0x0a, 0x6e, 0x2e, 0xe9, 0x9c, 0xd7, + 0xea, 0x63, 0x83, 0x9a, 0x69, 0x05, 0x56, 0xec, 0x64, 0x05, 0x16, 0xd3, 0xcd, 0xb7, 0x89, 0xfa, + 0x79, 0x0b, 0xfa, 0xb8, 0x86, 0xa0, 0x3b, 0x05, 0x8d, 0xa6, 0xef, 0x8f, 0xc7, 0xee, 0x26, 0x2d, + 0x14, 0x9c, 0x0d, 0x5a, 0x81, 0x41, 0xf6, 0x83, 0x69, 0x38, 0x8a, 0xf9, 0x3e, 0x63, 0xbc, 0x55, + 0xbd, 0x83, 0x37, 0x65, 0x35, 0x1c, 0x53, 0xb0, 0x7f, 0xba, 0x48, 0x4f, 0xb7, 0x18, 0xd5, 0xb8, + 0xf4, 0xad, 0x87, 0x77, 0xe9, 0x17, 0x1e, 0xd6, 0xa5, 0xbf, 0x09, 0x63, 0x55, 0xcd, 0x3a, 0x20, + 0x9e, 0xc9, 0x0b, 0x6d, 0x17, 0x89, 0x66, 0x48, 0xc0, 0x65, 0xa8, 0xf3, 0x26, 0x11, 0x9c, 0xa4, + 0x8a, 0x3e, 0x09, 0xc3, 0x7c, 0x9e, 0x45, 0x2b, 0xdc, 0x90, 0xee, 0x89, 0xfc, 0xf5, 0xa2, 0x37, + 0xc1, 0x65, 0xee, 0x5a, 0x75, 0x6c, 0x10, 0xb3, 0xff, 0xc9, 0x02, 0xb4, 0xd8, 0xdc, 0x22, 0x0d, + 0x12, 0x38, 0xf5, 0x58, 0xc9, 0xf7, 0x25, 0x0b, 0xa6, 0x48, 0xaa, 0x78, 0xde, 0x6f, 0x34, 0xc4, + 0x93, 0x3e, 0x47, 0xea, 0xb4, 0x98, 0x53, 0x27, 0x66, 0xeb, 0xf3, 0x30, 0x70, 0x6e, 0x7b, 0x68, + 0x05, 0x26, 0xf9, 0x2d, 0xa9, 0x00, 0x9a, 0xad, 0xdd, 0x23, 0x82, 0xf0, 0xe4, 0x5a, 0x1a, 0x05, + 0x67, 0xd5, 0xb3, 0x7f, 0x7f, 0x04, 0x72, 0x7b, 0xf1, 0x81, 0x76, 0xf3, 0x03, 0xed, 0xe6, 0x07, + 0xda, 0xcd, 0x0f, 0xb4, 0x9b, 0x1f, 0x68, 0x37, 0x3f, 0xd0, 0x6e, 0xbe, 0x4f, 0xb5, 0x9b, 0xff, + 0xa5, 0x05, 0xc7, 0xd5, 0xf5, 0x65, 0x3c, 0xd8, 0x3f, 0x07, 0x93, 0x7c, 0xbb, 0xcd, 0xd7, 0x1d, + 0xb7, 0xb1, 0x46, 0x1a, 0xcd, 0xba, 0x13, 0x49, 0x1b, 0xa6, 0x4b, 0x99, 0x2b, 0x37, 0xe1, 0x28, + 0x61, 0x54, 0xe4, 0x1e, 0x67, 0x19, 0x00, 0x9c, 0xd5, 0x8c, 0xfd, 0x3b, 0x03, 0xd0, 0xbb, 0xb8, + 0x43, 0xbc, 0xe8, 0x08, 0x9e, 0x36, 0x55, 0x18, 0x75, 0xbd, 0x1d, 0xbf, 0xbe, 0x43, 0x6a, 0x1c, + 0x7e, 0x98, 0x17, 0xf8, 0x09, 0x41, 0x7a, 0x74, 0xd9, 0x20, 0x81, 0x13, 0x24, 0x1f, 0x86, 0x8e, + 0xe8, 0x0a, 0xf4, 0xf1, 0xcb, 0x47, 0x28, 0x88, 0x32, 0xcf, 0x6c, 0x36, 0x88, 0xe2, 0x4a, 0x8d, + 0xf5, 0x57, 0xfc, 0x72, 0x13, 0xd5, 0xd1, 0x67, 0x61, 0x74, 0xc3, 0x0d, 0xc2, 0x68, 0xcd, 0x6d, + 0xd0, 0xab, 0xa1, 0xd1, 0xbc, 0x0f, 0x9d, 0x90, 0x1a, 0x87, 0x25, 0x83, 0x12, 0x4e, 0x50, 0x46, + 0x9b, 0x30, 0x52, 0x77, 0xf4, 0xa6, 0xfa, 0x0f, 0xdd, 0x94, 0xba, 0x1d, 0xae, 0xeb, 0x84, 0xb0, + 0x49, 0x97, 0x6e, 0xa7, 0x2a, 0x53, 0x6b, 0x0c, 0x30, 0x71, 0x86, 0xda, 0x4e, 0x5c, 0x9f, 0xc1, + 0x61, 0x94, 0x41, 0x63, 0xee, 0x06, 0x83, 0x26, 0x83, 0xa6, 0x39, 0x15, 0x7c, 0x06, 0x06, 0x09, + 0x1d, 0x42, 0x4a, 0x58, 0x5c, 0x30, 0x17, 0xbb, 0xeb, 0xeb, 0x8a, 0x5b, 0x0d, 0x7c, 0x53, 0x1b, + 0xb7, 0x28, 0x29, 0xe1, 0x98, 0x28, 0x9a, 0x87, 0xbe, 0x90, 0x04, 0xae, 0x92, 0xf8, 0xb7, 0x99, + 0x46, 0x86, 0xc6, 0x5d, 0x1a, 0xf9, 0x6f, 0x2c, 0xaa, 0xd2, 0xe5, 0xe5, 0x30, 0x51, 0x2c, 0xbb, + 0x0c, 0xb4, 0xe5, 0x35, 0xcb, 0x4a, 0xb1, 0x80, 0xa2, 0x37, 0xa1, 0x3f, 0x20, 0x75, 0xa6, 0xee, + 0x1d, 0xe9, 0x7e, 0x91, 0x73, 0xed, 0x31, 0xaf, 0x87, 0x25, 0x01, 0x74, 0x0d, 0x50, 0x40, 0x28, + 0x83, 0xe7, 0x7a, 0x9b, 0xca, 0x08, 0x5f, 0x1c, 0xb4, 0x8a, 0x91, 0xc6, 0x31, 0x86, 0xf4, 0x66, + 0xc5, 0x19, 0xd5, 0xd0, 0x15, 0x98, 0x50, 0xa5, 0xcb, 0x5e, 0x18, 0x39, 0xf4, 0x80, 0x1b, 0x63, + 0xb4, 0x94, 0x7c, 0x05, 0x27, 0x11, 0x70, 0xba, 0x8e, 0xfd, 0x6b, 0x16, 0xf0, 0x71, 0x3e, 0x02, + 0xa9, 0xc2, 0xeb, 0xa6, 0x54, 0xe1, 0x54, 0xee, 0xcc, 0xe5, 0x48, 0x14, 0x7e, 0xcd, 0x82, 0x21, + 0x6d, 0x66, 0xe3, 0x35, 0x6b, 0xb5, 0x59, 0xb3, 0x2d, 0x18, 0xa7, 0x2b, 0xfd, 0xc6, 0xed, 0x90, + 0x04, 0x3b, 0xa4, 0xc6, 0x16, 0x66, 0xe1, 0xfe, 0x16, 0xa6, 0x32, 0xf8, 0xbd, 0x9e, 0x20, 0x88, + 0x53, 0x4d, 0xd8, 0x9f, 0x91, 0x5d, 0x55, 0xf6, 0xd1, 0x55, 0x35, 0xe7, 0x09, 0xfb, 0x68, 0x35, + 0xab, 0x38, 0xc6, 0xa1, 0x5b, 0x6d, 0xcb, 0x0f, 0xa3, 0xa4, 0x7d, 0xf4, 0x55, 0x3f, 0x8c, 0x30, + 0x83, 0xd8, 0x2f, 0x00, 0x2c, 0xde, 0x25, 0x55, 0xbe, 0x62, 0xf5, 0x47, 0x8f, 0x95, 0xff, 0xe8, + 0xb1, 0xff, 0xd2, 0x82, 0xd1, 0xa5, 0x79, 0xe3, 0xe6, 0x9a, 0x01, 0xe0, 0x2f, 0xb5, 0x5b, 0xb7, + 0x56, 0xa5, 0x91, 0x0e, 0xb7, 0x53, 0x50, 0xa5, 0x58, 0xc3, 0x40, 0xa7, 0xa0, 0x58, 0x6f, 0x79, + 0x42, 0xec, 0xd9, 0x4f, 0xaf, 0xc7, 0xeb, 0x2d, 0x0f, 0xd3, 0x32, 0xcd, 0x93, 0xad, 0xd8, 0xb5, + 0x27, 0x5b, 0xc7, 0x80, 0x3a, 0xa8, 0x04, 0xbd, 0x77, 0xee, 0xb8, 0x35, 0x1e, 0x27, 0x40, 0x18, + 0x10, 0xdd, 0xba, 0xb5, 0xbc, 0x10, 0x62, 0x5e, 0x6e, 0x7f, 0xb9, 0x08, 0xd3, 0x4b, 0x75, 0x72, + 0xf7, 0x3d, 0xc6, 0x4a, 0xe8, 0xd6, 0x0f, 0xef, 0x70, 0x02, 0xa4, 0xc3, 0xfa, 0x5a, 0x76, 0x1e, + 0x8f, 0x0d, 0xe8, 0xe7, 0xe6, 0xc1, 0x32, 0x72, 0x42, 0xa6, 0x52, 0x36, 0x7f, 0x40, 0x66, 0xb8, + 0x99, 0xb1, 0x50, 0xca, 0xaa, 0x0b, 0x53, 0x94, 0x62, 0x49, 0x7c, 0xfa, 0x15, 0x18, 0xd6, 0x31, + 0x0f, 0xe5, 0xf5, 0xfc, 0xc3, 0x45, 0x18, 0xa7, 0x3d, 0x78, 0xa8, 0x13, 0xb1, 0x9e, 0x9e, 0x88, + 0x07, 0xed, 0xf9, 0xda, 0x79, 0x36, 0xde, 0x49, 0xce, 0xc6, 0xa5, 0xbc, 0xd9, 0x38, 0xea, 0x39, + 0xf8, 0x11, 0x0b, 0x26, 0x97, 0xea, 0x7e, 0x75, 0x3b, 0xe1, 0x9d, 0xfa, 0x12, 0x0c, 0xd1, 0xe3, + 0x38, 0x34, 0x02, 0xb5, 0x18, 0xa1, 0x7b, 0x04, 0x08, 0xeb, 0x78, 0x5a, 0xb5, 0xf5, 0xf5, 0xe5, + 0x85, 0xac, 0x88, 0x3f, 0x02, 0x84, 0x75, 0x3c, 0xfb, 0xcf, 0x2d, 0x38, 0x73, 0x65, 0x7e, 0x31, + 0x5e, 0x8a, 0xa9, 0xa0, 0x43, 0xe7, 0xa1, 0xaf, 0x59, 0xd3, 0xba, 0x12, 0x8b, 0x85, 0x17, 0x58, + 0x2f, 0x04, 0xf4, 0xfd, 0x12, 0xdf, 0x6b, 0x1d, 0xe0, 0x0a, 0x2e, 0xcf, 0x8b, 0x73, 0x57, 0x6a, + 0x81, 0xac, 0x5c, 0x2d, 0xd0, 0x13, 0xd0, 0x4f, 0xef, 0x05, 0xb7, 0x2a, 0xfb, 0xcd, 0xcd, 0x2e, + 0x78, 0x11, 0x96, 0x30, 0xfb, 0x57, 0x2d, 0x98, 0xbc, 0xe2, 0x46, 0xf4, 0xd2, 0x4e, 0x46, 0xd5, + 0xa1, 0xb7, 0x76, 0xe8, 0x46, 0x7e, 0xb0, 0x9b, 0x8c, 0xaa, 0x83, 0x15, 0x04, 0x6b, 0x58, 0xfc, + 0x83, 0x76, 0x5c, 0xe6, 0xef, 0x52, 0x30, 0xf5, 0x6e, 0x58, 0x94, 0x63, 0x85, 0x41, 0xc7, 0xab, + 0xe6, 0x06, 0x4c, 0x64, 0xb9, 0x2b, 0x0e, 0x6e, 0x35, 0x5e, 0x0b, 0x12, 0x80, 0x63, 0x1c, 0xfb, + 0x1f, 0x2c, 0x28, 0x5d, 0xe1, 0x5e, 0xbb, 0x1b, 0x61, 0xce, 0xa1, 0xfb, 0x02, 0x0c, 0x12, 0xa9, + 0x20, 0x10, 0xbd, 0x56, 0x8c, 0xa8, 0xd2, 0x1c, 0xf0, 0xe0, 0x3e, 0x0a, 0xaf, 0x0b, 0x17, 0xfa, + 0xc3, 0xf9, 0x40, 0x2f, 0x01, 0x22, 0x7a, 0x5b, 0x7a, 0xb4, 0x23, 0x16, 0x36, 0x65, 0x31, 0x05, + 0xc5, 0x19, 0x35, 0xec, 0x9f, 0xb3, 0xe0, 0xb8, 0xfa, 0xe0, 0xf7, 0xdd, 0x67, 0xda, 0x5f, 0x2f, + 0xc0, 0xc8, 0xd5, 0xb5, 0xb5, 0xf2, 0x15, 0x12, 0x69, 0xab, 0xb2, 0xbd, 0xda, 0x1f, 0x6b, 0xda, + 0xcb, 0x76, 0x6f, 0xc4, 0x56, 0xe4, 0xd6, 0x67, 0x78, 0x0c, 0xbf, 0x99, 0x65, 0x2f, 0xba, 0x11, + 0x54, 0xa2, 0xc0, 0xf5, 0x36, 0x33, 0x57, 0xba, 0xe4, 0x59, 0x8a, 0x79, 0x3c, 0x0b, 0x7a, 0x01, + 0xfa, 0x58, 0x10, 0x41, 0x39, 0x09, 0x8f, 0xa8, 0x27, 0x16, 0x2b, 0x3d, 0xd8, 0x2b, 0x0d, 0xae, + 0xe3, 0x65, 0xfe, 0x07, 0x0b, 0x54, 0xb4, 0x0e, 0x43, 0x5b, 0x51, 0xd4, 0xbc, 0x4a, 0x9c, 0x1a, + 0x09, 0xe4, 0x29, 0x7b, 0x36, 0xeb, 0x94, 0xa5, 0x83, 0xc0, 0xd1, 0xe2, 0x83, 0x29, 0x2e, 0x0b, + 0xb1, 0x4e, 0xc7, 0xae, 0x00, 0xc4, 0xb0, 0x07, 0xa4, 0xb8, 0xb1, 0xd7, 0x60, 0x90, 0x7e, 0xee, + 0x6c, 0xdd, 0x75, 0xda, 0xab, 0xc6, 0x9f, 0x81, 0x41, 0xa9, 0xf8, 0x0e, 0x45, 0x88, 0x0f, 0x76, + 0x23, 0x49, 0xbd, 0x78, 0x88, 0x63, 0xb8, 0xfd, 0x38, 0x08, 0x0b, 0xe0, 0x76, 0x24, 0xed, 0x0d, + 0x38, 0xc6, 0x4c, 0x99, 0x9d, 0x68, 0xcb, 0x58, 0xa3, 0x9d, 0x17, 0xc3, 0xb3, 0xe2, 0x5d, 0xc7, + 0xbf, 0x6c, 0x4a, 0x73, 0x21, 0x1f, 0x96, 0x14, 0xe3, 0x37, 0x9e, 0xfd, 0xf7, 0x3d, 0xf0, 0xc8, + 0x72, 0x25, 0x3f, 0x36, 0xd5, 0x65, 0x18, 0xe6, 0xec, 0x22, 0x5d, 0x1a, 0x4e, 0x5d, 0xb4, 0xab, + 0x24, 0xa0, 0x6b, 0x1a, 0x0c, 0x1b, 0x98, 0xe8, 0x0c, 0x14, 0xdd, 0x77, 0xbd, 0xa4, 0x83, 0xe5, + 0xf2, 0x5b, 0xab, 0x98, 0x96, 0x53, 0x30, 0xe5, 0x3c, 0xf9, 0x91, 0xae, 0xc0, 0x8a, 0xfb, 0x7c, + 0x1d, 0x46, 0xdd, 0xb0, 0x1a, 0xba, 0xcb, 0x1e, 0xdd, 0xa7, 0xda, 0x4e, 0x57, 0x32, 0x07, 0xda, + 0x69, 0x05, 0xc5, 0x09, 0x6c, 0xed, 0x7e, 0xe9, 0xed, 0x9a, 0x7b, 0xed, 0x18, 0x19, 0x83, 0x1e, + 0xff, 0x4d, 0xf6, 0x75, 0x21, 0x13, 0xc1, 0x8b, 0xe3, 0x9f, 0x7f, 0x70, 0x88, 0x25, 0x8c, 0x3e, + 0xe8, 0xaa, 0x5b, 0x4e, 0x73, 0xb6, 0x15, 0x6d, 0x2d, 0xb8, 0x61, 0xd5, 0xdf, 0x21, 0xc1, 0x2e, + 0x7b, 0x8b, 0x0f, 0xc4, 0x0f, 0x3a, 0x05, 0x98, 0xbf, 0x3a, 0x5b, 0xa6, 0x98, 0x38, 0x5d, 0x07, + 0xcd, 0xc2, 0x98, 0x2c, 0xac, 0x90, 0x90, 0x5d, 0x01, 0x43, 0x8c, 0x8c, 0x72, 0x79, 0x14, 0xc5, + 0x8a, 0x48, 0x12, 0xdf, 0x64, 0x70, 0xe1, 0x41, 0x30, 0xb8, 0x2f, 0xc3, 0x88, 0xeb, 0xb9, 0x91, + 0xeb, 0x44, 0x3e, 0xd7, 0x1f, 0xf1, 0x67, 0x37, 0x13, 0x30, 0x2f, 0xeb, 0x00, 0x6c, 0xe2, 0xd9, + 0xff, 0x5f, 0x0f, 0x4c, 0xb0, 0x69, 0xfb, 0x60, 0x85, 0x7d, 0x2f, 0xad, 0xb0, 0xf5, 0xf4, 0x0a, + 0x7b, 0x10, 0x9c, 0xfb, 0x7d, 0x2f, 0xb3, 0x2f, 0x58, 0x30, 0xc1, 0x64, 0xdc, 0xc6, 0x32, 0xbb, + 0x08, 0x83, 0x81, 0xe1, 0x8d, 0x3a, 0xa8, 0x2b, 0xb5, 0xa4, 0x63, 0x69, 0x8c, 0x83, 0xde, 0x00, + 0x68, 0xc6, 0x32, 0xf4, 0x82, 0x11, 0x42, 0x14, 0x72, 0xc5, 0xe7, 0x5a, 0x1d, 0xfb, 0xb3, 0x30, + 0xa8, 0xdc, 0x4d, 0xa5, 0xbf, 0xb9, 0x95, 0xe3, 0x6f, 0xde, 0x99, 0x8d, 0x90, 0xb6, 0x71, 0xc5, + 0x4c, 0xdb, 0xb8, 0xaf, 0x5a, 0x10, 0x6b, 0x38, 0xd0, 0x5b, 0x30, 0xd8, 0xf4, 0x99, 0x41, 0x74, + 0x20, 0xbd, 0x0c, 0x1e, 0x6f, 0xab, 0x22, 0xe1, 0x71, 0x02, 0x03, 0x3e, 0x1d, 0x65, 0x59, 0x15, + 0xc7, 0x54, 0xd0, 0x35, 0xe8, 0x6f, 0x06, 0xa4, 0x12, 0xb1, 0x20, 0x56, 0xdd, 0x13, 0xe4, 0xcb, + 0x97, 0x57, 0xc4, 0x92, 0x82, 0xfd, 0x1b, 0x05, 0x18, 0x4f, 0xa2, 0xa2, 0xd7, 0xa0, 0x87, 0xdc, + 0x25, 0x55, 0xd1, 0xdf, 0x4c, 0x9e, 0x20, 0x96, 0x91, 0xf0, 0x01, 0xa0, 0xff, 0x31, 0xab, 0x85, + 0xae, 0x42, 0x3f, 0x65, 0x08, 0xae, 0xa8, 0x80, 0x8d, 0x8f, 0xe6, 0x31, 0x15, 0x8a, 0xb3, 0xe2, + 0x9d, 0x13, 0x45, 0x58, 0x56, 0x67, 0x06, 0x69, 0xd5, 0x66, 0x85, 0xbe, 0xb5, 0xa2, 0x76, 0x22, + 0x81, 0xb5, 0xf9, 0x32, 0x47, 0x12, 0xd4, 0xb8, 0x41, 0x9a, 0x2c, 0xc4, 0x31, 0x11, 0xf4, 0x06, + 0xf4, 0x86, 0x75, 0x42, 0x9a, 0xc2, 0xe2, 0x20, 0x53, 0xca, 0x59, 0xa1, 0x08, 0x82, 0x12, 0x93, + 0x8a, 0xb0, 0x02, 0xcc, 0x2b, 0xda, 0xbf, 0x65, 0x01, 0x70, 0x0b, 0x3e, 0xc7, 0xdb, 0x24, 0x47, + 0xa0, 0x18, 0x58, 0x80, 0x9e, 0xb0, 0x49, 0xaa, 0xed, 0xac, 0xfd, 0xe3, 0xfe, 0x54, 0x9a, 0xa4, + 0x1a, 0xaf, 0x59, 0xfa, 0x0f, 0xb3, 0xda, 0xf6, 0x8f, 0x02, 0x8c, 0xc6, 0x68, 0xcb, 0x11, 0x69, + 0xa0, 0xe7, 0x8c, 0x28, 0x37, 0xa7, 0x12, 0x51, 0x6e, 0x06, 0x19, 0xb6, 0x26, 0x83, 0xfe, 0x2c, + 0x14, 0x1b, 0xce, 0x5d, 0x21, 0x64, 0x7c, 0xa6, 0x7d, 0x37, 0x28, 0xfd, 0x99, 0x15, 0xe7, 0x2e, + 0x7f, 0x87, 0x3f, 0x23, 0xf7, 0xd8, 0x8a, 0x73, 0xb7, 0xa3, 0x45, 0x3a, 0x6d, 0x84, 0xb5, 0xe5, + 0x7a, 0xc2, 0x38, 0xad, 0xab, 0xb6, 0x5c, 0x2f, 0xd9, 0x96, 0xeb, 0x75, 0xd1, 0x96, 0xeb, 0xa1, + 0x7b, 0xd0, 0x2f, 0x6c, 0x47, 0x45, 0xf8, 0xbd, 0x8b, 0x5d, 0xb4, 0x27, 0x4c, 0x4f, 0x79, 0x9b, + 0x17, 0xa5, 0x9c, 0x41, 0x94, 0x76, 0x6c, 0x57, 0x36, 0x88, 0xfe, 0x2b, 0x0b, 0x46, 0xc5, 0x6f, + 0x4c, 0xde, 0x6d, 0x91, 0x30, 0x12, 0x7c, 0xf8, 0x47, 0xba, 0xef, 0x83, 0xa8, 0xc8, 0xbb, 0xf2, + 0x11, 0x79, 0x65, 0x9a, 0xc0, 0x8e, 0x3d, 0x4a, 0xf4, 0x02, 0xfd, 0x86, 0x05, 0xc7, 0x1a, 0xce, + 0x5d, 0xde, 0x22, 0x2f, 0xc3, 0x4e, 0xe4, 0xfa, 0xc2, 0x06, 0xe3, 0xb5, 0xee, 0xa6, 0x3f, 0x55, + 0x9d, 0x77, 0x52, 0x2a, 0x5c, 0x8f, 0x65, 0xa1, 0x74, 0xec, 0x6a, 0x66, 0xbf, 0xa6, 0x37, 0x60, + 0x40, 0xae, 0xb7, 0x87, 0x69, 0x18, 0xcf, 0xda, 0x11, 0x6b, 0xed, 0xa1, 0xb6, 0xf3, 0x59, 0x18, + 0xd6, 0xd7, 0xd8, 0x43, 0x6d, 0xeb, 0x5d, 0x98, 0xcc, 0x58, 0x4b, 0x0f, 0xb5, 0xc9, 0x3b, 0x70, + 0x2a, 0x77, 0x7d, 0x3c, 0x54, 0xc7, 0x86, 0xaf, 0x5b, 0xfa, 0x39, 0x78, 0x04, 0xda, 0x99, 0x79, + 0x53, 0x3b, 0x73, 0xb6, 0xfd, 0xce, 0xc9, 0x51, 0xd1, 0xbc, 0xa3, 0x77, 0x9a, 0x9e, 0xea, 0xe8, + 0x4d, 0xe8, 0xab, 0xd3, 0x12, 0x69, 0x81, 0x6c, 0x77, 0xde, 0x91, 0x31, 0x5f, 0xcc, 0xca, 0x43, + 0x2c, 0x28, 0xd8, 0x5f, 0xb1, 0x20, 0xc3, 0x35, 0x83, 0xf2, 0x49, 0x2d, 0xb7, 0xc6, 0x86, 0xa4, + 0x18, 0xf3, 0x49, 0x2a, 0x08, 0xcc, 0x19, 0x28, 0x6e, 0xba, 0x35, 0xe1, 0x59, 0xac, 0xc0, 0x57, + 0x28, 0x78, 0xd3, 0xad, 0xa1, 0x25, 0x40, 0x61, 0xab, 0xd9, 0xac, 0x33, 0xb3, 0x25, 0xa7, 0x7e, + 0x25, 0xf0, 0x5b, 0x4d, 0x6e, 0x6e, 0x5c, 0xe4, 0x42, 0xa2, 0x4a, 0x0a, 0x8a, 0x33, 0x6a, 0xd8, + 0xbf, 0x6b, 0x41, 0xcf, 0x11, 0x4c, 0x13, 0x36, 0xa7, 0xe9, 0xb9, 0x5c, 0xd2, 0x22, 0x6b, 0xc3, + 0x0c, 0x76, 0xee, 0x2c, 0xde, 0x8d, 0x88, 0x17, 0x32, 0x86, 0x23, 0x73, 0xd6, 0xf6, 0x2c, 0x98, + 0xbc, 0xee, 0x3b, 0xb5, 0x39, 0xa7, 0xee, 0x78, 0x55, 0x12, 0x2c, 0x7b, 0x9b, 0x87, 0xb2, 0xed, + 0x2f, 0x74, 0xb4, 0xed, 0xbf, 0x0c, 0x7d, 0x6e, 0x53, 0x0b, 0xfb, 0x7e, 0x8e, 0xce, 0xee, 0x72, + 0x59, 0x44, 0x7c, 0x47, 0x46, 0xe3, 0xac, 0x14, 0x0b, 0x7c, 0xba, 0x2c, 0xb9, 0x51, 0x5d, 0x4f, + 0xfe, 0xb2, 0xa4, 0x6f, 0x9d, 0x64, 0x38, 0x33, 0xc3, 0xfc, 0x7b, 0x0b, 0x8c, 0x26, 0x84, 0x07, + 0x23, 0x86, 0x7e, 0x97, 0x7f, 0xa9, 0x58, 0x9b, 0x4f, 0x66, 0xbf, 0x41, 0x52, 0x03, 0xa3, 0xf9, + 0xe6, 0xf1, 0x02, 0x2c, 0x09, 0xd9, 0x97, 0x21, 0x33, 0xfc, 0x4c, 0x67, 0xf9, 0x92, 0xfd, 0x09, + 0x98, 0x60, 0x35, 0x0f, 0x29, 0xbb, 0xb1, 0x13, 0x52, 0xf1, 0x8c, 0x08, 0xbe, 0xf6, 0xff, 0x6d, + 0x01, 0x5a, 0xf1, 0x6b, 0xee, 0xc6, 0xae, 0x20, 0xce, 0xbf, 0xff, 0x5d, 0x28, 0xf1, 0xc7, 0x71, + 0x32, 0xca, 0xed, 0x7c, 0xdd, 0x09, 0x43, 0x4d, 0x22, 0xff, 0xa4, 0x68, 0xb7, 0xb4, 0xd6, 0x1e, + 0x1d, 0x77, 0xa2, 0x87, 0xde, 0x4a, 0x04, 0x1d, 0xfc, 0x68, 0x2a, 0xe8, 0xe0, 0x93, 0x99, 0x76, + 0x31, 0xe9, 0xde, 0xcb, 0x60, 0x84, 0xf6, 0x17, 0x2d, 0x18, 0x5b, 0x4d, 0x44, 0x6d, 0x3d, 0xcf, + 0x8c, 0x04, 0x32, 0x34, 0x4d, 0x15, 0x56, 0x8a, 0x05, 0xf4, 0x81, 0x4b, 0x62, 0xff, 0xd5, 0x82, + 0x38, 0xdc, 0xd5, 0x11, 0xb0, 0xdc, 0xf3, 0x06, 0xcb, 0x9d, 0xf9, 0x7c, 0x51, 0xdd, 0xc9, 0xe3, + 0xb8, 0xd1, 0x35, 0x35, 0x27, 0x6d, 0x5e, 0x2e, 0x31, 0x19, 0xbe, 0xcf, 0x46, 0xcd, 0x89, 0x53, + 0xb3, 0xf1, 0xcd, 0x02, 0x20, 0x85, 0xdb, 0x75, 0xa0, 0xca, 0x74, 0x8d, 0x07, 0x13, 0xa8, 0x72, + 0x07, 0x10, 0x33, 0x73, 0x09, 0x1c, 0x2f, 0xe4, 0x64, 0x5d, 0x21, 0x7b, 0x3e, 0x9c, 0x0d, 0xcd, + 0xb4, 0xf4, 0x5c, 0xbd, 0x9e, 0xa2, 0x86, 0x33, 0x5a, 0xd0, 0xcc, 0x97, 0x7a, 0xbb, 0x35, 0x5f, + 0xea, 0xeb, 0xe0, 0x82, 0xfd, 0x35, 0x0b, 0x46, 0xd4, 0x30, 0xbd, 0x4f, 0x5c, 0x40, 0x54, 0x7f, + 0x72, 0xee, 0x95, 0xb2, 0xd6, 0x65, 0xc6, 0x0c, 0x7c, 0x1f, 0x73, 0xa5, 0x77, 0xea, 0xee, 0x3d, + 0xa2, 0xe2, 0x29, 0x97, 0x84, 0x6b, 0xbc, 0x28, 0x3d, 0xd8, 0x2b, 0x8d, 0xa8, 0x7f, 0x3c, 0x82, + 0x6b, 0x5c, 0xc5, 0xfe, 0x25, 0xba, 0xd9, 0xcd, 0xa5, 0x88, 0x5e, 0x82, 0xde, 0xe6, 0x96, 0x13, + 0x92, 0x84, 0xab, 0x5c, 0x6f, 0x99, 0x16, 0x1e, 0xec, 0x95, 0x46, 0x55, 0x05, 0x56, 0x82, 0x39, + 0x76, 0xf7, 0xe1, 0x3f, 0xd3, 0x8b, 0xb3, 0x63, 0xf8, 0xcf, 0x7f, 0xb2, 0xa0, 0x67, 0x95, 0xde, + 0x5e, 0x0f, 0xff, 0x08, 0x78, 0xdd, 0x38, 0x02, 0x4e, 0xe7, 0x65, 0x16, 0xca, 0xdd, 0xfd, 0x4b, + 0x89, 0xdd, 0x7f, 0x36, 0x97, 0x42, 0xfb, 0x8d, 0xdf, 0x80, 0x21, 0x96, 0xaf, 0x48, 0xb8, 0x05, + 0xbe, 0x60, 0x6c, 0xf8, 0x52, 0x62, 0xc3, 0x8f, 0x69, 0xa8, 0xda, 0x4e, 0x7f, 0x0a, 0xfa, 0x85, + 0x9f, 0x59, 0x32, 0x22, 0x81, 0xc0, 0xc5, 0x12, 0x6e, 0xff, 0x7c, 0x11, 0x8c, 0xfc, 0x48, 0xe8, + 0xf7, 0x2d, 0x98, 0x09, 0xb8, 0xfd, 0x79, 0x6d, 0xa1, 0x15, 0xb8, 0xde, 0x66, 0xa5, 0xba, 0x45, + 0x6a, 0xad, 0xba, 0xeb, 0x6d, 0x2e, 0x6f, 0x7a, 0xbe, 0x2a, 0x5e, 0xbc, 0x4b, 0xaa, 0x2d, 0xa6, + 0x1b, 0xee, 0x90, 0x8c, 0x49, 0xf9, 0x71, 0x3c, 0xbf, 0xbf, 0x57, 0x9a, 0xc1, 0x87, 0xa2, 0x8d, + 0x0f, 0xd9, 0x17, 0xf4, 0xe7, 0x16, 0x5c, 0xe4, 0x79, 0x7a, 0xba, 0xef, 0x7f, 0x1b, 0x09, 0x47, + 0x59, 0x92, 0x8a, 0x89, 0xac, 0x91, 0xa0, 0x31, 0xf7, 0xb2, 0x18, 0xd0, 0x8b, 0xe5, 0xc3, 0xb5, + 0x85, 0x0f, 0xdb, 0x39, 0xfb, 0x7f, 0x2e, 0xc2, 0x88, 0x08, 0x13, 0x29, 0xee, 0x80, 0x97, 0x8c, + 0x25, 0xf1, 0x68, 0x62, 0x49, 0x4c, 0x18, 0xc8, 0x0f, 0xe6, 0xf8, 0x0f, 0x61, 0x82, 0x1e, 0xce, + 0x57, 0x89, 0x13, 0x44, 0xb7, 0x89, 0xc3, 0xad, 0x12, 0x8b, 0x87, 0x3e, 0xfd, 0x95, 0x78, 0xfc, + 0x7a, 0x92, 0x18, 0x4e, 0xd3, 0xff, 0x5e, 0xba, 0x73, 0x3c, 0x18, 0x4f, 0x45, 0xfa, 0x7c, 0x1b, + 0x06, 0x95, 0x93, 0x94, 0x38, 0x74, 0xda, 0x07, 0xcc, 0x4d, 0x52, 0xe0, 0x42, 0xcf, 0xd8, 0x41, + 0x2f, 0x26, 0x67, 0xff, 0x66, 0xc1, 0x68, 0x90, 0x4f, 0xe2, 0x2a, 0x0c, 0x38, 0x21, 0x0b, 0xe2, + 0x5d, 0x6b, 0x27, 0x97, 0x4e, 0x35, 0xc3, 0x1c, 0xd5, 0x66, 0x45, 0x4d, 0xac, 0x68, 0xa0, 0xab, + 0xdc, 0xf6, 0x73, 0x87, 0xb4, 0x13, 0x4a, 0xa7, 0xa8, 0x81, 0xb4, 0x0e, 0xdd, 0x21, 0x58, 0xd4, + 0x47, 0x9f, 0xe2, 0xc6, 0xb9, 0xd7, 0x3c, 0xff, 0x8e, 0x77, 0xc5, 0xf7, 0x65, 0x48, 0xa0, 0xee, + 0x08, 0x4e, 0x48, 0x93, 0x5c, 0x55, 0x1d, 0x9b, 0xd4, 0xba, 0x0b, 0x9d, 0xfd, 0x39, 0x60, 0x79, + 0x49, 0xcc, 0x98, 0x04, 0x21, 0x22, 0x30, 0x26, 0x62, 0x90, 0xca, 0x32, 0x31, 0x76, 0x99, 0xcf, + 0x6f, 0xb3, 0x76, 0xac, 0xc7, 0xb9, 0x66, 0x92, 0xc0, 0x49, 0x9a, 0xf6, 0x16, 0x3f, 0x84, 0x97, + 0x88, 0x13, 0xb5, 0x02, 0x12, 0xa2, 0x8f, 0xc3, 0x54, 0xfa, 0x65, 0x2c, 0xd4, 0x21, 0x16, 0xe3, + 0x9e, 0x4f, 0xef, 0xef, 0x95, 0xa6, 0x2a, 0x39, 0x38, 0x38, 0xb7, 0xb6, 0xfd, 0x2b, 0x16, 0x30, + 0x4f, 0xf0, 0x23, 0xe0, 0x7c, 0x3e, 0x66, 0x72, 0x3e, 0x53, 0x79, 0xd3, 0x99, 0xc3, 0xf4, 0xbc, + 0xc8, 0xd7, 0x70, 0x39, 0xf0, 0xef, 0xee, 0x0a, 0xdb, 0xad, 0xce, 0xcf, 0x38, 0xfb, 0xcb, 0x16, + 0xb0, 0x24, 0x3e, 0x98, 0xbf, 0xda, 0xa5, 0x82, 0xa3, 0xb3, 0x59, 0xc2, 0xc7, 0x61, 0x60, 0x43, + 0x0c, 0x7f, 0x86, 0xd0, 0xc9, 0xe8, 0xb0, 0x49, 0x5b, 0x4e, 0x9a, 0xf0, 0xe8, 0x14, 0xff, 0xb0, + 0xa2, 0x66, 0xff, 0xf7, 0x16, 0x4c, 0xe7, 0x57, 0x43, 0xeb, 0x70, 0x32, 0x20, 0xd5, 0x56, 0x10, + 0xd2, 0x2d, 0x21, 0x1e, 0x40, 0xc2, 0x29, 0x8a, 0x4f, 0xf5, 0x23, 0xfb, 0x7b, 0xa5, 0x93, 0x38, + 0x1b, 0x05, 0xe7, 0xd5, 0x45, 0xaf, 0xc0, 0x68, 0x2b, 0xe4, 0x9c, 0x1f, 0x63, 0xba, 0x42, 0x11, + 0x29, 0x9a, 0xf9, 0x0d, 0xad, 0x1b, 0x10, 0x9c, 0xc0, 0xb4, 0x7f, 0x80, 0x2f, 0x47, 0x15, 0x2c, + 0xba, 0x01, 0x13, 0x9e, 0xf6, 0x9f, 0xde, 0x80, 0xf2, 0xa9, 0xff, 0x78, 0xa7, 0x5b, 0x9f, 0x5d, + 0x97, 0x9a, 0xaf, 0x7a, 0x82, 0x0c, 0x4e, 0x53, 0xb6, 0x7f, 0xc1, 0x82, 0x93, 0x3a, 0xa2, 0xe6, + 0x0e, 0xd7, 0x49, 0x97, 0xb7, 0x00, 0x03, 0x7e, 0x93, 0x04, 0x4e, 0xe4, 0x07, 0xe2, 0x9a, 0xbb, + 0x20, 0x57, 0xe8, 0x0d, 0x51, 0x7e, 0x20, 0x92, 0xd7, 0x48, 0xea, 0xb2, 0x1c, 0xab, 0x9a, 0xc8, + 0x86, 0x3e, 0x26, 0x40, 0x0c, 0x85, 0xe3, 0x23, 0x3b, 0xb4, 0x98, 0x7d, 0x4a, 0x88, 0x05, 0xc4, + 0xfe, 0x7b, 0x8b, 0xaf, 0x4f, 0xbd, 0xeb, 0xe8, 0x5d, 0x18, 0x6f, 0x38, 0x51, 0x75, 0x6b, 0xf1, + 0x6e, 0x33, 0xe0, 0x2a, 0x5a, 0x39, 0x4e, 0xcf, 0x74, 0x1a, 0x27, 0xed, 0x23, 0x63, 0x03, 0xe9, + 0x95, 0x04, 0x31, 0x9c, 0x22, 0x8f, 0x6e, 0xc3, 0x10, 0x2b, 0x63, 0x3e, 0xbd, 0x61, 0x3b, 0x5e, + 0x26, 0xaf, 0x35, 0x65, 0xe2, 0xb3, 0x12, 0xd3, 0xc1, 0x3a, 0x51, 0xfb, 0xab, 0x45, 0x7e, 0x68, + 0xb0, 0xb7, 0xc7, 0x53, 0xd0, 0xdf, 0xf4, 0x6b, 0xf3, 0xcb, 0x0b, 0x58, 0xcc, 0x82, 0xba, 0xf7, + 0xca, 0xbc, 0x18, 0x4b, 0x38, 0xba, 0x00, 0x03, 0xe2, 0xa7, 0x54, 0xa9, 0xb3, 0x3d, 0x22, 0xf0, + 0x42, 0xac, 0xa0, 0xe8, 0x79, 0x80, 0x66, 0xe0, 0xef, 0xb8, 0x35, 0x16, 0x89, 0xa9, 0x68, 0x5a, + 0xe7, 0x95, 0x15, 0x04, 0x6b, 0x58, 0xe8, 0x55, 0x18, 0x69, 0x79, 0x21, 0xe7, 0x9f, 0xb4, 0x78, + 0xf7, 0xca, 0x6e, 0x6c, 0x5d, 0x07, 0x62, 0x13, 0x17, 0xcd, 0x42, 0x5f, 0xe4, 0x30, 0x6b, 0xb3, + 0xde, 0x7c, 0x23, 0xfa, 0x35, 0x8a, 0xa1, 0x67, 0x96, 0xa3, 0x15, 0xb0, 0xa8, 0x88, 0xde, 0x96, + 0xee, 0xf5, 0xfc, 0x26, 0x12, 0xde, 0x2b, 0xdd, 0xdd, 0x5a, 0x9a, 0x73, 0xbd, 0xf0, 0x8a, 0x31, + 0x68, 0xa1, 0x57, 0x00, 0xc8, 0xdd, 0x88, 0x04, 0x9e, 0x53, 0x57, 0x36, 0xa2, 0x8a, 0x91, 0x59, + 0xf0, 0x57, 0xfd, 0x68, 0x3d, 0x24, 0x8b, 0x0a, 0x03, 0x6b, 0xd8, 0xf6, 0x8f, 0x0e, 0x01, 0xc4, + 0x0f, 0x0d, 0x74, 0x0f, 0x06, 0xaa, 0x4e, 0xd3, 0xa9, 0xf2, 0xb4, 0xa9, 0xc5, 0x3c, 0xaf, 0xe7, + 0xb8, 0xc6, 0xcc, 0xbc, 0x40, 0xe7, 0xca, 0x1b, 0x19, 0x32, 0x7c, 0x40, 0x16, 0x77, 0x54, 0xd8, + 0xa8, 0xf6, 0xd0, 0x17, 0x2c, 0x18, 0x12, 0x91, 0x8e, 0xd8, 0x0c, 0x15, 0xf2, 0xf5, 0x6d, 0x5a, + 0xfb, 0xb3, 0x71, 0x0d, 0xde, 0x85, 0x17, 0xe4, 0x0a, 0xd5, 0x20, 0x1d, 0x7b, 0xa1, 0x37, 0x8c, + 0x3e, 0x2c, 0xdf, 0xb6, 0x45, 0x63, 0x28, 0xd5, 0xdb, 0x76, 0x90, 0x5d, 0x35, 0xfa, 0xb3, 0x76, + 0xdd, 0x78, 0xd6, 0xf6, 0xe4, 0xfb, 0x0f, 0x1b, 0xfc, 0x76, 0xa7, 0x17, 0x2d, 0x2a, 0xeb, 0xb1, + 0x44, 0x7a, 0xf3, 0x9d, 0x5e, 0xb5, 0x87, 0x5d, 0x87, 0x38, 0x22, 0x9f, 0x85, 0xb1, 0x9a, 0xc9, + 0xb5, 0x88, 0x95, 0xf8, 0x64, 0x1e, 0xdd, 0x04, 0x93, 0x13, 0xf3, 0x29, 0x09, 0x00, 0x4e, 0x12, + 0x46, 0x65, 0x1e, 0x5a, 0x66, 0xd9, 0xdb, 0xf0, 0x85, 0x07, 0x95, 0x9d, 0x3b, 0x97, 0xbb, 0x61, + 0x44, 0x1a, 0x14, 0x33, 0x66, 0x12, 0x56, 0x45, 0x5d, 0xac, 0xa8, 0xa0, 0x37, 0xa1, 0x8f, 0x79, + 0x3d, 0x86, 0x53, 0x03, 0xf9, 0x6a, 0x0d, 0x33, 0x12, 0x6a, 0xbc, 0x21, 0xd9, 0xdf, 0x10, 0x0b, + 0x0a, 0xe8, 0xaa, 0xf4, 0x29, 0x0e, 0x97, 0xbd, 0xf5, 0x90, 0x30, 0x9f, 0xe2, 0xc1, 0xb9, 0xc7, + 0x63, 0x77, 0x61, 0x5e, 0x9e, 0x99, 0x7f, 0xd6, 0xa8, 0x49, 0xd9, 0x3e, 0xf1, 0x5f, 0xa6, 0xb5, + 0x15, 0x71, 0xdb, 0x32, 0xbb, 0x67, 0xa6, 0xbe, 0x8d, 0x87, 0xf3, 0xa6, 0x49, 0x02, 0x27, 0x69, + 0x52, 0x16, 0x9a, 0xef, 0x7a, 0xe1, 0x83, 0xd5, 0xe9, 0xec, 0xe0, 0x92, 0x03, 0x76, 0x1b, 0xf1, + 0x12, 0x2c, 0xea, 0x23, 0x17, 0xc6, 0x02, 0x83, 0xbd, 0x90, 0xe1, 0xd6, 0xce, 0x77, 0xc7, 0xc4, + 0x68, 0x81, 0xfc, 0x4d, 0x32, 0x38, 0x49, 0x17, 0xbd, 0xa9, 0x31, 0x4a, 0x23, 0xed, 0x5f, 0xfe, + 0x9d, 0x58, 0xa3, 0xe9, 0x6d, 0x18, 0x31, 0x0e, 0x9b, 0x87, 0xaa, 0x82, 0xf4, 0x60, 0x3c, 0x79, + 0xb2, 0x3c, 0x54, 0xcd, 0xe3, 0xdf, 0xf6, 0xc0, 0xa8, 0xb9, 0x13, 0xd0, 0x45, 0x18, 0x14, 0x44, + 0x54, 0x46, 0x2b, 0xb5, 0xb9, 0x57, 0x24, 0x00, 0xc7, 0x38, 0x2c, 0x91, 0x19, 0xab, 0xae, 0xf9, + 0x0a, 0xc4, 0x89, 0xcc, 0x14, 0x04, 0x6b, 0x58, 0xf4, 0x01, 0x7b, 0xdb, 0xf7, 0x23, 0x75, 0x8f, + 0xaa, 0xed, 0x32, 0xc7, 0x4a, 0xb1, 0x80, 0xd2, 0xfb, 0x73, 0x9b, 0x04, 0x1e, 0xa9, 0x9b, 0x29, + 0x1d, 0xd4, 0xfd, 0x79, 0x4d, 0x07, 0x62, 0x13, 0x97, 0x72, 0x01, 0x7e, 0xc8, 0xf6, 0x9f, 0x78, + 0x26, 0xc7, 0xbe, 0x17, 0x15, 0x1e, 0x45, 0x42, 0xc2, 0xd1, 0x27, 0xe0, 0xa4, 0x0a, 0x9f, 0x28, + 0x56, 0x97, 0x6c, 0xb1, 0xcf, 0x90, 0x6a, 0x9d, 0x9c, 0xcf, 0x46, 0xc3, 0x79, 0xf5, 0xd1, 0xeb, + 0x30, 0x2a, 0x9e, 0x52, 0x92, 0x62, 0xbf, 0x69, 0x48, 0x78, 0xcd, 0x80, 0xe2, 0x04, 0xb6, 0x4c, + 0x4a, 0xc1, 0xde, 0x18, 0x92, 0xc2, 0x40, 0x3a, 0x29, 0x85, 0x0e, 0xc7, 0xa9, 0x1a, 0x68, 0x16, + 0xc6, 0x38, 0xeb, 0xe8, 0x7a, 0x9b, 0x7c, 0x4e, 0x84, 0x67, 0xa7, 0xda, 0x54, 0x37, 0x4c, 0x30, + 0x4e, 0xe2, 0xa3, 0xcb, 0x30, 0xec, 0x04, 0xd5, 0x2d, 0x37, 0x22, 0x55, 0xba, 0x33, 0x98, 0x2d, + 0x9f, 0x66, 0x89, 0x39, 0xab, 0xc1, 0xb0, 0x81, 0x69, 0xdf, 0x83, 0xc9, 0x8c, 0xf0, 0x32, 0x74, + 0xe1, 0x38, 0x4d, 0x57, 0x7e, 0x53, 0xc2, 0xdd, 0x61, 0xb6, 0xbc, 0x2c, 0xbf, 0x46, 0xc3, 0xa2, + 0xab, 0x93, 0x85, 0xa1, 0xd1, 0x92, 0x6f, 0xab, 0xd5, 0xb9, 0x24, 0x01, 0x38, 0xc6, 0xb1, 0xff, + 0xb9, 0x00, 0x63, 0x19, 0x0a, 0x3a, 0x96, 0x00, 0x3a, 0xf1, 0xd2, 0x8a, 0xf3, 0x3d, 0x9b, 0x39, + 0x4e, 0x0a, 0x87, 0xc8, 0x71, 0x52, 0xec, 0x94, 0xe3, 0xa4, 0xe7, 0xbd, 0xe4, 0x38, 0x31, 0x47, + 0xac, 0xb7, 0xab, 0x11, 0xcb, 0xc8, 0x8b, 0xd2, 0x77, 0xc8, 0xbc, 0x28, 0xc6, 0xa0, 0xf7, 0x77, + 0x31, 0xe8, 0x3f, 0x5d, 0x80, 0xf1, 0xa4, 0x6e, 0xef, 0x08, 0xe4, 0xe3, 0x6f, 0x1a, 0xf2, 0xf1, + 0x0b, 0xdd, 0x78, 0xe2, 0xe7, 0xca, 0xca, 0x71, 0x42, 0x56, 0xfe, 0x74, 0x57, 0xd4, 0xda, 0xcb, + 0xcd, 0x7f, 0xb1, 0x00, 0xc7, 0x33, 0x55, 0x9e, 0x47, 0x30, 0x36, 0x37, 0x8c, 0xb1, 0x79, 0xae, + 0xeb, 0x28, 0x05, 0xb9, 0x03, 0x74, 0x2b, 0x31, 0x40, 0x17, 0xbb, 0x27, 0xd9, 0x7e, 0x94, 0xbe, + 0x55, 0x84, 0xb3, 0x99, 0xf5, 0x62, 0xf1, 0xf2, 0x92, 0x21, 0x5e, 0x7e, 0x3e, 0x21, 0x5e, 0xb6, + 0xdb, 0xd7, 0x7e, 0x30, 0xf2, 0x66, 0xe1, 0xad, 0xcf, 0x62, 0x8e, 0xdc, 0xa7, 0xac, 0xd9, 0xf0, + 0xd6, 0x57, 0x84, 0xb0, 0x49, 0xf7, 0x7b, 0x49, 0xc6, 0xfc, 0x67, 0x16, 0x9c, 0xca, 0x9c, 0x9b, + 0x23, 0x90, 0xf4, 0xad, 0x9a, 0x92, 0xbe, 0xa7, 0xba, 0x5e, 0xad, 0x39, 0xa2, 0xbf, 0x2f, 0xf6, + 0xe5, 0x7c, 0x0b, 0x13, 0x40, 0xdc, 0x80, 0x21, 0xa7, 0x5a, 0x25, 0x61, 0xb8, 0xe2, 0xd7, 0x54, + 0x3a, 0x84, 0xe7, 0xd8, 0xf3, 0x30, 0x2e, 0x3e, 0xd8, 0x2b, 0x4d, 0x27, 0x49, 0xc4, 0x60, 0xac, + 0x53, 0x40, 0x9f, 0x82, 0x81, 0x50, 0x66, 0xb2, 0xec, 0xb9, 0xff, 0x4c, 0x96, 0x8c, 0xc9, 0x55, + 0x02, 0x16, 0x45, 0x12, 0x7d, 0xbf, 0x1e, 0xfd, 0xa9, 0x8d, 0x68, 0x91, 0x77, 0xf2, 0x3e, 0x62, + 0x40, 0x3d, 0x0f, 0xb0, 0xa3, 0x5e, 0x32, 0x49, 0xe1, 0x89, 0xf6, 0xc6, 0xd1, 0xb0, 0xd0, 0x1b, + 0x30, 0x1e, 0xf2, 0xc0, 0xa7, 0xb1, 0x91, 0x0a, 0x5f, 0x8b, 0x2c, 0x76, 0x5c, 0x25, 0x01, 0xc3, + 0x29, 0x6c, 0xb4, 0x24, 0x5b, 0x65, 0xe6, 0x48, 0x7c, 0x79, 0x9e, 0x8f, 0x5b, 0x14, 0x26, 0x49, + 0xc7, 0x92, 0x93, 0xc0, 0x86, 0x5f, 0xab, 0x89, 0x3e, 0x05, 0x40, 0x17, 0x91, 0x10, 0xa2, 0xf4, + 0xe7, 0x1f, 0xa1, 0xf4, 0x6c, 0xa9, 0x65, 0x7a, 0x32, 0x30, 0x37, 0xfb, 0x05, 0x45, 0x04, 0x6b, + 0x04, 0x91, 0x03, 0x23, 0xf1, 0xbf, 0x38, 0x47, 0xfb, 0x85, 0xdc, 0x16, 0x92, 0xc4, 0x99, 0x82, + 0x61, 0x41, 0x27, 0x81, 0x4d, 0x8a, 0xe8, 0x93, 0x70, 0x6a, 0x27, 0xd7, 0xf2, 0x87, 0x73, 0x82, + 0x2c, 0xe9, 0x7a, 0xbe, 0xbd, 0x4f, 0x7e, 0x7d, 0xfb, 0x7f, 0x07, 0x78, 0xa4, 0xcd, 0x49, 0x8f, + 0x66, 0x4d, 0xad, 0xfd, 0x33, 0x49, 0xc9, 0xc6, 0x74, 0x66, 0x65, 0x43, 0xd4, 0x91, 0xd8, 0x50, + 0x85, 0xf7, 0xbc, 0xa1, 0x7e, 0xc2, 0xd2, 0x64, 0x4e, 0xdc, 0xa6, 0xfb, 0x63, 0x87, 0xbc, 0xc1, + 0x1e, 0xa0, 0x10, 0x6a, 0x23, 0x43, 0x92, 0xf3, 0x7c, 0xd7, 0xdd, 0xe9, 0x5e, 0xb4, 0xf3, 0xf5, + 0xec, 0x80, 0xef, 0x5c, 0xc8, 0x73, 0xe5, 0xb0, 0xdf, 0x7f, 0x54, 0xc1, 0xdf, 0xbf, 0x69, 0xc1, + 0xa9, 0x54, 0x31, 0xef, 0x03, 0x09, 0x45, 0xb4, 0xbb, 0xd5, 0xf7, 0xdc, 0x79, 0x49, 0x90, 0x7f, + 0xc3, 0x55, 0xf1, 0x0d, 0xa7, 0x72, 0xf1, 0x92, 0x5d, 0xff, 0xd2, 0xdf, 0x94, 0x26, 0x59, 0x03, + 0x26, 0x22, 0xce, 0xef, 0x3a, 0x6a, 0xc2, 0xb9, 0x6a, 0x2b, 0x08, 0xe2, 0xc5, 0x9a, 0xb1, 0x39, + 0xf9, 0x5b, 0xef, 0xf1, 0xfd, 0xbd, 0xd2, 0xb9, 0xf9, 0x0e, 0xb8, 0xb8, 0x23, 0x35, 0xe4, 0x01, + 0x6a, 0xa4, 0xec, 0xeb, 0xd8, 0x01, 0x90, 0x23, 0x87, 0x49, 0x5b, 0xe3, 0x71, 0x4b, 0xd9, 0x0c, + 0x2b, 0xbd, 0x0c, 0xca, 0x47, 0x2b, 0x3d, 0xf9, 0xce, 0xc4, 0xa5, 0x9f, 0xbe, 0x0e, 0x67, 0xdb, + 0x2f, 0xa6, 0x43, 0x85, 0x72, 0xf8, 0x4b, 0x0b, 0xce, 0xb4, 0x8d, 0x17, 0xf6, 0x5d, 0xf8, 0x58, + 0xb0, 0x3f, 0x6f, 0xc1, 0xa3, 0x99, 0x35, 0x92, 0x4e, 0x78, 0x55, 0x5a, 0xa8, 0x99, 0xa3, 0xc6, + 0x91, 0x73, 0x24, 0x00, 0xc7, 0x38, 0x86, 0xc5, 0x66, 0xa1, 0xa3, 0xc5, 0xe6, 0x1f, 0x59, 0x90, + 0xba, 0xea, 0x8f, 0x80, 0xf3, 0x5c, 0x36, 0x39, 0xcf, 0xc7, 0xbb, 0x19, 0xcd, 0x1c, 0xa6, 0xf3, + 0x1f, 0xc7, 0xe0, 0x44, 0x8e, 0x27, 0xf6, 0x0e, 0x4c, 0x6c, 0x56, 0x89, 0x19, 0x7a, 0xa3, 0x5d, + 0x48, 0xba, 0xb6, 0x71, 0x3a, 0xe6, 0x8e, 0xef, 0xef, 0x95, 0x26, 0x52, 0x28, 0x38, 0xdd, 0x04, + 0xfa, 0xbc, 0x05, 0xc7, 0x9c, 0x3b, 0xe1, 0x22, 0x7d, 0x41, 0xb8, 0xd5, 0xb9, 0xba, 0x5f, 0xdd, + 0xa6, 0x8c, 0x99, 0xdc, 0x56, 0x2f, 0x66, 0x0a, 0xa3, 0x6f, 0x55, 0x52, 0xf8, 0x46, 0xf3, 0x53, + 0xfb, 0x7b, 0xa5, 0x63, 0x59, 0x58, 0x38, 0xb3, 0x2d, 0x84, 0x45, 0xc6, 0x2f, 0x27, 0xda, 0x6a, + 0x17, 0x1c, 0x26, 0xcb, 0x65, 0x9e, 0xb3, 0xc4, 0x12, 0x82, 0x15, 0x1d, 0xf4, 0x19, 0x18, 0xdc, + 0x94, 0x71, 0x20, 0x32, 0x58, 0xee, 0x78, 0x20, 0xdb, 0x47, 0xc7, 0xe0, 0x26, 0x30, 0x0a, 0x09, + 0xc7, 0x44, 0xd1, 0xeb, 0x50, 0xf4, 0x36, 0x42, 0x11, 0xa2, 0x2e, 0xdb, 0x12, 0xd7, 0xb4, 0x75, + 0xe6, 0x21, 0x98, 0x56, 0x97, 0x2a, 0x98, 0x56, 0x44, 0x57, 0xa1, 0x18, 0xdc, 0xae, 0x09, 0x4d, + 0x4a, 0xe6, 0x26, 0xc5, 0x73, 0x0b, 0x39, 0xbd, 0x62, 0x94, 0xf0, 0xdc, 0x02, 0xa6, 0x24, 0x50, + 0x19, 0x7a, 0x99, 0xfb, 0xb2, 0x60, 0x6d, 0x33, 0x9f, 0xf2, 0x6d, 0xc2, 0x00, 0x70, 0x8f, 0x44, + 0x86, 0x80, 0x39, 0x21, 0xb4, 0x06, 0x7d, 0x55, 0xd7, 0xab, 0x91, 0x40, 0xf0, 0xb2, 0x1f, 0xce, + 0xd4, 0x99, 0x30, 0x8c, 0x1c, 0x9a, 0x5c, 0x85, 0xc0, 0x30, 0xb0, 0xa0, 0xc5, 0xa8, 0x92, 0xe6, + 0xd6, 0x86, 0xbc, 0xb1, 0xb2, 0xa9, 0x92, 0xe6, 0xd6, 0x52, 0xa5, 0x2d, 0x55, 0x86, 0x81, 0x05, + 0x2d, 0xf4, 0x0a, 0x14, 0x36, 0xaa, 0xc2, 0x35, 0x39, 0x53, 0x79, 0x62, 0x46, 0xd1, 0x9a, 0xeb, + 0xdb, 0xdf, 0x2b, 0x15, 0x96, 0xe6, 0x71, 0x61, 0xa3, 0x8a, 0x56, 0xa1, 0x7f, 0x83, 0xc7, 0xdd, + 0x11, 0xfa, 0x91, 0x27, 0xb3, 0x43, 0x02, 0xa5, 0x42, 0xf3, 0x70, 0xef, 0x52, 0x01, 0xc0, 0x92, + 0x08, 0x4b, 0x40, 0xa5, 0xe2, 0x07, 0x89, 0xf0, 0xa5, 0x33, 0x87, 0x8b, 0xf9, 0xc4, 0x9f, 0x1a, + 0x71, 0x14, 0x22, 0xac, 0x51, 0xa4, 0xab, 0xda, 0xb9, 0xd7, 0x0a, 0x58, 0x6e, 0x0b, 0xa1, 0x1a, + 0xc9, 0x5c, 0xd5, 0xb3, 0x12, 0xa9, 0xdd, 0xaa, 0x56, 0x48, 0x38, 0x26, 0x8a, 0xb6, 0x61, 0x64, + 0x27, 0x6c, 0x6e, 0x11, 0xb9, 0xa5, 0x59, 0xd8, 0xbb, 0x1c, 0x6e, 0xf6, 0xa6, 0x40, 0x74, 0x83, + 0xa8, 0xe5, 0xd4, 0x53, 0xa7, 0x10, 0x7b, 0xd6, 0xdc, 0xd4, 0x89, 0x61, 0x93, 0x36, 0x1d, 0xfe, + 0x77, 0x5b, 0xfe, 0xed, 0xdd, 0x88, 0x88, 0xa8, 0xa3, 0x99, 0xc3, 0xff, 0x16, 0x47, 0x49, 0x0f, + 0xbf, 0x00, 0x60, 0x49, 0x04, 0xdd, 0x14, 0xc3, 0xc3, 0x4e, 0xcf, 0xf1, 0xfc, 0x90, 0xe6, 0xb3, + 0x12, 0x29, 0x67, 0x50, 0xd8, 0x69, 0x19, 0x93, 0x62, 0xa7, 0x64, 0x73, 0xcb, 0x8f, 0x7c, 0x2f, + 0x71, 0x42, 0x4f, 0xe4, 0x9f, 0x92, 0xe5, 0x0c, 0xfc, 0xf4, 0x29, 0x99, 0x85, 0x85, 0x33, 0xdb, + 0x42, 0x35, 0x18, 0x6d, 0xfa, 0x41, 0x74, 0xc7, 0x0f, 0xe4, 0xfa, 0x42, 0x6d, 0x04, 0xa5, 0x06, + 0xa6, 0x68, 0x91, 0x19, 0xe6, 0x98, 0x10, 0x9c, 0xa0, 0x89, 0x3e, 0x0e, 0xfd, 0x61, 0xd5, 0xa9, + 0x93, 0xe5, 0x1b, 0x53, 0x93, 0xf9, 0xd7, 0x4f, 0x85, 0xa3, 0xe4, 0xac, 0x2e, 0x1e, 0x36, 0x89, + 0xa3, 0x60, 0x49, 0x0e, 0x2d, 0x41, 0x2f, 0x4b, 0xec, 0xcc, 0x42, 0xe4, 0xe6, 0x44, 0x66, 0x4f, + 0xb9, 0xd5, 0xf0, 0xb3, 0x89, 0x15, 0x63, 0x5e, 0x9d, 0xee, 0x01, 0x21, 0x29, 0xf0, 0xc3, 0xa9, + 0xe3, 0xf9, 0x7b, 0x40, 0x08, 0x18, 0x6e, 0x54, 0xda, 0xed, 0x01, 0x85, 0x84, 0x63, 0xa2, 0xf4, + 0x64, 0xa6, 0xa7, 0xe9, 0x89, 0x36, 0x26, 0x93, 0xb9, 0x67, 0x29, 0x3b, 0x99, 0xe9, 0x49, 0x4a, + 0x49, 0xd8, 0x7f, 0x30, 0x90, 0xe6, 0x59, 0x98, 0x84, 0xe9, 0x3f, 0xb7, 0x52, 0x36, 0x13, 0x1f, + 0xe9, 0x56, 0xe0, 0xfd, 0x00, 0x1f, 0xae, 0x9f, 0xb7, 0xe0, 0x44, 0x33, 0xf3, 0x43, 0x04, 0x03, + 0xd0, 0x9d, 0xdc, 0x9c, 0x7f, 0xba, 0x0a, 0xa7, 0x9c, 0x0d, 0xc7, 0x39, 0x2d, 0x25, 0x85, 0x03, + 0xc5, 0xf7, 0x2c, 0x1c, 0x58, 0x81, 0x81, 0x2a, 0x7f, 0xc9, 0xc9, 0x34, 0x00, 0x5d, 0x05, 0x03, + 0x65, 0xac, 0x84, 0x78, 0x02, 0x6e, 0x60, 0x45, 0x02, 0xfd, 0xa4, 0x05, 0x67, 0x92, 0x5d, 0xc7, + 0x84, 0x81, 0x85, 0xc1, 0x24, 0x17, 0x6b, 0x2d, 0x89, 0xef, 0x4f, 0xf1, 0xff, 0x06, 0xf2, 0x41, + 0x27, 0x04, 0xdc, 0xbe, 0x31, 0xb4, 0x90, 0x21, 0x57, 0xeb, 0x33, 0x35, 0x8a, 0x5d, 0xc8, 0xd6, + 0x5e, 0x84, 0xe1, 0x86, 0xdf, 0xf2, 0x22, 0x61, 0xf7, 0x28, 0x8c, 0xa7, 0x98, 0xd1, 0xd0, 0x8a, + 0x56, 0x8e, 0x0d, 0xac, 0x84, 0x44, 0x6e, 0xe0, 0xbe, 0x25, 0x72, 0xef, 0xc0, 0xb0, 0xa7, 0xb9, + 0x04, 0xb4, 0x7b, 0xc1, 0x0a, 0xe9, 0xa2, 0x86, 0xcd, 0x7b, 0xa9, 0x97, 0x60, 0x83, 0x5a, 0x7b, + 0x69, 0x19, 0xbc, 0x37, 0x69, 0xd9, 0x91, 0x3e, 0x89, 0xed, 0x5f, 0x2f, 0x64, 0xbc, 0x18, 0xb8, + 0x54, 0xee, 0x35, 0x53, 0x2a, 0x77, 0x3e, 0x29, 0x95, 0x4b, 0xa9, 0xaa, 0x0c, 0x81, 0x5c, 0xf7, + 0x19, 0x25, 0xbb, 0x0e, 0xf0, 0xfc, 0xc3, 0x16, 0x9c, 0x64, 0xba, 0x0f, 0xda, 0xc0, 0x7b, 0xd6, + 0x77, 0x30, 0x93, 0xd4, 0xeb, 0xd9, 0xe4, 0x70, 0x5e, 0x3b, 0x76, 0x1d, 0xce, 0x75, 0xba, 0x77, + 0x99, 0x85, 0x6f, 0x4d, 0x19, 0x47, 0xc4, 0x16, 0xbe, 0xb5, 0xe5, 0x05, 0xcc, 0x20, 0xdd, 0x86, + 0x2f, 0xb4, 0xff, 0x7f, 0x0b, 0x8a, 0x65, 0xbf, 0x76, 0x04, 0x2f, 0xfa, 0x8f, 0x19, 0x2f, 0xfa, + 0x47, 0xb2, 0x6f, 0xfc, 0x5a, 0xae, 0xb2, 0x6f, 0x31, 0xa1, 0xec, 0x3b, 0x93, 0x47, 0xa0, 0xbd, + 0x6a, 0xef, 0x97, 0x8a, 0x30, 0x54, 0xf6, 0x6b, 0x6a, 0x9f, 0xfd, 0xaf, 0xf7, 0xe3, 0xc8, 0x93, + 0x9b, 0x7d, 0x4a, 0xa3, 0xcc, 0x2c, 0x7a, 0x65, 0xdc, 0x89, 0xef, 0x32, 0x7f, 0x9e, 0x5b, 0xc4, + 0xdd, 0xdc, 0x8a, 0x48, 0x2d, 0xf9, 0x39, 0x47, 0xe7, 0xcf, 0xf3, 0xed, 0x22, 0x8c, 0x25, 0x5a, + 0x47, 0x75, 0x18, 0xa9, 0xeb, 0xaa, 0x24, 0xb1, 0x4e, 0xef, 0x4b, 0x0b, 0x25, 0xfc, 0x21, 0xb4, + 0x22, 0x6c, 0x12, 0x47, 0x33, 0x00, 0x9e, 0x6e, 0x15, 0xae, 0x02, 0x15, 0x6b, 0x16, 0xe1, 0x1a, + 0x06, 0x7a, 0x09, 0x86, 0x22, 0xbf, 0xe9, 0xd7, 0xfd, 0xcd, 0xdd, 0x6b, 0x44, 0x46, 0xb6, 0x54, + 0x46, 0xc3, 0x6b, 0x31, 0x08, 0xeb, 0x78, 0xe8, 0x2e, 0x4c, 0x28, 0x22, 0x95, 0x07, 0xa0, 0x5e, + 0x63, 0x62, 0x93, 0xd5, 0x24, 0x45, 0x9c, 0x6e, 0x04, 0xbd, 0x02, 0xa3, 0xcc, 0x7a, 0x99, 0xd5, + 0xbf, 0x46, 0x76, 0x65, 0xc4, 0x63, 0xc6, 0x61, 0xaf, 0x18, 0x10, 0x9c, 0xc0, 0x44, 0xf3, 0x30, + 0xd1, 0x70, 0xc3, 0x44, 0xf5, 0x3e, 0x56, 0x9d, 0x75, 0x60, 0x25, 0x09, 0xc4, 0x69, 0x7c, 0xfb, + 0x57, 0xc5, 0x1c, 0x7b, 0x91, 0xfb, 0xc1, 0x76, 0x7c, 0x7f, 0x6f, 0xc7, 0x6f, 0x59, 0x30, 0x4e, + 0x5b, 0x67, 0x26, 0x99, 0x92, 0x91, 0x52, 0x39, 0x31, 0xac, 0x36, 0x39, 0x31, 0xce, 0xd3, 0x63, + 0xbb, 0xe6, 0xb7, 0x22, 0x21, 0x1d, 0xd5, 0xce, 0x65, 0x5a, 0x8a, 0x05, 0x54, 0xe0, 0x91, 0x20, + 0x10, 0x7e, 0xef, 0x3a, 0x1e, 0x09, 0x02, 0x2c, 0xa0, 0x32, 0x65, 0x46, 0x4f, 0x76, 0xca, 0x0c, + 0x1e, 0xf9, 0x5c, 0x58, 0xc1, 0x09, 0x96, 0x56, 0x8b, 0x7c, 0x2e, 0xcd, 0xe3, 0x62, 0x1c, 0xfb, + 0xeb, 0x45, 0x18, 0x2e, 0xfb, 0xb5, 0xd8, 0xb0, 0xe3, 0x45, 0xc3, 0xb0, 0xe3, 0x5c, 0xc2, 0xb0, + 0x63, 0x5c, 0xc7, 0xfd, 0xc0, 0x8c, 0xe3, 0x3b, 0x65, 0xc6, 0xf1, 0x87, 0x16, 0x9b, 0xb5, 0x85, + 0xd5, 0x0a, 0xb7, 0xf0, 0x45, 0x97, 0x60, 0x88, 0x9d, 0x70, 0x2c, 0xd0, 0x82, 0xb4, 0x76, 0x60, + 0x29, 0x2c, 0x57, 0xe3, 0x62, 0xac, 0xe3, 0xa0, 0x0b, 0x30, 0x10, 0x12, 0x27, 0xa8, 0x6e, 0xa9, + 0xe3, 0x5d, 0x98, 0x26, 0xf0, 0x32, 0xac, 0xa0, 0xe8, 0xad, 0x38, 0xe8, 0x76, 0x31, 0xdf, 0x5c, + 0x58, 0xef, 0x0f, 0xdf, 0x22, 0xf9, 0x91, 0xb6, 0xed, 0x5b, 0x80, 0xd2, 0xf8, 0x5d, 0xf8, 0x5f, + 0x95, 0xcc, 0xb0, 0xb0, 0x83, 0xa9, 0x90, 0xb0, 0xff, 0x62, 0xc1, 0x68, 0xd9, 0xaf, 0xd1, 0xad, + 0xfb, 0xbd, 0xb4, 0x4f, 0xf5, 0x8c, 0x03, 0x7d, 0x6d, 0x32, 0x0e, 0x3c, 0x06, 0xbd, 0x65, 0xbf, + 0xd6, 0x21, 0x74, 0xed, 0x7f, 0x63, 0x41, 0x7f, 0xd9, 0xaf, 0x1d, 0x81, 0xe2, 0xe5, 0x35, 0x53, + 0xf1, 0x72, 0x32, 0x67, 0xdd, 0xe4, 0xe8, 0x5a, 0xfe, 0xa4, 0x07, 0x46, 0x68, 0x3f, 0xfd, 0x4d, + 0x39, 0x95, 0xc6, 0xb0, 0x59, 0x5d, 0x0c, 0x1b, 0x7d, 0x06, 0xf8, 0xf5, 0xba, 0x7f, 0x27, 0x39, + 0xad, 0x4b, 0xac, 0x14, 0x0b, 0x28, 0x7a, 0x16, 0x06, 0x9a, 0x01, 0xd9, 0x71, 0x7d, 0xc1, 0x5f, + 0x6b, 0x6a, 0xac, 0xb2, 0x28, 0xc7, 0x0a, 0x83, 0x3e, 0xbc, 0x43, 0xd7, 0xa3, 0xbc, 0x44, 0xd5, + 0xf7, 0x6a, 0x5c, 0x37, 0x51, 0x14, 0x69, 0xb1, 0xb4, 0x72, 0x6c, 0x60, 0xa1, 0x5b, 0x30, 0xc8, + 0xfe, 0xb3, 0x63, 0xa7, 0xf7, 0xd0, 0xc7, 0x8e, 0x48, 0x14, 0x2c, 0x08, 0xe0, 0x98, 0x16, 0x7a, + 0x1e, 0x20, 0x92, 0xa9, 0x65, 0x42, 0x11, 0xc2, 0x54, 0xbd, 0x45, 0x54, 0xd2, 0x99, 0x10, 0x6b, + 0x58, 0xe8, 0x19, 0x18, 0x8c, 0x1c, 0xb7, 0x7e, 0xdd, 0xf5, 0x98, 0xfe, 0x9e, 0xf6, 0x5f, 0xe4, + 0xeb, 0x15, 0x85, 0x38, 0x86, 0x53, 0x5e, 0x90, 0xc5, 0x84, 0x9a, 0xdb, 0x8d, 0x44, 0x6a, 0xba, + 0x22, 0xe7, 0x05, 0xaf, 0xab, 0x52, 0xac, 0x61, 0xa0, 0x2d, 0x38, 0xed, 0x7a, 0x2c, 0x85, 0x14, + 0xa9, 0x6c, 0xbb, 0xcd, 0xb5, 0xeb, 0x95, 0x9b, 0x24, 0x70, 0x37, 0x76, 0xe7, 0x9c, 0xea, 0x36, + 0xf1, 0x64, 0x42, 0xfc, 0xc7, 0x45, 0x17, 0x4f, 0x2f, 0xb7, 0xc1, 0xc5, 0x6d, 0x29, 0x21, 0x9b, + 0x6e, 0xc7, 0x80, 0x38, 0x0d, 0x21, 0x13, 0xe0, 0xe9, 0x67, 0x58, 0x09, 0x16, 0x10, 0xfb, 0x05, + 0xb6, 0x27, 0x6e, 0x54, 0xd0, 0xd3, 0xc6, 0xf1, 0x72, 0x42, 0x3f, 0x5e, 0x0e, 0xf6, 0x4a, 0x7d, + 0x37, 0x2a, 0x5a, 0x7c, 0xa0, 0xcb, 0x70, 0xbc, 0xec, 0xd7, 0xca, 0x7e, 0x10, 0x2d, 0xf9, 0xc1, + 0x1d, 0x27, 0xa8, 0xc9, 0x25, 0x58, 0x92, 0x11, 0x92, 0xe8, 0x19, 0xdb, 0xcb, 0x4f, 0x20, 0x23, + 0xfa, 0xd1, 0x0b, 0x8c, 0xab, 0x3b, 0xa4, 0x43, 0x6a, 0x95, 0xf1, 0x17, 0x2a, 0x51, 0xdb, 0x15, + 0x27, 0x22, 0xe8, 0x06, 0x8c, 0x54, 0xf5, 0xab, 0x56, 0x54, 0x7f, 0x4a, 0x5e, 0x76, 0xc6, 0x3d, + 0x9c, 0x79, 0x37, 0x9b, 0xf5, 0xed, 0x6f, 0x5a, 0xa2, 0x15, 0x2e, 0xad, 0xe0, 0x76, 0xaf, 0x9d, + 0xcf, 0xdc, 0x79, 0x98, 0x08, 0xf4, 0x2a, 0x9a, 0xfd, 0xd8, 0x71, 0x9e, 0xf9, 0x26, 0x01, 0xc4, + 0x69, 0x7c, 0xf4, 0x49, 0x38, 0x65, 0x14, 0x4a, 0x55, 0xba, 0x96, 0x7f, 0x9a, 0xc9, 0x73, 0x70, + 0x1e, 0x12, 0xce, 0xaf, 0x6f, 0xff, 0x20, 0x9c, 0x48, 0x7e, 0x97, 0x90, 0xb0, 0xdc, 0xe7, 0xd7, + 0x15, 0x0e, 0xf7, 0x75, 0xf6, 0x4b, 0x30, 0x41, 0x9f, 0xde, 0x8a, 0x8d, 0x64, 0xf3, 0xd7, 0x39, + 0x08, 0xd5, 0x6f, 0x0e, 0xb0, 0x6b, 0x30, 0x91, 0x7d, 0x0d, 0x7d, 0x1a, 0x46, 0x43, 0xc2, 0x22, + 0xaf, 0x49, 0xc9, 0x5e, 0x1b, 0x6f, 0xf2, 0xca, 0xa2, 0x8e, 0xc9, 0x5f, 0x2f, 0x66, 0x19, 0x4e, + 0x50, 0x43, 0x0d, 0x18, 0xbd, 0xe3, 0x7a, 0x35, 0xff, 0x4e, 0x28, 0xe9, 0x0f, 0xe4, 0xab, 0x09, + 0x6e, 0x71, 0xcc, 0x44, 0x1f, 0x8d, 0xe6, 0x6e, 0x19, 0xc4, 0x70, 0x82, 0x38, 0x3d, 0x6a, 0x82, + 0x96, 0x37, 0x1b, 0xae, 0x87, 0x24, 0x10, 0x71, 0xe1, 0xd8, 0x51, 0x83, 0x65, 0x21, 0x8e, 0xe1, + 0xf4, 0xa8, 0x61, 0x7f, 0x98, 0x3b, 0x3a, 0x3b, 0xcb, 0xc4, 0x51, 0x83, 0x55, 0x29, 0xd6, 0x30, + 0xe8, 0x51, 0xcc, 0xfe, 0xad, 0xfa, 0x1e, 0xf6, 0xfd, 0x48, 0x1e, 0xde, 0x2c, 0x55, 0xa5, 0x56, + 0x8e, 0x0d, 0xac, 0x9c, 0x28, 0x74, 0x3d, 0x87, 0x8d, 0x42, 0x87, 0xa2, 0x36, 0x1e, 0xf8, 0x3c, + 0x1a, 0xf2, 0xe5, 0x76, 0x1e, 0xf8, 0x07, 0xf7, 0xe5, 0x9d, 0x4f, 0x79, 0x81, 0x0d, 0x31, 0x40, + 0xbd, 0x3c, 0xcc, 0x1e, 0x53, 0x64, 0x56, 0xf8, 0xe8, 0x48, 0x18, 0x5a, 0x84, 0xfe, 0x70, 0x37, + 0xac, 0x46, 0xf5, 0xb0, 0x5d, 0x3a, 0xd2, 0x0a, 0x43, 0xd1, 0xb2, 0x61, 0xf3, 0x2a, 0x58, 0xd6, + 0x45, 0x55, 0x98, 0x14, 0x14, 0xe7, 0xb7, 0x1c, 0x4f, 0x25, 0x49, 0xe4, 0x16, 0x8b, 0x97, 0xf6, + 0xf7, 0x4a, 0x93, 0xa2, 0x65, 0x1d, 0x7c, 0xb0, 0x57, 0xa2, 0x5b, 0x32, 0x03, 0x82, 0xb3, 0xa8, + 0xf1, 0x25, 0x5f, 0xad, 0xfa, 0x8d, 0x66, 0x39, 0xf0, 0x37, 0xdc, 0x3a, 0x69, 0xa7, 0x0c, 0xae, + 0x18, 0x98, 0x62, 0xc9, 0x1b, 0x65, 0x38, 0x41, 0x0d, 0xdd, 0x86, 0x31, 0xa7, 0xd9, 0x9c, 0x0d, + 0x1a, 0x7e, 0x20, 0x1b, 0x18, 0xca, 0xd7, 0x2a, 0xcc, 0x9a, 0xa8, 0x3c, 0x47, 0x62, 0xa2, 0x10, + 0x27, 0x09, 0xd2, 0x81, 0x12, 0x1b, 0xcd, 0x18, 0xa8, 0x91, 0x78, 0xa0, 0xc4, 0xbe, 0xcc, 0x18, + 0xa8, 0x0c, 0x08, 0xce, 0xa2, 0x66, 0xff, 0x00, 0x63, 0xfc, 0x2b, 0xee, 0xa6, 0xc7, 0x9c, 0xe3, + 0x50, 0x03, 0x46, 0x9a, 0xec, 0xd8, 0x17, 0xf9, 0xcb, 0xc4, 0x51, 0xf1, 0x62, 0x97, 0xc2, 0xcb, + 0x3b, 0x2c, 0x03, 0xab, 0x61, 0xc4, 0x5a, 0xd6, 0xc9, 0x61, 0x93, 0xba, 0xfd, 0x8b, 0xd3, 0x8c, + 0x75, 0xac, 0x70, 0x89, 0x64, 0xbf, 0x70, 0x55, 0x14, 0x32, 0x88, 0xe9, 0x7c, 0xd9, 0x7f, 0xbc, + 0xbe, 0x84, 0xbb, 0x23, 0x96, 0x75, 0xd1, 0xa7, 0x60, 0x94, 0x3e, 0xe9, 0x15, 0xfb, 0x16, 0x4e, + 0x1d, 0xcb, 0x8f, 0x81, 0xa5, 0xb0, 0xf4, 0xdc, 0x86, 0x7a, 0x65, 0x9c, 0x20, 0x86, 0xde, 0x62, + 0x76, 0x9d, 0x92, 0x74, 0xa1, 0x1b, 0xd2, 0xba, 0x09, 0xa7, 0x24, 0xab, 0x11, 0x41, 0x2d, 0x98, + 0x4c, 0x67, 0x70, 0x0e, 0xa7, 0xec, 0xfc, 0xb7, 0x51, 0x3a, 0x09, 0x73, 0x9c, 0x84, 0x2e, 0x0d, + 0x0b, 0x71, 0x16, 0x7d, 0x74, 0x3d, 0x99, 0x5f, 0xb7, 0x68, 0x68, 0x0d, 0x52, 0x39, 0x76, 0x47, + 0xda, 0xa6, 0xd6, 0xdd, 0x84, 0x33, 0x5a, 0x8a, 0xd2, 0x2b, 0x81, 0xc3, 0xec, 0x8a, 0x5c, 0x76, + 0x1b, 0x69, 0x4c, 0xed, 0xa3, 0xfb, 0x7b, 0xa5, 0x33, 0x6b, 0xed, 0x10, 0x71, 0x7b, 0x3a, 0xe8, + 0x06, 0x1c, 0xe7, 0x11, 0x5c, 0x16, 0x88, 0x53, 0xab, 0xbb, 0x9e, 0xe2, 0x9a, 0xf9, 0xd9, 0x75, + 0x6a, 0x7f, 0xaf, 0x74, 0x7c, 0x36, 0x0b, 0x01, 0x67, 0xd7, 0x43, 0xaf, 0xc1, 0x60, 0xcd, 0x93, + 0xa7, 0x6c, 0x9f, 0x91, 0x05, 0x76, 0x70, 0x61, 0xb5, 0xa2, 0xbe, 0x3f, 0xfe, 0x83, 0xe3, 0x0a, + 0x68, 0x93, 0xab, 0xad, 0x94, 0xac, 0xb1, 0x3f, 0x15, 0xd8, 0x33, 0x29, 0x8e, 0x37, 0x42, 0x22, + 0x70, 0x7d, 0xad, 0x72, 0xb9, 0x33, 0xa2, 0x25, 0x18, 0x84, 0xd1, 0x9b, 0x80, 0x44, 0xb6, 0xa1, + 0xd9, 0x2a, 0x4b, 0x8e, 0xa7, 0xd9, 0x92, 0x2a, 0x11, 0x42, 0x25, 0x85, 0x81, 0x33, 0x6a, 0xa1, + 0xab, 0xf4, 0x78, 0xd4, 0x4b, 0xc5, 0xf1, 0xab, 0x72, 0x8d, 0x2f, 0x90, 0x66, 0x40, 0x98, 0xf9, + 0xa3, 0x49, 0x11, 0x27, 0xea, 0xa1, 0x1a, 0x9c, 0x76, 0x5a, 0x91, 0xcf, 0x34, 0x82, 0x26, 0xea, + 0x9a, 0xbf, 0x4d, 0x3c, 0xa6, 0x8c, 0x1f, 0x60, 0x01, 0x43, 0x4f, 0xcf, 0xb6, 0xc1, 0xc3, 0x6d, + 0xa9, 0xd0, 0xe7, 0x14, 0x1d, 0x0b, 0x4d, 0x59, 0x67, 0x78, 0x77, 0x73, 0x0d, 0xb6, 0xc4, 0x40, + 0x2f, 0xc1, 0xd0, 0x96, 0x1f, 0x46, 0xab, 0x24, 0xba, 0xe3, 0x07, 0xdb, 0x22, 0xbd, 0x41, 0x9c, + 0x52, 0x26, 0x06, 0x61, 0x1d, 0x0f, 0x3d, 0x05, 0xfd, 0xcc, 0x54, 0x6c, 0x79, 0x81, 0xdd, 0xb5, + 0x03, 0xf1, 0x19, 0x73, 0x95, 0x17, 0x63, 0x09, 0x97, 0xa8, 0xcb, 0xe5, 0x79, 0x76, 0x1c, 0x27, + 0x50, 0x97, 0xcb, 0xf3, 0x58, 0xc2, 0xe9, 0x72, 0x0d, 0xb7, 0x9c, 0x80, 0x94, 0x03, 0xbf, 0x4a, + 0x42, 0x2d, 0x91, 0xd1, 0x23, 0x3c, 0x79, 0x03, 0x5d, 0xae, 0x95, 0x2c, 0x04, 0x9c, 0x5d, 0x0f, + 0x91, 0x74, 0x7a, 0xde, 0xd1, 0x7c, 0x55, 0x69, 0x9a, 0x1d, 0xec, 0x32, 0x43, 0xaf, 0x07, 0xe3, + 0x2a, 0x31, 0x30, 0x4f, 0xd7, 0x10, 0x4e, 0x8d, 0xb1, 0xb5, 0xdd, 0x7d, 0xae, 0x07, 0xa5, 0x7c, + 0x5e, 0x4e, 0x50, 0xc2, 0x29, 0xda, 0x46, 0x44, 0xda, 0xf1, 0x8e, 0x11, 0x69, 0x2f, 0xc2, 0x60, + 0xd8, 0xba, 0x5d, 0xf3, 0x1b, 0x8e, 0xeb, 0x31, 0x8b, 0x1b, 0xed, 0xe1, 0x5e, 0x91, 0x00, 0x1c, + 0xe3, 0xa0, 0x25, 0x18, 0x70, 0xa4, 0x66, 0x19, 0xe5, 0x07, 0xdb, 0x53, 0xfa, 0x64, 0x1e, 0x7f, + 0x4a, 0xea, 0x92, 0x55, 0x5d, 0xf4, 0x2a, 0x8c, 0x88, 0x80, 0x1e, 0x22, 0x97, 0xfe, 0xa4, 0xe9, + 0xbe, 0x5c, 0xd1, 0x81, 0xd8, 0xc4, 0x45, 0xeb, 0x30, 0x14, 0xf9, 0x75, 0xe6, 0x83, 0x4b, 0xb9, + 0xe4, 0x13, 0xf9, 0x31, 0x71, 0xd7, 0x14, 0x9a, 0xae, 0xf3, 0x50, 0x55, 0xb1, 0x4e, 0x07, 0xad, + 0xf1, 0xf5, 0xce, 0xd2, 0x16, 0x91, 0x50, 0x24, 0x63, 0x3f, 0x93, 0x67, 0x2e, 0xc9, 0xd0, 0xcc, + 0xed, 0x20, 0x6a, 0x62, 0x9d, 0x0c, 0xba, 0x02, 0x13, 0xcd, 0xc0, 0xf5, 0xd9, 0x9a, 0x50, 0x9a, + 0xf2, 0x29, 0x33, 0x49, 0x69, 0x39, 0x89, 0x80, 0xd3, 0x75, 0x58, 0x3c, 0x16, 0x51, 0x38, 0x75, + 0x8a, 0x27, 0x5a, 0xe3, 0x72, 0x10, 0x5e, 0x86, 0x15, 0x14, 0xad, 0xb0, 0x93, 0x98, 0x8b, 0xf0, + 0xa6, 0xa6, 0xf3, 0xbd, 0xfc, 0x75, 0x51, 0x1f, 0xe7, 0xfd, 0xd5, 0x5f, 0x1c, 0x53, 0x40, 0x35, + 0x2d, 0xbf, 0x39, 0x7d, 0x41, 0x85, 0x53, 0xa7, 0xdb, 0xd8, 0xeb, 0x26, 0x9e, 0xcb, 0x31, 0x43, + 0x60, 0x14, 0x87, 0x38, 0x41, 0x13, 0xbd, 0x01, 0xe3, 0x22, 0x58, 0x41, 0x3c, 0x4c, 0x67, 0x62, + 0x9f, 0x26, 0x9c, 0x80, 0xe1, 0x14, 0x36, 0x4f, 0x74, 0xe6, 0xdc, 0xae, 0x13, 0x71, 0xf4, 0x5d, + 0x77, 0xbd, 0xed, 0x70, 0xea, 0x2c, 0x3b, 0x1f, 0x44, 0xa2, 0xb3, 0x24, 0x14, 0x67, 0xd4, 0x40, + 0x6b, 0x30, 0xde, 0x0c, 0x08, 0x69, 0xb0, 0x77, 0x92, 0xb8, 0xcf, 0x4a, 0x3c, 0x1c, 0x11, 0xed, + 0x49, 0x39, 0x01, 0x3b, 0xc8, 0x28, 0xc3, 0x29, 0x0a, 0xe8, 0x0e, 0x0c, 0xf8, 0x3b, 0x24, 0xd8, + 0x22, 0x4e, 0x6d, 0xea, 0x5c, 0x1b, 0x4f, 0x3b, 0x71, 0xb9, 0xdd, 0x10, 0xb8, 0x09, 0x43, 0x24, + 0x59, 0xdc, 0xd9, 0x10, 0x49, 0x36, 0x86, 0xfe, 0x0b, 0x0b, 0x4e, 0x49, 0xd5, 0x5e, 0xa5, 0x49, + 0x47, 0x7d, 0xde, 0xf7, 0xc2, 0x28, 0xe0, 0x01, 0x74, 0x1e, 0xcd, 0x0f, 0x2a, 0xb3, 0x96, 0x53, + 0x49, 0x69, 0x11, 0x4e, 0xe5, 0x61, 0x84, 0x38, 0xbf, 0x45, 0xfa, 0xb2, 0x0f, 0x49, 0x24, 0x0f, + 0xa3, 0xd9, 0x70, 0xe9, 0xad, 0x85, 0xd5, 0xa9, 0xc7, 0x78, 0xf4, 0x1f, 0xba, 0x19, 0x2a, 0x49, + 0x20, 0x4e, 0xe3, 0xa3, 0x4b, 0x50, 0xf0, 0xc3, 0xa9, 0xc7, 0xdb, 0xa4, 0xc4, 0xf7, 0x6b, 0x37, + 0x2a, 0xdc, 0x20, 0xf5, 0x46, 0x05, 0x17, 0xfc, 0x50, 0x26, 0x1b, 0xa3, 0xcf, 0xd9, 0x70, 0xea, + 0x09, 0x2e, 0x73, 0x96, 0xc9, 0xc6, 0x58, 0x21, 0x8e, 0xe1, 0x68, 0x0b, 0xc6, 0x42, 0x43, 0x6c, + 0x10, 0x4e, 0x9d, 0x67, 0x23, 0xf5, 0x44, 0xde, 0xa4, 0x19, 0xd8, 0x5a, 0x16, 0x20, 0x93, 0x0a, + 0x4e, 0x92, 0xe5, 0xbb, 0x4b, 0x13, 0x5c, 0x84, 0x53, 0x4f, 0x76, 0xd8, 0x5d, 0x1a, 0xb2, 0xbe, + 0xbb, 0x74, 0x1a, 0x38, 0x41, 0x13, 0xad, 0xeb, 0x6e, 0x8c, 0x17, 0xf2, 0x8d, 0x1b, 0x33, 0x1d, + 0x18, 0x47, 0xf2, 0x9c, 0x17, 0xa7, 0xbf, 0x0f, 0x26, 0x52, 0x5c, 0xd8, 0x61, 0x7c, 0x3a, 0xa6, + 0xb7, 0x61, 0xc4, 0x58, 0xe9, 0x0f, 0xd5, 0xe4, 0xe7, 0xcf, 0x06, 0x61, 0x50, 0x99, 0x62, 0xa0, + 0x8b, 0xa6, 0x95, 0xcf, 0xa9, 0xa4, 0x95, 0xcf, 0x40, 0xd9, 0xaf, 0x19, 0x86, 0x3d, 0x6b, 0x19, + 0xb1, 0x72, 0xf3, 0xce, 0xd5, 0xee, 0x1d, 0xcf, 0x34, 0xf5, 0x52, 0xb1, 0x6b, 0x73, 0xa1, 0x9e, + 0xb6, 0x1a, 0xab, 0x2b, 0x30, 0xe1, 0xf9, 0x8c, 0xf5, 0x27, 0x35, 0xc9, 0xd7, 0x31, 0xf6, 0x6d, + 0x50, 0x8f, 0xe5, 0x96, 0x40, 0xc0, 0xe9, 0x3a, 0xb4, 0x41, 0xce, 0x7f, 0x25, 0x55, 0x64, 0x9c, + 0x3d, 0xc3, 0x02, 0x4a, 0x9f, 0x9c, 0xfc, 0x57, 0x38, 0x35, 0x9e, 0xff, 0xe4, 0xe4, 0x95, 0x92, + 0x3c, 0x5e, 0x28, 0x79, 0x3c, 0xa6, 0x11, 0x6a, 0xfa, 0xb5, 0xe5, 0xb2, 0x78, 0x3d, 0x68, 0x51, + 0xec, 0x6b, 0xcb, 0x65, 0xcc, 0x61, 0x68, 0x16, 0xfa, 0xd8, 0x0f, 0x19, 0x23, 0x27, 0x6f, 0xf7, + 0x2f, 0x97, 0xb5, 0x1c, 0xaa, 0xac, 0x02, 0x16, 0x15, 0x99, 0xc4, 0x9f, 0x3e, 0xb9, 0x98, 0xc4, + 0xbf, 0xff, 0x3e, 0x25, 0xfe, 0x92, 0x00, 0x8e, 0x69, 0xa1, 0xbb, 0x70, 0xdc, 0x78, 0xe6, 0x2a, + 0x4f, 0x3c, 0xc8, 0x37, 0x06, 0x48, 0x20, 0xcf, 0x9d, 0x11, 0x9d, 0x3e, 0xbe, 0x9c, 0x45, 0x09, + 0x67, 0x37, 0x80, 0xea, 0x30, 0x51, 0x4d, 0xb5, 0x3a, 0xd0, 0x7d, 0xab, 0x6a, 0x5d, 0xa4, 0x5b, + 0x4c, 0x13, 0x46, 0xaf, 0xc2, 0xc0, 0xbb, 0x3e, 0x37, 0xdc, 0x13, 0x2f, 0x1e, 0x19, 0x05, 0x66, + 0xe0, 0xad, 0x1b, 0x15, 0x56, 0x7e, 0xb0, 0x57, 0x1a, 0x2a, 0xfb, 0x35, 0xf9, 0x17, 0xab, 0x0a, + 0xe8, 0xc7, 0x2c, 0x98, 0x4e, 0xbf, 0xa3, 0x55, 0xa7, 0x47, 0xba, 0xef, 0xb4, 0x2d, 0x1a, 0x9d, + 0x5e, 0xcc, 0x25, 0x87, 0xdb, 0x34, 0x85, 0x3e, 0x4a, 0xf7, 0x53, 0xe8, 0xde, 0x23, 0x22, 0x01, + 0xfd, 0xa3, 0xf1, 0x7e, 0xa2, 0xa5, 0x07, 0x7b, 0xa5, 0x31, 0x7e, 0xe0, 0xba, 0xf7, 0x54, 0xbc, + 0x7d, 0x5e, 0x01, 0xfd, 0x20, 0x1c, 0x0f, 0xd2, 0x72, 0x6d, 0x22, 0x79, 0xfb, 0xa7, 0xbb, 0x39, + 0xbc, 0x93, 0x13, 0x8e, 0xb3, 0x08, 0xe2, 0xec, 0x76, 0xec, 0xdf, 0xb3, 0x98, 0x3e, 0x43, 0x74, + 0x8b, 0x84, 0xad, 0x7a, 0x74, 0x04, 0xc6, 0x72, 0x8b, 0x86, 0x3d, 0xc1, 0x7d, 0x5b, 0xbb, 0xfd, + 0x2f, 0x16, 0xb3, 0x76, 0x3b, 0x42, 0xbf, 0xbd, 0xb7, 0x60, 0x20, 0x12, 0xad, 0x89, 0xae, 0xe7, + 0x59, 0xe6, 0xc8, 0x4e, 0x31, 0x8b, 0x3f, 0xf5, 0x76, 0x92, 0xa5, 0x58, 0x91, 0xb1, 0xff, 0x47, + 0x3e, 0x03, 0x12, 0x72, 0x04, 0x6a, 0xdb, 0x05, 0x53, 0x6d, 0x5b, 0xea, 0xf0, 0x05, 0x39, 0xea, + 0xdb, 0xff, 0xc1, 0xec, 0x37, 0x93, 0x19, 0xbe, 0xdf, 0xcd, 0x2c, 0xed, 0x2f, 0x5a, 0x00, 0x71, + 0x82, 0x93, 0x2e, 0x12, 0x4e, 0x5f, 0xa6, 0xaf, 0x25, 0x3f, 0xf2, 0xab, 0x7e, 0x5d, 0xa8, 0x8d, + 0x4e, 0xc7, 0x9a, 0x63, 0x5e, 0x7e, 0xa0, 0xfd, 0xc6, 0x0a, 0x1b, 0x95, 0x64, 0xc4, 0xe1, 0x62, + 0x6c, 0xcb, 0x60, 0x44, 0x1b, 0xfe, 0x8a, 0x05, 0xc7, 0xb2, 0x9c, 0x40, 0xe8, 0xdb, 0x9b, 0x4b, + 0x4f, 0x95, 0x09, 0xac, 0x9a, 0xcd, 0x9b, 0xa2, 0x1c, 0x2b, 0x8c, 0xae, 0x33, 0x79, 0x1f, 0x2e, + 0xf9, 0xc6, 0x0d, 0x18, 0x29, 0x07, 0x44, 0xe3, 0x2f, 0x5e, 0x8f, 0xf3, 0x02, 0x0d, 0xce, 0x3d, + 0x7b, 0xe8, 0xc8, 0x4a, 0xf6, 0x57, 0x0b, 0x70, 0x8c, 0x1b, 0x72, 0xcd, 0xee, 0xf8, 0x6e, 0xad, + 0xec, 0xd7, 0x84, 0xeb, 0xee, 0xdb, 0x30, 0xdc, 0xd4, 0x44, 0xde, 0xed, 0x02, 0xc9, 0xeb, 0xa2, + 0xf1, 0x58, 0x48, 0xa7, 0x97, 0x62, 0x83, 0x16, 0xaa, 0xc1, 0x30, 0xd9, 0x71, 0xab, 0xca, 0x1a, + 0xa8, 0x70, 0xe8, 0x4b, 0x5a, 0xb5, 0xb2, 0xa8, 0xd1, 0xc1, 0x06, 0xd5, 0xae, 0xcd, 0xaf, 0x35, + 0x16, 0xad, 0xa7, 0x83, 0x05, 0xd0, 0xcf, 0x5a, 0x70, 0x32, 0x27, 0xec, 0x3c, 0x6d, 0xee, 0x0e, + 0x33, 0x99, 0x13, 0xcb, 0x56, 0x35, 0xc7, 0x0d, 0xe9, 0xb0, 0x80, 0xa2, 0x8f, 0x03, 0x34, 0xe3, + 0x94, 0x9b, 0x1d, 0xe2, 0x73, 0x1b, 0x91, 0x7a, 0xb5, 0xa0, 0xab, 0x2a, 0x33, 0xa7, 0x46, 0xcb, + 0xfe, 0x4a, 0x0f, 0xf4, 0x32, 0xc3, 0x2b, 0x54, 0x86, 0xfe, 0x2d, 0x1e, 0x13, 0xb0, 0xed, 0xbc, + 0x51, 0x5c, 0x19, 0x64, 0x30, 0x9e, 0x37, 0xad, 0x14, 0x4b, 0x32, 0x68, 0x05, 0x26, 0x79, 0x3a, + 0xd1, 0xfa, 0x02, 0xa9, 0x3b, 0xbb, 0x52, 0x9a, 0x5c, 0x60, 0x9f, 0xaa, 0xa4, 0xea, 0xcb, 0x69, + 0x14, 0x9c, 0x55, 0x0f, 0xbd, 0x0e, 0xa3, 0xf4, 0x75, 0xef, 0xb7, 0x22, 0x49, 0x89, 0xe7, 0xef, + 0x54, 0x0f, 0x9e, 0x35, 0x03, 0x8a, 0x13, 0xd8, 0xe8, 0x55, 0x18, 0x69, 0xa6, 0xe4, 0xe6, 0xbd, + 0xb1, 0x80, 0xc9, 0x94, 0x95, 0x9b, 0xb8, 0xcc, 0x0f, 0xa4, 0xc5, 0xbc, 0x5e, 0xd6, 0xb6, 0x02, + 0x12, 0x6e, 0xf9, 0xf5, 0x1a, 0xe3, 0x80, 0x7b, 0x35, 0x3f, 0x90, 0x04, 0x1c, 0xa7, 0x6a, 0x50, + 0x2a, 0x1b, 0x8e, 0x5b, 0x6f, 0x05, 0x24, 0xa6, 0xd2, 0x67, 0x52, 0x59, 0x4a, 0xc0, 0x71, 0xaa, + 0x46, 0x67, 0x85, 0x40, 0xff, 0x83, 0x51, 0x08, 0xd8, 0xbf, 0x5c, 0x00, 0x63, 0x6a, 0xbf, 0x87, + 0xf3, 0x8a, 0xbe, 0x06, 0x3d, 0x9b, 0x41, 0xb3, 0x2a, 0x8c, 0x0c, 0x33, 0xbf, 0xec, 0x0a, 0x2e, + 0xcf, 0xeb, 0x5f, 0x46, 0xff, 0x63, 0x56, 0x8b, 0xee, 0xf1, 0xe3, 0xe5, 0xc0, 0xa7, 0x97, 0x9c, + 0x0c, 0x1b, 0xaa, 0xdc, 0xad, 0xfa, 0xe5, 0x1b, 0xbb, 0x4d, 0x80, 0x6d, 0xe1, 0x33, 0xc2, 0x29, + 0x18, 0xf6, 0x78, 0x15, 0xf1, 0xc2, 0x96, 0x54, 0xd0, 0x25, 0x18, 0x12, 0xa9, 0x1e, 0x99, 0x57, + 0x10, 0xdf, 0x4c, 0xcc, 0x7e, 0x70, 0x21, 0x2e, 0xc6, 0x3a, 0x8e, 0xfd, 0xe3, 0x05, 0x98, 0xcc, + 0x70, 0xeb, 0xe4, 0xd7, 0xc8, 0xa6, 0x1b, 0x46, 0xc1, 0x6e, 0xf2, 0x72, 0xc2, 0xa2, 0x1c, 0x2b, + 0x0c, 0x7a, 0x56, 0xf1, 0x8b, 0x2a, 0x79, 0x39, 0x09, 0xb7, 0x29, 0x01, 0x3d, 0xdc, 0xe5, 0x44, + 0xaf, 0xed, 0x56, 0x48, 0x64, 0x2c, 0x7f, 0x75, 0x6d, 0x33, 0x63, 0x03, 0x06, 0xa1, 0x4f, 0xc0, + 0x4d, 0xa5, 0x41, 0xd7, 0x9e, 0x80, 0x5c, 0x87, 0xce, 0x61, 0xb4, 0x73, 0x11, 0xf1, 0x1c, 0x2f, + 0x12, 0x0f, 0xc5, 0x38, 0xc6, 0x33, 0x2b, 0xc5, 0x02, 0x6a, 0x7f, 0xb9, 0x08, 0xa7, 0x72, 0x1d, + 0xbd, 0x69, 0xd7, 0x1b, 0xbe, 0xe7, 0x46, 0xbe, 0x32, 0xcc, 0xe4, 0x71, 0x9d, 0x49, 0x73, 0x6b, + 0x45, 0x94, 0x63, 0x85, 0x81, 0xce, 0x43, 0x2f, 0x93, 0xb5, 0x27, 0xd3, 0xbc, 0xe1, 0xb9, 0x05, + 0x1e, 0x31, 0x93, 0x83, 0xb5, 0x5b, 0xbd, 0xd8, 0xf6, 0x56, 0x7f, 0x8c, 0x72, 0x30, 0x7e, 0x3d, + 0x79, 0xa1, 0xd0, 0xee, 0xfa, 0x7e, 0x1d, 0x33, 0x20, 0x7a, 0x42, 0x8c, 0x57, 0xc2, 0x12, 0x11, + 0x3b, 0x35, 0x3f, 0xd4, 0x06, 0xed, 0x29, 0xe8, 0xdf, 0x26, 0xbb, 0x81, 0xeb, 0x6d, 0x26, 0x2d, + 0x54, 0xaf, 0xf1, 0x62, 0x2c, 0xe1, 0x66, 0x56, 0xf3, 0xfe, 0x07, 0x91, 0xd5, 0x5c, 0x5f, 0x01, + 0x03, 0x1d, 0xd9, 0x93, 0x9f, 0x28, 0xc2, 0x18, 0x9e, 0x5b, 0xf8, 0x60, 0x22, 0xd6, 0xd3, 0x13, + 0xf1, 0x20, 0x92, 0x7f, 0x1f, 0x6e, 0x36, 0x7e, 0xdb, 0x82, 0x31, 0x96, 0x70, 0x52, 0x44, 0x69, + 0x71, 0x7d, 0xef, 0x08, 0x9e, 0x02, 0x8f, 0x41, 0x6f, 0x40, 0x1b, 0x15, 0x33, 0xa8, 0xf6, 0x38, + 0xeb, 0x09, 0xe6, 0x30, 0x74, 0x1a, 0x7a, 0x58, 0x17, 0xe8, 0xe4, 0x0d, 0xf3, 0x23, 0x78, 0xc1, + 0x89, 0x1c, 0xcc, 0x4a, 0x59, 0xbc, 0x48, 0x4c, 0x9a, 0x75, 0x97, 0x77, 0x3a, 0xb6, 0x84, 0x78, + 0x7f, 0x84, 0x80, 0xc9, 0xec, 0xda, 0x7b, 0x8b, 0x17, 0x99, 0x4d, 0xb2, 0xfd, 0x33, 0xfb, 0x1f, + 0x0a, 0x70, 0x36, 0xb3, 0x5e, 0xd7, 0xf1, 0x22, 0xdb, 0xd7, 0x7e, 0x98, 0xe9, 0xe9, 0x8a, 0x47, + 0x68, 0xff, 0xdf, 0xd3, 0x2d, 0xf7, 0xdf, 0xdb, 0x45, 0x18, 0xc7, 0xcc, 0x21, 0x7b, 0x9f, 0x84, + 0x71, 0xcc, 0xec, 0x5b, 0x8e, 0x98, 0xe0, 0x5f, 0x0b, 0x39, 0xdf, 0xc2, 0x04, 0x06, 0x17, 0xe8, + 0x39, 0xc3, 0x80, 0xa1, 0x7c, 0x84, 0xf3, 0x33, 0x86, 0x97, 0x61, 0x05, 0x45, 0xb3, 0x30, 0xd6, + 0x70, 0x3d, 0x7a, 0xf8, 0xec, 0x9a, 0xac, 0xb8, 0x52, 0x91, 0xac, 0x98, 0x60, 0x9c, 0xc4, 0x47, + 0xae, 0x16, 0xe2, 0x91, 0x7f, 0xdd, 0xab, 0x87, 0xda, 0x75, 0x33, 0xa6, 0x95, 0x88, 0x1a, 0xc5, + 0x8c, 0x70, 0x8f, 0x2b, 0x9a, 0x9c, 0xa8, 0xd8, 0xbd, 0x9c, 0x68, 0x38, 0x5b, 0x46, 0x34, 0xfd, + 0x2a, 0x8c, 0xdc, 0xb7, 0x6e, 0xc4, 0xfe, 0x56, 0x11, 0x1e, 0x69, 0xb3, 0xed, 0xf9, 0x59, 0x6f, + 0xcc, 0x81, 0x76, 0xd6, 0xa7, 0xe6, 0xa1, 0x0c, 0xc7, 0x36, 0x5a, 0xf5, 0xfa, 0x2e, 0x73, 0x74, + 0x23, 0x35, 0x89, 0x21, 0x78, 0x4a, 0x29, 0x1c, 0x39, 0xb6, 0x94, 0x81, 0x83, 0x33, 0x6b, 0xd2, + 0x27, 0x16, 0xbd, 0x49, 0x76, 0x15, 0xa9, 0xc4, 0x13, 0x0b, 0xeb, 0x40, 0x6c, 0xe2, 0xa2, 0x2b, + 0x30, 0xe1, 0xec, 0x38, 0x2e, 0x4f, 0xef, 0x21, 0x09, 0xf0, 0x37, 0x96, 0x92, 0x45, 0xcf, 0x26, + 0x11, 0x70, 0xba, 0x0e, 0x7a, 0x13, 0x90, 0x7f, 0x9b, 0x39, 0xcf, 0xd4, 0xae, 0x10, 0x4f, 0x28, + 0xf3, 0xd9, 0xdc, 0x15, 0xe3, 0x23, 0xe1, 0x46, 0x0a, 0x03, 0x67, 0xd4, 0x4a, 0x04, 0x1b, 0xec, + 0xcb, 0x0f, 0x36, 0xd8, 0xfe, 0x5c, 0xec, 0x98, 0x19, 0xf1, 0x1d, 0x18, 0x39, 0xac, 0xb5, 0xf7, + 0x53, 0xd0, 0x1f, 0x88, 0x9c, 0xf3, 0x09, 0xaf, 0x72, 0x99, 0x91, 0x5b, 0xc2, 0xed, 0xff, 0xc7, + 0x02, 0x25, 0x4b, 0x36, 0xe3, 0x8a, 0xbf, 0xca, 0x4c, 0xd7, 0xb9, 0x14, 0x5c, 0x0b, 0x25, 0x76, + 0x5c, 0x33, 0x5d, 0x8f, 0x81, 0xd8, 0xc4, 0xe5, 0xcb, 0x2d, 0x8c, 0x23, 0x58, 0x18, 0x0f, 0x08, + 0xa1, 0x35, 0x54, 0x18, 0xe8, 0x13, 0xd0, 0x5f, 0x73, 0x77, 0xdc, 0x50, 0xc8, 0xd1, 0x0e, 0xad, + 0xb7, 0x8b, 0xbf, 0x6f, 0x81, 0x93, 0xc1, 0x92, 0x9e, 0xfd, 0x53, 0x16, 0x28, 0x75, 0xe7, 0x55, + 0xe2, 0xd4, 0xa3, 0x2d, 0xf4, 0x06, 0x80, 0xa4, 0xa0, 0x64, 0x6f, 0xd2, 0x08, 0x0b, 0xb0, 0x82, + 0x1c, 0x18, 0xff, 0xb0, 0x56, 0x07, 0xbd, 0x0e, 0x7d, 0x5b, 0x8c, 0x96, 0xf8, 0xb6, 0xf3, 0x4a, + 0xd5, 0xc5, 0x4a, 0x0f, 0xf6, 0x4a, 0xc7, 0xcc, 0x36, 0xe5, 0x2d, 0xc6, 0x6b, 0xd9, 0x3f, 0x51, + 0x88, 0xe7, 0xf4, 0xad, 0x96, 0x1f, 0x39, 0x47, 0xc0, 0x89, 0x5c, 0x31, 0x38, 0x91, 0x27, 0xda, + 0xe9, 0x73, 0x59, 0x97, 0x72, 0x39, 0x90, 0x1b, 0x09, 0x0e, 0xe4, 0xc9, 0xce, 0xa4, 0xda, 0x73, + 0x1e, 0xff, 0x93, 0x05, 0x13, 0x06, 0xfe, 0x11, 0x5c, 0x80, 0x4b, 0xe6, 0x05, 0xf8, 0x68, 0xc7, + 0x6f, 0xc8, 0xb9, 0xf8, 0x7e, 0xb4, 0x98, 0xe8, 0x3b, 0xbb, 0xf0, 0xde, 0x85, 0x9e, 0x2d, 0x27, + 0xa8, 0x89, 0x77, 0xfd, 0xc5, 0xae, 0xc6, 0x7a, 0xe6, 0xaa, 0x13, 0x08, 0x03, 0x8e, 0x67, 0xe5, + 0xa8, 0xd3, 0xa2, 0x8e, 0xc6, 0x1b, 0xac, 0x29, 0x74, 0x19, 0xfa, 0xc2, 0xaa, 0xdf, 0x54, 0x7e, + 0x80, 0x2c, 0x5d, 0x78, 0x85, 0x95, 0x1c, 0xec, 0x95, 0x90, 0xd9, 0x1c, 0x2d, 0xc6, 0x02, 0x1f, + 0xbd, 0x0d, 0x23, 0xec, 0x97, 0xb2, 0xa6, 0x2c, 0xe6, 0x4b, 0x60, 0x2a, 0x3a, 0x22, 0x37, 0x35, + 0x36, 0x8a, 0xb0, 0x49, 0x6a, 0x7a, 0x13, 0x06, 0xd5, 0x67, 0x3d, 0x54, 0x6d, 0xfd, 0xff, 0x59, + 0x84, 0xc9, 0x8c, 0x35, 0x87, 0x42, 0x63, 0x26, 0x2e, 0x75, 0xb9, 0x54, 0xdf, 0xe3, 0x5c, 0x84, + 0xec, 0x01, 0x58, 0x13, 0x6b, 0xab, 0xeb, 0x46, 0xd7, 0x43, 0x92, 0x6c, 0x94, 0x16, 0x75, 0x6e, + 0x94, 0x36, 0x76, 0x64, 0x43, 0x4d, 0x1b, 0x52, 0x3d, 0x7d, 0xa8, 0x73, 0xfa, 0x87, 0x3d, 0x70, + 0x2c, 0xcb, 0xc4, 0x04, 0x7d, 0x0e, 0xfa, 0x98, 0xa3, 0x9a, 0x14, 0x9c, 0xbd, 0xd8, 0xad, 0x71, + 0xca, 0x0c, 0xf3, 0x75, 0x13, 0xa1, 0x69, 0x67, 0xe4, 0x71, 0xc4, 0x0b, 0x3b, 0x0e, 0xb3, 0x68, + 0x93, 0x85, 0x8c, 0x12, 0xb7, 0xa7, 0x3c, 0x3e, 0x3e, 0xd2, 0x75, 0x07, 0xc4, 0xfd, 0x1b, 0x26, + 0x2c, 0xb5, 0x64, 0x71, 0x67, 0x4b, 0x2d, 0xd9, 0x32, 0x5a, 0x86, 0xbe, 0x2a, 0x37, 0x01, 0x2a, + 0x76, 0x3e, 0xc2, 0xb8, 0xfd, 0x8f, 0x3a, 0x80, 0x85, 0xdd, 0x8f, 0x20, 0x30, 0xed, 0xc2, 0x90, + 0x36, 0x30, 0x0f, 0x75, 0xf1, 0x6c, 0xd3, 0x8b, 0x4f, 0x1b, 0x82, 0x87, 0xba, 0x80, 0x7e, 0x46, + 0xbb, 0xfb, 0xc5, 0x79, 0xf0, 0x61, 0x83, 0x77, 0x3a, 0x9d, 0x70, 0x1f, 0x4c, 0xec, 0x2b, 0xc6, + 0x4b, 0x55, 0xcc, 0x98, 0xee, 0xb9, 0xa9, 0xa1, 0xcc, 0x0b, 0xbf, 0x7d, 0x1c, 0x77, 0xfb, 0x67, + 0x2d, 0x48, 0x38, 0x78, 0x29, 0x71, 0xa7, 0x95, 0x2b, 0xee, 0x3c, 0x07, 0x3d, 0x81, 0x5f, 0x27, + 0xc9, 0xd4, 0xfb, 0xd8, 0xaf, 0x13, 0xcc, 0x20, 0x14, 0x23, 0x8a, 0x85, 0x58, 0xc3, 0xfa, 0x03, + 0x5d, 0x3c, 0xbd, 0x1f, 0x83, 0xde, 0x3a, 0xd9, 0x21, 0xf5, 0x64, 0x86, 0xd4, 0xeb, 0xb4, 0x10, + 0x73, 0x98, 0xfd, 0xdb, 0x3d, 0x70, 0xa6, 0x6d, 0x64, 0x39, 0xca, 0x60, 0x6e, 0x3a, 0x11, 0xb9, + 0xe3, 0xec, 0x26, 0x33, 0x03, 0x5e, 0xe1, 0xc5, 0x58, 0xc2, 0x99, 0xb3, 0x35, 0xcf, 0x94, 0x93, + 0x10, 0x0e, 0x8b, 0x04, 0x39, 0x02, 0x6a, 0x0a, 0x1b, 0x8b, 0x0f, 0x42, 0xd8, 0xf8, 0x3c, 0x40, + 0x18, 0xd6, 0xb9, 0x1d, 0x67, 0x4d, 0x78, 0x71, 0xc7, 0x19, 0x95, 0x2a, 0xd7, 0x05, 0x04, 0x6b, + 0x58, 0x68, 0x01, 0xc6, 0x9b, 0x81, 0x1f, 0x71, 0x59, 0xfb, 0x02, 0x37, 0x75, 0xee, 0x35, 0x83, + 0x7a, 0x95, 0x13, 0x70, 0x9c, 0xaa, 0x81, 0x5e, 0x82, 0x21, 0x11, 0xe8, 0xab, 0xec, 0xfb, 0x75, + 0x21, 0xde, 0x53, 0xd6, 0xbf, 0x95, 0x18, 0x84, 0x75, 0x3c, 0xad, 0x1a, 0x13, 0xe0, 0xf7, 0x67, + 0x56, 0xe3, 0x42, 0x7c, 0x0d, 0x2f, 0x91, 0x14, 0x60, 0xa0, 0xab, 0xa4, 0x00, 0xb1, 0xc0, 0x73, + 0xb0, 0x6b, 0x7d, 0x32, 0x74, 0x14, 0x11, 0x7e, 0xad, 0x07, 0x26, 0xc5, 0xc2, 0x79, 0xd8, 0xcb, + 0x65, 0x3d, 0xbd, 0x5c, 0x1e, 0x84, 0x48, 0xf4, 0x83, 0x35, 0x73, 0xd4, 0x6b, 0xe6, 0x27, 0x2d, + 0x30, 0x79, 0x48, 0xf4, 0x9f, 0xe5, 0xa6, 0x56, 0x7d, 0x29, 0x97, 0x27, 0x8d, 0x23, 0x86, 0xbf, + 0xb7, 0x24, 0xab, 0xf6, 0xff, 0x65, 0xc1, 0xa3, 0x1d, 0x29, 0xa2, 0x45, 0x18, 0x64, 0x8c, 0xae, + 0xf6, 0x2e, 0x7e, 0x52, 0xb9, 0x42, 0x48, 0x40, 0x0e, 0xdf, 0x1d, 0xd7, 0x44, 0x8b, 0xa9, 0x1c, + 0xb6, 0x4f, 0x65, 0xe4, 0xb0, 0x3d, 0x6e, 0x0c, 0xcf, 0x7d, 0x26, 0xb1, 0xfd, 0x12, 0xbd, 0x71, + 0x4c, 0x7f, 0xca, 0x8f, 0x18, 0xe2, 0x5c, 0x3b, 0x21, 0xce, 0x45, 0x26, 0xb6, 0x76, 0x87, 0xbc, + 0x01, 0xe3, 0x2c, 0x02, 0x28, 0x73, 0xcc, 0x11, 0x8e, 0x98, 0x85, 0xd8, 0xf8, 0xfe, 0x7a, 0x02, + 0x86, 0x53, 0xd8, 0xf6, 0xdf, 0x15, 0xa1, 0x8f, 0x6f, 0xbf, 0x23, 0x78, 0xf8, 0x3e, 0x03, 0x83, + 0x6e, 0xa3, 0xd1, 0xe2, 0x69, 0x49, 0x7b, 0x63, 0x53, 0xee, 0x65, 0x59, 0x88, 0x63, 0x38, 0x5a, + 0x12, 0x9a, 0x84, 0x36, 0x41, 0xc6, 0x79, 0xc7, 0x67, 0x16, 0x9c, 0xc8, 0xe1, 0x5c, 0x9c, 0xba, + 0x67, 0x63, 0x9d, 0x03, 0xfa, 0x34, 0x40, 0x18, 0x05, 0xae, 0xb7, 0x49, 0xcb, 0x44, 0x26, 0x8a, + 0xa7, 0xdb, 0x50, 0xab, 0x28, 0x64, 0x4e, 0x33, 0x3e, 0x73, 0x14, 0x00, 0x6b, 0x14, 0xd1, 0x8c, + 0x71, 0xd3, 0x4f, 0x27, 0xe6, 0x0e, 0x38, 0xd5, 0x78, 0xce, 0xa6, 0x5f, 0x86, 0x41, 0x45, 0xbc, + 0x93, 0x5c, 0x71, 0x58, 0x67, 0xd8, 0x3e, 0x06, 0x63, 0x89, 0xbe, 0x1d, 0x4a, 0x2c, 0xf9, 0x3b, + 0x16, 0x8c, 0xf1, 0xce, 0x2c, 0x7a, 0x3b, 0xe2, 0x36, 0xb8, 0x07, 0xc7, 0xea, 0x19, 0xa7, 0xb2, + 0x98, 0xfe, 0xee, 0x4f, 0x71, 0x25, 0x86, 0xcc, 0x82, 0xe2, 0xcc, 0x36, 0xd0, 0x05, 0xba, 0xe3, + 0xe8, 0xa9, 0xeb, 0xd4, 0x45, 0x34, 0x91, 0x61, 0xbe, 0xdb, 0x78, 0x19, 0x56, 0x50, 0xfb, 0xaf, + 0x2c, 0x98, 0xe0, 0x3d, 0xbf, 0x46, 0x76, 0xd5, 0xd9, 0xf4, 0x9d, 0xec, 0xbb, 0x48, 0x88, 0x5d, + 0xc8, 0x49, 0x88, 0xad, 0x7f, 0x5a, 0xb1, 0xed, 0xa7, 0x7d, 0xd5, 0x02, 0xb1, 0x42, 0x8e, 0x40, + 0xd2, 0xf2, 0x7d, 0xa6, 0xa4, 0x65, 0x3a, 0x7f, 0x13, 0xe4, 0x88, 0x58, 0xfe, 0xc5, 0x82, 0x71, + 0x8e, 0x10, 0x5b, 0x41, 0x7c, 0x47, 0xe7, 0x61, 0xce, 0xfc, 0xa2, 0x4c, 0xb3, 0xd6, 0x6b, 0x64, + 0x77, 0xcd, 0x2f, 0x3b, 0xd1, 0x56, 0xf6, 0x47, 0x19, 0x93, 0xd5, 0xd3, 0x76, 0xb2, 0x6a, 0x72, + 0x03, 0x19, 0x89, 0x17, 0x3b, 0x08, 0x80, 0x0f, 0x9b, 0x78, 0xd1, 0xfe, 0x7b, 0x0b, 0x10, 0x6f, + 0xc6, 0x60, 0xdc, 0x28, 0x3b, 0xc4, 0x4a, 0xb5, 0x8b, 0x2e, 0x3e, 0x9a, 0x14, 0x04, 0x6b, 0x58, + 0x0f, 0x64, 0x78, 0x12, 0xa6, 0x2c, 0xc5, 0xce, 0xa6, 0x2c, 0x87, 0x18, 0xd1, 0xaf, 0xf6, 0x43, + 0xd2, 0x15, 0x13, 0xdd, 0x84, 0xe1, 0xaa, 0xd3, 0x74, 0x6e, 0xbb, 0x75, 0x37, 0x72, 0x49, 0xd8, + 0xce, 0xce, 0x6d, 0x5e, 0xc3, 0x13, 0xc6, 0x07, 0x5a, 0x09, 0x36, 0xe8, 0xa0, 0x19, 0x80, 0x66, + 0xe0, 0xee, 0xb8, 0x75, 0xb2, 0xc9, 0x04, 0x42, 0x2c, 0x7e, 0x11, 0x37, 0xba, 0x93, 0xa5, 0x58, + 0xc3, 0xc8, 0x08, 0x1b, 0x52, 0x7c, 0xc8, 0x61, 0x43, 0xe0, 0xc8, 0xc2, 0x86, 0xf4, 0x1c, 0x2a, + 0x6c, 0xc8, 0xc0, 0xa1, 0xc3, 0x86, 0xf4, 0x76, 0x15, 0x36, 0x04, 0xc3, 0x09, 0xc9, 0x7b, 0xd2, + 0xff, 0x4b, 0x6e, 0x9d, 0x88, 0x07, 0x07, 0x0f, 0xba, 0x34, 0xbd, 0xbf, 0x57, 0x3a, 0x81, 0x33, + 0x31, 0x70, 0x4e, 0x4d, 0xf4, 0x71, 0x98, 0x72, 0xea, 0x75, 0xff, 0x8e, 0x9a, 0xd4, 0xc5, 0xb0, + 0xea, 0xd4, 0xb9, 0x72, 0xa9, 0x9f, 0x51, 0x3d, 0xbd, 0xbf, 0x57, 0x9a, 0x9a, 0xcd, 0xc1, 0xc1, + 0xb9, 0xb5, 0xd1, 0x6b, 0x30, 0xd8, 0x0c, 0xfc, 0xea, 0x8a, 0xe6, 0x2f, 0x7e, 0x96, 0x0e, 0x60, + 0x59, 0x16, 0x1e, 0xec, 0x95, 0x46, 0xd4, 0x1f, 0x76, 0xe1, 0xc7, 0x15, 0x32, 0x22, 0x72, 0x0c, + 0x3d, 0xec, 0x88, 0x1c, 0xc3, 0x0f, 0x38, 0x22, 0x87, 0xbd, 0x0d, 0x93, 0x15, 0x12, 0xb8, 0x4e, + 0xdd, 0xbd, 0x47, 0x79, 0x72, 0x79, 0x06, 0xae, 0xc1, 0x60, 0x90, 0x38, 0xf5, 0xbb, 0x0a, 0x2e, + 0xae, 0xc9, 0x65, 0xe4, 0x29, 0x1f, 0x13, 0xb2, 0xff, 0xbd, 0x05, 0xfd, 0xc2, 0xbd, 0xf3, 0x08, + 0x38, 0xd3, 0x59, 0x43, 0x25, 0x53, 0xca, 0x9e, 0x14, 0xd6, 0x99, 0x5c, 0x65, 0xcc, 0x72, 0x42, + 0x19, 0xf3, 0x68, 0x3b, 0x22, 0xed, 0xd5, 0x30, 0xff, 0x75, 0x91, 0xbe, 0x10, 0x8c, 0x40, 0x03, + 0x0f, 0x7f, 0x08, 0x56, 0xa1, 0x3f, 0x14, 0x8e, 0xee, 0x85, 0x7c, 0x5f, 0x9e, 0xe4, 0x24, 0xc6, + 0x36, 0x90, 0xc2, 0xb5, 0x5d, 0x12, 0xc9, 0xf4, 0xa0, 0x2f, 0x3e, 0x44, 0x0f, 0xfa, 0x4e, 0xa1, + 0x18, 0x7a, 0x1e, 0x44, 0x28, 0x06, 0xfb, 0x1b, 0xec, 0x76, 0xd6, 0xcb, 0x8f, 0x80, 0x71, 0xbb, + 0x62, 0xde, 0xe3, 0x76, 0x9b, 0x95, 0x25, 0x3a, 0x95, 0xc3, 0xc0, 0xfd, 0x96, 0x05, 0x67, 0x32, + 0xbe, 0x4a, 0xe3, 0xe6, 0x9e, 0x85, 0x01, 0xa7, 0x55, 0x73, 0xd5, 0x5e, 0xd6, 0xb4, 0xc5, 0xb3, + 0xa2, 0x1c, 0x2b, 0x0c, 0x34, 0x0f, 0x13, 0xe4, 0x6e, 0xd3, 0xe5, 0x6a, 0x78, 0xdd, 0x74, 0xbc, + 0xc8, 0x7d, 0x82, 0x17, 0x93, 0x40, 0x9c, 0xc6, 0x57, 0xe1, 0xdc, 0x8a, 0xb9, 0xe1, 0xdc, 0x7e, + 0xdd, 0x82, 0x21, 0xe5, 0xea, 0xfd, 0xd0, 0x47, 0xfb, 0x0d, 0x73, 0xb4, 0x1f, 0x69, 0x33, 0xda, + 0x39, 0xc3, 0xfc, 0x97, 0x05, 0xd5, 0xdf, 0xb2, 0x1f, 0x44, 0x5d, 0x70, 0x89, 0xf7, 0xef, 0xf6, + 0x72, 0x09, 0x86, 0x9c, 0x66, 0x53, 0x02, 0xa4, 0xfd, 0x22, 0x4b, 0x15, 0x11, 0x17, 0x63, 0x1d, + 0x47, 0x79, 0xe1, 0x14, 0x73, 0xbd, 0x70, 0x6a, 0x00, 0x91, 0x13, 0x6c, 0x92, 0x88, 0x96, 0x09, + 0x73, 0xeb, 0xfc, 0xf3, 0xa6, 0x15, 0xb9, 0xf5, 0x19, 0xd7, 0x8b, 0xc2, 0x28, 0x98, 0x59, 0xf6, + 0xa2, 0x1b, 0x01, 0x7f, 0xa6, 0x6a, 0x41, 0x13, 0x15, 0x2d, 0xac, 0xd1, 0x95, 0x61, 0x4d, 0x58, + 0x1b, 0xbd, 0xa6, 0x21, 0xcc, 0xaa, 0x28, 0xc7, 0x0a, 0xc3, 0x7e, 0x99, 0xdd, 0x3e, 0x6c, 0x4c, + 0x0f, 0x17, 0x0c, 0xf0, 0x1f, 0x86, 0xd5, 0x6c, 0x30, 0x95, 0xf0, 0x82, 0x1e, 0x72, 0xb0, 0xfd, + 0x61, 0x4f, 0x1b, 0xd6, 0xfd, 0x59, 0xe3, 0xb8, 0x84, 0xe8, 0x93, 0x29, 0xe3, 0xa6, 0xe7, 0x3a, + 0xdc, 0x1a, 0x87, 0x30, 0x67, 0x62, 0x79, 0xe3, 0x58, 0x56, 0xad, 0xe5, 0xb2, 0xd8, 0x17, 0x5a, + 0xde, 0x38, 0x01, 0xc0, 0x31, 0x0e, 0x65, 0xd8, 0xd4, 0x9f, 0x70, 0x0a, 0xc5, 0xe1, 0xc5, 0x15, + 0x76, 0x88, 0x35, 0x0c, 0x74, 0x51, 0x08, 0x2d, 0xb8, 0xee, 0xe1, 0x91, 0x84, 0xd0, 0x42, 0x0e, + 0x97, 0x26, 0x69, 0xba, 0x04, 0x43, 0xe4, 0x6e, 0x44, 0x02, 0xcf, 0xa9, 0xd3, 0x16, 0x7a, 0xe3, + 0x88, 0xb8, 0x8b, 0x71, 0x31, 0xd6, 0x71, 0xd0, 0x1a, 0x8c, 0x85, 0x5c, 0x96, 0xa7, 0x92, 0x5a, + 0x70, 0x99, 0xe8, 0xd3, 0xca, 0xc9, 0xde, 0x04, 0x1f, 0xb0, 0x22, 0x7e, 0x3a, 0xc9, 0xd0, 0x23, + 0x49, 0x12, 0xe8, 0x75, 0x18, 0xad, 0xfb, 0x4e, 0x6d, 0xce, 0xa9, 0x3b, 0x5e, 0x95, 0x8d, 0xcf, + 0x80, 0x11, 0x7f, 0x72, 0xf4, 0xba, 0x01, 0xc5, 0x09, 0x6c, 0xca, 0x20, 0xea, 0x25, 0x22, 0x11, + 0x8b, 0xe3, 0x6d, 0x92, 0x70, 0x6a, 0x90, 0x7d, 0x15, 0x63, 0x10, 0xaf, 0xe7, 0xe0, 0xe0, 0xdc, + 0xda, 0xe8, 0x32, 0x0c, 0xcb, 0xcf, 0xd7, 0x22, 0xf5, 0xc4, 0x0e, 0x4d, 0x1a, 0x0c, 0x1b, 0x98, + 0x28, 0x84, 0xe3, 0xf2, 0xff, 0x5a, 0xe0, 0x6c, 0x6c, 0xb8, 0x55, 0x11, 0xbe, 0x82, 0x3b, 0x7f, + 0x7f, 0x4c, 0x7a, 0x9a, 0x2e, 0x66, 0x21, 0x1d, 0xec, 0x95, 0x4e, 0x8b, 0x51, 0xcb, 0x84, 0xe3, + 0x6c, 0xda, 0x68, 0x05, 0x26, 0xb9, 0x0d, 0xcc, 0xfc, 0x16, 0xa9, 0x6e, 0xcb, 0x0d, 0xc7, 0xb8, + 0x46, 0xcd, 0xf1, 0xe7, 0x6a, 0x1a, 0x05, 0x67, 0xd5, 0x43, 0xef, 0xc0, 0x54, 0xb3, 0x75, 0xbb, + 0xee, 0x86, 0x5b, 0xab, 0x7e, 0xc4, 0x4c, 0xc8, 0x66, 0x6b, 0xb5, 0x80, 0x84, 0xdc, 0x37, 0x98, + 0x5d, 0xbd, 0x32, 0xba, 0x52, 0x39, 0x07, 0x0f, 0xe7, 0x52, 0x40, 0xf7, 0xe0, 0x78, 0x62, 0x21, + 0x88, 0x30, 0x29, 0xa3, 0xf9, 0x29, 0xad, 0x2a, 0x59, 0x15, 0x44, 0xc4, 0xa1, 0x2c, 0x10, 0xce, + 0x6e, 0x02, 0xbd, 0x02, 0xe0, 0x36, 0x97, 0x9c, 0x86, 0x5b, 0xa7, 0xcf, 0xd1, 0x49, 0xb6, 0x46, + 0xe8, 0xd3, 0x04, 0x96, 0xcb, 0xb2, 0x94, 0x9e, 0xcd, 0xe2, 0xdf, 0x2e, 0xd6, 0xb0, 0xd1, 0x75, + 0x18, 0x15, 0xff, 0x76, 0xc5, 0x94, 0x4e, 0xa8, 0xec, 0xa7, 0xa3, 0xb2, 0x86, 0x9a, 0xc7, 0x44, + 0x09, 0x4e, 0xd4, 0x45, 0x9b, 0x70, 0x46, 0xa6, 0x5e, 0xd5, 0xd7, 0xa7, 0x9c, 0x83, 0x90, 0xe5, + 0x91, 0x1a, 0xe0, 0x3e, 0x45, 0xb3, 0xed, 0x10, 0x71, 0x7b, 0x3a, 0xf4, 0x5e, 0xd7, 0x97, 0x39, + 0xf7, 0x18, 0x3f, 0x1e, 0x47, 0xf1, 0xbc, 0x9e, 0x04, 0xe2, 0x34, 0x3e, 0xf2, 0xe1, 0xb8, 0xeb, + 0x65, 0xad, 0xea, 0x13, 0x8c, 0xd0, 0x47, 0xb9, 0xb3, 0x7c, 0xfb, 0x15, 0x9d, 0x09, 0xc7, 0xd9, + 0x74, 0xd1, 0x32, 0x4c, 0x46, 0xbc, 0x60, 0xc1, 0x0d, 0x79, 0x9a, 0x1a, 0xfa, 0xec, 0x3b, 0xc9, + 0x9a, 0x3b, 0x49, 0x57, 0xf3, 0x5a, 0x1a, 0x8c, 0xb3, 0xea, 0xbc, 0x37, 0x03, 0xd0, 0x6f, 0x5a, + 0xb4, 0xb6, 0xc6, 0xe8, 0xa3, 0xcf, 0xc0, 0xb0, 0x3e, 0x3e, 0x82, 0x69, 0x39, 0x9f, 0xcd, 0x07, + 0x6b, 0xc7, 0x0b, 0x7f, 0x26, 0xa8, 0x23, 0x44, 0x87, 0x61, 0x83, 0x22, 0xaa, 0x66, 0x04, 0xb9, + 0xb8, 0xd8, 0x1d, 0x53, 0xd4, 0xbd, 0xfd, 0x23, 0x81, 0xec, 0x9d, 0x83, 0xae, 0xc3, 0x40, 0xb5, + 0xee, 0x12, 0x2f, 0x5a, 0x2e, 0xb7, 0x0b, 0xae, 0x3a, 0x2f, 0x70, 0xc4, 0x56, 0x14, 0xd9, 0xa5, + 0x78, 0x19, 0x56, 0x14, 0xec, 0xcb, 0x30, 0x54, 0xa9, 0x13, 0xd2, 0xe4, 0x7e, 0x5c, 0xe8, 0x29, + 0xf6, 0x30, 0x61, 0xac, 0xa5, 0xc5, 0x58, 0x4b, 0xfd, 0xcd, 0xc1, 0x98, 0x4a, 0x09, 0xb7, 0xff, + 0xb8, 0x00, 0xa5, 0x0e, 0x49, 0xce, 0x12, 0xfa, 0x36, 0xab, 0x2b, 0x7d, 0xdb, 0x2c, 0x8c, 0xc5, + 0xff, 0x74, 0x51, 0x9e, 0x32, 0x86, 0xbe, 0x69, 0x82, 0x71, 0x12, 0xbf, 0x6b, 0xbf, 0x16, 0x5d, + 0x65, 0xd7, 0xd3, 0xd1, 0x33, 0xcb, 0x50, 0xd5, 0xf7, 0x76, 0xff, 0xf6, 0xce, 0x55, 0xbb, 0xda, + 0xdf, 0x28, 0xc0, 0x71, 0x35, 0x84, 0xdf, 0xbb, 0x03, 0xb7, 0x9e, 0x1e, 0xb8, 0x07, 0xa0, 0xb4, + 0xb6, 0x6f, 0x40, 0x1f, 0x8f, 0xf8, 0xda, 0x05, 0xcf, 0xff, 0x98, 0x19, 0x7c, 0x5f, 0xb1, 0x99, + 0x46, 0x00, 0xfe, 0x1f, 0xb3, 0x60, 0x2c, 0xe1, 0x20, 0x89, 0xb0, 0xe6, 0x45, 0x7f, 0x3f, 0x7c, + 0x79, 0x16, 0xc7, 0x7f, 0x0e, 0x7a, 0xb6, 0x7c, 0x65, 0xa4, 0xac, 0x30, 0xae, 0xfa, 0x61, 0x84, + 0x19, 0xc4, 0xfe, 0x6b, 0x0b, 0x7a, 0xd7, 0x1c, 0xd7, 0x8b, 0xa4, 0xf6, 0xc3, 0xca, 0xd1, 0x7e, + 0x74, 0xf3, 0x5d, 0xe8, 0x25, 0xe8, 0x23, 0x1b, 0x1b, 0xa4, 0x1a, 0x89, 0x59, 0x95, 0xd1, 0x34, + 0xfa, 0x16, 0x59, 0x29, 0x65, 0x42, 0x59, 0x63, 0xfc, 0x2f, 0x16, 0xc8, 0xe8, 0x16, 0x0c, 0x46, + 0x6e, 0x83, 0xcc, 0xd6, 0x6a, 0xc2, 0x26, 0xe0, 0x3e, 0x42, 0xc0, 0xac, 0x49, 0x02, 0x38, 0xa6, + 0x65, 0x7f, 0xb9, 0x00, 0x10, 0x47, 0x98, 0xeb, 0xf4, 0x89, 0x73, 0x29, 0x6d, 0xf1, 0xf9, 0x0c, + 0x6d, 0x31, 0x8a, 0x09, 0x66, 0xa8, 0x8a, 0xd5, 0x30, 0x15, 0xbb, 0x1a, 0xa6, 0x9e, 0xc3, 0x0c, + 0xd3, 0x3c, 0x4c, 0xc4, 0x11, 0xf2, 0xcc, 0x00, 0xa1, 0xec, 0xfe, 0x5e, 0x4b, 0x02, 0x71, 0x1a, + 0xdf, 0x26, 0x70, 0x4e, 0x05, 0x0a, 0x13, 0x77, 0x21, 0x73, 0x25, 0xd0, 0xb5, 0xef, 0x1d, 0xc6, + 0x29, 0x56, 0x87, 0x17, 0x72, 0xd5, 0xe1, 0xbf, 0x60, 0xc1, 0xb1, 0x64, 0x3b, 0xcc, 0xef, 0xfe, + 0x8b, 0x16, 0x1c, 0x8f, 0x73, 0xfc, 0xa4, 0x4d, 0x10, 0x5e, 0x6c, 0x1b, 0xfc, 0x2c, 0xa7, 0xc7, + 0x71, 0xd8, 0x96, 0x95, 0x2c, 0xd2, 0x38, 0xbb, 0x45, 0xfb, 0xdf, 0xf5, 0xc0, 0x54, 0x5e, 0xd4, + 0x34, 0xe6, 0x69, 0xe4, 0xdc, 0xad, 0x6c, 0x93, 0x3b, 0xc2, 0x9f, 0x23, 0xf6, 0x34, 0xe2, 0xc5, + 0x58, 0xc2, 0x93, 0x69, 0x9d, 0x0a, 0x5d, 0xa6, 0x75, 0xda, 0x82, 0x89, 0x3b, 0x5b, 0xc4, 0x5b, + 0xf7, 0x42, 0x27, 0x72, 0xc3, 0x0d, 0x97, 0x29, 0xd0, 0xf9, 0xba, 0x79, 0x45, 0x7a, 0x5d, 0xdc, + 0x4a, 0x22, 0x1c, 0xec, 0x95, 0xce, 0x18, 0x05, 0x71, 0x97, 0xf9, 0x41, 0x82, 0xd3, 0x44, 0xd3, + 0x59, 0xb1, 0x7a, 0x1e, 0x72, 0x56, 0xac, 0x86, 0x2b, 0xcc, 0x6e, 0xa4, 0x1b, 0x09, 0x7b, 0xb6, + 0xae, 0xa8, 0x52, 0xac, 0x61, 0xa0, 0x4f, 0x01, 0xd2, 0xd3, 0x1a, 0x1a, 0x41, 0x6b, 0x9f, 0xdb, + 0xdf, 0x2b, 0xa1, 0xd5, 0x14, 0xf4, 0x60, 0xaf, 0x34, 0x49, 0x4b, 0x97, 0x3d, 0xfa, 0xfc, 0x8d, + 0x23, 0xfd, 0x65, 0x10, 0x42, 0xb7, 0x60, 0x9c, 0x96, 0xb2, 0x1d, 0x25, 0x23, 0xe2, 0xf2, 0x27, + 0xeb, 0x33, 0xfb, 0x7b, 0xa5, 0xf1, 0xd5, 0x04, 0x2c, 0x8f, 0x74, 0x8a, 0x48, 0x46, 0x72, 0xac, + 0x81, 0x6e, 0x93, 0x63, 0xd9, 0x5f, 0xb4, 0xe0, 0x14, 0xbd, 0xe0, 0x6a, 0xd7, 0x73, 0xb4, 0xe8, + 0x4e, 0xd3, 0xe5, 0x7a, 0x1a, 0x71, 0xd5, 0x30, 0x59, 0x5d, 0x79, 0x99, 0x6b, 0x69, 0x14, 0x94, + 0x9e, 0xf0, 0xdb, 0xae, 0x57, 0x4b, 0x9e, 0xf0, 0xd7, 0x5c, 0xaf, 0x86, 0x19, 0x44, 0x5d, 0x59, + 0xc5, 0xdc, 0x08, 0xfb, 0x5f, 0xa3, 0x7b, 0x95, 0xf6, 0xe5, 0x3b, 0xda, 0x0d, 0xf4, 0x8c, 0xae, + 0x53, 0x15, 0xe6, 0x93, 0xb9, 0xfa, 0xd4, 0x2f, 0x58, 0x20, 0xbc, 0xdf, 0xbb, 0xb8, 0x93, 0xdf, + 0x86, 0xe1, 0x9d, 0x74, 0xca, 0xd7, 0x73, 0xf9, 0xe1, 0x00, 0x44, 0xa2, 0x57, 0xc5, 0xa2, 0x1b, + 0xe9, 0x5d, 0x0d, 0x5a, 0x76, 0x0d, 0x04, 0x74, 0x81, 0x30, 0xad, 0x46, 0xe7, 0xde, 0x3c, 0x0f, + 0x50, 0x63, 0xb8, 0x2c, 0x0f, 0x7c, 0xc1, 0xe4, 0xb8, 0x16, 0x14, 0x04, 0x6b, 0x58, 0xf6, 0xaf, + 0x16, 0x61, 0x48, 0xa6, 0x18, 0x6d, 0x79, 0xdd, 0xc8, 0x1e, 0x75, 0xc6, 0xa9, 0xd0, 0x91, 0x71, + 0x7a, 0x07, 0x26, 0x02, 0x52, 0x6d, 0x05, 0xa1, 0xbb, 0x43, 0x24, 0x58, 0x6c, 0x92, 0x19, 0x9e, + 0xe0, 0x21, 0x01, 0x3c, 0x60, 0x21, 0xb2, 0x12, 0x85, 0x4c, 0x69, 0x9c, 0x26, 0x84, 0x2e, 0xc2, + 0x20, 0x13, 0xbd, 0x97, 0x63, 0x81, 0xb0, 0x12, 0x7c, 0xad, 0x48, 0x00, 0x8e, 0x71, 0xd8, 0xe3, + 0xa0, 0x75, 0x9b, 0xa1, 0x27, 0x3c, 0xc1, 0x2b, 0xbc, 0x18, 0x4b, 0x38, 0xfa, 0x38, 0x8c, 0xf3, + 0x7a, 0x81, 0xdf, 0x74, 0x36, 0xb9, 0x4a, 0xb0, 0x57, 0x85, 0xd7, 0x19, 0x5f, 0x49, 0xc0, 0x0e, + 0xf6, 0x4a, 0xc7, 0x92, 0x65, 0xac, 0xdb, 0x29, 0x2a, 0xcc, 0xf2, 0x8f, 0x37, 0x42, 0xef, 0x8c, + 0x94, 0xc1, 0x60, 0x0c, 0xc2, 0x3a, 0x9e, 0xfd, 0xcf, 0x16, 0x4c, 0x68, 0x53, 0xd5, 0x75, 0x8e, + 0x0d, 0x63, 0x90, 0x0a, 0x5d, 0x0c, 0xd2, 0xe1, 0xa2, 0x3d, 0x64, 0xce, 0x70, 0xcf, 0x03, 0x9a, + 0x61, 0xfb, 0x33, 0x80, 0xd2, 0xf9, 0x6b, 0xd1, 0x9b, 0xdc, 0x90, 0xdf, 0x0d, 0x48, 0xad, 0x9d, + 0xc2, 0x5f, 0x8f, 0x9c, 0x23, 0x3d, 0x57, 0x79, 0x2d, 0xac, 0xea, 0xdb, 0x3f, 0xde, 0x03, 0xe3, + 0xc9, 0x58, 0x1d, 0xe8, 0x2a, 0xf4, 0x71, 0x2e, 0x5d, 0x90, 0x6f, 0x63, 0x4f, 0xa6, 0x45, 0xf8, + 0xe0, 0xf9, 0x6f, 0x38, 0x77, 0x2f, 0xea, 0xa3, 0x77, 0x60, 0xa8, 0xe6, 0xdf, 0xf1, 0xee, 0x38, + 0x41, 0x6d, 0xb6, 0xbc, 0x2c, 0x4e, 0x88, 0x4c, 0x01, 0xd4, 0x42, 0x8c, 0xa6, 0x47, 0x0d, 0x61, + 0xb6, 0x13, 0x31, 0x08, 0xeb, 0xe4, 0xd0, 0x1a, 0x4b, 0xc9, 0xb4, 0xe1, 0x6e, 0xae, 0x38, 0xcd, + 0x76, 0x5e, 0x5d, 0xf3, 0x12, 0x49, 0xa3, 0x3c, 0x22, 0xf2, 0x36, 0x71, 0x00, 0x8e, 0x09, 0xa1, + 0xcf, 0xc1, 0x64, 0x98, 0xa3, 0x12, 0xcb, 0x4b, 0x67, 0xde, 0x4e, 0x4b, 0xc4, 0x85, 0x29, 0x59, + 0xca, 0xb3, 0xac, 0x66, 0xd0, 0x5d, 0x40, 0x42, 0xf4, 0xbc, 0x16, 0xb4, 0xc2, 0x68, 0xae, 0xe5, + 0xd5, 0xea, 0x32, 0x65, 0xd3, 0x87, 0xb3, 0xe5, 0x04, 0x49, 0x6c, 0xad, 0x6d, 0x16, 0x12, 0x38, + 0x8d, 0x81, 0x33, 0xda, 0xb0, 0xbf, 0xd0, 0x03, 0xd3, 0x32, 0x61, 0x74, 0x86, 0xf7, 0xca, 0xe7, + 0xad, 0x84, 0xfb, 0xca, 0x2b, 0xf9, 0x07, 0xfd, 0x43, 0x73, 0x62, 0xf9, 0x52, 0xda, 0x89, 0xe5, + 0xb5, 0x43, 0x76, 0xe3, 0x81, 0xb9, 0xb2, 0x7c, 0xcf, 0xfa, 0x9f, 0xec, 0x1f, 0x03, 0xe3, 0x6a, + 0x46, 0x98, 0xc7, 0x5b, 0x2f, 0x4b, 0xd5, 0x51, 0xce, 0xf3, 0xff, 0xaa, 0xc0, 0x31, 0x2e, 0xfb, + 0x61, 0x19, 0x95, 0x9d, 0x9d, 0xb3, 0x8a, 0x0e, 0xa5, 0x49, 0x1a, 0xcd, 0x68, 0x77, 0xc1, 0x0d, + 0x44, 0x8f, 0x33, 0x69, 0x2e, 0x0a, 0x9c, 0x34, 0x4d, 0x09, 0xc1, 0x8a, 0x0e, 0xda, 0x81, 0x89, + 0x4d, 0x16, 0xf1, 0x49, 0xcb, 0xdd, 0x2c, 0xce, 0x85, 0xcc, 0x7d, 0x7b, 0x65, 0x7e, 0x31, 0x3f, + 0xd1, 0x33, 0x7f, 0xfc, 0xa5, 0x50, 0x70, 0xba, 0x09, 0xba, 0x35, 0x8e, 0x39, 0x77, 0xc2, 0xc5, + 0xba, 0x13, 0x46, 0x6e, 0x75, 0xae, 0xee, 0x57, 0xb7, 0x2b, 0x91, 0x1f, 0xc8, 0x04, 0x8f, 0x99, + 0x6f, 0xaf, 0xd9, 0x5b, 0x95, 0x14, 0xbe, 0xd1, 0xfc, 0xd4, 0xfe, 0x5e, 0xe9, 0x58, 0x16, 0x16, + 0xce, 0x6c, 0x0b, 0xad, 0x42, 0xff, 0xa6, 0x1b, 0x61, 0xd2, 0xf4, 0xc5, 0x69, 0x91, 0x79, 0x14, + 0x5e, 0xe1, 0x28, 0x46, 0x4b, 0x2c, 0x22, 0x95, 0x00, 0x60, 0x49, 0x04, 0xbd, 0xa9, 0x2e, 0x81, + 0xbe, 0x7c, 0x01, 0x6c, 0xda, 0xf6, 0x2e, 0xf3, 0x1a, 0x78, 0x1d, 0x8a, 0xde, 0x46, 0xd8, 0x2e, + 0x16, 0xcf, 0xea, 0x92, 0x21, 0x3f, 0x9b, 0xeb, 0xa7, 0x4f, 0xe3, 0xd5, 0xa5, 0x0a, 0xa6, 0x15, + 0x99, 0xdb, 0x6b, 0x58, 0x0d, 0x5d, 0x91, 0x2c, 0x2a, 0xd3, 0x0b, 0x78, 0xb9, 0x32, 0x5f, 0x59, + 0x36, 0x68, 0xb0, 0xa8, 0x86, 0xac, 0x18, 0xf3, 0xea, 0xe8, 0x26, 0x0c, 0x6e, 0xf2, 0x83, 0x6f, + 0x23, 0x14, 0x49, 0xe3, 0x33, 0x2f, 0xa3, 0x2b, 0x12, 0xc9, 0xa0, 0xc7, 0xae, 0x0c, 0x05, 0xc2, + 0x31, 0x29, 0xf4, 0x05, 0x0b, 0x8e, 0x27, 0xb3, 0xee, 0x33, 0x67, 0x35, 0x61, 0xa6, 0x96, 0xe9, + 0x00, 0x50, 0xce, 0xaa, 0x60, 0x34, 0xc8, 0xd4, 0x2f, 0x99, 0x68, 0x38, 0xbb, 0x39, 0x3a, 0xd0, + 0xc1, 0xed, 0x5a, 0xbb, 0xfc, 0x42, 0x89, 0xc0, 0x44, 0x7c, 0xa0, 0xf1, 0xdc, 0x02, 0xa6, 0x15, + 0xd1, 0x1a, 0xc0, 0x46, 0x9d, 0x88, 0x88, 0x8f, 0xc2, 0x28, 0x2a, 0xf3, 0xf6, 0x5f, 0x52, 0x58, + 0x82, 0x0e, 0x7b, 0x89, 0xc6, 0xa5, 0x58, 0xa3, 0x43, 0x97, 0x52, 0xd5, 0xf5, 0x6a, 0x24, 0x60, + 0xca, 0xad, 0x9c, 0xa5, 0x34, 0xcf, 0x30, 0xd2, 0x4b, 0x89, 0x97, 0x63, 0x41, 0x81, 0xd1, 0x22, + 0xcd, 0xad, 0x8d, 0xb0, 0x5d, 0x26, 0x8b, 0x79, 0xd2, 0xdc, 0x4a, 0x2c, 0x28, 0x4e, 0x8b, 0x95, + 0x63, 0x41, 0x81, 0x6e, 0x99, 0x0d, 0xba, 0x81, 0x48, 0x30, 0x35, 0x96, 0xbf, 0x65, 0x96, 0x38, + 0x4a, 0x7a, 0xcb, 0x08, 0x00, 0x96, 0x44, 0xd0, 0xa7, 0x4d, 0x6e, 0x67, 0x9c, 0xd1, 0x7c, 0xa6, + 0x03, 0xb7, 0x63, 0xd0, 0x6d, 0xcf, 0xef, 0xbc, 0x02, 0x85, 0x8d, 0x2a, 0x53, 0x8a, 0xe5, 0xe8, + 0x0c, 0x96, 0xe6, 0x0d, 0x6a, 0x2c, 0x32, 0xfc, 0xd2, 0x3c, 0x2e, 0x6c, 0x54, 0xe9, 0xd2, 0x77, + 0xee, 0xb5, 0x02, 0xb2, 0xe4, 0xd6, 0x89, 0xc8, 0x6a, 0x91, 0xb9, 0xf4, 0x67, 0x25, 0x52, 0x7a, + 0xe9, 0x2b, 0x10, 0x8e, 0x49, 0x51, 0xba, 0x31, 0x0f, 0x36, 0x99, 0x4f, 0x57, 0xb1, 0x5a, 0x69, + 0xba, 0x99, 0x5c, 0xd8, 0x36, 0x8c, 0xec, 0x84, 0xcd, 0x2d, 0x22, 0x4f, 0x45, 0xa6, 0xae, 0xcb, + 0x89, 0x54, 0x71, 0x53, 0x20, 0xba, 0x41, 0xd4, 0x72, 0xea, 0xa9, 0x83, 0x9c, 0x89, 0x56, 0x6e, + 0xea, 0xc4, 0xb0, 0x49, 0x9b, 0x2e, 0x84, 0x77, 0x79, 0x38, 0x39, 0xa6, 0xb8, 0xcb, 0x59, 0x08, + 0x19, 0x11, 0xe7, 0xf8, 0x42, 0x10, 0x00, 0x2c, 0x89, 0xa8, 0xc1, 0x66, 0x17, 0xd0, 0x89, 0x0e, + 0x83, 0x9d, 0xea, 0x6f, 0x3c, 0xd8, 0xec, 0xc2, 0x89, 0x49, 0xb1, 0x8b, 0xa6, 0xb9, 0xe5, 0x47, + 0xbe, 0x97, 0xb8, 0xe4, 0x4e, 0xe6, 0x5f, 0x34, 0xe5, 0x0c, 0xfc, 0xf4, 0x45, 0x93, 0x85, 0x85, + 0x33, 0xdb, 0xa2, 0x1f, 0xd7, 0x94, 0x91, 0x01, 0x45, 0xe6, 0x8d, 0xa7, 0x72, 0x02, 0x6b, 0xa6, + 0xc3, 0x07, 0xf2, 0x8f, 0x53, 0x20, 0x1c, 0x93, 0x42, 0x35, 0x18, 0x6d, 0x1a, 0x11, 0x67, 0x59, + 0x06, 0x91, 0x1c, 0xbe, 0x20, 0x2b, 0x36, 0x2d, 0x97, 0x10, 0x99, 0x10, 0x9c, 0xa0, 0xc9, 0x2c, + 0xf7, 0xb8, 0xab, 0x1f, 0x4b, 0x30, 0x92, 0x33, 0xd5, 0x19, 0xde, 0x80, 0x7c, 0xaa, 0x05, 0x00, + 0x4b, 0x22, 0x74, 0x34, 0x84, 0x83, 0x9a, 0x1f, 0xb2, 0x3c, 0x3d, 0x79, 0x0a, 0xf6, 0x2c, 0x35, + 0x91, 0x0c, 0xb3, 0x2e, 0x40, 0x38, 0x26, 0x45, 0x4f, 0x72, 0x7a, 0xe1, 0x9d, 0xce, 0x3f, 0xc9, + 0x93, 0xd7, 0x1d, 0x3b, 0xc9, 0xe9, 0x65, 0x57, 0x14, 0x57, 0x9d, 0x8a, 0x0a, 0xce, 0x72, 0x8c, + 0xe4, 0xf4, 0x4b, 0x85, 0x15, 0x4f, 0xf7, 0x4b, 0x81, 0x70, 0x4c, 0x8a, 0x5d, 0xc5, 0x2c, 0x34, + 0xdd, 0xd9, 0x36, 0x57, 0x31, 0x45, 0xc8, 0xb8, 0x8a, 0xb5, 0xd0, 0x75, 0xf6, 0x8f, 0x17, 0xe0, + 0x6c, 0xfb, 0x7d, 0x1b, 0xeb, 0xd0, 0xca, 0xb1, 0xcd, 0x52, 0x42, 0x87, 0xc6, 0x25, 0x3a, 0x31, + 0x56, 0xd7, 0x01, 0x87, 0xaf, 0xc0, 0x84, 0x72, 0x47, 0xac, 0xbb, 0xd5, 0x5d, 0x2d, 0xb1, 0xa8, + 0x0a, 0xcd, 0x53, 0x49, 0x22, 0xe0, 0x74, 0x1d, 0x34, 0x0b, 0x63, 0x46, 0xe1, 0xf2, 0x82, 0x78, + 0xfe, 0xc7, 0xd9, 0x31, 0x4c, 0x30, 0x4e, 0xe2, 0xdb, 0xbf, 0x66, 0xc1, 0xc9, 0x9c, 0x3c, 0xf3, + 0x5d, 0xc7, 0xd3, 0xdd, 0x80, 0xb1, 0xa6, 0x59, 0xb5, 0x43, 0x08, 0x70, 0x23, 0x9b, 0xbd, 0xea, + 0x6b, 0x02, 0x80, 0x93, 0x44, 0xed, 0x5f, 0x29, 0xc0, 0x99, 0xb6, 0xf6, 0xf5, 0x08, 0xc3, 0x89, + 0xcd, 0x46, 0xe8, 0xcc, 0x07, 0xa4, 0x46, 0xbc, 0xc8, 0x75, 0xea, 0x95, 0x26, 0xa9, 0x6a, 0x5a, + 0x50, 0x66, 0xa8, 0x7e, 0x65, 0xa5, 0x32, 0x9b, 0xc6, 0xc0, 0x39, 0x35, 0xd1, 0x12, 0xa0, 0x34, + 0x44, 0xcc, 0x30, 0x7b, 0xe2, 0xa6, 0xe9, 0xe1, 0x8c, 0x1a, 0xe8, 0x65, 0x18, 0x51, 0x76, 0xfb, + 0xda, 0x8c, 0xb3, 0x0b, 0x02, 0xeb, 0x00, 0x6c, 0xe2, 0xa1, 0x4b, 0x3c, 0x6d, 0x92, 0x48, 0xb0, + 0x25, 0x54, 0xa6, 0x63, 0x32, 0x27, 0x92, 0x28, 0xc6, 0x3a, 0xce, 0xdc, 0xe5, 0x3f, 0xfd, 0xf6, + 0xd9, 0x0f, 0xfd, 0xc5, 0xb7, 0xcf, 0x7e, 0xe8, 0xaf, 0xbe, 0x7d, 0xf6, 0x43, 0x3f, 0xb4, 0x7f, + 0xd6, 0xfa, 0xd3, 0xfd, 0xb3, 0xd6, 0x5f, 0xec, 0x9f, 0xb5, 0xfe, 0x6a, 0xff, 0xac, 0xf5, 0xff, + 0xee, 0x9f, 0xb5, 0xbe, 0xfc, 0xb7, 0x67, 0x3f, 0xf4, 0x36, 0x8a, 0x23, 0x54, 0x5f, 0xa4, 0xb3, + 0x73, 0x71, 0xe7, 0xd2, 0x7f, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x60, 0x45, 0x7a, 0xd6, 0xa3, 0x24, + 0x01, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -16016,6 +16020,13 @@ func (m *PodLogOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Stream != nil { + i -= len(*m.Stream) + copy(dAtA[i:], *m.Stream) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Stream))) + i-- + dAtA[i] = 0x52 + } i-- if m.InsecureSkipTLSVerifyBackend { dAtA[i] = 1 @@ -16322,6 +16333,13 @@ func (m *PodSecurityContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.SELinuxChangePolicy != nil { + i -= len(*m.SELinuxChangePolicy) + copy(dAtA[i:], *m.SELinuxChangePolicy) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SELinuxChangePolicy))) + i-- + dAtA[i] = 0x6a + } if m.SupplementalGroupsPolicy != nil { i -= len(*m.SupplementalGroupsPolicy) copy(dAtA[i:], *m.SupplementalGroupsPolicy) @@ -16488,6 +16506,20 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Resources != nil { + { + size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xc2 + } if len(m.ResourceClaims) > 0 { for iNdEx := len(m.ResourceClaims) - 1; iNdEx >= 0; iNdEx-- { { @@ -24737,6 +24769,10 @@ func (m *PodLogOptions) Size() (n int) { n += 1 + sovGenerated(uint64(*m.LimitBytes)) } n += 2 + if m.Stream != nil { + l = len(*m.Stream) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -24885,6 +24921,10 @@ func (m *PodSecurityContext) Size() (n int) { l = len(*m.SupplementalGroupsPolicy) n += 1 + l + sovGenerated(uint64(l)) } + if m.SELinuxChangePolicy != nil { + l = len(*m.SELinuxChangePolicy) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -25059,6 +25099,10 @@ func (m *PodSpec) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + if m.Resources != nil { + l = m.Resources.Size() + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -29088,6 +29132,7 @@ func (this *PodLogOptions) String() string { `TailLines:` + valueToStringGenerated(this.TailLines) + `,`, `LimitBytes:` + valueToStringGenerated(this.LimitBytes) + `,`, `InsecureSkipTLSVerifyBackend:` + fmt.Sprintf("%v", this.InsecureSkipTLSVerifyBackend) + `,`, + `Stream:` + valueToStringGenerated(this.Stream) + `,`, `}`, }, "") return s @@ -29187,6 +29232,7 @@ func (this *PodSecurityContext) String() string { `SeccompProfile:` + strings.Replace(this.SeccompProfile.String(), "SeccompProfile", "SeccompProfile", 1) + `,`, `AppArmorProfile:` + strings.Replace(this.AppArmorProfile.String(), "AppArmorProfile", "AppArmorProfile", 1) + `,`, `SupplementalGroupsPolicy:` + valueToStringGenerated(this.SupplementalGroupsPolicy) + `,`, + `SELinuxChangePolicy:` + valueToStringGenerated(this.SELinuxChangePolicy) + `,`, `}`, }, "") return s @@ -29320,6 +29366,7 @@ func (this *PodSpec) String() string { `HostUsers:` + valueToStringGenerated(this.HostUsers) + `,`, `SchedulingGates:` + repeatedStringForSchedulingGates + `,`, `ResourceClaims:` + repeatedStringForResourceClaims + `,`, + `Resources:` + strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1) + `,`, `}`, }, "") return s @@ -56954,6 +57001,39 @@ func (m *PodLogOptions) Unmarshal(dAtA []byte) error { } } m.InsecureSkipTLSVerifyBackend = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stream", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Stream = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -58122,6 +58202,39 @@ func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { s := SupplementalGroupsPolicy(dAtA[iNdEx:postIndex]) m.SupplementalGroupsPolicy = &s iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SELinuxChangePolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := PodSELinuxChangePolicy(dAtA[iNdEx:postIndex]) + m.SELinuxChangePolicy = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -59611,6 +59724,42 @@ func (m *PodSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 40: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Resources == nil { + m.Resources = &ResourceRequirements{} + } + if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/api/core/v1/generated.proto b/vendor/k8s.io/api/core/v1/generated.proto index 68ac80ed0b..08706987c5 100644 --- a/vendor/k8s.io/api/core/v1/generated.proto +++ b/vendor/k8s.io/api/core/v1/generated.proto @@ -181,7 +181,6 @@ message AzureFileVolumeSource { } // Binding ties one object to another; for example, a pod is bound to a node by a scheduler. -// Deprecated in 1.7, please use the bindings subresource of pods instead. message Binding { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata @@ -192,7 +191,7 @@ message Binding { optional ObjectReference target = 2; } -// Represents storage that is managed by an external CSI volume driver (Beta feature) +// Represents storage that is managed by an external CSI volume driver message CSIPersistentVolumeSource { // driver is the name of the driver to use for this volume. // Required. @@ -1071,7 +1070,7 @@ message ContainerStatus { // AllocatedResources represents the compute resources allocated for this container by the // node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission // and after successfully admitting desired pod resize. - // +featureGate=InPlacePodVerticalScaling + // +featureGate=InPlacePodVerticalScalingAllocatedStatus // +optional map allocatedResources = 10; @@ -1870,6 +1869,7 @@ message GCEPersistentDiskVolumeSource { optional bool readOnly = 4; } +// GRPCAction specifies an action involving a GRPC service. message GRPCAction { // Port number of the gRPC service. Number must be in the range 1 to 65535. optional int32 port = 1; @@ -2203,21 +2203,21 @@ message Lifecycle { // LifecycleHandler defines a specific action that should be taken in a lifecycle // hook. One and only one of the fields, except TCPSocket must be specified. message LifecycleHandler { - // Exec specifies the action to take. + // Exec specifies a command to execute in the container. // +optional optional ExecAction exec = 1; - // HTTPGet specifies the http request to perform. + // HTTPGet specifies an HTTP GET request to perform. // +optional optional HTTPGetAction httpGet = 2; // Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - // for the backward compatibility. There are no validation of this field and - // lifecycle hooks will fail in runtime when tcp handler is specified. + // for backward compatibility. There is no validation of this field and + // lifecycle hooks will fail at runtime when it is specified. // +optional optional TCPSocketAction tcpSocket = 3; - // Sleep represents the duration that the container should sleep before being terminated. + // Sleep represents a duration that the container should sleep. // +featureGate=PodLifecycleSleepAction // +optional optional SleepAction sleep = 4; @@ -2346,13 +2346,23 @@ message LoadBalancerStatus { // LocalObjectReference contains enough information to let you locate the // referenced object inside the same namespace. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 2. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 3. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // +structType=atomic message LocalObjectReference { // Name of the referent. // This field is effectively required, but due to backwards compatibility is // allowed to be empty. Instances of this type with an empty value here are // almost certainly wrong. - // TODO: Add other useful fields. apiVersion, kind, uid? // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional // +default="" @@ -2361,7 +2371,7 @@ message LocalObjectReference { optional string name = 1; } -// Local represents directly-attached storage with node affinity (Beta feature) +// Local represents directly-attached storage with node affinity message LocalVolumeSource { // path of the full path to the volume on the node. // It can be either a directory or block device (disk, partition, ...). @@ -2438,12 +2448,15 @@ message NamespaceCondition { // Status of the condition, one of True, False, Unknown. optional string status = 2; + // Last time the condition transitioned from one status to another. // +optional optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; + // Unique, one-word, CamelCase reason for the condition's last transition. // +optional optional string reason = 5; + // Human-readable message indicating details about last transition. // +optional optional string message = 6; } @@ -2783,7 +2796,7 @@ message NodeStatus { optional string phase = 3; // Conditions is an array of current observed node conditions. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition + // More info: https://kubernetes.io/docs/reference/node/node-status/#condition // +optional // +patchMergeKey=type // +patchStrategy=merge @@ -2793,7 +2806,7 @@ message NodeStatus { // List of addresses reachable to the node. // Queried from cloud provider, if available. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses + // More info: https://kubernetes.io/docs/reference/node/node-status/#addresses // Note: This field is declared as mergeable, but the merge key is not sufficiently // unique, which can cause data corruption when it is merged. Callers should instead // use a full-replacement patch. See https://pr.k8s.io/79391 for an example. @@ -2813,7 +2826,7 @@ message NodeStatus { optional NodeDaemonEndpoints daemonEndpoints = 6; // Set of ids/uuids to uniquely identify the node. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#info + // More info: https://kubernetes.io/docs/reference/node/node-status/#info // +optional optional NodeSystemInfo nodeInfo = 7; @@ -3001,8 +3014,13 @@ message PersistentVolumeClaim { // PersistentVolumeClaimCondition contains details about state of pvc message PersistentVolumeClaimCondition { + // Type is the type of the condition. + // More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about optional string type = 1; + // Status is the status of the condition. + // Can be True, False, Unknown. + // More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required optional string status = 2; // lastProbeTime is the time we probed the condition. @@ -3280,12 +3298,16 @@ 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. + // Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + // gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1; // awsElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. + // Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + // awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2; @@ -3300,6 +3322,7 @@ message PersistentVolumeSource { // glusterfs represents a Glusterfs volume that is attached to a host and // exposed to the pod. Provisioned by an admin. + // Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional optional GlusterfsPersistentVolumeSource glusterfs = 4; @@ -3310,6 +3333,7 @@ message PersistentVolumeSource { optional NFSVolumeSource nfs = 5; // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional optional RBDPersistentVolumeSource rbd = 6; @@ -3320,11 +3344,14 @@ message PersistentVolumeSource { optional ISCSIPersistentVolumeSource iscsi = 7; // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + // are redirected to the cinder.csi.openstack.org CSI driver. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional CinderPersistentVolumeSource cinder = 8; - // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + // Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. // +optional optional CephFSPersistentVolumeSource cephfs = 9; @@ -3332,39 +3359,53 @@ message PersistentVolumeSource { // +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 + // 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. + // Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. // +optional optional FlockerVolumeSource flocker = 11; // flexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. + // Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. // +optional optional FlexPersistentVolumeSource flexVolume = 12; // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + // are redirected to the file.csi.azure.com CSI driver. // +optional optional AzureFilePersistentVolumeSource azureFile = 13; - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + // Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + // are redirected to the csi.vsphere.vmware.com CSI driver. // +optional optional VsphereVirtualDiskVolumeSource vsphereVolume = 14; - // quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + // Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. // +optional optional QuobyteVolumeSource quobyte = 15; // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + // are redirected to the disk.csi.azure.com CSI driver. // +optional optional AzureDiskVolumeSource azureDisk = 16; - // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + // Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17; - // portworxVolume represents a portworx volume attached and mounted on kubelets host machine + // portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + // Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + // are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + // is on. // +optional optional PortworxVolumeSource portworxVolume = 18; // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. // +optional optional ScaleIOPersistentVolumeSource scaleIO = 19; @@ -3372,12 +3413,13 @@ message PersistentVolumeSource { // +optional optional LocalVolumeSource local = 20; - // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod + // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. + // Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. // More info: https://examples.k8s.io/volumes/storageos/README.md // +optional optional StorageOSPersistentVolumeSource storageos = 21; - // csi represents storage that is handled by an external CSI driver (Beta feature). + // csi represents storage that is handled by an external CSI driver. // +optional optional CSIPersistentVolumeSource csi = 22; } @@ -3710,9 +3752,11 @@ message PodDNSConfig { // PodDNSConfigOption defines DNS resolver options of a pod. message PodDNSConfigOption { + // Name is this DNS resolver option's name. // Required. optional string name = 1; + // Value is this DNS resolver option's value. // +optional optional string value = 2; } @@ -3803,7 +3847,8 @@ message PodLogOptions { 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 + // logs are shown from the creation of the container or sinceSeconds or sinceTime. + // Note that when "TailLines" is specified, "Stream" can only be set to nil or "All". // +optional optional int64 tailLines = 7; @@ -3821,6 +3866,14 @@ message PodLogOptions { // the actual log data coming from the real kubelet). // +optional optional bool insecureSkipTLSVerifyBackend = 9; + + // Specify which container log stream to return to the client. + // Acceptable values are "All", "Stdout" and "Stderr". If not specified, "All" is used, and both stdout and stderr + // are returned interleaved. + // Note that when "TailLines" is specified, "Stream" can only be set to nil or "All". + // +featureGate=PodLogsQuerySplitStreams + // +optional + optional string stream = 10; } // PodOS defines the OS parameters of a pod. @@ -4029,6 +4082,33 @@ message PodSecurityContext { // Note that this field cannot be set when spec.os.name is windows. // +optional optional AppArmorProfile appArmorProfile = 11; + + // seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + // It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + // Valid values are "MountOption" and "Recursive". + // + // "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + // This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + // + // "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + // This requires all Pods that share the same volume to use the same SELinux label. + // It is not possible to share the same volume among privileged and unprivileged Pods. + // Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + // whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + // CSIDriver instance. Other volumes are always re-labelled recursively. + // "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + // + // If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + // If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + // and "Recursive" for all other volumes. + // + // This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + // + // All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + // Note that this field cannot be set when spec.os.name is windows. + // +featureGate=SELinuxChangePolicy + // +optional + optional string seLinuxChangePolicy = 13; } // Describes the class of pods that should avoid this node. @@ -4386,6 +4466,21 @@ message PodSpec { // +featureGate=DynamicResourceAllocation // +optional repeated PodResourceClaim resourceClaims = 39; + + // Resources is the total amount of CPU and Memory resources required by all + // containers in the pod. It supports specifying Requests and Limits for + // "cpu" and "memory" resource names only. ResourceClaims are not supported. + // + // This field enables fine-grained control over resource allocation for the + // entire pod, allowing resource sharing among containers in a pod. + // TODO: For beta graduation, expand this comment with a detailed explanation. + // + // This is an alpha field and requires enabling the PodLevelResources feature + // gate. + // + // +featureGate=PodLevelResources + // +optional + optional ResourceRequirements resources = 40; } // PodStatus represents information about the status of a pod. Status may trail the actual @@ -4477,14 +4572,26 @@ message PodStatus { // +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 + // Statuses of init containers in this pod. The most recent successful non-restartable // init container will have ready = true, the most recently started container will have // startTime set. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + // Each init container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status // +listType=atomic repeated ContainerStatus initContainerStatuses = 10; - // The list has one entry per container in the manifest. + // Statuses of containers in this pod. + // Each container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional // +listType=atomic @@ -4496,7 +4603,14 @@ message PodStatus { // +optional optional string qosClass = 9; - // Status for any ephemeral containers that have run in this pod. + // Statuses for any ephemeral containers that have run in this pod. + // Each ephemeral container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional // +listType=atomic repeated ContainerStatus ephemeralContainerStatuses = 13; @@ -4571,6 +4685,7 @@ message PodTemplateSpec { optional PodSpec spec = 2; } +// PortStatus represents the error condition of a service port message PortStatus { // Port is the port number of the service port of which status is recorded here optional int32 port = 1; @@ -4695,19 +4810,19 @@ message Probe { // ProbeHandler defines a specific action that should be taken in a probe. // One and only one of the fields must be specified. message ProbeHandler { - // Exec specifies the action to take. + // Exec specifies a command to execute in the container. // +optional optional ExecAction exec = 1; - // HTTPGet specifies the http request to perform. + // HTTPGet specifies an HTTP GET request to perform. // +optional optional HTTPGetAction httpGet = 2; - // TCPSocket specifies an action involving a TCP port. + // TCPSocket specifies a connection to a TCP port. // +optional optional TCPSocketAction tcpSocket = 3; - // GRPC specifies an action involving a GRPC port. + // GRPC specifies a GRPC HealthCheckRequest. // +optional optional GRPCAction grpc = 4; } @@ -5036,7 +5151,7 @@ message ResourceFieldSelector { } // ResourceHealth represents the health of a resource. It has the latest device health information. -// This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP. +// This is a part of KEP https://kep.k8s.io/4680. message ResourceHealth { // ResourceID is the unique identifier of the resource. See the ResourceID type for more information. optional string resourceID = 1; @@ -5145,15 +5260,18 @@ message ResourceRequirements { repeated ResourceClaim claims = 3; } +// ResourceStatus represents the status of a single resource allocated to a Pod. message ResourceStatus { - // Name of the resource. Must be unique within the pod and match one of the resources from the pod spec. + // Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. + // For DRA resources, the value must be "claim:/". + // When this status is reported about a container, the "claim_name" and "request" must match one of the claims of this container. // +required optional string name = 1; - // List of unique Resources health. Each element in the list contains an unique resource ID and resource health. - // At a minimum, ResourceID must uniquely identify the Resource - // allocated to the Pod on the Node for the lifetime of a Pod. - // See ResourceID type for it's definition. + // List of unique resources health. Each element in the list contains an unique resource ID and its health. + // At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. + // If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. + // See ResourceID type definition for a specific format it has in various use cases. // +listType=map // +listMapKey=resourceID repeated ResourceHealth resources = 2; @@ -5611,6 +5729,8 @@ message ServiceAccount { // Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. // Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". + // The "kubernetes.io/enforce-mountable-secrets" annotation is deprecated since v1.32. + // Prefer separate namespaces to isolate access to mounted secrets. // This field should not be used to find auto-generated service account token secrets for use outside of pods. // Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. // More info: https://kubernetes.io/docs/concepts/configuration/secret @@ -5996,7 +6116,7 @@ message ServiceSpec { // not set, the implementation will apply its default routing strategy. If set // to "PreferClose", implementations should prioritize endpoints that are // topologically close (e.g., same zone). - // This is an alpha field and requires enabling ServiceTrafficDistribution feature. + // This is a beta field and requires enabling ServiceTrafficDistribution feature. // +featureGate=ServiceTrafficDistribution // +optional optional string trafficDistribution = 23; @@ -6323,6 +6443,20 @@ message TopologySpreadConstraint { // TypedLocalObjectReference contains enough information to let you locate the // typed referenced object inside the same namespace. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 2. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 3. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity +// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple +// and the version of the actual struct is irrelevant. +// 4. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // +structType=atomic message TypedLocalObjectReference { // APIGroup is the group for the resource being referenced. @@ -6338,6 +6472,7 @@ message TypedLocalObjectReference { optional string name = 3; } +// TypedObjectReference contains enough information to let you locate the typed referenced object message TypedObjectReference { // APIGroup is the group for the resource being referenced. // If APIGroup is not specified, the specified Kind must be in the core API group. @@ -6538,18 +6673,22 @@ message VolumeSource { // gcePersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. + // Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + // gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3; // awsElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. + // Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + // awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4; // gitRepo represents a git repository at a particular revision. - // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + // Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. // +optional @@ -6572,6 +6711,7 @@ message VolumeSource { optional ISCSIVolumeSource iscsi = 8; // glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + // Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional optional GlusterfsVolumeSource glusterfs = 9; @@ -6583,25 +6723,31 @@ message VolumeSource { optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10; // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional optional RBDVolumeSource rbd = 11; // flexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. + // Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. // +optional optional FlexVolumeSource flexVolume = 12; // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + // are redirected to the cinder.csi.openstack.org CSI driver. // More info: https://examples.k8s.io/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 + // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + // Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. // +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 + // flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + // Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. // +optional optional FlockerVolumeSource flocker = 15; @@ -6614,6 +6760,8 @@ message VolumeSource { optional FCVolumeSource fc = 17; // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + // are redirected to the file.csi.azure.com CSI driver. // +optional optional AzureFileVolumeSource azureFile = 18; @@ -6621,37 +6769,48 @@ message VolumeSource { // +optional optional ConfigMapVolumeSource configMap = 19; - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + // Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + // are redirected to the csi.vsphere.vmware.com CSI driver. // +optional optional VsphereVirtualDiskVolumeSource vsphereVolume = 20; - // quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + // Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. // +optional optional QuobyteVolumeSource quobyte = 21; // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + // are redirected to the disk.csi.azure.com CSI driver. // +optional optional AzureDiskVolumeSource azureDisk = 22; - // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + // Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23; // projected 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 + // portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + // Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + // are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + // is on. // +optional optional PortworxVolumeSource portworxVolume = 24; // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. // +optional optional ScaleIOVolumeSource scaleIO = 25; // storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + // Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. // +optional optional StorageOSVolumeSource storageos = 27; - // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers. // +optional optional CSIVolumeSource csi = 28; diff --git a/vendor/k8s.io/api/core/v1/objectreference.go b/vendor/k8s.io/api/core/v1/objectreference.go index ee5335ee87..609cadc7aa 100644 --- a/vendor/k8s.io/api/core/v1/objectreference.go +++ b/vendor/k8s.io/api/core/v1/objectreference.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -// IsAnAPIObject allows clients to preemptively get a reference to an API object and pass it to places that +// SetGroupVersionKind allows clients to preemptively get a reference to an API object and pass it to places that // intend only to get a reference to that object. This simplifies the event recording interface. func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) { obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() diff --git a/vendor/k8s.io/api/core/v1/types.go b/vendor/k8s.io/api/core/v1/types.go index 3a74138bae..fb2c1c7453 100644 --- a/vendor/k8s.io/api/core/v1/types.go +++ b/vendor/k8s.io/api/core/v1/types.go @@ -63,16 +63,20 @@ type VolumeSource struct { 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. + // Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + // gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"` // awsElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. + // Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + // awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"` // gitRepo represents a git repository at a particular revision. - // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + // Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. // +optional @@ -91,6 +95,7 @@ type VolumeSource struct { // +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. + // Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"` @@ -100,21 +105,27 @@ type VolumeSource struct { // +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. + // Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. // More info: https://examples.k8s.io/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. + // Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. // +optional FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + // are redirected to the cinder.csi.openstack.org CSI driver. // More info: https://examples.k8s.io/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 + // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + // Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. // +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 + // flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + // Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. // +optional Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"` // downwardAPI represents downward API about the pod that should populate this volume @@ -124,34 +135,47 @@ type VolumeSource struct { // +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. + // Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + // are redirected to the file.csi.azure.com CSI driver. // +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 + // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + // Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + // are redirected to the csi.vsphere.vmware.com CSI driver. // +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 + // quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + // Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. // +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. + // Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + // are redirected to the disk.csi.azure.com CSI driver. // +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 represents a PhotonController persistent disk attached and mounted on kubelets host machine. + // Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"` // projected 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 + // portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + // Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + // are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + // is on. // +optional PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"` // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. // +optional ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"` // storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + // Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. // +optional StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"` - // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers. // +optional CSI *CSIVolumeSource `json:"csi,omitempty" protobuf:"bytes,28,opt,name=csi"` // ephemeral represents a volume that is handled by a cluster storage driver. @@ -219,11 +243,15 @@ 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. + // Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + // gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"` // awsElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. + // Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + // awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"` @@ -236,6 +264,7 @@ type PersistentVolumeSource struct { 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. + // Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional Glusterfs *GlusterfsPersistentVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"` @@ -244,6 +273,7 @@ type PersistentVolumeSource struct { // +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. + // Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional RBD *RBDPersistentVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"` @@ -252,50 +282,68 @@ type PersistentVolumeSource struct { // +optional ISCSI *ISCSIPersistentVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"` // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + // are redirected to the cinder.csi.openstack.org CSI driver. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"` - // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + // Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. // +optional CephFS *CephFSPersistentVolumeSource `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 + // 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. + // Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. // +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. + // Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. // +optional FlexVolume *FlexPersistentVolumeSource `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. + // Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + // are redirected to the file.csi.azure.com CSI driver. // +optional AzureFile *AzureFilePersistentVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"` - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + // Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + // are redirected to the csi.vsphere.vmware.com CSI driver. // +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 + // quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + // Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. // +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. + // Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + // are redirected to the disk.csi.azure.com CSI driver. // +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 represents a PhotonController persistent disk attached and mounted on kubelets host machine. + // Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"` - // portworxVolume represents a portworx volume attached and mounted on kubelets host machine + // portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + // Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + // are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate + // is on. // +optional PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"` // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. // +optional ScaleIO *ScaleIOPersistentVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"` // local represents directly-attached storage with node affinity // +optional Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"` - // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod + // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. + // Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. // More info: https://examples.k8s.io/volumes/storageos/README.md // +optional StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"` - // csi represents storage that is handled by an external CSI driver (Beta feature). + // csi represents storage that is handled by an external CSI driver. // +optional CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"` } @@ -582,6 +630,7 @@ type PersistentVolumeClaimSpec struct { VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty" protobuf:"bytes,9,opt,name=volumeAttributesClassName"` } +// TypedObjectReference contains enough information to let you locate the typed referenced object type TypedObjectReference struct { // APIGroup is the group for the resource being referenced. // If APIGroup is not specified, the specified Kind must be in the core API group. @@ -688,8 +737,13 @@ type ModifyVolumeStatus struct { // PersistentVolumeClaimCondition contains details about state of pvc type PersistentVolumeClaimCondition struct { - Type PersistentVolumeClaimConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PersistentVolumeClaimConditionType"` - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` + // Type is the type of the condition. + // More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about + Type PersistentVolumeClaimConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PersistentVolumeClaimConditionType"` + // Status is the status of the condition. + // Can be True, False, Unknown. + // More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required + Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` // lastProbeTime is the time we probed the condition. // +optional LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` @@ -2015,7 +2069,7 @@ type KeyToPath struct { Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"` } -// Local represents directly-attached storage with node affinity (Beta feature) +// Local represents directly-attached storage with node affinity type LocalVolumeSource struct { // path of the full path to the volume on the node. // It can be either a directory or block device (disk, partition, ...). @@ -2029,7 +2083,7 @@ type LocalVolumeSource struct { FSType *string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` } -// Represents storage that is managed by an external CSI volume driver (Beta feature) +// Represents storage that is managed by an external CSI volume driver type CSIPersistentVolumeSource struct { // driver is the name of the driver to use for this volume. // Required. @@ -2476,6 +2530,7 @@ type TCPSocketAction struct { Host string `json:"host,omitempty" protobuf:"bytes,2,opt,name=host"` } +// GRPCAction specifies an action involving a GRPC service. type GRPCAction struct { // Port number of the gRPC service. Number must be in the range 1 to 65535. Port int32 `json:"port" protobuf:"bytes,1,opt,name=port"` @@ -2891,17 +2946,16 @@ type Container struct { // ProbeHandler defines a specific action that should be taken in a probe. // One and only one of the fields must be specified. type ProbeHandler struct { - // Exec specifies the action to take. + // Exec specifies a command to execute in the container. // +optional Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"` - // HTTPGet specifies the http request to perform. + // HTTPGet specifies an HTTP GET request to perform. // +optional HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"` - // TCPSocket specifies an action involving a TCP port. + // TCPSocket specifies a connection to a TCP port. // +optional TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` - - // GRPC specifies an action involving a GRPC port. + // GRPC specifies a GRPC HealthCheckRequest. // +optional GRPC *GRPCAction `json:"grpc,omitempty" protobuf:"bytes,4,opt,name=grpc"` } @@ -2909,18 +2963,18 @@ type ProbeHandler struct { // LifecycleHandler defines a specific action that should be taken in a lifecycle // hook. One and only one of the fields, except TCPSocket must be specified. type LifecycleHandler struct { - // Exec specifies the action to take. + // Exec specifies a command to execute in the container. // +optional Exec *ExecAction `json:"exec,omitempty" protobuf:"bytes,1,opt,name=exec"` - // HTTPGet specifies the http request to perform. + // HTTPGet specifies an HTTP GET request to perform. // +optional HTTPGet *HTTPGetAction `json:"httpGet,omitempty" protobuf:"bytes,2,opt,name=httpGet"` // Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - // for the backward compatibility. There are no validation of this field and - // lifecycle hooks will fail in runtime when tcp handler is specified. + // for backward compatibility. There is no validation of this field and + // lifecycle hooks will fail at runtime when it is specified. // +optional TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` - // Sleep represents the duration that the container should sleep before being terminated. + // Sleep represents a duration that the container should sleep. // +featureGate=PodLifecycleSleepAction // +optional Sleep *SleepAction `json:"sleep,omitempty" protobuf:"bytes,4,opt,name=sleep"` @@ -3071,7 +3125,7 @@ type ContainerStatus struct { // AllocatedResources represents the compute resources allocated for this container by the // node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission // and after successfully admitting desired pod resize. - // +featureGate=InPlacePodVerticalScaling + // +featureGate=InPlacePodVerticalScalingAllocatedStatus // +optional AllocatedResources ResourceList `json:"allocatedResources,omitempty" protobuf:"bytes,10,rep,name=allocatedResources,casttype=ResourceList,castkey=ResourceName"` // Resources represents the compute resource requests and limits that have been successfully @@ -3102,14 +3156,17 @@ type ContainerStatus struct { AllocatedResourcesStatus []ResourceStatus `json:"allocatedResourcesStatus,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,14,rep,name=allocatedResourcesStatus"` } +// ResourceStatus represents the status of a single resource allocated to a Pod. type ResourceStatus struct { - // Name of the resource. Must be unique within the pod and match one of the resources from the pod spec. + // Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. + // For DRA resources, the value must be "claim:/". + // When this status is reported about a container, the "claim_name" and "request" must match one of the claims of this container. // +required Name ResourceName `json:"name" protobuf:"bytes,1,opt,name=name"` - // List of unique Resources health. Each element in the list contains an unique resource ID and resource health. - // At a minimum, ResourceID must uniquely identify the Resource - // allocated to the Pod on the Node for the lifetime of a Pod. - // See ResourceID type for it's definition. + // List of unique resources health. Each element in the list contains an unique resource ID and its health. + // At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. + // If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. + // See ResourceID type definition for a specific format it has in various use cases. // +listType=map // +listMapKey=resourceID Resources []ResourceHealth `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` @@ -3126,16 +3183,16 @@ const ( // ResourceID is calculated based on the source of this resource health information. // For DevicePlugin: // -// deviceplugin:DeviceID, where DeviceID is from the Device structure of DevicePlugin's ListAndWatchResponse type: https://github.com/kubernetes/kubernetes/blob/eda1c780543a27c078450e2f17d674471e00f494/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto#L61-L73 +// DeviceID, where DeviceID is from the Device structure of DevicePlugin's ListAndWatchResponse type: https://github.com/kubernetes/kubernetes/blob/eda1c780543a27c078450e2f17d674471e00f494/staging/src/k8s.io/kubelet/pkg/apis/deviceplugin/v1alpha/api.proto#L61-L73 // // DevicePlugin ID is usually a constant for the lifetime of a Node and typically can be used to uniquely identify the device on the node. // For DRA: // -// dra://: such a device can be looked up in the information published by that DRA driver to learn more about it. It is designed to be globally unique in a cluster. +// //: such a device can be looked up in the information published by that DRA driver to learn more about it. It is designed to be globally unique in a cluster. type ResourceID string // ResourceHealth represents the health of a resource. It has the latest device health information. -// This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP. +// This is a part of KEP https://kep.k8s.io/4680. type ResourceHealth struct { // ResourceID is the unique identifier of the resource. See the ResourceID type for more information. ResourceID ResourceID `json:"resourceID" protobuf:"bytes,1,opt,name=resourceID"` @@ -3237,7 +3294,7 @@ const ( // during scheduling, for example due to nodeAffinity parsing errors. PodReasonSchedulerError = "SchedulerError" - // TerminationByKubelet reason in DisruptionTarget pod condition indicates that the termination + // PodReasonTerminationByKubelet reason in DisruptionTarget pod condition indicates that the termination // is initiated by kubelet PodReasonTerminationByKubelet = "TerminationByKubelet" @@ -4030,6 +4087,20 @@ type PodSpec struct { // +featureGate=DynamicResourceAllocation // +optional ResourceClaims []PodResourceClaim `json:"resourceClaims,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,39,rep,name=resourceClaims"` + // Resources is the total amount of CPU and Memory resources required by all + // containers in the pod. It supports specifying Requests and Limits for + // "cpu" and "memory" resource names only. ResourceClaims are not supported. + // + // This field enables fine-grained control over resource allocation for the + // entire pod, allowing resource sharing among containers in a pod. + // TODO: For beta graduation, expand this comment with a detailed explanation. + // + // This is an alpha field and requires enabling the PodLevelResources feature + // gate. + // + // +featureGate=PodLevelResources + // +optional + Resources *ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,40,opt,name=resources"` } // PodResourceClaim references exactly one ResourceClaim, either directly @@ -4308,6 +4379,22 @@ const ( SupplementalGroupsPolicyStrict SupplementalGroupsPolicy = "Strict" ) +// PodSELinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. +type PodSELinuxChangePolicy string + +const ( + // Recursive relabeling of all Pod volumes by the container runtime. + // This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + SELinuxChangePolicyRecursive PodSELinuxChangePolicy = "Recursive" + // MountOption mounts all eligible Pod volumes with `-o context` mount option. + // This requires all Pods that share the same volume to use the same SELinux label. + // It is not possible to share the same volume among privileged and unprivileged Pods. + // Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + // whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + // CSIDriver instance. Other volumes are always re-labelled recursively. + SELinuxChangePolicyMountOption PodSELinuxChangePolicy = "MountOption" +) + // PodSecurityContext holds pod-level security attributes and common container settings. // Some fields are also present in container.securityContext. Field values of // container.securityContext take precedence over field values of PodSecurityContext. @@ -4406,6 +4493,32 @@ type PodSecurityContext struct { // Note that this field cannot be set when spec.os.name is windows. // +optional AppArmorProfile *AppArmorProfile `json:"appArmorProfile,omitempty" protobuf:"bytes,11,opt,name=appArmorProfile"` + // seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + // It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + // Valid values are "MountOption" and "Recursive". + // + // "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + // This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + // + // "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + // This requires all Pods that share the same volume to use the same SELinux label. + // It is not possible to share the same volume among privileged and unprivileged Pods. + // Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + // whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + // CSIDriver instance. Other volumes are always re-labelled recursively. + // "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + // + // If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + // If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + // and "Recursive" for all other volumes. + // + // This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + // + // All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + // Note that this field cannot be set when spec.os.name is windows. + // +featureGate=SELinuxChangePolicy + // +optional + SELinuxChangePolicy *PodSELinuxChangePolicy `json:"seLinuxChangePolicy,omitempty" protobuf:"bytes,13,opt,name=seLinuxChangePolicy"` } // SeccompProfile defines a pod/container's seccomp profile settings. @@ -4513,8 +4626,10 @@ type PodDNSConfig struct { // PodDNSConfigOption defines DNS resolver options of a pod. type PodDNSConfigOption struct { + // Name is this DNS resolver option's name. // Required. Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + // Value is this DNS resolver option's value. // +optional Value *string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` } @@ -4807,24 +4922,45 @@ type PodStatus struct { // +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 + // Statuses of init containers in this pod. The most recent successful non-restartable // init container will have ready = true, the most recently started container will have // startTime set. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + // Each init container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status // +listType=atomic InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"` - // The list has one entry per container in the manifest. + // Statuses of containers in this pod. + // Each container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional // +listType=atomic 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://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes // +optional QOSClass PodQOSClass `json:"qosClass,omitempty" protobuf:"bytes,9,rep,name=qosClass"` - // Status for any ephemeral containers that have run in this pod. + + // Statuses for any ephemeral containers that have run in this pod. + // Each ephemeral container in the pod should have at most one status in this list, + // and all statuses should be for containers in the pod. + // However this is not enforced. + // If a status for a non-existent container is present in the list, or the list has duplicate names, + // the behavior of various Kubernetes components is not defined and those statuses might be + // ignored. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional // +listType=atomic EphemeralContainerStatuses []ContainerStatus `json:"ephemeralContainerStatuses,omitempty" protobuf:"bytes,13,rep,name=ephemeralContainerStatuses"` @@ -4867,6 +5003,7 @@ type PodStatusResult struct { // +genclient // +genclient:method=UpdateEphemeralContainers,verb=update,subresource=ephemeralcontainers +// +genclient:method=UpdateResize,verb=update,subresource=resize // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.0 @@ -5558,7 +5695,7 @@ type ServiceSpec struct { // not set, the implementation will apply its default routing strategy. If set // to "PreferClose", implementations should prioritize endpoints that are // topologically close (e.g., same zone). - // This is an alpha field and requires enabling ServiceTrafficDistribution feature. + // This is a beta field and requires enabling ServiceTrafficDistribution feature. // +featureGate=ServiceTrafficDistribution // +optional TrafficDistribution *string `json:"trafficDistribution,omitempty" protobuf:"bytes,23,opt,name=trafficDistribution"` @@ -5692,6 +5829,8 @@ type ServiceAccount struct { // Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. // Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". + // The "kubernetes.io/enforce-mountable-secrets" annotation is deprecated since v1.32. + // Prefer separate namespaces to isolate access to mounted secrets. // This field should not be used to find auto-generated service account token secrets for use outside of pods. // Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. // More info: https://kubernetes.io/docs/concepts/configuration/secret @@ -6092,7 +6231,7 @@ type NodeStatus struct { // +optional Phase NodePhase `json:"phase,omitempty" protobuf:"bytes,3,opt,name=phase,casttype=NodePhase"` // Conditions is an array of current observed node conditions. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#condition + // More info: https://kubernetes.io/docs/reference/node/node-status/#condition // +optional // +patchMergeKey=type // +patchStrategy=merge @@ -6101,7 +6240,7 @@ type NodeStatus struct { Conditions []NodeCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` // List of addresses reachable to the node. // Queried from cloud provider, if available. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses + // More info: https://kubernetes.io/docs/reference/node/node-status/#addresses // Note: This field is declared as mergeable, but the merge key is not sufficiently // unique, which can cause data corruption when it is merged. Callers should instead // use a full-replacement patch. See https://pr.k8s.io/79391 for an example. @@ -6119,7 +6258,7 @@ type NodeStatus struct { // +optional DaemonEndpoints NodeDaemonEndpoints `json:"daemonEndpoints,omitempty" protobuf:"bytes,6,opt,name=daemonEndpoints"` // Set of ids/uuids to uniquely identify the node. - // More info: https://kubernetes.io/docs/concepts/nodes/node/#info + // More info: https://kubernetes.io/docs/reference/node/node-status/#info // +optional NodeInfo NodeSystemInfo `json:"nodeInfo,omitempty" protobuf:"bytes,7,opt,name=nodeInfo"` // List of container images on this node @@ -6454,10 +6593,13 @@ type NamespaceCondition struct { Type NamespaceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=NamespaceConditionType"` // Status of the condition, one of True, False, Unknown. Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` + // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` + // Unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` + // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } @@ -6508,7 +6650,6 @@ type NamespaceList struct { // +k8s:prerelease-lifecycle-gen:introduced=1.0 // Binding ties one object to another; for example, a pod is bound to a node by a scheduler. -// Deprecated in 1.7, please use the bindings subresource of pods instead. type Binding struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -6528,6 +6669,15 @@ type Preconditions struct { UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` } +const ( + // LogStreamStdout is the stream type for stdout. + LogStreamStdout = "Stdout" + // LogStreamStderr is the stream type for stderr. + LogStreamStderr = "Stderr" + // LogStreamAll represents the combined stdout and stderr. + LogStreamAll = "All" +) + // +k8s:conversion-gen:explicit-from=net/url.Values // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.0 @@ -6562,7 +6712,8 @@ type PodLogOptions struct { // +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 + // logs are shown from the creation of the container or sinceSeconds or sinceTime. + // Note that when "TailLines" is specified, "Stream" can only be set to nil or "All". // +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 @@ -6579,6 +6730,14 @@ type PodLogOptions struct { // the actual log data coming from the real kubelet). // +optional InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"` + + // Specify which container log stream to return to the client. + // Acceptable values are "All", "Stdout" and "Stderr". If not specified, "All" is used, and both stdout and stderr + // are returned interleaved. + // Note that when "TailLines" is specified, "Stream" can only be set to nil or "All". + // +featureGate=PodLogsQuerySplitStreams + // +optional + Stream *string `json:"stream,omitempty" protobuf:"varint,10,opt,name=stream"` } // +k8s:conversion-gen:explicit-from=net/url.Values @@ -6779,13 +6938,23 @@ type ObjectReference struct { // LocalObjectReference contains enough information to let you locate the // referenced object inside the same namespace. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 2. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 3. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // +structType=atomic type LocalObjectReference struct { // Name of the referent. // This field is effectively required, but due to backwards compatibility is // allowed to be empty. Instances of this type with an empty value here are // almost certainly wrong. - // TODO: Add other useful fields. apiVersion, kind, uid? // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional // +default="" @@ -6796,6 +6965,20 @@ type LocalObjectReference struct { // TypedLocalObjectReference contains enough information to let you locate the // typed referenced object inside the same namespace. +// --- +// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. +// 1. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular +// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". +// Those cannot be well described when embedded. +// 2. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. +// 3. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity +// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple +// and the version of the actual struct is irrelevant. +// 4. We cannot easily change it. Because this type is embedded in many locations, updates to this type +// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. +// +// Instead of using this type, create a locally provided and used type that is well-focused on your reference. +// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // +structType=atomic type TypedLocalObjectReference struct { // APIGroup is the group for the resource being referenced. @@ -7729,7 +7912,6 @@ const ( ) // PortStatus represents the error condition of a service port - type PortStatus struct { // Port is the port number of the service port of which status is recorded here Port int32 `json:"port" protobuf:"varint,1,opt,name=port"` diff --git a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 950806ef8e..89ce3d2303 100644 --- a/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -117,7 +117,7 @@ func (AzureFileVolumeSource) SwaggerDoc() map[string]string { } var map_Binding = map[string]string{ - "": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + "": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "target": "The target object that you want to bind to the standard object.", } @@ -127,7 +127,7 @@ func (Binding) SwaggerDoc() map[string]string { } var map_CSIPersistentVolumeSource = map[string]string{ - "": "Represents storage that is managed by an external CSI volume driver (Beta feature)", + "": "Represents storage that is managed by an external CSI volume driver", "driver": "driver is the name of the driver to use for this volume. Required.", "volumeHandle": "volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", "readOnly": "readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", @@ -802,6 +802,7 @@ func (GCEPersistentDiskVolumeSource) SwaggerDoc() map[string]string { } var map_GRPCAction = map[string]string{ + "": "GRPCAction specifies an action involving a GRPC service.", "port": "Port number of the gRPC service. Number must be in the range 1 to 65535.", "service": "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.", } @@ -967,10 +968,10 @@ func (Lifecycle) SwaggerDoc() map[string]string { var map_LifecycleHandler = map[string]string{ "": "LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.", - "exec": "Exec specifies the action to take.", - "httpGet": "HTTPGet specifies the http request to perform.", - "tcpSocket": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.", - "sleep": "Sleep represents the duration that the container should sleep before being terminated.", + "exec": "Exec specifies a command to execute in the container.", + "httpGet": "HTTPGet specifies an HTTP GET request to perform.", + "tcpSocket": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.", + "sleep": "Sleep represents a duration that the container should sleep.", } func (LifecycleHandler) SwaggerDoc() map[string]string { @@ -1062,7 +1063,7 @@ func (LocalObjectReference) SwaggerDoc() map[string]string { } var map_LocalVolumeSource = map[string]string{ - "": "Local represents directly-attached storage with node affinity (Beta feature)", + "": "Local represents directly-attached storage with node affinity", "path": "path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", "fsType": "fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", } @@ -1104,9 +1105,12 @@ func (Namespace) SwaggerDoc() map[string]string { } var map_NamespaceCondition = map[string]string{ - "": "NamespaceCondition contains details about state of namespace.", - "type": "Type of namespace controller condition.", - "status": "Status of the condition, one of True, False, Unknown.", + "": "NamespaceCondition contains details about state of namespace.", + "type": "Type of namespace controller condition.", + "status": "Status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "Last time the condition transitioned from one status to another.", + "reason": "Unique, one-word, CamelCase reason for the condition's last transition.", + "message": "Human-readable message indicating details about last transition.", } func (NamespaceCondition) SwaggerDoc() map[string]string { @@ -1315,10 +1319,10 @@ var map_NodeStatus = map[string]string{ "capacity": "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/reference/node/node-status/#capacity", "allocatable": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", "phase": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", - "conditions": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", - "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", + "conditions": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/reference/node/node-status/#condition", + "addresses": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/reference/node/node-status/#addresses Note: This field is declared as mergeable, but the merge key is not sufficiently unique, which can cause data corruption when it is merged. Callers should instead use a full-replacement patch. See https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", "daemonEndpoints": "Endpoints of daemons running on the Node.", - "nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + "nodeInfo": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info", "images": "List of container images on this node", "volumesInUse": "List of attachable volumes in use (mounted) by the node.", "volumesAttached": "List of volumes that are attached to the node.", @@ -1398,6 +1402,8 @@ func (PersistentVolumeClaim) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimCondition = map[string]string{ "": "PersistentVolumeClaimCondition contains details about state of pvc", + "type": "Type is the type of the condition. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about", + "status": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required", "lastProbeTime": "lastProbeTime is the time we probed the condition.", "lastTransitionTime": "lastTransitionTime is the time the condition transitioned from one status to another.", "reason": "reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized.", @@ -1483,28 +1489,28 @@ 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: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "awsElasticBlockStore": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "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. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "awsElasticBlockStore": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", "hostPath": "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - "glusterfs": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "glusterfs": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", "nfs": "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "rbd": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "rbd": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", "iscsi": "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - "cinder": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "cephfs": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "cinder": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "cephfs": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", "fc": "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "flocker": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", - "flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "azureFile": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "vsphereVolume": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "quobyte": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "azureDisk": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "photonPersistentDisk": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "portworxVolume": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "scaleIO": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "flocker": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", + "flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", + "azureFile": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", + "vsphereVolume": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", + "quobyte": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", + "azureDisk": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", + "photonPersistentDisk": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", + "portworxVolume": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", + "scaleIO": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", "local": "local represents directly-attached storage with node affinity", - "storageos": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", - "csi": "csi represents storage that is handled by an external CSI driver (Beta feature).", + "storageos": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", + "csi": "csi represents storage that is handled by an external CSI driver.", } func (PersistentVolumeSource) SwaggerDoc() map[string]string { @@ -1634,8 +1640,9 @@ func (PodDNSConfig) SwaggerDoc() map[string]string { } var map_PodDNSConfigOption = map[string]string{ - "": "PodDNSConfigOption defines DNS resolver options of a pod.", - "name": "Required.", + "": "PodDNSConfigOption defines DNS resolver options of a pod.", + "name": "Name is this DNS resolver option's name. Required.", + "value": "Value is this DNS resolver option's value.", } func (PodDNSConfigOption) SwaggerDoc() map[string]string { @@ -1683,9 +1690,10 @@ var map_PodLogOptions = map[string]string{ "sinceSeconds": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", "sinceTime": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", "timestamps": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - "tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", + "tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", "limitBytes": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", "insecureSkipTLSVerifyBackend": "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", + "stream": "Specify which container log stream to return to the client. Acceptable values are \"All\", \"Stdout\" and \"Stderr\". If not specified, \"All\" is used, and both stdout and stderr are returned interleaved. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\".", } func (PodLogOptions) SwaggerDoc() map[string]string { @@ -1772,6 +1780,7 @@ var map_PodSecurityContext = map[string]string{ "fsGroupChangePolicy": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used. Note that this field cannot be set when spec.os.name is windows.", "seccompProfile": "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", "appArmorProfile": "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", + "seLinuxChangePolicy": "seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. Valid values are \"MountOption\" and \"Recursive\".\n\n\"Recursive\" means relabeling of all files on all Pod volumes by the container runtime. This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node.\n\n\"MountOption\" mounts all eligible Pod volumes with `-o context` mount option. This requires all Pods that share the same volume to use the same SELinux label. It is not possible to share the same volume among privileged and unprivileged Pods. Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their CSIDriver instance. Other volumes are always re-labelled recursively. \"MountOption\" value is allowed only when SELinuxMount feature gate is enabled.\n\nIf not specified and SELinuxMount feature gate is enabled, \"MountOption\" is used. If not specified and SELinuxMount feature gate is disabled, \"MountOption\" is used for ReadWriteOncePod volumes and \"Recursive\" for all other volumes.\n\nThis field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers.\n\nAll Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. Note that this field cannot be set when spec.os.name is windows.", } func (PodSecurityContext) SwaggerDoc() map[string]string { @@ -1828,6 +1837,7 @@ var map_PodSpec = map[string]string{ "hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.", "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.", "resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + "resources": "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\" and \"memory\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1846,10 +1856,10 @@ var map_PodStatus = map[string]string{ "podIP": "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", "podIPs": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.", "startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", - "initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - "containerStatuses": "The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "initContainerStatuses": "Statuses of init containers in this pod. The most recent successful non-restartable init container will have ready = true, the most recently started container will have startTime set. Each init container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status", + "containerStatuses": "Statuses of containers in this pod. Each container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes", - "ephemeralContainerStatuses": "Status for any ephemeral containers that have run in this pod.", + "ephemeralContainerStatuses": "Statuses for any ephemeral containers that have run in this pod. Each ephemeral container in the pod should have at most one status in this list, and all statuses should be for containers in the pod. However this is not enforced. If a status for a non-existent container is present in the list, or the list has duplicate names, the behavior of various Kubernetes components is not defined and those statuses might be ignored. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "resize": "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\"", "resourceClaimStatuses": "Status of resource claims.", } @@ -1899,6 +1909,7 @@ func (PodTemplateSpec) SwaggerDoc() map[string]string { } var map_PortStatus = map[string]string{ + "": "PortStatus represents the error condition of a service port", "port": "Port is the port number of the service port of which status is recorded here", "protocol": "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"", "error": "Error is to record the problem with the service port The format of the error shall comply with the following rules: - built-in error values shall be specified in this file and those shall use\n CamelCase names\n- cloud provider specific error values must have names that comply with the\n format foo.example.com/CamelCase.", @@ -1966,10 +1977,10 @@ func (Probe) SwaggerDoc() map[string]string { var map_ProbeHandler = map[string]string{ "": "ProbeHandler defines a specific action that should be taken in a probe. One and only one of the fields must be specified.", - "exec": "Exec specifies the action to take.", - "httpGet": "HTTPGet specifies the http request to perform.", - "tcpSocket": "TCPSocket specifies an action involving a TCP port.", - "grpc": "GRPC specifies an action involving a GRPC port.", + "exec": "Exec specifies a command to execute in the container.", + "httpGet": "HTTPGet specifies an HTTP GET request to perform.", + "tcpSocket": "TCPSocket specifies a connection to a TCP port.", + "grpc": "GRPC specifies a GRPC HealthCheckRequest.", } func (ProbeHandler) SwaggerDoc() map[string]string { @@ -2125,7 +2136,7 @@ func (ResourceFieldSelector) SwaggerDoc() map[string]string { } var map_ResourceHealth = map[string]string{ - "": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680 and historical health changes are planned to be added in future iterations of a KEP.", + "": "ResourceHealth represents the health of a resource. It has the latest device health information. This is a part of KEP https://kep.k8s.io/4680.", "resourceID": "ResourceID is the unique identifier of the resource. See the ResourceID type for more information.", "health": "Health of the resource. can be one of:\n - Healthy: operates as normal\n - Unhealthy: reported unhealthy. We consider this a temporary health issue\n since we do not have a mechanism today to distinguish\n temporary and permanent issues.\n - Unknown: The status cannot be determined.\n For example, Device Plugin got unregistered and hasn't been re-registered since.\n\nIn future we may want to introduce the PermanentlyUnhealthy Status.", } @@ -2188,8 +2199,9 @@ func (ResourceRequirements) SwaggerDoc() map[string]string { } var map_ResourceStatus = map[string]string{ - "name": "Name of the resource. Must be unique within the pod and match one of the resources from the pod spec.", - "resources": "List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it's definition.", + "": "ResourceStatus represents the status of a single resource allocated to a Pod.", + "name": "Name of the resource. Must be unique within the pod and in case of non-DRA resource, match one of the resources from the pod spec. For DRA resources, the value must be \"claim:/\". When this status is reported about a container, the \"claim_name\" and \"request\" must match one of the claims of this container.", + "resources": "List of unique resources health. Each element in the list contains an unique resource ID and its health. At a minimum, for the lifetime of a Pod, resource ID must uniquely identify the resource allocated to the Pod on the Node. If other Pod on the same Node reports the status with the same resource ID, it must be the same resource they share. See ResourceID type definition for a specific format it has in various use cases.", } func (ResourceStatus) SwaggerDoc() map[string]string { @@ -2391,7 +2403,7 @@ 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: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "secrets": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "secrets": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". The \"kubernetes.io/enforce-mountable-secrets\" annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", "imagePullSecrets": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", } @@ -2475,7 +2487,7 @@ var map_ServiceSpec = map[string]string{ "allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", "loadBalancerClass": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", "internalTrafficPolicy": "InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).", - "trafficDistribution": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.", + "trafficDistribution": "TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to \"PreferClose\", implementations should prioritize endpoints that are topologically close (e.g., same zone). This is a beta field and requires enabling ServiceTrafficDistribution feature.", } func (ServiceSpec) SwaggerDoc() map[string]string { @@ -2628,6 +2640,7 @@ func (TypedLocalObjectReference) SwaggerDoc() map[string]string { } var map_TypedObjectReference = map[string]string{ + "": "TypedObjectReference contains enough information to let you locate the typed referenced object", "apiGroup": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", "kind": "Kind is the type of resource being referenced", "name": "Name is the name of resource being referenced", @@ -2720,32 +2733,32 @@ var map_VolumeSource = map[string]string{ "": "Represents the source of a volume to mount. Only one of its members may be specified.", "hostPath": "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", "emptyDir": "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - "gcePersistentDisk": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "awsElasticBlockStore": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "gitRepo": "gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + "gcePersistentDisk": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "awsElasticBlockStore": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "gitRepo": "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", "secret": "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", "nfs": "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", "iscsi": "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", - "glusterfs": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "glusterfs": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", "persistentVolumeClaim": "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "rbd": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", - "flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "cinder": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/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", + "rbd": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", + "flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", + "cinder": "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "cephfs": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", + "flocker": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", "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.", + "azureFile": "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", "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", + "vsphereVolume": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", + "quobyte": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", + "azureDisk": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", + "photonPersistentDisk": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", "projected": "projected items for all in one resources secrets, configmaps, and downward API", - "portworxVolume": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "scaleIO": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "storageos": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - "csi": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + "portworxVolume": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", + "scaleIO": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", + "storageos": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", + "csi": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", "ephemeral": "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", "image": "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath). The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", } diff --git a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index 3d23f7f620..3f669092ef 100644 --- a/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -3935,6 +3935,11 @@ func (in *PodLogOptions) DeepCopyInto(out *PodLogOptions) { *out = new(int64) **out = **in } + if in.Stream != nil { + in, out := &in.Stream, &out.Stream + *out = new(string) + **out = **in + } return } @@ -4169,6 +4174,11 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = new(AppArmorProfile) (*in).DeepCopyInto(*out) } + if in.SELinuxChangePolicy != nil { + in, out := &in.SELinuxChangePolicy, &out.SELinuxChangePolicy + *out = new(PodSELinuxChangePolicy) + **out = **in + } return } @@ -4361,6 +4371,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(ResourceRequirements) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/k8s.io/api/resource/v1alpha3/doc.go b/vendor/k8s.io/api/resource/v1alpha3/doc.go index aeb66561fb..ffc21307d0 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/doc.go +++ b/vendor/k8s.io/api/resource/v1alpha3/doc.go @@ -17,7 +17,7 @@ limitations under the License. // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package - +// +k8s:prerelease-lifecycle-gen=true // +groupName=resource.k8s.io // Package v1alpha3 is the v1alpha3 version of the resource API. diff --git a/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go b/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go index 4ac01cc6f3..540f7b8184 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go +++ b/vendor/k8s.io/api/resource/v1alpha3/generated.pb.go @@ -26,8 +26,9 @@ import ( proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - v1 "k8s.io/api/core/v1" + v11 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" @@ -48,10 +49,38 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } +func (*AllocatedDeviceStatus) ProtoMessage() {} +func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{0} +} +func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src) +} +func (m *AllocatedDeviceStatus) XXX_Size() int { + return m.Size() +} +func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() { + xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo + func (m *AllocationResult) Reset() { *m = AllocationResult{} } func (*AllocationResult) ProtoMessage() {} func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{0} + return fileDescriptor_66649ee9bbcd89d2, []int{1} } func (m *AllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +108,7 @@ var xxx_messageInfo_AllocationResult proto.InternalMessageInfo func (m *BasicDevice) Reset() { *m = BasicDevice{} } func (*BasicDevice) ProtoMessage() {} func (*BasicDevice) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{1} + return fileDescriptor_66649ee9bbcd89d2, []int{2} } func (m *BasicDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -107,7 +136,7 @@ var xxx_messageInfo_BasicDevice proto.InternalMessageInfo func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } func (*CELDeviceSelector) ProtoMessage() {} func (*CELDeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{2} + return fileDescriptor_66649ee9bbcd89d2, []int{3} } func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +164,7 @@ var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo func (m *Device) Reset() { *m = Device{} } func (*Device) ProtoMessage() {} func (*Device) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{3} + return fileDescriptor_66649ee9bbcd89d2, []int{4} } func (m *Device) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +192,7 @@ var xxx_messageInfo_Device proto.InternalMessageInfo func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } func (*DeviceAllocationConfiguration) ProtoMessage() {} func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{4} + return fileDescriptor_66649ee9bbcd89d2, []int{5} } func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +220,7 @@ var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } func (*DeviceAllocationResult) ProtoMessage() {} func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{5} + return fileDescriptor_66649ee9bbcd89d2, []int{6} } func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +248,7 @@ var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } func (*DeviceAttribute) ProtoMessage() {} func (*DeviceAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{6} + return fileDescriptor_66649ee9bbcd89d2, []int{7} } func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +276,7 @@ var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } func (*DeviceClaim) ProtoMessage() {} func (*DeviceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{7} + return fileDescriptor_66649ee9bbcd89d2, []int{8} } func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +304,7 @@ var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } func (*DeviceClaimConfiguration) ProtoMessage() {} func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{8} + return fileDescriptor_66649ee9bbcd89d2, []int{9} } func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -303,7 +332,7 @@ var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo func (m *DeviceClass) Reset() { *m = DeviceClass{} } func (*DeviceClass) ProtoMessage() {} func (*DeviceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{9} + return fileDescriptor_66649ee9bbcd89d2, []int{10} } func (m *DeviceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +360,7 @@ var xxx_messageInfo_DeviceClass proto.InternalMessageInfo func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } func (*DeviceClassConfiguration) ProtoMessage() {} func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{10} + return fileDescriptor_66649ee9bbcd89d2, []int{11} } func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +388,7 @@ var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } func (*DeviceClassList) ProtoMessage() {} func (*DeviceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{11} + return fileDescriptor_66649ee9bbcd89d2, []int{12} } func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +416,7 @@ var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } func (*DeviceClassSpec) ProtoMessage() {} func (*DeviceClassSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{12} + return fileDescriptor_66649ee9bbcd89d2, []int{13} } func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +444,7 @@ var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } func (*DeviceConfiguration) ProtoMessage() {} func (*DeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{13} + return fileDescriptor_66649ee9bbcd89d2, []int{14} } func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +472,7 @@ var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } func (*DeviceConstraint) ProtoMessage() {} func (*DeviceConstraint) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{14} + return fileDescriptor_66649ee9bbcd89d2, []int{15} } func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +500,7 @@ var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } func (*DeviceRequest) ProtoMessage() {} func (*DeviceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{15} + return fileDescriptor_66649ee9bbcd89d2, []int{16} } func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +528,7 @@ var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } func (*DeviceRequestAllocationResult) ProtoMessage() {} func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{16} + return fileDescriptor_66649ee9bbcd89d2, []int{17} } func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +556,7 @@ var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } func (*DeviceSelector) ProtoMessage() {} func (*DeviceSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{17} + return fileDescriptor_66649ee9bbcd89d2, []int{18} } func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -552,43 +581,15 @@ func (m *DeviceSelector) XXX_DiscardUnknown() { var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo -func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } -func (*OpaqueDeviceConfiguration) ProtoMessage() {} -func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{18} -} -func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { - xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) -} -func (m *OpaqueDeviceConfiguration) XXX_Size() int { - return m.Size() -} -func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { - xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) -} - -var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo - -func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } -func (*PodSchedulingContext) ProtoMessage() {} -func (*PodSchedulingContext) Descriptor() ([]byte, []int) { +func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } +func (*NetworkDeviceData) ProtoMessage() {} +func (*NetworkDeviceData) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{19} } -func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { +func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PodSchedulingContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -596,83 +597,27 @@ func (m *PodSchedulingContext) XXX_Marshal(b []byte, deterministic bool) ([]byte } return b[:n], nil } -func (m *PodSchedulingContext) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSchedulingContext.Merge(m, src) +func (m *NetworkDeviceData) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkDeviceData.Merge(m, src) } -func (m *PodSchedulingContext) XXX_Size() int { +func (m *NetworkDeviceData) XXX_Size() int { return m.Size() } -func (m *PodSchedulingContext) XXX_DiscardUnknown() { - xxx_messageInfo_PodSchedulingContext.DiscardUnknown(m) +func (m *NetworkDeviceData) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m) } -var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo +var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo -func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } -func (*PodSchedulingContextList) ProtoMessage() {} -func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { +func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } +func (*OpaqueDeviceConfiguration) ProtoMessage() {} +func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{20} } -func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSchedulingContextList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSchedulingContextList) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSchedulingContextList.Merge(m, src) -} -func (m *PodSchedulingContextList) XXX_Size() int { - return m.Size() -} -func (m *PodSchedulingContextList) XXX_DiscardUnknown() { - xxx_messageInfo_PodSchedulingContextList.DiscardUnknown(m) -} - -var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo - -func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } -func (*PodSchedulingContextSpec) ProtoMessage() {} -func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{21} -} -func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PodSchedulingContextSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *PodSchedulingContextSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSchedulingContextSpec.Merge(m, src) -} -func (m *PodSchedulingContextSpec) XXX_Size() int { - return m.Size() -} -func (m *PodSchedulingContextSpec) XXX_DiscardUnknown() { - xxx_messageInfo_PodSchedulingContextSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo - -func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } -func (*PodSchedulingContextStatus) ProtoMessage() {} -func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{22} -} -func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { +func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PodSchedulingContextStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -680,22 +625,22 @@ func (m *PodSchedulingContextStatus) XXX_Marshal(b []byte, deterministic bool) ( } return b[:n], nil } -func (m *PodSchedulingContextStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_PodSchedulingContextStatus.Merge(m, src) +func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) } -func (m *PodSchedulingContextStatus) XXX_Size() int { +func (m *OpaqueDeviceConfiguration) XXX_Size() int { return m.Size() } -func (m *PodSchedulingContextStatus) XXX_DiscardUnknown() { - xxx_messageInfo_PodSchedulingContextStatus.DiscardUnknown(m) +func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) } -var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo +var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{23} + return fileDescriptor_66649ee9bbcd89d2, []int{21} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -723,7 +668,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{24} + return fileDescriptor_66649ee9bbcd89d2, []int{22} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -751,7 +696,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{25} + return fileDescriptor_66649ee9bbcd89d2, []int{23} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -776,38 +721,10 @@ func (m *ResourceClaimList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo -func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } -func (*ResourceClaimSchedulingStatus) ProtoMessage() {} -func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{26} -} -func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimSchedulingStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimSchedulingStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimSchedulingStatus.Merge(m, src) -} -func (m *ResourceClaimSchedulingStatus) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimSchedulingStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimSchedulingStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo - func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{27} + return fileDescriptor_66649ee9bbcd89d2, []int{24} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,7 +752,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{28} + return fileDescriptor_66649ee9bbcd89d2, []int{25} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -863,7 +780,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{29} + return fileDescriptor_66649ee9bbcd89d2, []int{26} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -891,7 +808,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{30} + return fileDescriptor_66649ee9bbcd89d2, []int{27} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -919,7 +836,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{31} + return fileDescriptor_66649ee9bbcd89d2, []int{28} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -947,7 +864,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo func (m *ResourcePool) Reset() { *m = ResourcePool{} } func (*ResourcePool) ProtoMessage() {} func (*ResourcePool) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{32} + return fileDescriptor_66649ee9bbcd89d2, []int{29} } func (m *ResourcePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -975,7 +892,7 @@ var xxx_messageInfo_ResourcePool proto.InternalMessageInfo func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } func (*ResourceSlice) ProtoMessage() {} func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{33} + return fileDescriptor_66649ee9bbcd89d2, []int{30} } func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1003,7 +920,7 @@ var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } func (*ResourceSliceList) ProtoMessage() {} func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{34} + return fileDescriptor_66649ee9bbcd89d2, []int{31} } func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1031,7 +948,7 @@ var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } func (*ResourceSliceSpec) ProtoMessage() {} func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{35} + return fileDescriptor_66649ee9bbcd89d2, []int{32} } func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1057,6 +974,7 @@ func (m *ResourceSliceSpec) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo func init() { + proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1alpha3.AllocatedDeviceStatus") proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha3.AllocationResult") proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice") proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.AttributesEntry") @@ -1077,15 +995,11 @@ func init() { proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequest") proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequestAllocationResult") proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceSelector") + proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1alpha3.NetworkDeviceData") proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.OpaqueDeviceConfiguration") - proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContext") - proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextList") - proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextSpec") - proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextStatus") proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim") proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimConsumerReference") proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimList") - proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSchedulingStatus") proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSpec") proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimStatus") proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplate") @@ -1102,138 +1016,208 @@ func init() { } var fileDescriptor_66649ee9bbcd89d2 = []byte{ - // 2085 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0xcd, 0x6f, 0x1c, 0x57, - 0x3d, 0xb3, 0xeb, 0xcf, 0x9f, 0xbf, 0x9f, 0x93, 0xe0, 0x9a, 0x66, 0x37, 0x99, 0x22, 0x70, 0xda, - 0x74, 0xb6, 0x71, 0x4b, 0x1b, 0x5a, 0x90, 0xf0, 0xd8, 0x6e, 0xe4, 0x28, 0x1f, 0xce, 0xdb, 0x26, - 0x34, 0x50, 0x4a, 0x9f, 0x67, 0x9f, 0xed, 0xc1, 0xb3, 0x33, 0xd3, 0x99, 0x37, 0x26, 0x16, 0x12, - 0x8a, 0xb8, 0x70, 0x8b, 0x7a, 0xe5, 0x80, 0xb8, 0x21, 0x21, 0x0e, 0x70, 0xe0, 0x88, 0x54, 0x24, - 0x90, 0xc8, 0x31, 0x08, 0x0e, 0x3d, 0x2d, 0xcd, 0x22, 0xfe, 0x89, 0x5c, 0x40, 0xef, 0xcd, 0x9b, - 0x4f, 0xcf, 0x6c, 0x66, 0xa3, 0xca, 0x2a, 0x37, 0xcf, 0xef, 0xfb, 0xfd, 0xbe, 0xdf, 0x5b, 0xc3, - 0xa5, 0x83, 0x2b, 0xbe, 0x66, 0x3a, 0x2d, 0xe2, 0x9a, 0x2d, 0x8f, 0xfa, 0x4e, 0xe0, 0x19, 0xb4, - 0x75, 0x78, 0x99, 0x58, 0xee, 0x3e, 0x79, 0xbd, 0xb5, 0x47, 0x6d, 0xea, 0x11, 0x46, 0x3b, 0x9a, - 0xeb, 0x39, 0xcc, 0x41, 0x2f, 0x86, 0xd4, 0x1a, 0x71, 0x4d, 0x2d, 0xa2, 0xd6, 0x22, 0xea, 0xe5, - 0x57, 0xf7, 0x4c, 0xb6, 0x1f, 0xec, 0x68, 0x86, 0xd3, 0x6d, 0xed, 0x39, 0x7b, 0x4e, 0x4b, 0x30, - 0xed, 0x04, 0xbb, 0xe2, 0x4b, 0x7c, 0x88, 0xbf, 0x42, 0x61, 0xcb, 0x6a, 0x4a, 0xb5, 0xe1, 0x78, - 0x5c, 0x6d, 0x5e, 0xe1, 0xf2, 0x1b, 0x09, 0x4d, 0x97, 0x18, 0xfb, 0xa6, 0x4d, 0xbd, 0xa3, 0x96, - 0x7b, 0xb0, 0x97, 0xb5, 0x77, 0x18, 0x2e, 0xbf, 0xd5, 0xa5, 0x8c, 0x14, 0xe9, 0x6a, 0x95, 0x71, - 0x79, 0x81, 0xcd, 0xcc, 0xee, 0x71, 0x35, 0x6f, 0x3e, 0x8b, 0xc1, 0x37, 0xf6, 0x69, 0x97, 0xe4, - 0xf9, 0xd4, 0xff, 0x2a, 0x30, 0xbf, 0x66, 0x59, 0x8e, 0x41, 0x98, 0xe9, 0xd8, 0x98, 0xfa, 0x81, - 0xc5, 0xd0, 0x8f, 0x60, 0xbc, 0x43, 0x0f, 0x4d, 0x83, 0xfa, 0x4b, 0xca, 0x79, 0x65, 0x65, 0x6a, - 0xf5, 0x0d, 0x6d, 0x90, 0xb3, 0xb5, 0x0d, 0x41, 0x9c, 0x17, 0xa3, 0xcf, 0x3d, 0xea, 0x35, 0x4f, - 0xf5, 0x7b, 0xcd, 0xf1, 0x10, 0xef, 0xe3, 0x48, 0x2a, 0xba, 0x0b, 0xd3, 0xb6, 0xd3, 0xa1, 0x6d, - 0x6a, 0x51, 0x83, 0x39, 0xde, 0x52, 0x5d, 0x68, 0x39, 0x9f, 0xd6, 0xc2, 0xa3, 0xa0, 0x1d, 0x5e, - 0xd6, 0x6e, 0xa6, 0xe8, 0xf4, 0xf9, 0x7e, 0xaf, 0x39, 0x9d, 0x86, 0xe0, 0x8c, 0x1c, 0xb4, 0x0a, - 0x60, 0x38, 0x36, 0xf3, 0x1c, 0xcb, 0xa2, 0xde, 0xd2, 0xc8, 0x79, 0x65, 0x65, 0x52, 0x47, 0xd2, - 0x0a, 0x58, 0x8f, 0x31, 0x38, 0x45, 0xa5, 0x7e, 0x5e, 0x87, 0x29, 0x9d, 0xf8, 0xa6, 0x11, 0x5a, - 0x89, 0x7e, 0x06, 0x40, 0x18, 0xf3, 0xcc, 0x9d, 0x80, 0x89, 0xf3, 0xd7, 0x57, 0xa6, 0x56, 0xbf, - 0x35, 0xf8, 0xfc, 0x29, 0x76, 0x6d, 0x2d, 0xe6, 0xdd, 0xb4, 0x99, 0x77, 0xa4, 0xbf, 0x14, 0xa9, - 0x4f, 0x10, 0x3f, 0xff, 0x57, 0x73, 0xe6, 0x76, 0x40, 0x2c, 0x73, 0xd7, 0xa4, 0x9d, 0x9b, 0xa4, - 0x4b, 0x71, 0x4a, 0x23, 0x3a, 0x84, 0x09, 0x83, 0xb8, 0xc4, 0x30, 0xd9, 0xd1, 0x52, 0x4d, 0x68, - 0x7f, 0xab, 0xba, 0xf6, 0x75, 0xc9, 0x19, 0xea, 0xbe, 0x20, 0x75, 0x4f, 0x44, 0xe0, 0xe3, 0x9a, - 0x63, 0x5d, 0xcb, 0x16, 0xcc, 0xe5, 0x6c, 0x47, 0xf3, 0x50, 0x3f, 0xa0, 0x47, 0x22, 0x07, 0x26, - 0x31, 0xff, 0x13, 0xad, 0xc3, 0xe8, 0x21, 0xb1, 0x02, 0xba, 0x54, 0x13, 0x11, 0x7b, 0xb5, 0x52, - 0x5e, 0x44, 0x52, 0x71, 0xc8, 0xfb, 0x76, 0xed, 0x8a, 0xb2, 0x7c, 0x00, 0x33, 0x19, 0x5b, 0x0b, - 0x74, 0x6d, 0x64, 0x75, 0x69, 0x29, 0x5d, 0x71, 0x8a, 0x6b, 0xee, 0xc1, 0x5e, 0x56, 0xf9, 0xed, - 0x80, 0xd8, 0xcc, 0x64, 0x47, 0x29, 0x65, 0xea, 0x55, 0x58, 0x58, 0xdf, 0xbc, 0x1e, 0x5a, 0x93, - 0xce, 0x15, 0x7a, 0xdf, 0xf5, 0xa8, 0xef, 0x9b, 0x8e, 0x1d, 0xea, 0x4d, 0x72, 0x65, 0x33, 0xc6, - 0xe0, 0x14, 0x95, 0x7a, 0x08, 0x63, 0x32, 0x4b, 0xce, 0xc3, 0x88, 0x4d, 0xba, 0x54, 0xf2, 0x4d, - 0x4b, 0xbe, 0x11, 0xe1, 0x53, 0x81, 0x41, 0xd7, 0x60, 0x74, 0x87, 0x47, 0x46, 0x9a, 0x7f, 0xb1, - 0x72, 0x10, 0xf5, 0xc9, 0x7e, 0xaf, 0x39, 0x2a, 0x00, 0x38, 0x14, 0xa1, 0x3e, 0xac, 0xc1, 0xb9, - 0x7c, 0x91, 0xad, 0x3b, 0xf6, 0xae, 0xb9, 0x17, 0x78, 0xe2, 0x03, 0x7d, 0x17, 0xc6, 0x42, 0x91, - 0xd2, 0xa2, 0x15, 0x69, 0xd1, 0x58, 0x5b, 0x40, 0x9f, 0xf6, 0x9a, 0x67, 0xf3, 0xac, 0x21, 0x06, - 0x4b, 0x3e, 0xb4, 0x02, 0x13, 0x1e, 0xfd, 0x38, 0xa0, 0x3e, 0xf3, 0x45, 0xde, 0x4d, 0xea, 0xd3, - 0x3c, 0x75, 0xb0, 0x84, 0xe1, 0x18, 0x8b, 0x1e, 0x28, 0xb0, 0x18, 0x56, 0x72, 0xc6, 0x06, 0x59, - 0xc5, 0x97, 0xab, 0xe4, 0x44, 0x86, 0x51, 0xff, 0xaa, 0x34, 0x76, 0xb1, 0x00, 0x89, 0x8b, 0x54, - 0xa9, 0xff, 0x51, 0xe0, 0x6c, 0x71, 0xd7, 0x41, 0xbb, 0x30, 0xee, 0x89, 0xbf, 0xa2, 0xe2, 0x7d, - 0xa7, 0x8a, 0x41, 0xf2, 0x98, 0xe5, 0x3d, 0x2c, 0xfc, 0xf6, 0x71, 0x24, 0x1c, 0x19, 0x30, 0x66, - 0x08, 0x9b, 0x64, 0x95, 0xbe, 0x33, 0x5c, 0x8f, 0xcc, 0x7a, 0x60, 0x36, 0x0a, 0x57, 0x08, 0xc6, - 0x52, 0xb4, 0xfa, 0x5b, 0x05, 0xe6, 0x72, 0x55, 0x84, 0x1a, 0x50, 0x37, 0x6d, 0x26, 0xd2, 0xaa, - 0x1e, 0xc6, 0x68, 0xcb, 0x66, 0x77, 0x79, 0xb2, 0x63, 0x8e, 0x40, 0x17, 0x60, 0x64, 0xc7, 0x71, - 0x2c, 0x11, 0x8e, 0x09, 0x7d, 0xa6, 0xdf, 0x6b, 0x4e, 0xea, 0x8e, 0x63, 0x85, 0x14, 0x02, 0x85, - 0xbe, 0x01, 0x63, 0x3e, 0xf3, 0x4c, 0x7b, 0x4f, 0xf6, 0xc8, 0xb9, 0x7e, 0xaf, 0x39, 0xd5, 0x16, - 0x90, 0x90, 0x4c, 0xa2, 0xd1, 0xcb, 0x30, 0x7e, 0x48, 0x3d, 0x51, 0x21, 0xa3, 0x82, 0x52, 0x74, - 0xe0, 0xbb, 0x21, 0x28, 0x24, 0x8d, 0x08, 0xd4, 0xdf, 0xd7, 0x60, 0x4a, 0x06, 0xd0, 0x22, 0x66, - 0x17, 0xdd, 0x4b, 0x25, 0x54, 0x18, 0x89, 0x57, 0x86, 0x88, 0x84, 0x3e, 0x1f, 0x35, 0xaf, 0x82, - 0x0c, 0xa4, 0x30, 0x65, 0x38, 0xb6, 0xcf, 0x3c, 0x62, 0xda, 0x32, 0x5d, 0xb3, 0x0d, 0x62, 0x50, - 0xe2, 0x49, 0x36, 0x7d, 0x51, 0x2a, 0x98, 0x4a, 0x60, 0x3e, 0x4e, 0xcb, 0x45, 0x1f, 0xc6, 0x21, - 0xae, 0x0b, 0x0d, 0x6f, 0x56, 0xd2, 0xc0, 0x0f, 0x5f, 0x2d, 0xba, 0x7f, 0x53, 0x60, 0xa9, 0x8c, - 0x29, 0x53, 0x8f, 0xca, 0x73, 0xd5, 0x63, 0xed, 0xe4, 0xea, 0xf1, 0xcf, 0x4a, 0x2a, 0xf6, 0xbe, - 0x8f, 0x3e, 0x82, 0x09, 0xbe, 0xda, 0x74, 0x08, 0x23, 0x72, 0x85, 0x78, 0x6d, 0x50, 0xfb, 0xf6, - 0x35, 0x4e, 0xcd, 0xc7, 0xfd, 0xad, 0x9d, 0x1f, 0x53, 0x83, 0xdd, 0xa0, 0x8c, 0x24, 0xcd, 0x38, - 0x81, 0xe1, 0x58, 0x2a, 0xba, 0x05, 0x23, 0xbe, 0x4b, 0x8d, 0x61, 0x06, 0x91, 0x30, 0xad, 0xed, - 0x52, 0x23, 0xe9, 0xd7, 0xfc, 0x0b, 0x0b, 0x41, 0xea, 0xaf, 0xd2, 0xc1, 0xf0, 0xfd, 0x6c, 0x30, - 0xca, 0x5c, 0xac, 0x9c, 0x9c, 0x8b, 0x3f, 0x8d, 0x5b, 0x81, 0xb0, 0xef, 0xba, 0xe9, 0x33, 0xf4, - 0xc1, 0x31, 0x37, 0x6b, 0xd5, 0xdc, 0xcc, 0xb9, 0x85, 0x93, 0xe3, 0x2a, 0x8b, 0x20, 0x29, 0x17, - 0xdf, 0x84, 0x51, 0x93, 0xd1, 0x6e, 0x54, 0x5f, 0x17, 0x2b, 0xfb, 0x58, 0x9f, 0x91, 0x52, 0x47, - 0xb7, 0x38, 0x3f, 0x0e, 0xc5, 0xa8, 0xbf, 0xab, 0x65, 0x4e, 0xc0, 0x7d, 0x8f, 0x7e, 0x08, 0x93, - 0xbe, 0x9c, 0xc8, 0x51, 0x97, 0xb8, 0x54, 0x45, 0x4f, 0xbc, 0x12, 0x2e, 0x48, 0x55, 0x93, 0x11, - 0xc4, 0xc7, 0x89, 0xc4, 0x54, 0x05, 0xd7, 0x86, 0xaa, 0xe0, 0x5c, 0xfc, 0xcb, 0x2a, 0x18, 0xdd, - 0x83, 0x19, 0x3f, 0x30, 0x19, 0xd9, 0xb1, 0x28, 0x5f, 0x4b, 0xfd, 0xca, 0x9b, 0xec, 0x42, 0xbf, - 0xd7, 0x9c, 0x69, 0xa7, 0x59, 0x71, 0x56, 0x92, 0xea, 0x41, 0x51, 0x6e, 0xa0, 0x1f, 0xc0, 0x98, - 0xe3, 0x92, 0x8f, 0x03, 0x2a, 0x03, 0xfe, 0x8c, 0xe5, 0xf0, 0x96, 0xa0, 0x2d, 0xca, 0x40, 0xe0, - 0xc7, 0x09, 0xd1, 0x58, 0x8a, 0x54, 0x1f, 0x2a, 0x30, 0x9f, 0xef, 0x93, 0x43, 0x34, 0xa2, 0x6d, - 0x98, 0xed, 0x12, 0x66, 0xec, 0xc7, 0xb3, 0x4a, 0x54, 0xe7, 0xa4, 0xbe, 0xd2, 0xef, 0x35, 0x67, - 0x6f, 0x64, 0x30, 0x4f, 0x7b, 0x4d, 0xf4, 0x6e, 0x60, 0x59, 0x47, 0xd9, 0x75, 0x34, 0xc7, 0xaf, - 0xfe, 0xa2, 0x0e, 0x33, 0x99, 0xb1, 0x50, 0x61, 0xf1, 0x5a, 0x83, 0xb9, 0x4e, 0x12, 0x47, 0x8e, - 0x90, 0x66, 0x7c, 0x45, 0x12, 0xa7, 0x93, 0x50, 0xf0, 0xe5, 0xe9, 0xb3, 0x59, 0x59, 0xff, 0xc2, - 0xb3, 0xf2, 0x2e, 0xcc, 0x92, 0x78, 0x11, 0xb8, 0xe1, 0x74, 0xa8, 0x1c, 0xc3, 0x9a, 0xe4, 0x9a, - 0x5d, 0xcb, 0x60, 0x9f, 0xf6, 0x9a, 0xa7, 0xf3, 0xeb, 0x03, 0x87, 0xe3, 0x9c, 0x14, 0xf4, 0x12, - 0x8c, 0x1a, 0x4e, 0x60, 0x33, 0x31, 0xab, 0xeb, 0x49, 0x15, 0xae, 0x73, 0x20, 0x0e, 0x71, 0xe8, - 0x9b, 0x30, 0x45, 0x3a, 0x5d, 0xd3, 0x5e, 0x33, 0x0c, 0xea, 0xfb, 0x4b, 0x63, 0x62, 0x4b, 0x88, - 0x67, 0xe1, 0x5a, 0x82, 0xc2, 0x69, 0x3a, 0xf5, 0x4f, 0x4a, 0xb4, 0x82, 0x96, 0xac, 0x4a, 0xe8, - 0x22, 0x5f, 0xbc, 0x04, 0x4a, 0x06, 0x27, 0xb5, 0x3b, 0x09, 0x30, 0x8e, 0xf0, 0xe8, 0xeb, 0x30, - 0xd6, 0xf1, 0xcc, 0x43, 0xea, 0xc9, 0xc8, 0xc4, 0xe5, 0xb5, 0x21, 0xa0, 0x58, 0x62, 0x79, 0xb0, - 0xdd, 0x68, 0x95, 0x49, 0x05, 0x7b, 0xdb, 0x71, 0x2c, 0x2c, 0x30, 0x42, 0x92, 0xb0, 0x4a, 0xba, - 0x30, 0x91, 0x14, 0xda, 0x2a, 0xb1, 0xea, 0x07, 0x30, 0x9b, 0xdb, 0xff, 0xaf, 0x41, 0xdd, 0xa0, - 0x96, 0xac, 0xa2, 0xd6, 0xe0, 0xe8, 0x1e, 0xbb, 0x3d, 0xe8, 0xe3, 0xfd, 0x5e, 0xb3, 0xbe, 0xbe, - 0x79, 0x1d, 0x73, 0x21, 0xea, 0x6f, 0x14, 0x78, 0xa1, 0xb4, 0xd2, 0x52, 0xa7, 0x55, 0x06, 0x9e, - 0x96, 0x00, 0xb8, 0xc4, 0x23, 0x5d, 0xca, 0xa8, 0xe7, 0x17, 0x0c, 0xb6, 0x6c, 0x3f, 0x97, 0x17, - 0x7b, 0x0d, 0x93, 0x9f, 0x6c, 0xde, 0x67, 0xd4, 0xe6, 0x3b, 0x58, 0x32, 0x33, 0xb7, 0x63, 0x41, - 0x38, 0x25, 0x54, 0xfd, 0x63, 0x0d, 0x4e, 0x6f, 0x3b, 0x9d, 0xb6, 0xb1, 0x4f, 0x3b, 0x81, 0x65, - 0xda, 0x7b, 0xfc, 0x52, 0x4c, 0xef, 0xb3, 0x13, 0x18, 0xd8, 0xef, 0x67, 0x06, 0xf6, 0x33, 0x1a, - 0x71, 0x91, 0x8d, 0x65, 0x93, 0x1b, 0x7d, 0xc4, 0xb7, 0x59, 0xc2, 0x82, 0xa8, 0xfb, 0x5e, 0x79, - 0x0e, 0xd9, 0x82, 0x3f, 0x89, 0x4c, 0xf8, 0x8d, 0xa5, 0x5c, 0xf5, 0xef, 0x0a, 0x2c, 0x15, 0xb1, - 0x9d, 0xc0, 0x10, 0xfe, 0x5e, 0x76, 0x08, 0xaf, 0x0e, 0x7f, 0xb6, 0x92, 0x69, 0xfc, 0x49, 0xc9, - 0x99, 0xc4, 0x58, 0xbe, 0x02, 0xd3, 0x61, 0xbb, 0xa2, 0x1d, 0x3e, 0x8d, 0x64, 0xe2, 0x9e, 0x96, - 0x82, 0xa6, 0xdb, 0x29, 0x1c, 0xce, 0x50, 0xa2, 0xb7, 0x61, 0xd6, 0x75, 0x18, 0xb5, 0x99, 0x49, - 0xac, 0x70, 0x24, 0x86, 0x97, 0x49, 0xc4, 0xfb, 0xda, 0x76, 0x06, 0x83, 0x73, 0x94, 0xea, 0x2f, - 0x15, 0x58, 0x2e, 0x8f, 0x0e, 0xfa, 0x29, 0xcc, 0x46, 0x27, 0x16, 0xfb, 0x72, 0xc5, 0x0b, 0x1e, - 0x4e, 0xf3, 0x24, 0xb2, 0x65, 0xc8, 0xcf, 0x46, 0x3d, 0x37, 0x43, 0xe6, 0xe3, 0x9c, 0x2a, 0xf5, - 0xd7, 0x35, 0x98, 0xc9, 0x90, 0x9c, 0x40, 0xc9, 0xdc, 0xce, 0x94, 0x4c, 0x6b, 0x98, 0x63, 0x96, - 0xd5, 0xca, 0xbd, 0x5c, 0xad, 0x5c, 0x1e, 0x46, 0xe8, 0xe0, 0x22, 0xe9, 0x2b, 0xd0, 0xc8, 0xd0, - 0xf3, 0x1d, 0x22, 0xe8, 0x52, 0x0f, 0xd3, 0x5d, 0xea, 0x51, 0xdb, 0xa0, 0xe8, 0x12, 0x4c, 0x10, - 0xd7, 0xbc, 0xea, 0x39, 0x81, 0x2b, 0x53, 0x2a, 0x4e, 0xfd, 0xb5, 0xed, 0x2d, 0x01, 0xc7, 0x31, - 0x05, 0xa7, 0x8e, 0x2c, 0x92, 0x13, 0x20, 0x75, 0x27, 0x0c, 0xe1, 0x38, 0xa6, 0x88, 0x17, 0x83, - 0x91, 0xd2, 0xc5, 0x40, 0x87, 0x7a, 0x60, 0x76, 0xe4, 0x45, 0xf6, 0x35, 0x49, 0x50, 0xbf, 0xb3, - 0xb5, 0xf1, 0xb4, 0xd7, 0xbc, 0x50, 0xf6, 0x7e, 0xca, 0x8e, 0x5c, 0xea, 0x6b, 0x77, 0xb6, 0x36, - 0x30, 0x67, 0x56, 0xff, 0xa2, 0xc0, 0x42, 0xe6, 0x90, 0x27, 0xd0, 0x02, 0xb6, 0xb3, 0x2d, 0xe0, - 0x95, 0x21, 0x42, 0x56, 0x52, 0xfb, 0x0f, 0x14, 0x38, 0x37, 0xb0, 0x2c, 0x2a, 0xac, 0x59, 0xdf, - 0x81, 0xb9, 0xc0, 0xce, 0x2e, 0xbf, 0x61, 0xa5, 0x2f, 0xf2, 0x15, 0xeb, 0x4e, 0x16, 0x85, 0xf3, - 0xb4, 0xfc, 0xba, 0xb5, 0x70, 0x2c, 0x65, 0xd1, 0x7b, 0xf9, 0x97, 0xe7, 0x8b, 0x95, 0xaf, 0xdc, - 0x03, 0x9e, 0x9b, 0xb3, 0xcf, 0xc2, 0xb5, 0x4a, 0xcf, 0xc2, 0x9f, 0xd6, 0x60, 0xb1, 0x20, 0xfb, - 0xd1, 0x87, 0x00, 0xc9, 0xd6, 0x55, 0x10, 0xec, 0x02, 0x23, 0x8f, 0x3d, 0x2a, 0xcd, 0x8a, 0xf7, - 0xe0, 0x04, 0x9a, 0x92, 0x88, 0x7c, 0x98, 0xf2, 0xa8, 0x4f, 0xbd, 0x43, 0xda, 0x79, 0xd7, 0xf1, - 0x64, 0xc8, 0xbf, 0x3d, 0x44, 0xc8, 0x8f, 0x55, 0x5d, 0xb2, 0xdc, 0xe1, 0x44, 0x30, 0x4e, 0x6b, - 0x41, 0x6d, 0x38, 0xd3, 0xa1, 0x24, 0x65, 0xa6, 0x58, 0xd3, 0x68, 0x47, 0xbe, 0x21, 0x9d, 0x93, - 0x02, 0xce, 0x6c, 0x14, 0x11, 0xe1, 0x62, 0x5e, 0xf5, 0x9f, 0x0a, 0x9c, 0xc9, 0x58, 0xf6, 0x1e, - 0xed, 0xba, 0x16, 0x61, 0xf4, 0x04, 0x3a, 0xe7, 0xbd, 0x4c, 0xe7, 0x7c, 0x6b, 0x08, 0xf7, 0x45, - 0x46, 0x96, 0xbe, 0x13, 0xfc, 0x43, 0x81, 0x17, 0x0a, 0x39, 0x4e, 0xa0, 0x13, 0xbc, 0x9f, 0xed, - 0x04, 0xaf, 0x3f, 0xc7, 0xb9, 0x4a, 0x3a, 0xc2, 0xe3, 0xb2, 0x53, 0xb5, 0xc3, 0x0d, 0xeb, 0xff, - 0x6f, 0xd4, 0xa9, 0x7f, 0x50, 0x60, 0x3a, 0xa2, 0xe4, 0x37, 0x86, 0x0a, 0x3d, 0x6d, 0x15, 0x40, - 0xfe, 0x40, 0x16, 0xbd, 0x9f, 0xd5, 0x13, 0xbb, 0xaf, 0xc6, 0x18, 0x9c, 0xa2, 0x42, 0xd7, 0x00, - 0x45, 0x16, 0xb6, 0x2d, 0xb1, 0xfb, 0xf3, 0x1b, 0x58, 0x5d, 0xf0, 0x2e, 0x4b, 0x5e, 0x84, 0x8f, - 0x51, 0xe0, 0x02, 0x2e, 0xf5, 0xaf, 0x4a, 0xb2, 0x64, 0x08, 0xf0, 0x97, 0xd5, 0xf3, 0xc2, 0xb8, - 0x52, 0xcf, 0xa7, 0x87, 0xa4, 0xa0, 0xfc, 0xd2, 0x0e, 0x49, 0x61, 0x5d, 0x49, 0x49, 0x3c, 0xac, - 0xe7, 0x4e, 0x21, 0x4a, 0xa1, 0xea, 0x65, 0xee, 0xba, 0xbc, 0xba, 0x86, 0x6e, 0x7d, 0xb9, 0x9a, - 0x39, 0x3c, 0x4d, 0x0b, 0xaf, 0xb9, 0x97, 0x60, 0xc2, 0x76, 0x3a, 0x54, 0x3c, 0x66, 0xe4, 0x56, - 0xa1, 0x9b, 0x12, 0x8e, 0x63, 0x8a, 0x63, 0x3f, 0xaf, 0x8e, 0x7c, 0x41, 0x3f, 0xaf, 0xf2, 0xf5, - 0xcd, 0x92, 0x5b, 0xfd, 0xa8, 0x98, 0x0c, 0xc9, 0xfa, 0x26, 0xe1, 0x38, 0xa6, 0x40, 0xb7, 0x92, - 0x59, 0x3e, 0x26, 0x62, 0xf2, 0xb5, 0x2a, 0xb3, 0xbc, 0x7c, 0x8c, 0xeb, 0xfa, 0xa3, 0x27, 0x8d, - 0x53, 0x8f, 0x9f, 0x34, 0x4e, 0x7d, 0xf6, 0xa4, 0x71, 0xea, 0x41, 0xbf, 0xa1, 0x3c, 0xea, 0x37, - 0x94, 0xc7, 0xfd, 0x86, 0xf2, 0x59, 0xbf, 0xa1, 0x7c, 0xde, 0x6f, 0x28, 0x9f, 0xfc, 0xbb, 0x71, - 0xea, 0xfb, 0x2f, 0x0e, 0xfa, 0x2f, 0x82, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x23, 0x3d, 0xa6, - 0x20, 0x64, 0x20, 0x00, 0x00, + // 2030 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19, 0xcd, 0x6f, 0x1c, 0x57, + 0xdd, 0xb3, 0xe3, 0xcf, 0xdf, 0xfa, 0x2b, 0x2f, 0xa4, 0x38, 0xa6, 0xec, 0x3a, 0x53, 0x04, 0x4e, + 0x9b, 0xee, 0x36, 0x4e, 0xd5, 0x16, 0xc2, 0x01, 0x8f, 0xed, 0x06, 0x47, 0x89, 0xe3, 0x3c, 0xb7, + 0x11, 0x81, 0x12, 0x78, 0x9e, 0x7d, 0xb6, 0x07, 0xcf, 0xce, 0x4c, 0xe7, 0xbd, 0x71, 0xea, 0x0b, + 0xaa, 0xe0, 0x1e, 0xf1, 0x0f, 0x20, 0x0e, 0x48, 0x48, 0x5c, 0x80, 0xff, 0x00, 0x24, 0x90, 0x88, + 0xe0, 0x12, 0x09, 0x0e, 0x3d, 0x2d, 0xcd, 0x22, 0xce, 0xdc, 0x73, 0x42, 0xef, 0xcd, 0x9b, 0xcf, + 0xdd, 0x71, 0xc6, 0x55, 0xb1, 0xd2, 0xdb, 0xce, 0xef, 0xfb, 0xfd, 0xbe, 0xdf, 0x5b, 0xb8, 0x72, + 0xf8, 0x0e, 0x6b, 0xd9, 0x5e, 0x9b, 0xf8, 0x76, 0x3b, 0xa0, 0xcc, 0x0b, 0x03, 0x8b, 0xb6, 0x8f, + 0xae, 0x12, 0xc7, 0x3f, 0x20, 0xd7, 0xda, 0xfb, 0xd4, 0xa5, 0x01, 0xe1, 0xb4, 0xd3, 0xf2, 0x03, + 0x8f, 0x7b, 0xe8, 0xe5, 0x88, 0xba, 0x45, 0x7c, 0xbb, 0x15, 0x53, 0xb7, 0x62, 0xea, 0xc5, 0xd7, + 0xf7, 0x6d, 0x7e, 0x10, 0xee, 0xb6, 0x2c, 0xaf, 0xdb, 0xde, 0xf7, 0xf6, 0xbd, 0xb6, 0x64, 0xda, + 0x0d, 0xf7, 0xe4, 0x97, 0xfc, 0x90, 0xbf, 0x22, 0x61, 0x8b, 0x46, 0x46, 0xb5, 0xe5, 0x05, 0x42, + 0x6d, 0x51, 0xe1, 0xe2, 0x9b, 0x29, 0x4d, 0x97, 0x58, 0x07, 0xb6, 0x4b, 0x83, 0xe3, 0xb6, 0x7f, + 0xb8, 0x9f, 0xb7, 0xf7, 0x34, 0x5c, 0xac, 0xdd, 0xa5, 0x9c, 0x0c, 0xd3, 0xd5, 0x2e, 0xe3, 0x0a, + 0x42, 0x97, 0xdb, 0xdd, 0x41, 0x35, 0x6f, 0x3d, 0x8f, 0x81, 0x59, 0x07, 0xb4, 0x4b, 0x8a, 0x7c, + 0xc6, 0xaf, 0x75, 0xb8, 0xb0, 0xea, 0x38, 0x9e, 0x25, 0x60, 0xeb, 0xf4, 0xc8, 0xb6, 0xe8, 0x0e, + 0x27, 0x3c, 0x64, 0xe8, 0xeb, 0x30, 0xde, 0x09, 0xec, 0x23, 0x1a, 0x2c, 0x68, 0x4b, 0xda, 0xf2, + 0x94, 0x39, 0xfb, 0xb8, 0xd7, 0x1c, 0xe9, 0xf7, 0x9a, 0xe3, 0xeb, 0x12, 0x8a, 0x15, 0x16, 0x2d, + 0xc1, 0xa8, 0xef, 0x79, 0xce, 0x42, 0x4d, 0x52, 0x4d, 0x2b, 0xaa, 0xd1, 0x6d, 0xcf, 0x73, 0xb0, + 0xc4, 0x48, 0x49, 0x52, 0xf2, 0x82, 0x5e, 0x90, 0x24, 0xa1, 0x58, 0x61, 0x91, 0x05, 0x60, 0x79, + 0x6e, 0xc7, 0xe6, 0xb6, 0xe7, 0xb2, 0x85, 0xd1, 0x25, 0x7d, 0xb9, 0xbe, 0xd2, 0x6e, 0xa5, 0x61, + 0x4e, 0x0e, 0xd6, 0xf2, 0x0f, 0xf7, 0x05, 0x80, 0xb5, 0x84, 0xff, 0x5a, 0x47, 0x57, 0x5b, 0x6b, + 0x31, 0x9f, 0x89, 0x94, 0x70, 0x48, 0x40, 0x0c, 0x67, 0xc4, 0xa2, 0x3b, 0x30, 0xda, 0x21, 0x9c, + 0x2c, 0x8c, 0x2d, 0x69, 0xcb, 0xf5, 0x95, 0xd7, 0x4b, 0xc5, 0x2b, 0xbf, 0xb5, 0x30, 0x79, 0xb8, + 0xf1, 0x11, 0xa7, 0x2e, 0x13, 0xc2, 0x93, 0xd3, 0xad, 0x13, 0x4e, 0xb0, 0x14, 0x84, 0x76, 0xa1, + 0xee, 0x52, 0xfe, 0xd0, 0x0b, 0x0e, 0x05, 0x70, 0x61, 0x5c, 0xca, 0xcd, 0x9a, 0x3d, 0x98, 0x9d, + 0xad, 0x2d, 0xc5, 0x20, 0xcf, 0x2d, 0xd8, 0xcc, 0xb9, 0x7e, 0xaf, 0x59, 0xdf, 0x4a, 0xe5, 0xe0, + 0xac, 0x50, 0xe3, 0xef, 0x1a, 0xcc, 0xab, 0x28, 0xd9, 0x9e, 0x8b, 0x29, 0x0b, 0x1d, 0x8e, 0x7e, + 0x04, 0x13, 0x91, 0xe3, 0x98, 0x8c, 0x50, 0x7d, 0xe5, 0xcd, 0x93, 0x95, 0x46, 0xda, 0x8a, 0x62, + 0xcc, 0x39, 0x75, 0xa6, 0x89, 0x08, 0xcf, 0x70, 0x2c, 0x15, 0xdd, 0x83, 0x69, 0xd7, 0xeb, 0xd0, + 0x1d, 0xea, 0x50, 0x8b, 0x7b, 0x81, 0x8c, 0x5e, 0x7d, 0x65, 0x29, 0xab, 0x45, 0xd4, 0x8a, 0xf0, + 0xff, 0x56, 0x86, 0xce, 0x9c, 0xef, 0xf7, 0x9a, 0xd3, 0x59, 0x08, 0xce, 0xc9, 0x31, 0x3e, 0xd5, + 0xa1, 0x6e, 0x12, 0x66, 0x5b, 0x91, 0x46, 0xf4, 0x53, 0x00, 0xc2, 0x79, 0x60, 0xef, 0x86, 0x5c, + 0x9e, 0x45, 0xc4, 0xfd, 0x9b, 0x27, 0x9f, 0x25, 0xc3, 0xde, 0x5a, 0x4d, 0x78, 0x37, 0x5c, 0x1e, + 0x1c, 0x9b, 0xaf, 0xc4, 0x19, 0x90, 0x22, 0x7e, 0xf6, 0xaf, 0xe6, 0xcc, 0xdd, 0x90, 0x38, 0xf6, + 0x9e, 0x4d, 0x3b, 0x5b, 0xa4, 0x4b, 0x71, 0x46, 0x23, 0x3a, 0x82, 0x49, 0x8b, 0xf8, 0xc4, 0xb2, + 0xf9, 0xf1, 0x42, 0x4d, 0x6a, 0x7f, 0xbb, 0xba, 0xf6, 0x35, 0xc5, 0x19, 0xe9, 0xbe, 0xa4, 0x74, + 0x4f, 0xc6, 0xe0, 0x41, 0xcd, 0x89, 0xae, 0x45, 0x07, 0xe6, 0x0a, 0xb6, 0xa3, 0x79, 0xd0, 0x0f, + 0xe9, 0x71, 0x54, 0x71, 0x58, 0xfc, 0x44, 0x6b, 0x30, 0x76, 0x44, 0x9c, 0x90, 0xca, 0xfa, 0xca, + 0x27, 0x6c, 0x79, 0x8c, 0x63, 0xa9, 0x38, 0xe2, 0xfd, 0x56, 0xed, 0x1d, 0x6d, 0xf1, 0x10, 0x66, + 0x72, 0xb6, 0x0e, 0xd1, 0xb5, 0x9e, 0xd7, 0xd5, 0x3a, 0xa9, 0xf6, 0x52, 0xe5, 0x77, 0x43, 0xe2, + 0x72, 0x9b, 0x1f, 0x67, 0x94, 0x19, 0x37, 0xe0, 0xdc, 0xda, 0xc6, 0x2d, 0xd5, 0x4f, 0x54, 0xdc, + 0xd1, 0x0a, 0x00, 0xfd, 0xc8, 0x0f, 0x28, 0x13, 0xb5, 0xa4, 0xba, 0x4a, 0x52, 0xae, 0x1b, 0x09, + 0x06, 0x67, 0xa8, 0x8c, 0x23, 0x50, 0x5d, 0x42, 0xf4, 0x19, 0x97, 0x74, 0xa9, 0xe2, 0x4b, 0x2a, + 0x51, 0xfa, 0x54, 0x62, 0xd0, 0x4d, 0x18, 0xdb, 0x15, 0x91, 0x51, 0xe6, 0x5f, 0xae, 0x1c, 0x44, + 0x73, 0xaa, 0xdf, 0x6b, 0x8e, 0x49, 0x00, 0x8e, 0x44, 0x18, 0x8f, 0x6a, 0xf0, 0xd5, 0x62, 0xc1, + 0xac, 0x79, 0xee, 0x9e, 0xbd, 0x1f, 0x06, 0xf2, 0x03, 0x7d, 0x07, 0xc6, 0x23, 0x91, 0xca, 0xa2, + 0xe5, 0xb8, 0xab, 0xed, 0x48, 0xe8, 0xb3, 0x5e, 0xf3, 0xa5, 0x22, 0x6b, 0x84, 0xc1, 0x8a, 0x0f, + 0x2d, 0xc3, 0x64, 0x40, 0x3f, 0x0c, 0x29, 0xe3, 0x4c, 0xe6, 0xdd, 0x94, 0x39, 0x2d, 0x52, 0x07, + 0x2b, 0x18, 0x4e, 0xb0, 0xe8, 0x63, 0x0d, 0xce, 0x47, 0x55, 0x99, 0xb3, 0x41, 0x55, 0xe4, 0xd5, + 0x2a, 0x39, 0x91, 0x63, 0x34, 0xbf, 0xa2, 0x8c, 0x3d, 0x3f, 0x04, 0x89, 0x87, 0xa9, 0x32, 0xfe, + 0xa3, 0xc1, 0x4b, 0xc3, 0x3b, 0x08, 0xda, 0x83, 0x89, 0x40, 0xfe, 0x8a, 0x8b, 0xf7, 0x7a, 0x15, + 0x83, 0xd4, 0x31, 0xcb, 0xfb, 0x51, 0xf4, 0xcd, 0x70, 0x2c, 0x1c, 0x59, 0x30, 0x6e, 0x49, 0x9b, + 0x54, 0x95, 0x5e, 0x3f, 0x5d, 0xbf, 0xcb, 0x7b, 0x20, 0x19, 0x42, 0x11, 0x18, 0x2b, 0xd1, 0xc6, + 0x6f, 0x35, 0x98, 0x2b, 0x54, 0x11, 0x6a, 0x80, 0x6e, 0xbb, 0x5c, 0xa6, 0x95, 0x1e, 0xc5, 0x68, + 0xd3, 0xe5, 0xf7, 0x44, 0xb2, 0x63, 0x81, 0x40, 0x97, 0x60, 0x74, 0x57, 0x8c, 0x40, 0x11, 0x8e, + 0x49, 0x73, 0xa6, 0xdf, 0x6b, 0x4e, 0x99, 0x9e, 0xe7, 0x44, 0x14, 0x12, 0x85, 0xbe, 0x01, 0xe3, + 0x8c, 0x07, 0xb6, 0xbb, 0xbf, 0x30, 0x2a, 0xb3, 0x45, 0xf6, 0xfb, 0x1d, 0x09, 0x89, 0xc8, 0x14, + 0x1a, 0xbd, 0x0a, 0x13, 0x47, 0x34, 0x90, 0x15, 0x32, 0x26, 0x29, 0x65, 0x37, 0xbd, 0x17, 0x81, + 0x22, 0xd2, 0x98, 0xc0, 0xf8, 0x7d, 0x0d, 0xea, 0x2a, 0x80, 0x0e, 0xb1, 0xbb, 0xe8, 0x7e, 0x26, + 0xa1, 0xa2, 0x48, 0xbc, 0x76, 0x8a, 0x48, 0x98, 0xf3, 0x71, 0xf3, 0x1a, 0x92, 0x81, 0x14, 0xea, + 0x96, 0xe7, 0x32, 0x1e, 0x10, 0xdb, 0x55, 0xe9, 0x9a, 0x6f, 0x10, 0x27, 0x25, 0x9e, 0x62, 0x33, + 0xcf, 0x2b, 0x05, 0xf5, 0x14, 0xc6, 0x70, 0x56, 0x2e, 0x7a, 0x90, 0x84, 0x58, 0x97, 0x1a, 0xde, + 0xaa, 0xa4, 0x41, 0x1c, 0xbe, 0x5a, 0x74, 0xff, 0xaa, 0xc1, 0x42, 0x19, 0x53, 0xae, 0x1e, 0xb5, + 0xcf, 0x54, 0x8f, 0xb5, 0xb3, 0xab, 0xc7, 0x3f, 0x69, 0x99, 0xd8, 0x33, 0x86, 0x7e, 0x0c, 0x93, + 0x62, 0x19, 0x92, 0xbb, 0x4d, 0xb4, 0x0e, 0xbc, 0x51, 0x6d, 0x75, 0xba, 0xb3, 0xfb, 0x13, 0x6a, + 0xf1, 0xdb, 0x94, 0x93, 0xb4, 0x19, 0xa7, 0x30, 0x9c, 0x48, 0x15, 0x9b, 0x13, 0xf3, 0xa9, 0x75, + 0x9a, 0x41, 0x24, 0x4d, 0xdb, 0xf1, 0xa9, 0x95, 0xf6, 0x6b, 0xf1, 0x85, 0xa5, 0x20, 0xe3, 0x97, + 0xd9, 0x60, 0x30, 0x96, 0x0f, 0x46, 0x99, 0x8b, 0xb5, 0xb3, 0x73, 0xf1, 0x1f, 0x93, 0x56, 0x20, + 0xed, 0xbb, 0x65, 0x33, 0x8e, 0x3e, 0x18, 0x70, 0x73, 0xab, 0x9a, 0x9b, 0x05, 0xb7, 0x74, 0x72, + 0x52, 0x65, 0x31, 0x24, 0xe3, 0xe2, 0x2d, 0x18, 0xb3, 0x39, 0xed, 0xc6, 0xf5, 0x75, 0xb9, 0xb2, + 0x8f, 0xcd, 0x19, 0x25, 0x75, 0x6c, 0x53, 0xf0, 0xe3, 0x48, 0x8c, 0xf1, 0x24, 0x7f, 0x02, 0xe1, + 0x7b, 0xf4, 0x43, 0x98, 0x62, 0x6a, 0x22, 0xc7, 0x5d, 0xe2, 0x4a, 0x15, 0x3d, 0xc9, 0x7a, 0x77, + 0x4e, 0xa9, 0x9a, 0x8a, 0x21, 0x0c, 0xa7, 0x12, 0x33, 0x15, 0x5c, 0x3b, 0x55, 0x05, 0x17, 0xe2, + 0x5f, 0x5a, 0xc1, 0x01, 0x0c, 0x0b, 0x20, 0xfa, 0x01, 0x8c, 0x7b, 0x3e, 0xf9, 0x30, 0xa4, 0x2a, + 0x2a, 0xcf, 0xd9, 0xe0, 0xee, 0x48, 0xda, 0x61, 0x69, 0x02, 0x42, 0x67, 0x84, 0xc6, 0x4a, 0xa4, + 0xf1, 0x48, 0x83, 0xf9, 0x62, 0x33, 0x3b, 0x45, 0xb7, 0xd8, 0x86, 0xd9, 0x2e, 0xe1, 0xd6, 0x41, + 0x32, 0x50, 0xd4, 0x5d, 0x69, 0xb9, 0xdf, 0x6b, 0xce, 0xde, 0xce, 0x61, 0x9e, 0xf5, 0x9a, 0xe8, + 0xdd, 0xd0, 0x71, 0x8e, 0xf3, 0x3b, 0x63, 0x81, 0xdf, 0xf8, 0xb9, 0x0e, 0x33, 0xb9, 0xde, 0x5d, + 0x61, 0x3b, 0x5a, 0x85, 0xb9, 0x4e, 0xea, 0x6c, 0x81, 0x50, 0x66, 0x7c, 0x59, 0x11, 0x67, 0x33, + 0x45, 0xf2, 0x15, 0xe9, 0xf3, 0xa9, 0xa3, 0x7f, 0xee, 0xa9, 0x73, 0x0f, 0x66, 0x49, 0x32, 0xad, + 0x6f, 0x7b, 0x1d, 0xaa, 0x66, 0x65, 0x4b, 0x71, 0xcd, 0xae, 0xe6, 0xb0, 0xcf, 0x7a, 0xcd, 0x2f, + 0x15, 0x67, 0xbc, 0x80, 0xe3, 0x82, 0x14, 0xf4, 0x0a, 0x8c, 0x59, 0x5e, 0xe8, 0x72, 0x39, 0x50, + 0xf5, 0xb4, 0x54, 0xd6, 0x04, 0x10, 0x47, 0x38, 0x74, 0x15, 0xea, 0xa4, 0xd3, 0xb5, 0xdd, 0x55, + 0xcb, 0xa2, 0x8c, 0xc9, 0x6b, 0xdc, 0x64, 0x34, 0xa5, 0x57, 0x53, 0x30, 0xce, 0xd2, 0x18, 0xff, + 0xd5, 0xe2, 0x1d, 0xb1, 0x64, 0x97, 0x41, 0x97, 0xc5, 0x66, 0x24, 0x51, 0x2a, 0x30, 0x99, 0xe5, + 0x46, 0x82, 0x71, 0x8c, 0xcf, 0x5c, 0xb7, 0x6b, 0x95, 0xae, 0xdb, 0x7a, 0x85, 0xeb, 0xf6, 0xe8, + 0x89, 0xd7, 0xed, 0xc2, 0x89, 0xc7, 0x2a, 0x9c, 0xf8, 0x03, 0x98, 0x2d, 0xec, 0xf4, 0x37, 0x41, + 0xb7, 0xa8, 0xa3, 0x8a, 0xee, 0x39, 0xb7, 0xde, 0x81, 0x1b, 0x81, 0x39, 0xd1, 0xef, 0x35, 0xf5, + 0xb5, 0x8d, 0x5b, 0x58, 0x08, 0x31, 0x7e, 0xa7, 0xc1, 0xb9, 0x81, 0x9b, 0x31, 0xba, 0x0e, 0x33, + 0xb6, 0xcb, 0x69, 0xb0, 0x47, 0x2c, 0xba, 0x95, 0xa6, 0xf8, 0x05, 0x75, 0xaa, 0x99, 0xcd, 0x2c, + 0x12, 0xe7, 0x69, 0xd1, 0x45, 0xd0, 0x6d, 0x3f, 0xde, 0xae, 0xa5, 0xb6, 0xcd, 0x6d, 0x86, 0x05, + 0x4c, 0xd4, 0xc3, 0x01, 0x09, 0x3a, 0x0f, 0x49, 0x40, 0x57, 0x3b, 0x1d, 0x71, 0xdf, 0x50, 0x3e, + 0x4d, 0xea, 0xe1, 0xbb, 0x79, 0x34, 0x2e, 0xd2, 0x1b, 0xbf, 0xd1, 0xe0, 0x62, 0x69, 0x27, 0xa9, + 0xfc, 0x80, 0x42, 0x00, 0x7c, 0x12, 0x90, 0x2e, 0xe5, 0x34, 0x60, 0x43, 0xa6, 0x6b, 0x85, 0x77, + 0x89, 0x64, 0x70, 0x6f, 0x27, 0x82, 0x70, 0x46, 0xa8, 0xf1, 0xab, 0x1a, 0xcc, 0x60, 0x15, 0x8f, + 0x68, 0x55, 0xfc, 0xff, 0xaf, 0x0b, 0x77, 0x73, 0xeb, 0xc2, 0x73, 0x52, 0x23, 0x67, 0x5c, 0xd9, + 0xc2, 0x80, 0xee, 0x8b, 0x25, 0x9a, 0xf0, 0x90, 0x55, 0xbb, 0xf8, 0xe4, 0x85, 0x4a, 0xc6, 0x34, + 0x08, 0xd1, 0x37, 0x56, 0x02, 0x8d, 0xbe, 0x06, 0x8d, 0x1c, 0xbd, 0xe8, 0xf4, 0x61, 0x97, 0x06, + 0x98, 0xee, 0xd1, 0x80, 0xba, 0x16, 0x45, 0x57, 0x60, 0x92, 0xf8, 0xf6, 0x8d, 0xc0, 0x0b, 0x7d, + 0x15, 0xd1, 0x64, 0x94, 0xaf, 0x6e, 0x6f, 0x4a, 0x38, 0x4e, 0x28, 0x04, 0x75, 0x6c, 0x91, 0xca, + 0xab, 0xcc, 0x7a, 0x1d, 0xc1, 0x71, 0x42, 0x91, 0xb4, 0xef, 0xd1, 0xd2, 0xf6, 0x6d, 0x82, 0x1e, + 0xda, 0x1d, 0x75, 0x27, 0x78, 0x43, 0x11, 0xe8, 0xef, 0x6f, 0xae, 0x3f, 0xeb, 0x35, 0x2f, 0x95, + 0x3d, 0xfe, 0xf1, 0x63, 0x9f, 0xb2, 0xd6, 0xfb, 0x9b, 0xeb, 0x58, 0x30, 0x1b, 0x7f, 0xd6, 0xe0, + 0x5c, 0xee, 0x90, 0x67, 0xb0, 0xd2, 0x6c, 0xe7, 0x57, 0x9a, 0xd7, 0x4e, 0x11, 0xb2, 0x92, 0xa5, + 0xc6, 0x2e, 0x1c, 0x42, 0x6e, 0x35, 0xef, 0x15, 0x1f, 0xc3, 0x2e, 0x57, 0xbe, 0x39, 0x94, 0xbf, + 0x80, 0x19, 0x7f, 0xab, 0xc1, 0xf9, 0x21, 0x59, 0x84, 0x1e, 0x00, 0xa4, 0x33, 0x66, 0x88, 0xd3, + 0x86, 0x28, 0x1c, 0xb8, 0xe7, 0xce, 0xca, 0x27, 0xaa, 0x14, 0x9a, 0x91, 0x88, 0x18, 0xd4, 0x03, + 0xca, 0x68, 0x70, 0x44, 0x3b, 0xef, 0x7a, 0x81, 0x72, 0xdd, 0xb7, 0x4f, 0xe1, 0xba, 0x81, 0xec, + 0x4d, 0xef, 0x5e, 0x38, 0x15, 0x8c, 0xb3, 0x5a, 0xd0, 0x83, 0xd4, 0x85, 0xd1, 0xdb, 0xeb, 0xb5, + 0x4a, 0x27, 0xca, 0x3f, 0x1b, 0x9f, 0xe0, 0xcc, 0x7f, 0x6a, 0x70, 0x21, 0x67, 0xe4, 0x7b, 0xb4, + 0xeb, 0x3b, 0x84, 0xd3, 0x33, 0x68, 0x46, 0xf7, 0x73, 0xcd, 0xe8, 0xed, 0x53, 0x78, 0x32, 0x36, + 0xb2, 0xf4, 0x16, 0xf3, 0x0f, 0x0d, 0x2e, 0x0e, 0xe5, 0x38, 0x83, 0xe2, 0xfa, 0x5e, 0xbe, 0xb8, + 0xae, 0x7d, 0x86, 0x73, 0x95, 0xdf, 0x1c, 0x2e, 0x96, 0xfa, 0xe1, 0x0b, 0x39, 0x3d, 0x8c, 0x3f, + 0x68, 0x30, 0x1d, 0x53, 0x8a, 0x75, 0xa9, 0xc2, 0xce, 0xbc, 0x02, 0xa0, 0xfe, 0x30, 0x89, 0x6f, + 0xf7, 0x7a, 0x6a, 0xf7, 0x8d, 0x04, 0x83, 0x33, 0x54, 0xe8, 0x26, 0xa0, 0xd8, 0xc2, 0x1d, 0x47, + 0x2e, 0x05, 0x62, 0xf5, 0xd4, 0x25, 0xef, 0xa2, 0xe2, 0x45, 0x78, 0x80, 0x02, 0x0f, 0xe1, 0x32, + 0xfe, 0xa2, 0xa5, 0x73, 0x5b, 0x82, 0x5f, 0x54, 0xcf, 0x4b, 0xe3, 0x4a, 0x3d, 0x9f, 0x9d, 0x3b, + 0x92, 0xf2, 0x85, 0x9d, 0x3b, 0xd2, 0xba, 0x92, 0x92, 0x78, 0xa4, 0x17, 0x4e, 0x21, 0x4b, 0xa1, + 0xea, 0x96, 0x77, 0x2b, 0xf3, 0x37, 0x59, 0x7d, 0xe5, 0xd5, 0x6a, 0xe6, 0x88, 0x34, 0x1d, 0xba, + 0xe3, 0x5f, 0x81, 0x49, 0xd7, 0xeb, 0x44, 0xfb, 0x70, 0x61, 0xbb, 0xd8, 0x52, 0x70, 0x9c, 0x50, + 0x0c, 0xfc, 0x91, 0x33, 0xfa, 0xf9, 0xfc, 0x91, 0x23, 0x37, 0x22, 0xc7, 0x11, 0x04, 0xf1, 0xf5, + 0x21, 0xdd, 0x88, 0x14, 0x1c, 0x27, 0x14, 0xe8, 0x4e, 0x3a, 0x5f, 0xc6, 0x65, 0x4c, 0xbe, 0x56, + 0x65, 0x44, 0x97, 0x0f, 0x14, 0xd3, 0x7c, 0xfc, 0xb4, 0x31, 0xf2, 0xe4, 0x69, 0x63, 0xe4, 0x93, + 0xa7, 0x8d, 0x91, 0x8f, 0xfb, 0x0d, 0xed, 0x71, 0xbf, 0xa1, 0x3d, 0xe9, 0x37, 0xb4, 0x4f, 0xfa, + 0x0d, 0xed, 0xd3, 0x7e, 0x43, 0xfb, 0xc5, 0xbf, 0x1b, 0x23, 0xdf, 0x7f, 0xf9, 0xa4, 0x7f, 0x95, + 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x60, 0x85, 0x64, 0x74, 0x1e, 0x00, 0x00, +} + +func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AllocatedDeviceStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllocatedDeviceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NetworkData != nil { + { + size, err := m.NetworkData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + i -= len(m.Device) + copy(dAtA[i:], m.Device) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device))) + i-- + dAtA[i] = 0x1a + i -= len(m.Pool) + copy(dAtA[i:], m.Pool) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool))) + i-- + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { @@ -1256,11 +1240,6 @@ func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x22 if m.NodeSelector != nil { { size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) @@ -1835,18 +1814,6 @@ func (m *DeviceClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.SuitableNodes != nil { - { - size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } if len(m.Config) > 0 { for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { { @@ -1972,14 +1939,16 @@ func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i-- - if m.AdminAccess { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if m.AdminAccess != nil { + i-- + if *m.AdminAccess { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 } - i-- - dAtA[i] = 0x30 i = encodeVarintGenerated(dAtA, i, uint64(m.Count)) i-- dAtA[i] = 0x28 @@ -2035,6 +2004,16 @@ func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if m.AdminAccess != nil { + i-- + if *m.AdminAccess { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } i -= len(m.Device) copy(dAtA[i:], m.Device) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device))) @@ -2093,7 +2072,7 @@ func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { +func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2103,88 +2082,39 @@ func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Driver) - copy(dAtA[i:], m.Driver) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSchedulingContext) MarshalTo(dAtA []byte) (int, error) { +func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.HardwareAddress) + copy(dAtA[i:], m.HardwareAddress) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.HardwareAddress))) i-- dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.IPs) > 0 { + for iNdEx := len(m.IPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.IPs[iNdEx]) + copy(dAtA[i:], m.IPs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPs[iNdEx]))) + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i -= len(m.InterfaceName) + copy(dAtA[i:], m.InterfaceName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.InterfaceName))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { +func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2194,32 +2124,18 @@ func (m *PodSchedulingContextList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PodSchedulingContextList) MarshalTo(dAtA []byte) (int, error) { +func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2227,84 +2143,15 @@ func (m *PodSchedulingContextList) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSchedulingContextSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSchedulingContextSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSchedulingContextSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PotentialNodes) > 0 { - for iNdEx := len(m.PotentialNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PotentialNodes[iNdEx]) - copy(dAtA[i:], m.PotentialNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PotentialNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.SelectedNode) - copy(dAtA[i:], m.SelectedNode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelectedNode))) + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *PodSchedulingContextStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSchedulingContextStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSchedulingContextStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceClaims) > 0 { - for iNdEx := len(m.ResourceClaims) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2448,43 +2295,6 @@ func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UnsuitableNodes) > 0 { - for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UnsuitableNodes[iNdEx]) - copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2505,11 +2315,6 @@ func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x12 { size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -2543,14 +2348,20 @@ func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i-- - if m.DeallocationRequested { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - i-- - dAtA[i] = 0x18 if len(m.ReservedFor) > 0 { for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { { @@ -2925,6 +2736,33 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *AllocatedDeviceStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Pool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Device) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.Data.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NetworkData != nil { + l = m.NetworkData.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *AllocationResult) Size() (n int) { if m == nil { return 0 @@ -2937,8 +2775,6 @@ func (m *AllocationResult) Size() (n int) { l = m.NodeSelector.Size() n += 1 + l + sovGenerated(uint64(l)) } - l = len(m.Controller) - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -3161,10 +2997,6 @@ func (m *DeviceClassSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if m.SuitableNodes != nil { - l = m.SuitableNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -3219,7 +3051,9 @@ func (m *DeviceRequest) Size() (n int) { l = len(m.AllocationMode) n += 1 + l + sovGenerated(uint64(l)) n += 1 + sovGenerated(uint64(m.Count)) - n += 2 + if m.AdminAccess != nil { + n += 2 + } return n } @@ -3237,6 +3071,9 @@ func (m *DeviceRequestAllocationResult) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.Device) n += 1 + l + sovGenerated(uint64(l)) + if m.AdminAccess != nil { + n += 2 + } return n } @@ -3253,6 +3090,25 @@ func (m *DeviceSelector) Size() (n int) { return n } +func (m *NetworkDeviceData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InterfaceName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.IPs) > 0 { + for _, s := range m.IPs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.HardwareAddress) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *OpaqueDeviceConfiguration) Size() (n int) { if m == nil { return 0 @@ -3266,7 +3122,7 @@ func (m *OpaqueDeviceConfiguration) Size() (n int) { return n } -func (m *PodSchedulingContext) Size() (n int) { +func (m *ResourceClaim) Size() (n int) { if m == nil { return 0 } @@ -3281,7 +3137,24 @@ func (m *PodSchedulingContext) Size() (n int) { return n } -func (m *PodSchedulingContextList) Size() (n int) { +func (m *ResourceClaimConsumerReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + 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)) + return n +} + +func (m *ResourceClaimList) Size() (n int) { if m == nil { return 0 } @@ -3298,113 +3171,13 @@ func (m *PodSchedulingContextList) Size() (n int) { return n } -func (m *PodSchedulingContextSpec) Size() (n int) { +func (m *ResourceClaimSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.SelectedNode) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.PotentialNodes) > 0 { - for _, s := range m.PotentialNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PodSchedulingContextStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceClaims) > 0 { - for _, e := range m.ResourceClaims { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceClaim) Size() (n int) { - if m == nil { - return 0 - } - 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 *ResourceClaimConsumerReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - 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)) - return n -} - -func (m *ResourceClaimList) Size() (n int) { - if m == nil { - return 0 - } - 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 *ResourceClaimSchedulingStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.UnsuitableNodes) > 0 { - for _, s := range m.UnsuitableNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceClaimSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Devices.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Controller) + l = m.Devices.Size() n += 1 + l + sovGenerated(uint64(l)) return n } @@ -3425,7 +3198,12 @@ func (m *ResourceClaimStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - n += 2 + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3547,14 +3325,33 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *AllocatedDeviceStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&AllocatedDeviceStatus{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `Data:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Data), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `NetworkData:` + strings.Replace(this.NetworkData.String(), "NetworkDeviceData", "NetworkDeviceData", 1) + `,`, + `}`, + }, "") + return s +} func (this *AllocationResult) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&AllocationResult{`, `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`, - `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, `}`, }, "") return s @@ -3700,7 +3497,7 @@ func (this *DeviceClass) String() string { return "nil" } s := strings.Join([]string{`&DeviceClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -3726,7 +3523,7 @@ func (this *DeviceClassList) String() string { } repeatedStringForItems += "}" s := strings.Join([]string{`&DeviceClassList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") @@ -3749,7 +3546,6 @@ func (this *DeviceClassSpec) String() string { s := strings.Join([]string{`&DeviceClassSpec{`, `Selectors:` + repeatedStringForSelectors + `,`, `Config:` + repeatedStringForConfig + `,`, - `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, `}`, }, "") return s @@ -3790,7 +3586,7 @@ func (this *DeviceRequest) String() string { `Selectors:` + repeatedStringForSelectors + `,`, `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, `Count:` + fmt.Sprintf("%v", this.Count) + `,`, - `AdminAccess:` + fmt.Sprintf("%v", this.AdminAccess) + `,`, + `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, `}`, }, "") return s @@ -3804,6 +3600,7 @@ func (this *DeviceRequestAllocationResult) String() string { `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, `}`, }, "") return s @@ -3818,67 +3615,25 @@ func (this *DeviceSelector) String() string { }, "") return s } -func (this *OpaqueDeviceConfiguration) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OpaqueDeviceConfiguration{`, - `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, - `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodSchedulingContext) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSchedulingContext{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSchedulingContextSpec", "PodSchedulingContextSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSchedulingContextStatus", "PodSchedulingContextStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodSchedulingContextList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]PodSchedulingContext{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodSchedulingContext", "PodSchedulingContext", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&PodSchedulingContextList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *PodSchedulingContextSpec) String() string { +func (this *NetworkDeviceData) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PodSchedulingContextSpec{`, - `SelectedNode:` + fmt.Sprintf("%v", this.SelectedNode) + `,`, - `PotentialNodes:` + fmt.Sprintf("%v", this.PotentialNodes) + `,`, + s := strings.Join([]string{`&NetworkDeviceData{`, + `InterfaceName:` + fmt.Sprintf("%v", this.InterfaceName) + `,`, + `IPs:` + fmt.Sprintf("%v", this.IPs) + `,`, + `HardwareAddress:` + fmt.Sprintf("%v", this.HardwareAddress) + `,`, `}`, }, "") return s } -func (this *PodSchedulingContextStatus) String() string { +func (this *OpaqueDeviceConfiguration) String() string { if this == nil { return "nil" } - repeatedStringForResourceClaims := "[]ResourceClaimSchedulingStatus{" - for _, f := range this.ResourceClaims { - repeatedStringForResourceClaims += strings.Replace(strings.Replace(f.String(), "ResourceClaimSchedulingStatus", "ResourceClaimSchedulingStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForResourceClaims += "}" - s := strings.Join([]string{`&PodSchedulingContextStatus{`, - `ResourceClaims:` + repeatedStringForResourceClaims + `,`, + s := strings.Join([]string{`&OpaqueDeviceConfiguration{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -3888,7 +3643,7 @@ func (this *ResourceClaim) String() string { return "nil" } s := strings.Join([]string{`&ResourceClaim{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, `}`, @@ -3918,30 +3673,18 @@ func (this *ResourceClaimList) String() string { } repeatedStringForItems += "}" s := strings.Join([]string{`&ResourceClaimList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } -func (this *ResourceClaimSchedulingStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, - `}`, - }, "") - return s -} func (this *ResourceClaimSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ResourceClaimSpec{`, `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`, - `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, `}`, }, "") return s @@ -3955,10 +3698,15 @@ func (this *ResourceClaimStatus) String() string { repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," } repeatedStringForReservedFor += "}" + repeatedStringForDevices := "[]AllocatedDeviceStatus{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "AllocatedDeviceStatus", "AllocatedDeviceStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForDevices += "}" s := strings.Join([]string{`&ResourceClaimStatus{`, `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, `ReservedFor:` + repeatedStringForReservedFor + `,`, - `DeallocationRequested:` + fmt.Sprintf("%v", this.DeallocationRequested) + `,`, + `Devices:` + repeatedStringForDevices + `,`, `}`, }, "") return s @@ -3968,7 +3716,7 @@ func (this *ResourceClaimTemplate) String() string { return "nil" } s := strings.Join([]string{`&ResourceClaimTemplate{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -3984,7 +3732,7 @@ func (this *ResourceClaimTemplateList) String() string { } repeatedStringForItems += "}" s := strings.Join([]string{`&ResourceClaimTemplateList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") @@ -3995,7 +3743,7 @@ func (this *ResourceClaimTemplateSpec) String() string { return "nil" } s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4018,7 +3766,7 @@ func (this *ResourceSlice) String() string { return "nil" } s := strings.Join([]string{`&ResourceSlice{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -4034,7 +3782,7 @@ func (this *ResourceSliceList) String() string { } repeatedStringForItems += "}" s := strings.Join([]string{`&ResourceSliceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") @@ -4053,7 +3801,7 @@ func (this *ResourceSliceSpec) String() string { `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`, `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, - `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, `AllNodes:` + fmt.Sprintf("%v", this.AllNodes) + `,`, `Devices:` + repeatedStringForDevices + `,`, `}`, @@ -4068,7 +3816,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *AllocationResult) Unmarshal(dAtA []byte) error { +func (m *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4091,17 +3839,17 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") + return fmt.Errorf("proto: AllocatedDeviceStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllocatedDeviceStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4111,30 +3859,29 @@ func (m *AllocationResult) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4144,31 +3891,27 @@ func (m *AllocationResult) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.NodeSelector == nil { - m.NodeSelector = &v1.NodeSelector{} - } - if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Pool = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4196,61 +3939,11 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Controller = string(dAtA[iNdEx:postIndex]) + m.Device = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BasicDevice) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4277,109 +3970,14 @@ func (m *BasicDevice) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Attributes == nil { - m.Attributes = make(map[QualifiedName]DeviceAttribute) + m.Conditions = append(m.Conditions, v1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - var mapkey QualifiedName - mapvalue := &DeviceAttribute{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &DeviceAttribute{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4406,161 +4004,15 @@ func (m *BasicDevice) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Capacity == nil { - m.Capacity = make(map[QualifiedName]resource.Quantity) - } - var mapkey QualifiedName - mapvalue := &resource.Quantity{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - 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 < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - 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 postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Capacity[QualifiedName(mapkey)] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NetworkData", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4570,23 +4022,27 @@ func (m *CELDeviceSelector) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Expression = string(dAtA[iNdEx:postIndex]) + if m.NetworkData == nil { + m.NetworkData = &NetworkDeviceData{} + } + if err := m.NetworkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4609,7 +4065,7 @@ func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { } return nil } -func (m *Device) Unmarshal(dAtA []byte) error { +func (m *AllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4632,17 +4088,17 @@ func (m *Device) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Device: wiretype end group for non-group") + return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllocationResult: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4652,27 +4108,28 @@ func (m *Device) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4699,10 +4156,10 @@ func (m *Device) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Basic == nil { - m.Basic = &BasicDevice{} + if m.NodeSelector == nil { + m.NodeSelector = &v11.NodeSelector{} } - if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4727,7 +4184,7 @@ func (m *Device) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { +func (m *BasicDevice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4750,17 +4207,17 @@ func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4770,59 +4227,124 @@ func (m *DeviceAllocationConfiguration) 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 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex]) + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attributes == nil { + m.Attributes = make(map[QualifiedName]DeviceAttribute) + } + var mapkey QualifiedName + mapvalue := &DeviceAttribute{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + 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 postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &DeviceAttribute{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Attributes[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4849,9 +4371,105 @@ func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Capacity == nil { + m.Capacity = make(map[QualifiedName]resource.Quantity) + } + var mapkey QualifiedName + mapvalue := &resource.Quantity{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + 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 postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &resource.Quantity{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Capacity[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -4874,7 +4492,7 @@ func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { +func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4897,51 +4515,17 @@ func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group") + return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Results = append(m.Results, DeviceRequestAllocationResult{}) - if err := m.Results[len(m.Results)-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 Config", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4951,25 +4535,23 @@ func (m *DeviceAllocationResult) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Config = append(m.Config, DeviceAllocationConfiguration{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4992,7 +4574,7 @@ func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { +func (m *Device) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5012,59 +4594,18 @@ func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { break } } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", 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.IntValue = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - 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.BoolValue = &b - case 4: + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5092,14 +4633,13 @@ func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.StringValue = &s + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5109,24 +4649,27 @@ func (m *DeviceAttribute) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.VersionValue = &s + if m.Basic == nil { + m.Basic = &BasicDevice{} + } + if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5149,7 +4692,7 @@ func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceClaim) Unmarshal(dAtA []byte) error { +func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5172,17 +4715,17 @@ func (m *DeviceClaim) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5192,31 +4735,29 @@ func (m *DeviceClaim) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Requests = append(m.Requests, DeviceRequest{}) - if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5226,29 +4767,27 @@ func (m *DeviceClaim) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Constraints = append(m.Constraints, DeviceConstraint{}) - if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5275,8 +4814,7 @@ func (m *DeviceClaim) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Config = append(m.Config, DeviceClaimConfiguration{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5301,7 +4839,7 @@ func (m *DeviceClaim) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { +func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5324,17 +4862,17 @@ func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5344,27 +4882,29 @@ func (m *DeviceClaimConfiguration) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + m.Results = append(m.Results, DeviceRequestAllocationResult{}) + if err := m.Results[len(m.Results)-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 DeviceConfiguration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5391,7 +4931,8 @@ func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, DeviceAllocationConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5416,7 +4957,7 @@ func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceClass) Unmarshal(dAtA []byte) error { +func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5439,17 +4980,58 @@ func (m *DeviceClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", 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.IntValue = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.BoolValue = &b + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5459,30 +5041,30 @@ func (m *DeviceClass) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.StringValue = &s iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5492,24 +5074,24 @@ func (m *DeviceClass) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.VersionValue = &s iNdEx = postIndex default: iNdEx = preIndex @@ -5532,7 +5114,7 @@ func (m *DeviceClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { +func (m *DeviceClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5542,28 +5124,96 @@ func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowGenerated } - if iNdEx >= l { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, DeviceRequest{}) + if err := m.Requests[len(m.Requests)-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 Constraints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Constraints = append(m.Constraints, DeviceConstraint{}) + if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5590,7 +5240,8 @@ func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, DeviceClaimConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5615,7 +5266,7 @@ func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceClassList) Unmarshal(dAtA []byte) error { +func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5638,17 +5289,17 @@ func (m *DeviceClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClaimConfiguration: 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 Requests", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5658,28 +5309,27 @@ func (m *DeviceClassList) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) 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 DeviceConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5706,8 +5356,7 @@ func (m *DeviceClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, DeviceClass{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5732,7 +5381,7 @@ func (m *DeviceClassList) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { +func (m *DeviceClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5755,15 +5404,15 @@ func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5790,48 +5439,13 @@ func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Selectors = append(m.Selectors, DeviceSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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 Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Config = append(m.Config, DeviceClassConfiguration{}) - if err := m.Config[len(m.Config)-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 SuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5858,10 +5472,7 @@ func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SuitableNodes == nil { - m.SuitableNodes = &v1.NodeSelector{} - } - if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5886,7 +5497,7 @@ func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { +func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5909,15 +5520,15 @@ func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5944,10 +5555,7 @@ func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Opaque == nil { - m.Opaque = &OpaqueDeviceConfiguration{} - } - if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5972,7 +5580,7 @@ func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { +func (m *DeviceClassList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5995,17 +5603,17 @@ func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6015,29 +5623,30 @@ func (m *DeviceConstraint) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + 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 MatchAttribute", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6047,24 +5656,25 @@ func (m *DeviceConstraint) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := FullyQualifiedName(dAtA[iNdEx:postIndex]) - m.MatchAttribute = &s + m.Items = append(m.Items, DeviceClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -6085,102 +5695,38 @@ func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { if iNdEx > l { return io.ErrUnexpectedEOF } - return nil -} -func (m *DeviceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceRequest: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 DeviceClassName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + return nil +} +func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - m.DeviceClassName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) } @@ -6214,11 +5760,11 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6228,63 +5774,26 @@ func (m *DeviceRequest) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Count |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - 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.Config = append(m.Config, DeviceClassConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.AdminAccess = bool(v != 0) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6306,7 +5815,7 @@ func (m *DeviceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { +func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6329,17 +5838,17 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6349,59 +5858,81 @@ func (m *DeviceRequestAllocationResult) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Request = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + if m.Opaque == nil { + m.Opaque = &OpaqueDeviceConfiguration{} } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Driver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6429,11 +5960,11 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Pool = string(dAtA[iNdEx:postIndex]) + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6461,7 +5992,8 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Device = string(dAtA[iNdEx:postIndex]) + s := FullyQualifiedName(dAtA[iNdEx:postIndex]) + m.MatchAttribute = &s iNdEx = postIndex default: iNdEx = preIndex @@ -6484,7 +6016,7 @@ func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviceSelector) Unmarshal(dAtA []byte) error { +func (m *DeviceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6507,15 +6039,79 @@ func (m *DeviceSelector) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType) + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 DeviceClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceClassName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6542,66 +6138,14 @@ func (m *DeviceSelector) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.CEL == nil { - m.CEL = &CELDeviceSelector{} - } - if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OpaqueDeviceConfiguration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OpaqueDeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6629,13 +6173,13 @@ func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Driver = string(dAtA[iNdEx:postIndex]) + m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) } - var msglen int + m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6645,25 +6189,32 @@ func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Count |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) } - if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex + b := bool(v != 0) + m.AdminAccess = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6685,7 +6236,7 @@ func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { +func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6708,17 +6259,17 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContext: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequestAllocationResult: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6728,30 +6279,29 @@ func (m *PodSchedulingContext) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Request = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6761,30 +6311,29 @@ func (m *PodSchedulingContext) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6794,25 +6343,77 @@ func (m *PodSchedulingContext) 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 < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Pool = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.AdminAccess = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6834,7 +6435,7 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { +func (m *DeviceSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6847,58 +6448,25 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { if iNdEx >= l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextList: 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 < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceSelector: 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) + return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6925,8 +6493,10 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PodSchedulingContext{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.CEL == nil { + m.CEL = &CELDeviceSelector{} + } + if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6951,7 +6521,7 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { +func (m *NetworkDeviceData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6974,15 +6544,15 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkDeviceData: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkDeviceData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InterfaceName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7010,11 +6580,43 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SelectedNode = string(dAtA[iNdEx:postIndex]) + m.InterfaceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PotentialNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IPs = append(m.IPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HardwareAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7042,7 +6644,7 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) + m.HardwareAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7065,7 +6667,7 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { +func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7088,15 +6690,47 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") + return fmt.Errorf("proto: OpaqueDeviceConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OpaqueDeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7123,8 +6757,7 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) - if err := m.ResourceClaims[len(m.ResourceClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7593,120 +7226,6 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: 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 < 0 { - return ErrInvalidLengthGenerated - } - 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 UnsuitableNodes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7769,38 +7288,6 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7921,11 +7408,11 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7935,12 +7422,26 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.DeallocationRequested = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Devices = append(m.Devices, AllocatedDeviceStatus{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8820,7 +8321,7 @@ func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.NodeSelector == nil { - m.NodeSelector = &v1.NodeSelector{} + m.NodeSelector = &v11.NodeSelector{} } if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/vendor/k8s.io/api/resource/v1alpha3/generated.proto b/vendor/k8s.io/api/resource/v1alpha3/generated.proto index b4428ad452..13be7cbd8e 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/generated.proto +++ b/vendor/k8s.io/api/resource/v1alpha3/generated.proto @@ -30,6 +30,56 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "k8s.io/api/resource/v1alpha3"; +// AllocatedDeviceStatus contains the status of an allocated device, if the +// driver chooses to report it. This may include driver-specific information. +message AllocatedDeviceStatus { + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + optional string driver = 1; + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + optional string pool = 2; + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + optional string device = 3; + + // Conditions contains the latest observation of the device's state. + // If the device has been configured according to the class and claim + // config references, the `Ready` condition should be True. + // + // +optional + // +listType=map + // +listMapKey=type + repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4; + + // Data contains arbitrary driver-specific data. + // + // The length of the raw data must be smaller or equal to 10 Ki. + // + // +optional + optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5; + + // NetworkData contains network-related information specific to the device. + // + // +optional + optional NetworkDeviceData networkData = 6; +} + // AllocationResult contains attributes of an allocated resource. message AllocationResult { // Devices is the result of allocating devices. @@ -42,22 +92,6 @@ message AllocationResult { // // +optional optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 3; - - // Controller is the name of the DRA driver which handled the - // allocation. That driver is also responsible for deallocating the - // claim. It is empty when the claim can be deallocated without - // involving a driver. - // - // A driver may allocate devices provided by other drivers, so this - // driver name here can be different from the driver names listed for - // the results. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. - // - // +optional - // +featureGate=DRAControlPlaneController - optional string controller = 4; } // BasicDevice defines one device instance. @@ -128,6 +162,10 @@ message CELDeviceSelector { // // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) // + // The length of the expression must be smaller or equal to 10 Ki. The + // cost of evaluating it is also limited based on the estimated number + // of logical steps. + // // +required optional string expression = 1; } @@ -309,22 +347,6 @@ message DeviceClassSpec { // +optional // +listType=atomic repeated DeviceClassConfiguration config = 2; - - // Only nodes matching the selector will be considered by the scheduler - // when trying to find a Node that fits a Pod when that Pod uses - // a claim that has not been allocated yet *and* that claim - // gets allocated through a control plane controller. It is ignored - // when the claim does not use a control plane controller - // for allocation. - // - // Setting this field is optional. If unset, all Nodes are candidates. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. - // - // +optional - // +featureGate=DRAControlPlaneController - optional .k8s.io.api.core.v1.NodeSelector suitableNodes = 3; } // DeviceConfiguration must have exactly one field set. It gets embedded @@ -443,8 +465,12 @@ message DeviceRequest { // all ordinary claims to the device with respect to access modes and // any resource allocations. // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // // +optional - // +default=false + // +featureGate=DRAAdminAccess optional bool adminAccess = 6; } @@ -481,6 +507,18 @@ message DeviceRequestAllocationResult { // // +required optional string device = 4; + + // AdminAccess indicates that this device was allocated for + // administrative access. See the corresponding request field + // for a definition of mode. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // + // +optional + // +featureGate=DRAAdminAccess + optional bool adminAccess = 5; } // DeviceSelector must have exactly one field set. @@ -492,6 +530,37 @@ message DeviceSelector { optional CELDeviceSelector cel = 1; } +// NetworkDeviceData provides network-related details for the allocated device. +// This information may be filled by drivers or other components to configure +// or identify the device within a network context. +message NetworkDeviceData { + // InterfaceName specifies the name of the network interface associated with + // the allocated device. This might be the name of a physical or virtual + // network interface being configured in the pod. + // + // Must not be longer than 256 characters. + // + // +optional + optional string interfaceName = 1; + + // IPs lists the network addresses assigned to the device's network interface. + // This can include both IPv4 and IPv6 addresses. + // The IPs are in the CIDR notation, which includes both the address and the + // associated subnet mask. + // e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6. + // + // +optional + // +listType=atomic + repeated string ips = 2; + + // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. + // + // Must not be longer than 128 characters. + // + // +optional + optional string hardwareAddress = 3; +} + // OpaqueDeviceConfiguration contains configuration parameters for a driver // in a format defined by the driver vendor. message OpaqueDeviceConfiguration { @@ -512,73 +581,12 @@ message OpaqueDeviceConfiguration { // includes self-identification and a version ("kind" + "apiVersion" for // Kubernetes types), with conversion between different versions. // + // The length of the raw data must be smaller or equal to 10 Ki. + // // +required optional .k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; } -// PodSchedulingContext objects hold information that is needed to schedule -// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation -// mode. -// -// This is an alpha type and requires enabling the DRAControlPlaneController -// feature gate. -message PodSchedulingContext { - // Standard object metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec describes where resources for the Pod are needed. - optional PodSchedulingContextSpec spec = 2; - - // Status describes where resources for the Pod can be allocated. - // - // +optional - optional PodSchedulingContextStatus status = 3; -} - -// PodSchedulingContextList is a collection of Pod scheduling objects. -message PodSchedulingContextList { - // Standard list metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of PodSchedulingContext objects. - repeated PodSchedulingContext items = 2; -} - -// PodSchedulingContextSpec describes where resources for the Pod are needed. -message PodSchedulingContextSpec { - // SelectedNode is the node for which allocation of ResourceClaims that - // are referenced by the Pod and that use "WaitForFirstConsumer" - // allocation is to be attempted. - // - // +optional - optional string selectedNode = 1; - - // PotentialNodes lists nodes where the Pod might be able to run. - // - // The size of this field is limited to 128. This is large enough for - // many clusters. Larger clusters may need more attempts to find a node - // that suits all pending resources. This may get increased in the - // future, but not reduced. - // - // +optional - // +listType=atomic - repeated string potentialNodes = 2; -} - -// PodSchedulingContextStatus describes where resources for the Pod can be allocated. -message PodSchedulingContextStatus { - // ResourceClaims describes resource availability for each - // pod.spec.resourceClaim entry where the corresponding ResourceClaim - // uses "WaitForFirstConsumer" allocation mode. - // - // +listType=map - // +listMapKey=name - // +optional - repeated ResourceClaimSchedulingStatus resourceClaims = 1; -} - // ResourceClaim describes a request for access to resources in the cluster, // for use by workloads. For example, if a workload needs an accelerator device // with specific properties, this is how that request is expressed. The status @@ -634,46 +642,12 @@ message ResourceClaimList { repeated ResourceClaim items = 2; } -// ResourceClaimSchedulingStatus contains information about one particular -// ResourceClaim with "WaitForFirstConsumer" allocation mode. -message ResourceClaimSchedulingStatus { - // Name matches the pod.spec.resourceClaims[*].Name field. - // - // +required - optional string name = 1; - - // UnsuitableNodes lists nodes that the ResourceClaim cannot be - // allocated for. - // - // The size of this field is limited to 128, the same as for - // PodSchedulingSpec.PotentialNodes. This may get increased in the - // future, but not reduced. - // - // +optional - // +listType=atomic - repeated string unsuitableNodes = 2; -} - // ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. message ResourceClaimSpec { // Devices defines how to request devices. // // +optional optional DeviceClaim devices = 1; - - // Controller is the name of the DRA driver that is meant - // to handle allocation of this claim. If empty, allocation is handled - // by the scheduler while scheduling a pod. - // - // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. - // - // +optional - // +featureGate=DRAControlPlaneController - optional string controller = 2; } // ResourceClaimStatus tracks whether the resource has been allocated and what @@ -711,19 +685,17 @@ message ResourceClaimStatus { // +patchMergeKey=uid repeated ResourceClaimConsumerReference reservedFor = 2; - // Indicates that a claim is to be deallocated. While this is set, - // no new consumers may be added to ReservedFor. - // - // This is only used if the claim needs to be deallocated by a DRA driver. - // That driver then must deallocate this claim and reset the field - // together with clearing the Allocation field. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. + // Devices contains the status of each device allocated for this + // claim, as reported by the driver. This can include driver-specific + // information. Entries are owned by their respective drivers. // // +optional - // +featureGate=DRAControlPlaneController - optional bool deallocationRequested = 3; + // +listType=map + // +listMapKey=driver + // +listMapKey=device + // +listMapKey=pool + // +featureGate=DRAResourceClaimDeviceStatus + repeated AllocatedDeviceStatus devices = 4; } // ResourceClaimTemplate is used to produce ResourceClaim objects. @@ -755,7 +727,7 @@ message ResourceClaimTemplateList { // ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. message ResourceClaimTemplateSpec { - // ObjectMeta may contain labels and annotations that will be copied into the PVC + // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim // when creating it. No other fields are allowed and will be rejected during // validation. // +optional diff --git a/vendor/k8s.io/api/resource/v1alpha3/register.go b/vendor/k8s.io/api/resource/v1alpha3/register.go index 74044e8cf0..8573758e31 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/register.go +++ b/vendor/k8s.io/api/resource/v1alpha3/register.go @@ -50,8 +50,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ResourceClaimList{}, &ResourceClaimTemplate{}, &ResourceClaimTemplateList{}, - &PodSchedulingContext{}, - &PodSchedulingContextList{}, &ResourceSlice{}, &ResourceSliceList{}, ) diff --git a/vendor/k8s.io/api/resource/v1alpha3/types.go b/vendor/k8s.io/api/resource/v1alpha3/types.go index 4efd2491de..e3d7fd8945 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/types.go +++ b/vendor/k8s.io/api/resource/v1alpha3/types.go @@ -37,6 +37,7 @@ const ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceSlice // ResourceSlice represents one or more resources in a pool of similar resources, // managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many @@ -220,7 +221,7 @@ type BasicDevice struct { Capacity map[QualifiedName]resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity"` } -// Limit for the sum of the number of entries in both ResourceSlices. +// Limit for the sum of the number of entries in both attributes and capacity. const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32 // QualifiedName is the name of a device attribute or capacity. @@ -244,6 +245,9 @@ type QualifiedName string // FullyQualifiedName is a QualifiedName where the domain is set. type FullyQualifiedName string +// DeviceMaxDomainLength is the maximum length of the domain prefix in a fully-qualified name. +const DeviceMaxDomainLength = 63 + // DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`/`). const DeviceMaxIDLength = 32 @@ -284,6 +288,7 @@ const DeviceAttributeMaxValueLength = 64 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceSliceList // ResourceSliceList is a collection of ResourceSlices. type ResourceSliceList struct { @@ -298,7 +303,8 @@ type ResourceSliceList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceClaim // ResourceClaim describes a request for access to resources in the cluster, // for use by workloads. For example, if a workload needs an accelerator device @@ -330,19 +336,10 @@ type ResourceClaimSpec struct { // +optional Devices DeviceClaim `json:"devices" protobuf:"bytes,1,name=devices"` - // Controller is the name of the DRA driver that is meant - // to handle allocation of this claim. If empty, allocation is handled - // by the scheduler while scheduling a pod. - // - // Must be a DNS subdomain and should end with a DNS domain owned by the - // vendor of the driver. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. - // - // +optional - // +featureGate=DRAControlPlaneController - Controller string `json:"controller,omitempty" protobuf:"bytes,2,opt,name=controller"` + // Controller is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // Controller string `json:"controller,omitempty" protobuf:"bytes,2,opt,name=controller"` } // DeviceClaim defines how to request devices with a ResourceClaim. @@ -368,6 +365,12 @@ type DeviceClaim struct { // +optional // +listType=atomic Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"` + + // Potential future extension, ignored by older schedulers. This is + // fine because scoring allows users to define a preference, without + // making it a hard requirement. + // + // Score *SomeScoringStruct } const ( @@ -451,9 +454,13 @@ type DeviceRequest struct { // all ordinary claims to the device with respect to access modes and // any resource allocations. // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // // +optional - // +default=false - AdminAccess bool `json:"adminAccess,omitempty" protobuf:"bytes,6,opt,name=adminAccess"` + // +featureGate=DRAAdminAccess + AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,6,opt,name=adminAccess"` } const ( @@ -526,10 +533,42 @@ type CELDeviceSelector struct { // // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) // + // The length of the expression must be smaller or equal to 10 Ki. The + // cost of evaluating it is also limited based on the estimated number + // of logical steps. + // // +required Expression string `json:"expression" protobuf:"bytes,1,name=expression"` } +// CELSelectorExpressionMaxCost specifies the cost limit for a single CEL selector +// evaluation. +// +// There is no overall budget for selecting a device, so the actual time +// required for that is proportional to the number of CEL selectors and how +// often they need to be evaluated, which can vary depending on several factors +// (number of devices, cluster utilization, additional constraints). +// +// Validation against this limit and [CELSelectorExpressionMaxLength] happens +// only when setting an expression for the first time or when changing it. If +// the limits are changed in a future Kubernetes release, existing users are +// guaranteed that existing expressions will continue to be valid. +// +// However, the kube-scheduler also applies this cost limit at runtime, so it +// could happen that a valid expression fails at runtime after an up- or +// downgrade. This can also happen without version skew when the cost estimate +// underestimated the actual cost. That this might happen is the reason why +// kube-scheduler enforces the runtime limit instead of relying on validation. +// +// According to +// https://github.com/kubernetes/kubernetes/blob/4aeaf1e99e82da8334c0d6dddd848a194cd44b4f/staging/src/k8s.io/apiserver/pkg/apis/cel/config.go#L20-L22, +// this gives roughly 0.1 second for each expression evaluation. +// However, this depends on how fast the machine is. +const CELSelectorExpressionMaxCost = 1000000 + +// CELSelectorExpressionMaxLength is the maximum length of a CEL selector expression string. +const CELSelectorExpressionMaxLength = 10 * 1024 + // DeviceConstraint must have exactly one field set besides Requests. type DeviceConstraint struct { // Requests is a list of the one or more requests in this claim which @@ -558,6 +597,16 @@ type DeviceConstraint struct { // +optional // +oneOf=ConstraintType MatchAttribute *FullyQualifiedName `json:"matchAttribute,omitempty" protobuf:"bytes,2,opt,name=matchAttribute"` + + // Potential future extension, not part of the current design: + // A CEL expression which compares different devices and returns + // true if they match. + // + // Because it would be part of a one-of, old schedulers will not + // accidentally ignore this additional, for them unknown match + // criteria. + // + // MatchExpression string } // DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. @@ -603,10 +652,16 @@ type OpaqueDeviceConfiguration struct { // includes self-identification and a version ("kind" + "apiVersion" for // Kubernetes types), with conversion between different versions. // + // The length of the raw data must be smaller or equal to 10 Ki. + // // +required Parameters runtime.RawExtension `json:"parameters" protobuf:"bytes,2,name=parameters"` } +// OpaqueParametersMaxLength is the maximum length of the raw data in an +// [OpaqueDeviceConfiguration.Parameters] field. +const OpaqueParametersMaxLength = 10 * 1024 + // ResourceClaimStatus tracks whether the resource has been allocated and what // the result of that was. type ResourceClaimStatus struct { @@ -642,19 +697,22 @@ type ResourceClaimStatus struct { // +patchMergeKey=uid ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` - // Indicates that a claim is to be deallocated. While this is set, - // no new consumers may be added to ReservedFor. - // - // This is only used if the claim needs to be deallocated by a DRA driver. - // That driver then must deallocate this claim and reset the field - // together with clearing the Allocation field. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. + // DeallocationRequested is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"bytes,3,opt,name=deallocationRequested"` + + // Devices contains the status of each device allocated for this + // claim, as reported by the driver. This can include driver-specific + // information. Entries are owned by their respective drivers. // // +optional - // +featureGate=DRAControlPlaneController - DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"bytes,3,opt,name=deallocationRequested"` + // +listType=map + // +listMapKey=driver + // +listMapKey=device + // +listMapKey=pool + // +featureGate=DRAResourceClaimDeviceStatus + Devices []AllocatedDeviceStatus `json:"devices,omitempty" protobuf:"bytes,4,opt,name=devices"` } // ReservedForMaxSize is the maximum number of entries in @@ -694,21 +752,10 @@ type AllocationResult struct { // +optional NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,3,opt,name=nodeSelector"` - // Controller is the name of the DRA driver which handled the - // allocation. That driver is also responsible for deallocating the - // claim. It is empty when the claim can be deallocated without - // involving a driver. - // - // A driver may allocate devices provided by other drivers, so this - // driver name here can be different from the driver names listed for - // the results. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. - // - // +optional - // +featureGate=DRAControlPlaneController - Controller string `json:"controller,omitempty" protobuf:"bytes,4,opt,name=controller"` + // Controller is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // Controller string `json:"controller,omitempty" protobuf:"bytes,4,opt,name=controller"` } // DeviceAllocationResult is the result of allocating devices. @@ -769,6 +816,18 @@ type DeviceRequestAllocationResult struct { // // +required Device string `json:"device" protobuf:"bytes,4,name=device"` + + // AdminAccess indicates that this device was allocated for + // administrative access. See the corresponding request field + // for a definition of mode. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // + // +optional + // +featureGate=DRAAdminAccess + AdminAccess *bool `json:"adminAccess" protobuf:"bytes,5,name=adminAccess"` } // DeviceAllocationConfiguration gets embedded in an AllocationResult. @@ -799,7 +858,8 @@ const ( ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceClaimList // ResourceClaimList is a collection of claims. type ResourceClaimList struct { @@ -812,111 +872,11 @@ type ResourceClaimList struct { Items []ResourceClaim `json:"items" protobuf:"bytes,2,rep,name=items"` } -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 - -// PodSchedulingContext objects hold information that is needed to schedule -// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation -// mode. -// -// This is an alpha type and requires enabling the DRAControlPlaneController -// feature gate. -type PodSchedulingContext struct { - metav1.TypeMeta `json:",inline"` - // Standard object metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec describes where resources for the Pod are needed. - Spec PodSchedulingContextSpec `json:"spec" protobuf:"bytes,2,name=spec"` - - // Status describes where resources for the Pod can be allocated. - // - // +optional - Status PodSchedulingContextStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// PodSchedulingContextSpec describes where resources for the Pod are needed. -type PodSchedulingContextSpec struct { - // SelectedNode is the node for which allocation of ResourceClaims that - // are referenced by the Pod and that use "WaitForFirstConsumer" - // allocation is to be attempted. - // - // +optional - SelectedNode string `json:"selectedNode,omitempty" protobuf:"bytes,1,opt,name=selectedNode"` - - // PotentialNodes lists nodes where the Pod might be able to run. - // - // The size of this field is limited to 128. This is large enough for - // many clusters. Larger clusters may need more attempts to find a node - // that suits all pending resources. This may get increased in the - // future, but not reduced. - // - // +optional - // +listType=atomic - PotentialNodes []string `json:"potentialNodes,omitempty" protobuf:"bytes,2,opt,name=potentialNodes"` -} - -// PodSchedulingContextStatus describes where resources for the Pod can be allocated. -type PodSchedulingContextStatus struct { - // ResourceClaims describes resource availability for each - // pod.spec.resourceClaim entry where the corresponding ResourceClaim - // uses "WaitForFirstConsumer" allocation mode. - // - // +listType=map - // +listMapKey=name - // +optional - ResourceClaims []ResourceClaimSchedulingStatus `json:"resourceClaims,omitempty" protobuf:"bytes,1,opt,name=resourceClaims"` - - // If there ever is a need to support other kinds of resources - // than ResourceClaim, then new fields could get added here - // for those other resources. -} - -// ResourceClaimSchedulingStatus contains information about one particular -// ResourceClaim with "WaitForFirstConsumer" allocation mode. -type ResourceClaimSchedulingStatus struct { - // Name matches the pod.spec.resourceClaims[*].Name field. - // - // +required - Name string `json:"name" protobuf:"bytes,1,name=name"` - - // UnsuitableNodes lists nodes that the ResourceClaim cannot be - // allocated for. - // - // The size of this field is limited to 128, the same as for - // PodSchedulingSpec.PotentialNodes. This may get increased in the - // future, but not reduced. - // - // +optional - // +listType=atomic - UnsuitableNodes []string `json:"unsuitableNodes,omitempty" protobuf:"bytes,2,opt,name=unsuitableNodes"` -} - -// PodSchedulingNodeListMaxSize defines the maximum number of entries in the -// node lists that are stored in PodSchedulingContext objects. This limit is part -// of the API. -const PodSchedulingNodeListMaxSize = 128 - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 - -// PodSchedulingContextList is a collection of Pod scheduling objects. -type PodSchedulingContextList 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 PodSchedulingContext objects. - Items []PodSchedulingContext `json:"items" protobuf:"bytes,2,rep,name=items"` -} - // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,DeviceClass // DeviceClass is a vendor- or admin-provided resource that contains // device configuration and selectors. It can be referenced in @@ -961,21 +921,10 @@ type DeviceClassSpec struct { // +listType=atomic Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` - // Only nodes matching the selector will be considered by the scheduler - // when trying to find a Node that fits a Pod when that Pod uses - // a claim that has not been allocated yet *and* that claim - // gets allocated through a control plane controller. It is ignored - // when the claim does not use a control plane controller - // for allocation. - // - // Setting this field is optional. If unset, all Nodes are candidates. - // - // This is an alpha field and requires enabling the DRAControlPlaneController - // feature gate. - // - // +optional - // +featureGate=DRAControlPlaneController - SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,3,opt,name=suitableNodes"` + // SuitableNodes is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,3,opt,name=suitableNodes"` } // DeviceClassConfiguration is used in DeviceClass. @@ -984,7 +933,8 @@ type DeviceClassConfiguration struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,DeviceClassList // DeviceClassList is a collection of classes. type DeviceClassList struct { @@ -999,7 +949,8 @@ type DeviceClassList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceClaimTemplate // ResourceClaimTemplate is used to produce ResourceClaim objects. // @@ -1021,7 +972,7 @@ type ResourceClaimTemplate struct { // ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. type ResourceClaimTemplateSpec struct { - // ObjectMeta may contain labels and annotations that will be copied into the PVC + // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim // when creating it. No other fields are allowed and will be rejected during // validation. // +optional @@ -1034,7 +985,8 @@ type ResourceClaimTemplateSpec struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:introduced=1.31 +// +k8s:prerelease-lifecycle-gen:replacement=resource.k8s.io,v1beta1,ResourceClaimTemplateList // ResourceClaimTemplateList is a collection of claim templates. type ResourceClaimTemplateList struct { @@ -1046,3 +998,84 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` } + +// AllocatedDeviceStatus contains the status of an allocated device, if the +// driver chooses to report it. This may include driver-specific information. +type AllocatedDeviceStatus struct { + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"` + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + Pool string `json:"pool" protobuf:"bytes,2,rep,name=pool"` + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + Device string `json:"device" protobuf:"bytes,3,rep,name=device"` + + // Conditions contains the latest observation of the device's state. + // If the device has been configured according to the class and claim + // config references, the `Ready` condition should be True. + // + // +optional + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions" protobuf:"bytes,4,opt,name=conditions"` + + // Data contains arbitrary driver-specific data. + // + // The length of the raw data must be smaller or equal to 10 Ki. + // + // +optional + Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"` + + // NetworkData contains network-related information specific to the device. + // + // +optional + NetworkData *NetworkDeviceData `json:"networkData,omitempty" protobuf:"bytes,6,opt,name=networkData"` +} + +// NetworkDeviceData provides network-related details for the allocated device. +// This information may be filled by drivers or other components to configure +// or identify the device within a network context. +type NetworkDeviceData struct { + // InterfaceName specifies the name of the network interface associated with + // the allocated device. This might be the name of a physical or virtual + // network interface being configured in the pod. + // + // Must not be longer than 256 characters. + // + // +optional + InterfaceName string `json:"interfaceName,omitempty" protobuf:"bytes,1,opt,name=interfaceName"` + + // IPs lists the network addresses assigned to the device's network interface. + // This can include both IPv4 and IPv6 addresses. + // The IPs are in the CIDR notation, which includes both the address and the + // associated subnet mask. + // e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6. + // + // +optional + // +listType=atomic + IPs []string `json:"ips,omitempty" protobuf:"bytes,2,opt,name=ips"` + + // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. + // + // Must not be longer than 128 characters. + // + // +optional + HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"` +} diff --git a/vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go b/vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go index 1a44a971db..1a71d64c10 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go @@ -27,11 +27,24 @@ package v1alpha3 // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_AllocatedDeviceStatus = map[string]string{ + "": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", + "data": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", + "networkData": "NetworkData contains network-related information specific to the device.", +} + +func (AllocatedDeviceStatus) SwaggerDoc() map[string]string { + return map_AllocatedDeviceStatus +} + var map_AllocationResult = map[string]string{ "": "AllocationResult contains attributes of an allocated resource.", "devices": "Devices is the result of allocating devices.", "nodeSelector": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", - "controller": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", } func (AllocationResult) SwaggerDoc() map[string]string { @@ -50,7 +63,7 @@ func (BasicDevice) SwaggerDoc() map[string]string { var map_CELDeviceSelector = map[string]string{ "": "CELDeviceSelector contains a CEL expression for selecting a device.", - "expression": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", + "expression": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.", } func (CELDeviceSelector) SwaggerDoc() map[string]string { @@ -148,10 +161,9 @@ func (DeviceClassList) SwaggerDoc() map[string]string { } var map_DeviceClassSpec = map[string]string{ - "": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", - "selectors": "Each selector must be satisfied by a device which is claimed via this class.", - "config": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", - "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + "": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", + "selectors": "Each selector must be satisfied by a device which is claimed via this class.", + "config": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", } func (DeviceClassSpec) SwaggerDoc() map[string]string { @@ -184,7 +196,7 @@ var map_DeviceRequest = map[string]string{ "selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", "allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", "count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.", - "adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", + "adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", } func (DeviceRequest) SwaggerDoc() map[string]string { @@ -192,11 +204,12 @@ func (DeviceRequest) SwaggerDoc() map[string]string { } var map_DeviceRequestAllocationResult = map[string]string{ - "": "DeviceRequestAllocationResult contains the allocation result for one request.", - "request": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", - "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", - "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", - "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "": "DeviceRequestAllocationResult contains the allocation result for one request.", + "request": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", } func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string { @@ -212,56 +225,27 @@ func (DeviceSelector) SwaggerDoc() map[string]string { return map_DeviceSelector } +var map_NetworkDeviceData = map[string]string{ + "": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", + "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", + "ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", + "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", +} + +func (NetworkDeviceData) SwaggerDoc() map[string]string { + return map_NetworkDeviceData +} + var map_OpaqueDeviceConfiguration = map[string]string{ "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", - "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.", + "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", } func (OpaqueDeviceConfiguration) SwaggerDoc() map[string]string { return map_OpaqueDeviceConfiguration } -var map_PodSchedulingContext = map[string]string{ - "": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", - "metadata": "Standard object metadata", - "spec": "Spec describes where resources for the Pod are needed.", - "status": "Status describes where resources for the Pod can be allocated.", -} - -func (PodSchedulingContext) SwaggerDoc() map[string]string { - return map_PodSchedulingContext -} - -var map_PodSchedulingContextList = map[string]string{ - "": "PodSchedulingContextList is a collection of Pod scheduling objects.", - "metadata": "Standard list metadata", - "items": "Items is the list of PodSchedulingContext objects.", -} - -func (PodSchedulingContextList) SwaggerDoc() map[string]string { - return map_PodSchedulingContextList -} - -var map_PodSchedulingContextSpec = map[string]string{ - "": "PodSchedulingContextSpec describes where resources for the Pod are needed.", - "selectedNode": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", - "potentialNodes": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", -} - -func (PodSchedulingContextSpec) SwaggerDoc() map[string]string { - return map_PodSchedulingContextSpec -} - -var map_PodSchedulingContextStatus = map[string]string{ - "": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", - "resourceClaims": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", -} - -func (PodSchedulingContextStatus) SwaggerDoc() map[string]string { - return map_PodSchedulingContextStatus -} - var map_ResourceClaim = map[string]string{ "": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "metadata": "Standard object metadata", @@ -295,20 +279,9 @@ func (ResourceClaimList) SwaggerDoc() map[string]string { return map_ResourceClaimList } -var map_ResourceClaimSchedulingStatus = map[string]string{ - "": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", - "name": "Name matches the pod.spec.resourceClaims[*].Name field.", - "unsuitableNodes": "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.", -} - -func (ResourceClaimSchedulingStatus) SwaggerDoc() map[string]string { - return map_ResourceClaimSchedulingStatus -} - var map_ResourceClaimSpec = map[string]string{ - "": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", - "devices": "Devices defines how to request devices.", - "controller": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + "": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", + "devices": "Devices defines how to request devices.", } func (ResourceClaimSpec) SwaggerDoc() map[string]string { @@ -316,10 +289,10 @@ func (ResourceClaimSpec) SwaggerDoc() map[string]string { } var map_ResourceClaimStatus = map[string]string{ - "": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", - "allocation": "Allocation is set once the claim has been allocated successfully.", - "reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", - "deallocationRequested": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + "": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", + "allocation": "Allocation is set once the claim has been allocated successfully.", + "reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "devices": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.", } func (ResourceClaimStatus) SwaggerDoc() map[string]string { @@ -348,7 +321,7 @@ func (ResourceClaimTemplateList) SwaggerDoc() map[string]string { var map_ResourceClaimTemplateSpec = map[string]string{ "": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", - "metadata": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", + "metadata": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation.", "spec": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", } diff --git a/vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go b/vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go index 58171df1f2..07ba47b59b 100644 --- a/vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go +++ b/vendor/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go @@ -22,18 +22,48 @@ limitations under the License. package v1alpha3 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Data.DeepCopyInto(&out.Data) + if in.NetworkData != nil { + in, out := &in.NetworkData, &out.NetworkData + *out = new(NetworkDeviceData) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus. +func (in *AllocatedDeviceStatus) DeepCopy() *AllocatedDeviceStatus { + if in == nil { + return nil + } + out := new(AllocatedDeviceStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { *out = *in in.Devices.DeepCopyInto(&out.Devices) if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector - *out = new(v1.NodeSelector) + *out = new(corev1.NodeSelector) (*in).DeepCopyInto(*out) } return @@ -144,7 +174,9 @@ func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult) { if in.Results != nil { in, out := &in.Results, &out.Results *out = make([]DeviceRequestAllocationResult, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.Config != nil { in, out := &in.Config, &out.Config @@ -355,11 +387,6 @@ func (in *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.SuitableNodes != nil { - in, out := &in.SuitableNodes, &out.SuitableNodes - *out = new(v1.NodeSelector) - (*in).DeepCopyInto(*out) - } return } @@ -430,6 +457,11 @@ func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AdminAccess != nil { + in, out := &in.AdminAccess, &out.AdminAccess + *out = new(bool) + **out = **in + } return } @@ -446,6 +478,11 @@ func (in *DeviceRequest) DeepCopy() *DeviceRequest { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocationResult) { *out = *in + if in.AdminAccess != nil { + in, out := &in.AdminAccess, &out.AdminAccess + *out = new(bool) + **out = **in + } return } @@ -481,123 +518,39 @@ func (in *DeviceSelector) DeepCopy() *DeviceSelector { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) { - *out = *in - in.Parameters.DeepCopyInto(&out.Parameters) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration. -func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration { - if in == nil { - return nil - } - out := new(OpaqueDeviceConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSchedulingContext) DeepCopyInto(out *PodSchedulingContext) { +func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContext. -func (in *PodSchedulingContext) DeepCopy() *PodSchedulingContext { - if in == nil { - return nil - } - out := new(PodSchedulingContext) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSchedulingContext) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSchedulingContextList) DeepCopyInto(out *PodSchedulingContextList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PodSchedulingContext, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContextList. -func (in *PodSchedulingContextList) DeepCopy() *PodSchedulingContextList { - if in == nil { - return nil - } - out := new(PodSchedulingContextList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSchedulingContextList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSchedulingContextSpec) DeepCopyInto(out *PodSchedulingContextSpec) { - *out = *in - if in.PotentialNodes != nil { - in, out := &in.PotentialNodes, &out.PotentialNodes + if in.IPs != nil { + in, out := &in.IPs, &out.IPs *out = make([]string, len(*in)) copy(*out, *in) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContextSpec. -func (in *PodSchedulingContextSpec) DeepCopy() *PodSchedulingContextSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData. +func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData { if in == nil { return nil } - out := new(PodSchedulingContextSpec) + out := new(NetworkDeviceData) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSchedulingContextStatus) DeepCopyInto(out *PodSchedulingContextStatus) { +func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) { *out = *in - if in.ResourceClaims != nil { - in, out := &in.ResourceClaims, &out.ResourceClaims - *out = make([]ResourceClaimSchedulingStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } + in.Parameters.DeepCopyInto(&out.Parameters) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingContextStatus. -func (in *PodSchedulingContextStatus) DeepCopy() *PodSchedulingContextStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration. +func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration { if in == nil { return nil } - out := new(PodSchedulingContextStatus) + out := new(OpaqueDeviceConfiguration) in.DeepCopyInto(out) return out } @@ -679,27 +632,6 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimSchedulingStatus) DeepCopyInto(out *ResourceClaimSchedulingStatus) { - *out = *in - if in.UnsuitableNodes != nil { - in, out := &in.UnsuitableNodes, &out.UnsuitableNodes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSchedulingStatus. -func (in *ResourceClaimSchedulingStatus) DeepCopy() *ResourceClaimSchedulingStatus { - if in == nil { - return nil - } - out := new(ResourceClaimSchedulingStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) { *out = *in @@ -730,6 +662,13 @@ func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) { *out = make([]ResourceClaimConsumerReference, len(*in)) copy(*out, *in) } + if in.Devices != nil { + in, out := &in.Devices, &out.Devices + *out = make([]AllocatedDeviceStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -903,7 +842,7 @@ func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) { out.Pool = in.Pool if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector - *out = new(v1.NodeSelector) + *out = new(corev1.NodeSelector) (*in).DeepCopyInto(*out) } if in.Devices != nil { diff --git a/vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go new file mode 100644 index 0000000000..9f57ab6704 --- /dev/null +++ b/vendor/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,218 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 prerelease-lifecycle-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeviceClass) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeviceClass) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DeviceClass) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "DeviceClass"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeviceClass) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeviceClassList) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeviceClassList) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *DeviceClassList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "DeviceClassList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeviceClassList) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaim) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaim) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ResourceClaim) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "ResourceClaim"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaim) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaimList) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaimList) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ResourceClaimList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "ResourceClaimList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaimList) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaimTemplate) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaimTemplate) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ResourceClaimTemplate) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "ResourceClaimTemplate"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaimTemplate) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaimTemplateList) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaimTemplateList) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ResourceClaimTemplateList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "ResourceClaimTemplateList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaimTemplateList) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceSlice) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceSlice) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ResourceSlice) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "ResourceSlice"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceSlice) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceSliceList) APILifecycleIntroduced() (major, minor int) { + return 1, 31 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceSliceList) APILifecycleDeprecated() (major, minor int) { + return 1, 34 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *ResourceSliceList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1beta1", Kind: "ResourceSliceList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceSliceList) APILifecycleRemoved() (major, minor int) { + return 1, 37 +} diff --git a/vendor/gopkg.in/yaml.v2/NOTICE b/vendor/k8s.io/api/resource/v1beta1/doc.go similarity index 62% rename from vendor/gopkg.in/yaml.v2/NOTICE rename to vendor/k8s.io/api/resource/v1beta1/doc.go index 866d74a7ad..88c35c6ca7 100644 --- a/vendor/gopkg.in/yaml.v2/NOTICE +++ b/vendor/k8s.io/api/resource/v1beta1/doc.go @@ -1,4 +1,5 @@ -Copyright 2011-2016 Canonical Ltd. +/* +Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -11,3 +12,13 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 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:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package +// +k8s:prerelease-lifecycle-gen=true +// +groupName=resource.k8s.io + +// Package v1beta1 is the v1beta1 version of the resource API. +package v1beta1 // import "k8s.io/api/resource/v1beta1" diff --git a/vendor/k8s.io/api/resource/v1beta1/generated.pb.go b/vendor/k8s.io/api/resource/v1beta1/generated.pb.go new file mode 100644 index 0000000000..df4e68f306 --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/generated.pb.go @@ -0,0 +1,8655 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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. DO NOT EDIT. +// source: k8s.io/api/resource/v1beta1/generated.proto + +package v1beta1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + v11 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" + + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *AllocatedDeviceStatus) Reset() { *m = AllocatedDeviceStatus{} } +func (*AllocatedDeviceStatus) ProtoMessage() {} +func (*AllocatedDeviceStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{0} +} +func (m *AllocatedDeviceStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllocatedDeviceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AllocatedDeviceStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocatedDeviceStatus.Merge(m, src) +} +func (m *AllocatedDeviceStatus) XXX_Size() int { + return m.Size() +} +func (m *AllocatedDeviceStatus) XXX_DiscardUnknown() { + xxx_messageInfo_AllocatedDeviceStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocatedDeviceStatus proto.InternalMessageInfo + +func (m *AllocationResult) Reset() { *m = AllocationResult{} } +func (*AllocationResult) ProtoMessage() {} +func (*AllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{1} +} +func (m *AllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *AllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllocationResult.Merge(m, src) +} +func (m *AllocationResult) XXX_Size() int { + return m.Size() +} +func (m *AllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_AllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_AllocationResult proto.InternalMessageInfo + +func (m *BasicDevice) Reset() { *m = BasicDevice{} } +func (*BasicDevice) ProtoMessage() {} +func (*BasicDevice) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{2} +} +func (m *BasicDevice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BasicDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *BasicDevice) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasicDevice.Merge(m, src) +} +func (m *BasicDevice) XXX_Size() int { + return m.Size() +} +func (m *BasicDevice) XXX_DiscardUnknown() { + xxx_messageInfo_BasicDevice.DiscardUnknown(m) +} + +var xxx_messageInfo_BasicDevice proto.InternalMessageInfo + +func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } +func (*CELDeviceSelector) ProtoMessage() {} +func (*CELDeviceSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{3} +} +func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *CELDeviceSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_CELDeviceSelector.Merge(m, src) +} +func (m *CELDeviceSelector) XXX_Size() int { + return m.Size() +} +func (m *CELDeviceSelector) XXX_DiscardUnknown() { + xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo + +func (m *Device) Reset() { *m = Device{} } +func (*Device) ProtoMessage() {} +func (*Device) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{4} +} +func (m *Device) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Device) XXX_Merge(src proto.Message) { + xxx_messageInfo_Device.Merge(m, src) +} +func (m *Device) XXX_Size() int { + return m.Size() +} +func (m *Device) XXX_DiscardUnknown() { + xxx_messageInfo_Device.DiscardUnknown(m) +} + +var xxx_messageInfo_Device proto.InternalMessageInfo + +func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } +func (*DeviceAllocationConfiguration) ProtoMessage() {} +func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{5} +} +func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src) +} +func (m *DeviceAllocationConfiguration) XXX_Size() int { + return m.Size() +} +func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo + +func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } +func (*DeviceAllocationResult) ProtoMessage() {} +func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{6} +} +func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceAllocationResult.Merge(m, src) +} +func (m *DeviceAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *DeviceAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo + +func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } +func (*DeviceAttribute) ProtoMessage() {} +func (*DeviceAttribute) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{7} +} +func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceAttribute.Merge(m, src) +} +func (m *DeviceAttribute) XXX_Size() int { + return m.Size() +} +func (m *DeviceAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceAttribute.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo + +func (m *DeviceCapacity) Reset() { *m = DeviceCapacity{} } +func (*DeviceCapacity) ProtoMessage() {} +func (*DeviceCapacity) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{8} +} +func (m *DeviceCapacity) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceCapacity) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceCapacity.Merge(m, src) +} +func (m *DeviceCapacity) XXX_Size() int { + return m.Size() +} +func (m *DeviceCapacity) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceCapacity.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceCapacity proto.InternalMessageInfo + +func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } +func (*DeviceClaim) ProtoMessage() {} +func (*DeviceClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{9} +} +func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClaim.Merge(m, src) +} +func (m *DeviceClaim) XXX_Size() int { + return m.Size() +} +func (m *DeviceClaim) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo + +func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } +func (*DeviceClaimConfiguration) ProtoMessage() {} +func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{10} +} +func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src) +} +func (m *DeviceClaimConfiguration) XXX_Size() int { + return m.Size() +} +func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo + +func (m *DeviceClass) Reset() { *m = DeviceClass{} } +func (*DeviceClass) ProtoMessage() {} +func (*DeviceClass) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{11} +} +func (m *DeviceClass) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceClass) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClass.Merge(m, src) +} +func (m *DeviceClass) XXX_Size() int { + return m.Size() +} +func (m *DeviceClass) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClass.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceClass proto.InternalMessageInfo + +func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } +func (*DeviceClassConfiguration) ProtoMessage() {} +func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{12} +} +func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClassConfiguration.Merge(m, src) +} +func (m *DeviceClassConfiguration) XXX_Size() int { + return m.Size() +} +func (m *DeviceClassConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo + +func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } +func (*DeviceClassList) ProtoMessage() {} +func (*DeviceClassList) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{13} +} +func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceClassList) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClassList.Merge(m, src) +} +func (m *DeviceClassList) XXX_Size() int { + return m.Size() +} +func (m *DeviceClassList) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClassList.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo + +func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } +func (*DeviceClassSpec) ProtoMessage() {} +func (*DeviceClassSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{14} +} +func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceClassSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClassSpec.Merge(m, src) +} +func (m *DeviceClassSpec) XXX_Size() int { + return m.Size() +} +func (m *DeviceClassSpec) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo + +func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } +func (*DeviceConfiguration) ProtoMessage() {} +func (*DeviceConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{15} +} +func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceConfiguration.Merge(m, src) +} +func (m *DeviceConfiguration) XXX_Size() int { + return m.Size() +} +func (m *DeviceConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo + +func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } +func (*DeviceConstraint) ProtoMessage() {} +func (*DeviceConstraint) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{16} +} +func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceConstraint) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceConstraint.Merge(m, src) +} +func (m *DeviceConstraint) XXX_Size() int { + return m.Size() +} +func (m *DeviceConstraint) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceConstraint.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo + +func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } +func (*DeviceRequest) ProtoMessage() {} +func (*DeviceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{17} +} +func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceRequest.Merge(m, src) +} +func (m *DeviceRequest) XXX_Size() int { + return m.Size() +} +func (m *DeviceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo + +func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } +func (*DeviceRequestAllocationResult) ProtoMessage() {} +func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{18} +} +func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src) +} +func (m *DeviceRequestAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo + +func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } +func (*DeviceSelector) ProtoMessage() {} +func (*DeviceSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{19} +} +func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceSelector.Merge(m, src) +} +func (m *DeviceSelector) XXX_Size() int { + return m.Size() +} +func (m *DeviceSelector) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo + +func (m *NetworkDeviceData) Reset() { *m = NetworkDeviceData{} } +func (*NetworkDeviceData) ProtoMessage() {} +func (*NetworkDeviceData) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{20} +} +func (m *NetworkDeviceData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *NetworkDeviceData) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkDeviceData.Merge(m, src) +} +func (m *NetworkDeviceData) XXX_Size() int { + return m.Size() +} +func (m *NetworkDeviceData) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkDeviceData.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkDeviceData proto.InternalMessageInfo + +func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } +func (*OpaqueDeviceConfiguration) ProtoMessage() {} +func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{21} +} +func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) +} +func (m *OpaqueDeviceConfiguration) XXX_Size() int { + return m.Size() +} +func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo + +func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } +func (*ResourceClaim) ProtoMessage() {} +func (*ResourceClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{22} +} +func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaim.Merge(m, src) +} +func (m *ResourceClaim) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaim) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo + +func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } +func (*ResourceClaimConsumerReference) ProtoMessage() {} +func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{23} +} +func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimConsumerReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimConsumerReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimConsumerReference.Merge(m, src) +} +func (m *ResourceClaimConsumerReference) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimConsumerReference) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimConsumerReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo + +func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } +func (*ResourceClaimList) ProtoMessage() {} +func (*ResourceClaimList) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{24} +} +func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimList.Merge(m, src) +} +func (m *ResourceClaimList) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo + +func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } +func (*ResourceClaimSpec) ProtoMessage() {} +func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{25} +} +func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimSpec.Merge(m, src) +} +func (m *ResourceClaimSpec) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo + +func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } +func (*ResourceClaimStatus) ProtoMessage() {} +func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{26} +} +func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimStatus.Merge(m, src) +} +func (m *ResourceClaimStatus) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo + +func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } +func (*ResourceClaimTemplate) ProtoMessage() {} +func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{27} +} +func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimTemplate) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimTemplate.Merge(m, src) +} +func (m *ResourceClaimTemplate) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimTemplate) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimTemplate.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo + +func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } +func (*ResourceClaimTemplateList) ProtoMessage() {} +func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{28} +} +func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimTemplateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimTemplateList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimTemplateList.Merge(m, src) +} +func (m *ResourceClaimTemplateList) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimTemplateList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimTemplateList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo + +func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } +func (*ResourceClaimTemplateSpec) ProtoMessage() {} +func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{29} +} +func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceClaimTemplateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceClaimTemplateSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceClaimTemplateSpec.Merge(m, src) +} +func (m *ResourceClaimTemplateSpec) XXX_Size() int { + return m.Size() +} +func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceClaimTemplateSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo + +func (m *ResourcePool) Reset() { *m = ResourcePool{} } +func (*ResourcePool) ProtoMessage() {} +func (*ResourcePool) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{30} +} +func (m *ResourcePool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourcePool) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourcePool.Merge(m, src) +} +func (m *ResourcePool) XXX_Size() int { + return m.Size() +} +func (m *ResourcePool) XXX_DiscardUnknown() { + xxx_messageInfo_ResourcePool.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourcePool proto.InternalMessageInfo + +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } +func (*ResourceSlice) ProtoMessage() {} +func (*ResourceSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{31} +} +func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSlice.Merge(m, src) +} +func (m *ResourceSlice) XXX_Size() int { + return m.Size() +} +func (m *ResourceSlice) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSlice.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo + +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } +func (*ResourceSliceList) ProtoMessage() {} +func (*ResourceSliceList) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{32} +} +func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSliceList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSliceList.Merge(m, src) +} +func (m *ResourceSliceList) XXX_Size() int { + return m.Size() +} +func (m *ResourceSliceList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo + +func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } +func (*ResourceSliceSpec) ProtoMessage() {} +func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_ba331e3ec6484c27, []int{33} +} +func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSliceSpec.Merge(m, src) +} +func (m *ResourceSliceSpec) XXX_Size() int { + return m.Size() +} +func (m *ResourceSliceSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo + +func init() { + proto.RegisterType((*AllocatedDeviceStatus)(nil), "k8s.io.api.resource.v1beta1.AllocatedDeviceStatus") + proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1beta1.AllocationResult") + proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1beta1.BasicDevice") + proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.AttributesEntry") + proto.RegisterMapType((map[QualifiedName]DeviceCapacity)(nil), "k8s.io.api.resource.v1beta1.BasicDevice.CapacityEntry") + proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1beta1.CELDeviceSelector") + proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1beta1.Device") + proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationConfiguration") + proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1beta1.DeviceAllocationResult") + proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1beta1.DeviceAttribute") + proto.RegisterType((*DeviceCapacity)(nil), "k8s.io.api.resource.v1beta1.DeviceCapacity") + proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1beta1.DeviceClaim") + proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceClaimConfiguration") + proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1beta1.DeviceClass") + proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceClassConfiguration") + proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1beta1.DeviceClassList") + proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1beta1.DeviceClassSpec") + proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1beta1.DeviceConfiguration") + proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1beta1.DeviceConstraint") + proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1beta1.DeviceRequest") + proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1beta1.DeviceRequestAllocationResult") + proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1beta1.DeviceSelector") + proto.RegisterType((*NetworkDeviceData)(nil), "k8s.io.api.resource.v1beta1.NetworkDeviceData") + proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1beta1.OpaqueDeviceConfiguration") + proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1beta1.ResourceClaim") + proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimConsumerReference") + proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimList") + proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimSpec") + proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimStatus") + proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimTemplate") + proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimTemplateList") + proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1beta1.ResourceClaimTemplateSpec") + proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1beta1.ResourcePool") + proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1beta1.ResourceSlice") + proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1beta1.ResourceSliceList") + proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1beta1.ResourceSliceSpec") +} + +func init() { + proto.RegisterFile("k8s.io/api/resource/v1beta1/generated.proto", fileDescriptor_ba331e3ec6484c27) +} + +var fileDescriptor_ba331e3ec6484c27 = []byte{ + // 2051 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19, 0x4b, 0x8f, 0x1b, 0x49, + 0x79, 0xda, 0xed, 0x79, 0x7d, 0x9e, 0x57, 0x2a, 0x64, 0x71, 0x26, 0xc2, 0x9e, 0x74, 0x24, 0xf0, + 0x66, 0xb3, 0xed, 0x8d, 0x81, 0x28, 0xca, 0x5e, 0x70, 0xcf, 0xcc, 0x06, 0x43, 0x32, 0x99, 0xad, + 0x61, 0x43, 0xb4, 0x6c, 0x10, 0x35, 0xed, 0x9a, 0x99, 0x66, 0xec, 0x6e, 0xa7, 0xbb, 0x7a, 0xb2, + 0x73, 0x40, 0xa0, 0x3d, 0xaf, 0x10, 0x77, 0xc4, 0x85, 0x03, 0x12, 0x12, 0x42, 0xfc, 0x02, 0x90, + 0x40, 0x88, 0x88, 0x03, 0xac, 0xe0, 0xb2, 0xe2, 0x60, 0x88, 0xf7, 0x07, 0x70, 0xcf, 0x09, 0x55, + 0x75, 0xf5, 0xd3, 0x6e, 0xd3, 0x83, 0x96, 0x51, 0xf6, 0xe6, 0xfe, 0xde, 0xf5, 0xbd, 0xab, 0x0c, + 0xaf, 0x1d, 0xdf, 0xf6, 0x74, 0xcb, 0x69, 0x92, 0x81, 0xd5, 0x74, 0xa9, 0xe7, 0xf8, 0xae, 0x49, + 0x9b, 0x27, 0x37, 0xf7, 0x29, 0x23, 0x37, 0x9b, 0x87, 0xd4, 0xa6, 0x2e, 0x61, 0xb4, 0xab, 0x0f, + 0x5c, 0x87, 0x39, 0xe8, 0x4a, 0x40, 0xac, 0x93, 0x81, 0xa5, 0x87, 0xc4, 0xba, 0x24, 0x5e, 0x7f, + 0xfd, 0xd0, 0x62, 0x47, 0xfe, 0xbe, 0x6e, 0x3a, 0xfd, 0xe6, 0xa1, 0x73, 0xe8, 0x34, 0x05, 0xcf, + 0xbe, 0x7f, 0x20, 0xbe, 0xc4, 0x87, 0xf8, 0x15, 0xc8, 0x5a, 0xd7, 0x12, 0x8a, 0x4d, 0xc7, 0xe5, + 0x4a, 0xb3, 0xfa, 0xd6, 0xbf, 0x12, 0xd3, 0xf4, 0x89, 0x79, 0x64, 0xd9, 0xd4, 0x3d, 0x6d, 0x0e, + 0x8e, 0x0f, 0xd3, 0xd6, 0x9e, 0x85, 0xcb, 0x6b, 0xf6, 0x29, 0x23, 0x93, 0x74, 0x35, 0xf3, 0xb8, + 0x5c, 0xdf, 0x66, 0x56, 0x7f, 0x5c, 0xcd, 0xad, 0xff, 0xc6, 0xe0, 0x99, 0x47, 0xb4, 0x4f, 0xb2, + 0x7c, 0xda, 0xcf, 0x55, 0xb8, 0xd4, 0xee, 0xf5, 0x1c, 0x93, 0xc3, 0xb6, 0xe8, 0x89, 0x65, 0xd2, + 0x3d, 0x46, 0x98, 0xef, 0xa1, 0x2f, 0xc2, 0x5c, 0xd7, 0xb5, 0x4e, 0xa8, 0x5b, 0x55, 0x36, 0x94, + 0xc6, 0xa2, 0xb1, 0xf2, 0x6c, 0x58, 0x9f, 0x19, 0x0d, 0xeb, 0x73, 0x5b, 0x02, 0x8a, 0x25, 0x16, + 0x6d, 0x40, 0x79, 0xe0, 0x38, 0xbd, 0x6a, 0x49, 0x50, 0x2d, 0x49, 0xaa, 0xf2, 0xae, 0xe3, 0xf4, + 0xb0, 0xc0, 0x08, 0x49, 0x42, 0x72, 0x55, 0xcd, 0x48, 0x12, 0x50, 0x2c, 0xb1, 0xc8, 0x04, 0x30, + 0x1d, 0xbb, 0x6b, 0x31, 0xcb, 0xb1, 0xbd, 0x6a, 0x79, 0x43, 0x6d, 0x54, 0x5a, 0x4d, 0x3d, 0x8e, + 0x72, 0x74, 0x30, 0x7d, 0x70, 0x7c, 0xc8, 0x01, 0x9e, 0xce, 0xfd, 0xa7, 0x9f, 0xdc, 0xd4, 0x37, + 0x43, 0x3e, 0x03, 0x49, 0xe1, 0x10, 0x81, 0x3c, 0x9c, 0x10, 0x8b, 0x1e, 0x40, 0xb9, 0x4b, 0x18, + 0xa9, 0xce, 0x6e, 0x28, 0x8d, 0x4a, 0xeb, 0xf5, 0x5c, 0xf1, 0xd2, 0x6f, 0x3a, 0x26, 0x4f, 0xb7, + 0xdf, 0x67, 0xd4, 0xf6, 0xb8, 0xf0, 0xe8, 0x74, 0x5b, 0x84, 0x11, 0x2c, 0x04, 0x21, 0x02, 0x15, + 0x9b, 0xb2, 0xa7, 0x8e, 0x7b, 0xcc, 0x81, 0xd5, 0x39, 0x21, 0x57, 0xd7, 0xa7, 0x24, 0xa7, 0xbe, + 0x23, 0xe9, 0xc5, 0xb1, 0x39, 0x97, 0xb1, 0x3a, 0x1a, 0xd6, 0x2b, 0x3b, 0xb1, 0x18, 0x9c, 0x94, + 0xa9, 0xfd, 0x59, 0x81, 0x35, 0x19, 0x24, 0xcb, 0xb1, 0x31, 0xf5, 0xfc, 0x1e, 0x43, 0xdf, 0x85, + 0xf9, 0xc0, 0x6f, 0x9e, 0x08, 0x50, 0xa5, 0xf5, 0xe5, 0xa9, 0x3a, 0x03, 0x65, 0x59, 0x29, 0xc6, + 0xaa, 0x3c, 0xd1, 0x7c, 0x80, 0xf7, 0x70, 0x28, 0x14, 0x3d, 0x84, 0x25, 0xdb, 0xe9, 0xd2, 0x3d, + 0xda, 0xa3, 0x26, 0x73, 0x5c, 0x11, 0xbb, 0x4a, 0x6b, 0x23, 0xa9, 0x84, 0x57, 0x0a, 0xf7, 0xfe, + 0x4e, 0x82, 0xce, 0x58, 0x1b, 0x0d, 0xeb, 0x4b, 0x49, 0x08, 0x4e, 0xc9, 0xd1, 0xfe, 0xa1, 0x42, + 0xc5, 0x20, 0x9e, 0x65, 0x06, 0x1a, 0xd1, 0x0f, 0x00, 0x08, 0x63, 0xae, 0xb5, 0xef, 0x33, 0x71, + 0x14, 0x1e, 0xf5, 0xdb, 0x53, 0x8f, 0x92, 0xe0, 0xd6, 0xdb, 0x11, 0xeb, 0xb6, 0xcd, 0xdc, 0x53, + 0xe3, 0x5a, 0x18, 0xfe, 0x18, 0xf1, 0xc1, 0x3f, 0xeb, 0xcb, 0x6f, 0xfb, 0xa4, 0x67, 0x1d, 0x58, + 0xb4, 0xbb, 0x43, 0xfa, 0x14, 0x27, 0x14, 0x22, 0x1f, 0x16, 0x4c, 0x32, 0x20, 0xa6, 0xc5, 0x4e, + 0xab, 0x25, 0xa1, 0xfc, 0x56, 0x61, 0xe5, 0x9b, 0x92, 0x31, 0x50, 0x7d, 0x55, 0xaa, 0x5e, 0x08, + 0xc1, 0xe3, 0x8a, 0x23, 0x55, 0xeb, 0xc7, 0xb0, 0x9a, 0x31, 0x1d, 0xad, 0x81, 0x7a, 0x4c, 0x4f, + 0x83, 0x6a, 0xc3, 0xfc, 0x27, 0x32, 0x60, 0xf6, 0x84, 0xf4, 0x7c, 0x2a, 0x6a, 0xab, 0xd2, 0xba, + 0x51, 0x24, 0xc0, 0xa1, 0x50, 0x1c, 0xb0, 0xde, 0x29, 0xdd, 0x56, 0xd6, 0x8f, 0x60, 0x39, 0x65, + 0xea, 0x04, 0x55, 0xed, 0xb4, 0xaa, 0xd7, 0x0a, 0xa8, 0x0a, 0x45, 0x26, 0x34, 0x69, 0x77, 0xe1, + 0xc2, 0xe6, 0xf6, 0x3d, 0xd9, 0x47, 0x64, 0xc4, 0x51, 0x0b, 0x80, 0xbe, 0x3f, 0x70, 0xa9, 0xc7, + 0x6b, 0x48, 0x76, 0x93, 0xa8, 0x4c, 0xb7, 0x23, 0x0c, 0x4e, 0x50, 0x69, 0x3e, 0xc8, 0xee, 0xc0, + 0xfb, 0x8b, 0x4d, 0xfa, 0x54, 0xf2, 0x45, 0x15, 0x28, 0xfc, 0x29, 0x30, 0xa8, 0x03, 0xb3, 0xfb, + 0x3c, 0x2a, 0xd2, 0xf6, 0x46, 0xd1, 0xf8, 0x19, 0x8b, 0xa3, 0x61, 0x7d, 0x56, 0x00, 0x70, 0x20, + 0x41, 0xfb, 0xb0, 0x04, 0x5f, 0xc8, 0x56, 0xca, 0xa6, 0x63, 0x1f, 0x58, 0x87, 0xbe, 0x2b, 0x3e, + 0xd0, 0xd7, 0x60, 0x2e, 0x90, 0x28, 0x0d, 0x6a, 0x84, 0xcd, 0x6c, 0x4f, 0x40, 0x5f, 0x0c, 0xeb, + 0xaf, 0x64, 0x59, 0x03, 0x0c, 0x96, 0x7c, 0xa8, 0x01, 0x0b, 0x2e, 0x7d, 0xe2, 0x53, 0x8f, 0x79, + 0x22, 0xe3, 0x16, 0x8d, 0x25, 0x9e, 0x35, 0x58, 0xc2, 0x70, 0x84, 0x45, 0x3f, 0x84, 0x8b, 0x41, + 0x35, 0xa6, 0x4c, 0x90, 0x95, 0xf8, 0x46, 0x91, 0x10, 0x25, 0xf9, 0x8c, 0x2b, 0xd2, 0xd4, 0x8b, + 0x13, 0x90, 0x78, 0x92, 0x26, 0xed, 0x13, 0x05, 0x5e, 0x99, 0xdc, 0x38, 0x10, 0x85, 0x79, 0x57, + 0xfc, 0x0a, 0x6b, 0xf6, 0x4e, 0x01, 0x7b, 0xe4, 0x19, 0xf3, 0xbb, 0x50, 0xf0, 0xed, 0xe1, 0x50, + 0x36, 0xda, 0x87, 0x39, 0x53, 0x98, 0x24, 0x8b, 0xf3, 0xce, 0x99, 0x9a, 0x5c, 0xfa, 0xfc, 0xd1, + 0xdc, 0x09, 0xc0, 0x58, 0x4a, 0xd6, 0x7e, 0xa9, 0xc0, 0x6a, 0xa6, 0x7a, 0x50, 0x0d, 0x54, 0xcb, + 0x66, 0x22, 0xa3, 0xd4, 0x20, 0x3e, 0x1d, 0x9b, 0x3d, 0xe4, 0x79, 0x8e, 0x39, 0x02, 0x5d, 0x85, + 0xf2, 0x3e, 0x9f, 0x7a, 0x3c, 0x16, 0x0b, 0xc6, 0xf2, 0x68, 0x58, 0x5f, 0x34, 0x1c, 0xa7, 0x17, + 0x50, 0x08, 0x14, 0xfa, 0x12, 0xcc, 0x79, 0xcc, 0xb5, 0xec, 0xc3, 0x6a, 0x59, 0x64, 0x8a, 0xe8, + 0xf1, 0x7b, 0x02, 0x12, 0x90, 0x49, 0x34, 0xba, 0x0e, 0xf3, 0x27, 0xd4, 0x15, 0xc5, 0x31, 0x2b, + 0x28, 0x45, 0x0b, 0x7d, 0x18, 0x80, 0x02, 0xd2, 0x90, 0x40, 0xa3, 0xb0, 0x92, 0xae, 0x3e, 0xb4, + 0x17, 0x56, 0xae, 0x32, 0x36, 0x79, 0xc6, 0x06, 0x66, 0xec, 0xb1, 0xb7, 0x7d, 0x62, 0x33, 0x8b, + 0x9d, 0x1a, 0xcb, 0xd2, 0x29, 0xb3, 0x81, 0xa2, 0x40, 0x96, 0xf6, 0xab, 0x12, 0x54, 0xa4, 0x9e, + 0x1e, 0xb1, 0xfa, 0xe8, 0x51, 0x22, 0x67, 0x83, 0x70, 0x5f, 0x2f, 0x1e, 0x6e, 0x63, 0x2d, 0xec, + 0x8c, 0x13, 0x72, 0xbc, 0x0b, 0x15, 0xd3, 0xb1, 0x3d, 0xe6, 0x12, 0xcb, 0x96, 0x05, 0x91, 0x1e, + 0xcb, 0x53, 0x72, 0x5b, 0x72, 0x19, 0x17, 0xa5, 0xfc, 0x4a, 0x0c, 0xf3, 0x70, 0x52, 0x2c, 0x7a, + 0x1c, 0xa5, 0x91, 0x2a, 0x14, 0x7c, 0xb5, 0x88, 0x02, 0x7e, 0xf2, 0x62, 0x19, 0xf4, 0x47, 0x05, + 0xaa, 0x79, 0x4c, 0xa9, 0x7a, 0x57, 0xfe, 0x97, 0x7a, 0x2f, 0x9d, 0x5b, 0xbd, 0xff, 0x4e, 0x49, + 0x84, 0xdd, 0xf3, 0xd0, 0xf7, 0x60, 0x81, 0x6f, 0x58, 0x62, 0x61, 0x52, 0xc6, 0xac, 0x98, 0xb2, + 0x8f, 0x3d, 0xd8, 0xff, 0x3e, 0x35, 0xd9, 0x7d, 0xca, 0x48, 0xdc, 0xe9, 0x63, 0x18, 0x8e, 0xa4, + 0xa2, 0x1d, 0x28, 0x7b, 0x03, 0x6a, 0x9e, 0x61, 0xc2, 0x09, 0xcb, 0xf6, 0x06, 0xd4, 0x8c, 0x67, + 0x01, 0xff, 0xc2, 0x42, 0x8e, 0xf6, 0xd3, 0x64, 0x24, 0x3c, 0x2f, 0x1d, 0x89, 0x1c, 0xff, 0x2a, + 0xe7, 0xe6, 0xdf, 0xdf, 0x46, 0x9d, 0x46, 0x58, 0x77, 0xcf, 0xf2, 0x18, 0x7a, 0x6f, 0xcc, 0xc7, + 0x7a, 0x31, 0x1f, 0x73, 0x6e, 0xe1, 0xe1, 0xa8, 0xbc, 0x42, 0x48, 0xc2, 0xbf, 0xf7, 0x61, 0xd6, + 0x62, 0xb4, 0x1f, 0x16, 0x56, 0xa3, 0xa8, 0x83, 0xe3, 0xbe, 0xd0, 0xe1, 0xec, 0x38, 0x90, 0xa2, + 0xfd, 0x25, 0x7d, 0x00, 0xee, 0x78, 0xf4, 0x1e, 0x2c, 0x7a, 0x72, 0xd4, 0x87, 0xcd, 0xa1, 0xc8, + 0xfa, 0x10, 0x2d, 0x8c, 0x17, 0xa4, 0xa6, 0xc5, 0x10, 0xe2, 0xe1, 0x58, 0x60, 0xa2, 0x72, 0x4b, + 0x67, 0xa9, 0xdc, 0x4c, 0xe8, 0x73, 0x2b, 0xf7, 0x09, 0x4c, 0x8a, 0x1e, 0x7a, 0x17, 0xe6, 0x9c, + 0x01, 0x79, 0x12, 0x75, 0xd5, 0xe9, 0x3b, 0xe1, 0x03, 0x41, 0x3a, 0x29, 0x45, 0x80, 0xab, 0x0c, + 0xd0, 0x58, 0x4a, 0xd4, 0x7e, 0xac, 0xc0, 0x5a, 0xb6, 0x85, 0x9d, 0xa1, 0x49, 0xec, 0xc2, 0x4a, + 0x9f, 0x30, 0xf3, 0x28, 0x9a, 0x55, 0xf2, 0xe6, 0xd5, 0x18, 0x0d, 0xeb, 0x2b, 0xf7, 0x53, 0x98, + 0x17, 0xc3, 0x3a, 0x7a, 0xcb, 0xef, 0xf5, 0x4e, 0xd3, 0x5b, 0x68, 0x86, 0x5f, 0xfb, 0x40, 0x85, + 0xe5, 0x54, 0xc3, 0x2e, 0xb0, 0x73, 0xb5, 0x61, 0xb5, 0x1b, 0xfb, 0x9a, 0x23, 0xa4, 0x19, 0x9f, + 0x97, 0xc4, 0xc9, 0x34, 0x11, 0x7c, 0x59, 0xfa, 0x74, 0xde, 0xa8, 0x9f, 0x76, 0xde, 0x3c, 0x84, + 0x15, 0x12, 0xed, 0x01, 0xf7, 0x9d, 0x2e, 0x95, 0x53, 0x58, 0x97, 0x5c, 0x2b, 0xed, 0x14, 0xf6, + 0xc5, 0xb0, 0xfe, 0xb9, 0xec, 0xf6, 0xc0, 0xe1, 0x38, 0x23, 0x05, 0x5d, 0x83, 0x59, 0xd3, 0xf1, + 0x6d, 0x26, 0x46, 0xb5, 0x1a, 0x97, 0xc9, 0x26, 0x07, 0xe2, 0x00, 0x87, 0x6e, 0x42, 0x85, 0x74, + 0xfb, 0x96, 0xdd, 0x36, 0x4d, 0xea, 0x79, 0xe2, 0x4e, 0xb8, 0x10, 0xcc, 0xff, 0x76, 0x0c, 0xc6, + 0x49, 0x1a, 0xed, 0xdf, 0x4a, 0xb8, 0x79, 0xe6, 0x2c, 0x49, 0xe8, 0x55, 0xbe, 0x71, 0x09, 0x94, + 0x8c, 0x4b, 0x62, 0x6b, 0x12, 0x60, 0x1c, 0xe2, 0x13, 0x77, 0xf7, 0x52, 0xa1, 0xbb, 0xbb, 0x5a, + 0xe0, 0xee, 0x5e, 0x9e, 0x7a, 0x77, 0xcf, 0x9c, 0x78, 0xb6, 0xc0, 0x89, 0xbf, 0x13, 0xae, 0x32, + 0xd1, 0x45, 0xa1, 0x03, 0xaa, 0x49, 0x7b, 0x13, 0xba, 0xe0, 0x78, 0x2e, 0x8c, 0xdd, 0x32, 0x8c, + 0xf9, 0xd1, 0xb0, 0xae, 0x6e, 0x6e, 0xdf, 0xc3, 0x5c, 0x86, 0xf6, 0x6b, 0x05, 0x2e, 0x8c, 0x5d, + 0xb3, 0xd1, 0x9b, 0xb0, 0x6c, 0xd9, 0x8c, 0xba, 0x07, 0xc4, 0xa4, 0x3b, 0x71, 0x82, 0x5f, 0x92, + 0x87, 0x5a, 0xee, 0x24, 0x91, 0x38, 0x4d, 0x8b, 0x2e, 0x83, 0x6a, 0x0d, 0xc2, 0x95, 0x5d, 0x68, + 0xeb, 0xec, 0x7a, 0x98, 0xc3, 0x78, 0x35, 0x1c, 0x11, 0xb7, 0xfb, 0x94, 0xb8, 0xb4, 0xdd, 0xed, + 0xf2, 0x3b, 0x8c, 0x74, 0x69, 0x54, 0x0d, 0x5f, 0x4f, 0xa3, 0x71, 0x96, 0x5e, 0xfb, 0x85, 0x02, + 0x97, 0x73, 0xfb, 0x48, 0xe1, 0xc7, 0x18, 0x02, 0x30, 0x20, 0x2e, 0xe9, 0x53, 0x46, 0x5d, 0x4f, + 0x0e, 0xd5, 0x33, 0xbe, 0x71, 0x44, 0xf3, 0x7a, 0x37, 0x12, 0x84, 0x13, 0x42, 0xb5, 0x9f, 0x95, + 0x60, 0x19, 0xcb, 0x70, 0x04, 0xcb, 0xe1, 0xff, 0x7f, 0x4b, 0xd8, 0x4d, 0x6d, 0x09, 0xd3, 0x33, + 0x23, 0x65, 0x5b, 0xde, 0x9e, 0x80, 0x1e, 0xf1, 0xe5, 0x9c, 0x30, 0xdf, 0x2b, 0x74, 0x9b, 0x4a, + 0xcb, 0x14, 0x7c, 0x71, 0x08, 0x82, 0x6f, 0x2c, 0xe5, 0x69, 0x23, 0x05, 0x6a, 0x29, 0x7a, 0xde, + 0xe5, 0xfd, 0x3e, 0x75, 0x31, 0x3d, 0xa0, 0x2e, 0xb5, 0x4d, 0x8a, 0x6e, 0xc0, 0x02, 0x19, 0x58, + 0x77, 0x5d, 0xc7, 0x1f, 0xc8, 0x78, 0x46, 0x23, 0xbc, 0xbd, 0xdb, 0x11, 0x70, 0x1c, 0x51, 0x70, + 0xea, 0xd0, 0x20, 0x99, 0x55, 0x89, 0x7d, 0x3a, 0x80, 0xe3, 0x88, 0x22, 0x6a, 0xdd, 0xe5, 0xdc, + 0xd6, 0x6d, 0x80, 0xea, 0x5b, 0x5d, 0x79, 0xd5, 0x78, 0x43, 0x12, 0xa8, 0xef, 0x74, 0xb6, 0x5e, + 0x0c, 0xeb, 0x57, 0xf3, 0x9e, 0x11, 0xd9, 0xe9, 0x80, 0x7a, 0xfa, 0x3b, 0x9d, 0x2d, 0xcc, 0x99, + 0xb5, 0xdf, 0x2b, 0x70, 0x21, 0x75, 0xc8, 0x73, 0x58, 0x65, 0x1e, 0xa4, 0x57, 0x99, 0xeb, 0xc5, + 0x23, 0x96, 0xb3, 0xcc, 0x1c, 0x65, 0xce, 0x20, 0xb6, 0x99, 0xbd, 0xec, 0xb3, 0x5a, 0xa3, 0xe8, + 0x55, 0x21, 0xff, 0x2d, 0x4d, 0xfb, 0x53, 0x09, 0x2e, 0x4e, 0xc8, 0x21, 0xf4, 0x18, 0x20, 0x1e, + 0x2f, 0x52, 0xdf, 0xf4, 0xbb, 0xcf, 0xd8, 0xd5, 0x79, 0x45, 0x3c, 0x76, 0xc5, 0xd0, 0x84, 0x40, + 0xe4, 0x42, 0xc5, 0xa5, 0x1e, 0x75, 0x4f, 0x68, 0xf7, 0x2d, 0xc7, 0x95, 0x7e, 0x7b, 0xb3, 0xb8, + 0xdf, 0xc6, 0x32, 0x37, 0xbe, 0x69, 0xe1, 0x58, 0x2e, 0x4e, 0x2a, 0x41, 0x8f, 0x63, 0xff, 0x05, + 0x2f, 0xb8, 0xad, 0x22, 0xe7, 0x49, 0xbf, 0x3d, 0x4f, 0xf1, 0xe4, 0xdf, 0x15, 0xb8, 0x94, 0xb2, + 0xf1, 0x5b, 0xb4, 0x3f, 0xe8, 0x11, 0x46, 0xcf, 0xa1, 0x0b, 0x3d, 0x4a, 0x75, 0xa1, 0x5b, 0xc5, + 0xfd, 0x18, 0xda, 0x98, 0x7b, 0x6b, 0xf9, 0x9b, 0x02, 0x97, 0x27, 0x72, 0x9c, 0x43, 0x59, 0x7d, + 0x3b, 0x5d, 0x56, 0xad, 0xb3, 0x1f, 0x2b, 0xa7, 0xbc, 0xfe, 0x9a, 0x77, 0x28, 0x51, 0x67, 0x9f, + 0xc1, 0xa1, 0xa1, 0xfd, 0x46, 0x81, 0xa5, 0x90, 0x92, 0xef, 0x48, 0x05, 0xf6, 0xe4, 0x16, 0x80, + 0xfc, 0xcb, 0x25, 0xbc, 0xc9, 0xab, 0xb1, 0xd9, 0x77, 0x23, 0x0c, 0x4e, 0x50, 0xa1, 0x6f, 0x00, + 0x0a, 0x0d, 0xdc, 0xeb, 0x89, 0x55, 0x80, 0xef, 0x9b, 0xaa, 0xe0, 0x5d, 0x97, 0xbc, 0x08, 0x8f, + 0x51, 0xe0, 0x09, 0x5c, 0xda, 0x1f, 0x94, 0x78, 0x5a, 0x0b, 0xf0, 0x4b, 0xea, 0x78, 0x61, 0x5b, + 0xae, 0xe3, 0x93, 0xe3, 0x46, 0x50, 0xbe, 0xac, 0xe3, 0x46, 0x18, 0x97, 0x53, 0x0f, 0x1f, 0xaa, + 0x99, 0x43, 0x88, 0x3a, 0x28, 0xba, 0xd9, 0x7d, 0x33, 0xf1, 0x37, 0x5b, 0xa5, 0xf5, 0x6a, 0x21, + 0x6b, 0x78, 0x8e, 0x4e, 0xdc, 0xea, 0x6f, 0xc0, 0x82, 0xed, 0x74, 0x83, 0x15, 0x38, 0xb3, 0x52, + 0xec, 0x48, 0x38, 0x8e, 0x28, 0xc6, 0xfe, 0x09, 0x2a, 0x7f, 0x3a, 0xff, 0x04, 0x89, 0x35, 0xa8, + 0xd7, 0xe3, 0x04, 0xe1, 0x85, 0x21, 0x5e, 0x83, 0x24, 0x1c, 0x47, 0x14, 0x68, 0x27, 0x1e, 0x2c, + 0x73, 0x22, 0x22, 0xd7, 0x0a, 0x0c, 0xe6, 0xfc, 0x49, 0x62, 0xb4, 0x9f, 0x3d, 0xaf, 0xcd, 0x7c, + 0xf4, 0xbc, 0x36, 0xf3, 0xf1, 0xf3, 0xda, 0xcc, 0x8f, 0x46, 0x35, 0xe5, 0xd9, 0xa8, 0xa6, 0x7c, + 0x34, 0xaa, 0x29, 0x1f, 0x8f, 0x6a, 0xca, 0xbf, 0x46, 0x35, 0xe5, 0x27, 0x9f, 0xd4, 0x66, 0xde, + 0xbd, 0x32, 0xe5, 0x1f, 0xe9, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x26, 0xe2, 0x5c, 0xf8, 0xaf, + 0x1e, 0x00, 0x00, +} + +func (m *AllocatedDeviceStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AllocatedDeviceStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllocatedDeviceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NetworkData != nil { + { + size, err := m.NetworkData.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Conditions) > 0 { + for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + i -= len(m.Device) + copy(dAtA[i:], m.Device) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device))) + i-- + dAtA[i] = 0x1a + i -= len(m.Pool) + copy(dAtA[i:], m.Pool) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool))) + i-- + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *AllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NodeSelector != nil { + { + size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *BasicDevice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BasicDevice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Capacity) > 0 { + keysForCapacity := make([]string, 0, len(m.Capacity)) + for k := range m.Capacity { + keysForCapacity = append(keysForCapacity, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { + v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] + baseI := i + { + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(keysForCapacity[iNdEx]) + copy(dAtA[i:], keysForCapacity[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Attributes) > 0 { + keysForAttributes := make([]string, 0, len(m.Attributes)) + for k := range m.Attributes { + keysForAttributes = append(keysForAttributes, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- { + v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])] + baseI := i + { + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(keysForAttributes[iNdEx]) + copy(dAtA[i:], keysForAttributes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAttributes[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Device) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Device) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Basic != nil { + { + size, err := m.Basic.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceAllocationConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceAllocationConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceAllocationConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requests[iNdEx]) + copy(dAtA[i:], m.Requests[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceAllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceAllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceAttribute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceAttribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.VersionValue != nil { + i -= len(*m.VersionValue) + copy(dAtA[i:], *m.VersionValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VersionValue))) + i-- + dAtA[i] = 0x2a + } + if m.StringValue != nil { + i -= len(*m.StringValue) + copy(dAtA[i:], *m.StringValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StringValue))) + i-- + dAtA[i] = 0x22 + } + if m.BoolValue != nil { + i-- + if *m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.IntValue != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue)) + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func (m *DeviceCapacity) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceCapacity) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceCapacity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Constraints) > 0 { + for iNdEx := len(m.Constraints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Constraints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceClaimConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceClaimConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceClaimConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requests[iNdEx]) + copy(dAtA[i:], m.Requests[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceClass) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceClass) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceClassConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceClassConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceClassConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceClassList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceClassList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceClassSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceClassSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Selectors) > 0 { + for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Opaque != nil { + { + size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeviceConstraint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceConstraint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MatchAttribute != nil { + i -= len(*m.MatchAttribute) + copy(dAtA[i:], *m.MatchAttribute) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchAttribute))) + i-- + dAtA[i] = 0x12 + } + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requests[iNdEx]) + copy(dAtA[i:], m.Requests[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminAccess != nil { + i-- + if *m.AdminAccess { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + i = encodeVarintGenerated(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x28 + i -= len(m.AllocationMode) + copy(dAtA[i:], m.AllocationMode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) + i-- + dAtA[i] = 0x22 + if len(m.Selectors) > 0 { + for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + i -= len(m.DeviceClassName) + copy(dAtA[i:], m.DeviceClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceRequestAllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceRequestAllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AdminAccess != nil { + i-- + if *m.AdminAccess { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + i -= len(m.Device) + copy(dAtA[i:], m.Device) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device))) + i-- + dAtA[i] = 0x22 + i -= len(m.Pool) + copy(dAtA[i:], m.Pool) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool))) + i-- + dAtA[i] = 0x1a + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0x12 + i -= len(m.Request) + copy(dAtA[i:], m.Request) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CEL != nil { + { + size, err := m.CEL.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NetworkDeviceData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkDeviceData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NetworkDeviceData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.HardwareAddress) + copy(dAtA[i:], m.HardwareAddress) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.HardwareAddress))) + i-- + dAtA[i] = 0x1a + if len(m.IPs) > 0 { + for iNdEx := len(m.IPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.IPs[iNdEx]) + copy(dAtA[i:], m.IPs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.IPs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.InterfaceName) + copy(dAtA[i:], m.InterfaceName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.InterfaceName))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaim) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimConsumerReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimConsumerReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimConsumerReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x2a + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x22 + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0x1a + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.ReservedFor) > 0 { + for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ReservedFor[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Allocation != nil { + { + size, err := m.Allocation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResourceClaimTemplate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimTemplate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimTemplateList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimTemplateList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceClaimTemplateSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceClaimTemplateSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourcePool) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceSliceCount)) + i-- + dAtA[i] = 0x18 + i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) + i-- + dAtA[i] = 0x10 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + i-- + if m.AllNodes { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + if m.NodeSelector != nil { + { + size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a + { + size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AllocatedDeviceStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Pool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Device) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.Data.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NetworkData != nil { + l = m.NetworkData.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *AllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Devices.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NodeSelector != nil { + l = m.NodeSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *BasicDevice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for k, v := range m.Attributes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.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 *CELDeviceSelector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Device) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.Basic != nil { + l = m.Basic.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DeviceAllocationConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Source) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeviceAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *DeviceAttribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IntValue != nil { + n += 1 + sovGenerated(uint64(*m.IntValue)) + } + if m.BoolValue != nil { + n += 2 + } + if m.StringValue != nil { + l = len(*m.StringValue) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.VersionValue != nil { + l = len(*m.VersionValue) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DeviceCapacity) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Value.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeviceClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Constraints) > 0 { + for _, e := range m.Constraints { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *DeviceClaimConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeviceClass) Size() (n int) { + if m == nil { + return 0 + } + 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 *DeviceClassConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *DeviceClassList) Size() (n int) { + if m == nil { + return 0 + } + 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 *DeviceClassSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *DeviceConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Opaque != nil { + l = m.Opaque.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DeviceConstraint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.MatchAttribute != nil { + l = len(*m.MatchAttribute) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *DeviceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DeviceClassName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.AllocationMode) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Count)) + if m.AdminAccess != nil { + n += 2 + } + return n +} + +func (m *DeviceRequestAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Request) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Pool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Device) + n += 1 + l + sovGenerated(uint64(l)) + if m.AdminAccess != nil { + n += 2 + } + return n +} + +func (m *DeviceSelector) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CEL != nil { + l = m.CEL.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *NetworkDeviceData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.InterfaceName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.IPs) > 0 { + for _, s := range m.IPs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.HardwareAddress) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *OpaqueDeviceConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceClaim) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimConsumerReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + 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)) + return n +} + +func (m *ResourceClaimList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Devices.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ResourceClaimStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Allocation != nil { + l = m.Allocation.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ReservedFor) > 0 { + for _, e := range m.ReservedFor { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ResourceClaimTemplate) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimTemplateList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceClaimTemplateSpec) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourcePool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + n += 1 + sovGenerated(uint64(m.ResourceSliceCount)) + return n +} + +func (m *ResourceSlice) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceSliceList) Size() (n int) { + if m == nil { + return 0 + } + 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 *ResourceSliceSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Pool.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + if m.NodeSelector != nil { + l = m.NodeSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 2 + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AllocatedDeviceStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForConditions := "[]Condition{" + for _, f := range this.Conditions { + repeatedStringForConditions += fmt.Sprintf("%v", f) + "," + } + repeatedStringForConditions += "}" + s := strings.Join([]string{`&AllocatedDeviceStatus{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `Conditions:` + repeatedStringForConditions + `,`, + `Data:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Data), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `NetworkData:` + strings.Replace(this.NetworkData.String(), "NetworkDeviceData", "NetworkDeviceData", 1) + `,`, + `}`, + }, "") + return s +} +func (this *AllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllocationResult{`, + `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, + `}`, + }, "") + return s +} +func (this *BasicDevice) String() string { + if this == nil { + return "nil" + } + keysForAttributes := make([]string, 0, len(this.Attributes)) + for k := range this.Attributes { + keysForAttributes = append(keysForAttributes, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" + for _, k := range keysForAttributes { + mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) + } + mapStringForAttributes += "}" + 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 := "map[QualifiedName]DeviceCapacity{" + for _, k := range keysForCapacity { + mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) + } + mapStringForCapacity += "}" + s := strings.Join([]string{`&BasicDevice{`, + `Attributes:` + mapStringForAttributes + `,`, + `Capacity:` + mapStringForCapacity + `,`, + `}`, + }, "") + return s +} +func (this *CELDeviceSelector) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CELDeviceSelector{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s +} +func (this *Device) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Device{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Basic:` + strings.Replace(this.Basic.String(), "BasicDevice", "BasicDevice", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAllocationConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceAllocationConfiguration{`, + `Source:` + fmt.Sprintf("%v", this.Source) + `,`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAllocationResult) String() string { + if this == nil { + return "nil" + } + repeatedStringForResults := "[]DeviceRequestAllocationResult{" + for _, f := range this.Results { + repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DeviceRequestAllocationResult", "DeviceRequestAllocationResult", 1), `&`, ``, 1) + "," + } + repeatedStringForResults += "}" + repeatedStringForConfig := "[]DeviceAllocationConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceAllocationConfiguration", "DeviceAllocationConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceAllocationResult{`, + `Results:` + repeatedStringForResults + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAttribute) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceAttribute{`, + `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, + `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, + `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, + `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceCapacity) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceCapacity{`, + `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "Quantity", "resource.Quantity", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClaim) String() string { + if this == nil { + return "nil" + } + repeatedStringForRequests := "[]DeviceRequest{" + for _, f := range this.Requests { + repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "DeviceRequest", "DeviceRequest", 1), `&`, ``, 1) + "," + } + repeatedStringForRequests += "}" + repeatedStringForConstraints := "[]DeviceConstraint{" + for _, f := range this.Constraints { + repeatedStringForConstraints += strings.Replace(strings.Replace(f.String(), "DeviceConstraint", "DeviceConstraint", 1), `&`, ``, 1) + "," + } + repeatedStringForConstraints += "}" + repeatedStringForConfig := "[]DeviceClaimConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClaimConfiguration", "DeviceClaimConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceClaim{`, + `Requests:` + repeatedStringForRequests + `,`, + `Constraints:` + repeatedStringForConstraints + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClaimConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceClaimConfiguration{`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClass) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClassConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceClassConfiguration{`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClassList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]DeviceClass{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceClass", "DeviceClass", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&DeviceClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClassSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForSelectors := "[]DeviceSelector{" + for _, f := range this.Selectors { + repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectors += "}" + repeatedStringForConfig := "[]DeviceClassConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClassConfiguration", "DeviceClassConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceClassSpec{`, + `Selectors:` + repeatedStringForSelectors + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *DeviceConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceConfiguration{`, + `Opaque:` + strings.Replace(this.Opaque.String(), "OpaqueDeviceConfiguration", "OpaqueDeviceConfiguration", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceConstraint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceConstraint{`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `MatchAttribute:` + valueToStringGenerated(this.MatchAttribute) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceRequest) String() string { + if this == nil { + return "nil" + } + repeatedStringForSelectors := "[]DeviceSelector{" + for _, f := range this.Selectors { + repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," + } + repeatedStringForSelectors += "}" + s := strings.Join([]string{`&DeviceRequest{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`, + `Selectors:` + repeatedStringForSelectors + `,`, + `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, + `Count:` + fmt.Sprintf("%v", this.Count) + `,`, + `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceRequestAllocationResult) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceRequestAllocationResult{`, + `Request:` + fmt.Sprintf("%v", this.Request) + `,`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, + `AdminAccess:` + valueToStringGenerated(this.AdminAccess) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceSelector) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceSelector{`, + `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`, + `}`, + }, "") + return s +} +func (this *NetworkDeviceData) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkDeviceData{`, + `InterfaceName:` + fmt.Sprintf("%v", this.InterfaceName) + `,`, + `IPs:` + fmt.Sprintf("%v", this.IPs) + `,`, + `HardwareAddress:` + fmt.Sprintf("%v", this.HardwareAddress) + `,`, + `}`, + }, "") + return s +} +func (this *OpaqueDeviceConfiguration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OpaqueDeviceConfiguration{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaim) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaim{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ResourceClaimStatus", "ResourceClaimStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimConsumerReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimConsumerReference{`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaim{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaim", "ResourceClaim", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimSpec{`, + `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForReservedFor := "[]ResourceClaimConsumerReference{" + for _, f := range this.ReservedFor { + repeatedStringForReservedFor += strings.Replace(strings.Replace(f.String(), "ResourceClaimConsumerReference", "ResourceClaimConsumerReference", 1), `&`, ``, 1) + "," + } + repeatedStringForReservedFor += "}" + repeatedStringForDevices := "[]AllocatedDeviceStatus{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "AllocatedDeviceStatus", "AllocatedDeviceStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForDevices += "}" + s := strings.Join([]string{`&ResourceClaimStatus{`, + `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, + `ReservedFor:` + repeatedStringForReservedFor + `,`, + `Devices:` + repeatedStringForDevices + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimTemplate{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimTemplateSpec", "ResourceClaimTemplateSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceClaimTemplate{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimTemplate", "ResourceClaimTemplate", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceClaimTemplateList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceClaimTemplateSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceClaimTemplateSpec{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceClaimSpec", "ResourceClaimSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourcePool) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourcePool{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `ResourceSliceCount:` + fmt.Sprintf("%v", this.ResourceSliceCount) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSlice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceSlice{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSliceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ResourceSlice{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceSlice", "ResourceSlice", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ResourceSliceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ResourceSliceSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForDevices := "[]Device{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "Device", "Device", 1), `&`, ``, 1) + "," + } + repeatedStringForDevices += "}" + s := strings.Join([]string{`&ResourceSliceSpec{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v11.NodeSelector", 1) + `,`, + `AllNodes:` + fmt.Sprintf("%v", this.AllNodes) + `,`, + `Devices:` + repeatedStringForDevices + `,`, + `}`, + }, "") + 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 *AllocatedDeviceStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocatedDeviceStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocatedDeviceStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pool = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, v1.Condition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NetworkData == nil { + m.NetworkData = &NetworkDeviceData{} + } + if err := m.NetworkData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeSelector == nil { + m.NodeSelector = &v11.NodeSelector{} + } + if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BasicDevice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attributes == nil { + m.Attributes = make(map[QualifiedName]DeviceAttribute) + } + var mapkey QualifiedName + mapvalue := &DeviceAttribute{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + 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 postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &DeviceAttribute{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Attributes[QualifiedName(mapkey)] = *mapvalue + iNdEx = postIndex + case 2: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Capacity == nil { + m.Capacity = make(map[QualifiedName]DeviceCapacity) + } + var mapkey QualifiedName + mapvalue := &DeviceCapacity{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + 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 postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &DeviceCapacity{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Capacity[QualifiedName(mapkey)] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Expression = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 Basic", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Basic == nil { + m.Basic = &BasicDevice{} + } + if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, DeviceRequestAllocationResult{}) + if err := m.Results[len(m.Results)-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 Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Config = append(m.Config, DeviceAllocationConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", 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.IntValue = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.BoolValue = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.StringValue = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.VersionValue = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceCapacity) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceCapacity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceCapacity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClaim) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, DeviceRequest{}) + if err := m.Requests[len(m.Requests)-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 Constraints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Constraints = append(m.Constraints, DeviceConstraint{}) + if err := m.Constraints[len(m.Constraints)-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 Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Config = append(m.Config, DeviceClaimConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClass) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClass: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClassList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClassList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, DeviceClass{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-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 Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Config = append(m.Config, DeviceClassConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Opaque == nil { + m.Opaque = &OpaqueDeviceConfiguration{} + } + if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := FullyQualifiedName(dAtA[iNdEx:postIndex]) + m.MatchAttribute = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceRequest: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 DeviceClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceClassName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-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 AllocationMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllocationMode = DeviceAllocationMode(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.AdminAccess = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Request = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pool = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Device = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.AdminAccess = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CEL == nil { + m.CEL = &CELDeviceSelector{} + } + if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkDeviceData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkDeviceData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkDeviceData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InterfaceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InterfaceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IPs = append(m.IPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HardwareAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HardwareAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OpaqueDeviceConfiguration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OpaqueDeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaim) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaim: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimConsumerReference: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaim{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Allocation == nil { + m.Allocation = &AllocationResult{} + } + if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) + if err := m.ReservedFor[len(m.ReservedFor)-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 Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Devices = append(m.Devices, AllocatedDeviceStatus{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimTemplate: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimTemplateList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceClaimTemplate{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceClaimTemplateSpec: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourcePool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourcePool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourcePool: 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field 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 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceSliceCount", wireType) + } + m.ResourceSliceCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResourceSliceCount |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceSlice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceSlice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceSlice: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceSliceList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceSliceList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceSliceList: 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 < 0 { + return ErrInvalidLengthGenerated + } + 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 < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ResourceSlice{}) + 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) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceSliceSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceSliceSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NodeName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeSelector == nil { + m.NodeSelector = &v11.NodeSelector{} + } + if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.AllNodes = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Devices = append(m.Devices, Device{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+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 + depth := 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 + } + } + case 1: + iNdEx += 8 + 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 + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/k8s.io/api/resource/v1beta1/generated.proto b/vendor/k8s.io/api/resource/v1beta1/generated.proto new file mode 100644 index 0000000000..6d525d5b85 --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/generated.proto @@ -0,0 +1,892 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY 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.api.resource.v1beta1; + +import "k8s.io/api/core/v1/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"; + +// Package-wide variables from generator "generated". +option go_package = "k8s.io/api/resource/v1beta1"; + +// AllocatedDeviceStatus contains the status of an allocated device, if the +// driver chooses to report it. This may include driver-specific information. +message AllocatedDeviceStatus { + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + optional string driver = 1; + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + optional string pool = 2; + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + optional string device = 3; + + // Conditions contains the latest observation of the device's state. + // If the device has been configured according to the class and claim + // config references, the `Ready` condition should be True. + // + // +optional + // +listType=map + // +listMapKey=type + repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4; + + // Data contains arbitrary driver-specific data. + // + // The length of the raw data must be smaller or equal to 10 Ki. + // + // +optional + optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5; + + // NetworkData contains network-related information specific to the device. + // + // +optional + optional NetworkDeviceData networkData = 6; +} + +// AllocationResult contains attributes of an allocated resource. +message AllocationResult { + // Devices is the result of allocating devices. + // + // +optional + optional DeviceAllocationResult devices = 1; + + // NodeSelector defines where the allocated resources are available. If + // unset, they are available everywhere. + // + // +optional + optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 3; +} + +// BasicDevice defines one device instance. +message BasicDevice { + // Attributes defines the set of attributes for this device. + // The name of each attribute must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + map attributes = 1; + + // Capacity defines the set of capacities for this device. + // The name of each capacity must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + map capacity = 2; +} + +// CELDeviceSelector contains a CEL expression for selecting a device. +message CELDeviceSelector { + // Expression is a CEL expression which evaluates a single device. It + // must evaluate to true when the device under consideration satisfies + // the desired criteria, and false when it does not. Any other result + // is an error and causes allocation of devices to abort. + // + // The expression's input is an object named "device", which carries + // the following properties: + // - driver (string): the name of the driver which defines this device. + // - attributes (map[string]object): the device's attributes, grouped by prefix + // (e.g. device.attributes["dra.example.com"] evaluates to an object with all + // of the attributes which were prefixed by "dra.example.com". + // - capacity (map[string]object): the device's capacities, grouped by prefix. + // + // Example: Consider a device with driver="dra.example.com", which exposes + // two attributes named "model" and "ext.example.com/family" and which + // exposes one capacity named "modules". This input to this expression + // would have the following fields: + // + // device.driver + // device.attributes["dra.example.com"].model + // device.attributes["ext.example.com"].family + // device.capacity["dra.example.com"].modules + // + // The device.driver field can be used to check for a specific driver, + // either as a high-level precondition (i.e. you only want to consider + // devices from this driver) or as part of a multi-clause expression + // that is meant to consider devices from different drivers. + // + // The value type of each attribute is defined by the device + // definition, and users who write these expressions must consult the + // documentation for their specific drivers. The value type of each + // capacity is Quantity. + // + // If an unknown prefix is used as a lookup in either device.attributes + // or device.capacity, an empty map will be returned. Any reference to + // an unknown field will cause an evaluation error and allocation to + // abort. + // + // A robust expression should check for the existence of attributes + // before referencing them. + // + // For ease of use, the cel.bind() function is enabled, and can be used + // to simplify expressions that access multiple attributes with the + // same domain. For example: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) + // + // The length of the expression must be smaller or equal to 10 Ki. The + // cost of evaluating it is also limited based on the estimated number + // of logical steps. + // + // +required + optional string expression = 1; +} + +// Device represents one individual hardware instance that can be selected based +// on its attributes. Besides the name, exactly one field must be set. +message Device { + // Name is unique identifier among all devices managed by + // the driver in the pool. It must be a DNS label. + // + // +required + optional string name = 1; + + // Basic defines one device instance. + // + // +optional + // +oneOf=deviceType + optional BasicDevice basic = 2; +} + +// DeviceAllocationConfiguration gets embedded in an AllocationResult. +message DeviceAllocationConfiguration { + // Source records whether the configuration comes from a class and thus + // is not something that a normal user would have been able to set + // or from a claim. + // + // +required + optional string source = 1; + + // Requests lists the names of requests where the configuration applies. + // If empty, its applies to all requests. + // + // +optional + // +listType=atomic + repeated string requests = 2; + + optional DeviceConfiguration deviceConfiguration = 3; +} + +// DeviceAllocationResult is the result of allocating devices. +message DeviceAllocationResult { + // Results lists all allocated devices. + // + // +optional + // +listType=atomic + repeated DeviceRequestAllocationResult results = 1; + + // This field is a combination of all the claim and class configuration parameters. + // Drivers can distinguish between those based on a flag. + // + // This includes configuration parameters for drivers which have no allocated + // devices in the result because it is up to the drivers which configuration + // parameters they support. They can silently ignore unknown configuration + // parameters. + // + // +optional + // +listType=atomic + repeated DeviceAllocationConfiguration config = 2; +} + +// DeviceAttribute must have exactly one field set. +message DeviceAttribute { + // IntValue is a number. + // + // +optional + // +oneOf=ValueType + optional int64 int = 2; + + // BoolValue is a true/false value. + // + // +optional + // +oneOf=ValueType + optional bool bool = 3; + + // StringValue is a string. Must not be longer than 64 characters. + // + // +optional + // +oneOf=ValueType + optional string string = 4; + + // VersionValue is a semantic version according to semver.org spec 2.0.0. + // Must not be longer than 64 characters. + // + // +optional + // +oneOf=ValueType + optional string version = 5; +} + +// DeviceCapacity describes a quantity associated with a device. +message DeviceCapacity { + // Value defines how much of a certain device capacity is available. + // + // +required + optional .k8s.io.apimachinery.pkg.api.resource.Quantity value = 1; +} + +// DeviceClaim defines how to request devices with a ResourceClaim. +message DeviceClaim { + // Requests represent individual requests for distinct devices which + // must all be satisfied. If empty, nothing needs to be allocated. + // + // +optional + // +listType=atomic + repeated DeviceRequest requests = 1; + + // These constraints must be satisfied by the set of devices that get + // allocated for the claim. + // + // +optional + // +listType=atomic + repeated DeviceConstraint constraints = 2; + + // This field holds configuration for multiple potential drivers which + // could satisfy requests in this claim. It is ignored while allocating + // the claim. + // + // +optional + // +listType=atomic + repeated DeviceClaimConfiguration config = 3; +} + +// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. +message DeviceClaimConfiguration { + // Requests lists the names of requests where the configuration applies. + // If empty, it applies to all requests. + // + // +optional + // +listType=atomic + repeated string requests = 1; + + optional DeviceConfiguration deviceConfiguration = 2; +} + +// DeviceClass is a vendor- or admin-provided resource that contains +// device configuration and selectors. It can be referenced in +// the device requests of a claim to apply these presets. +// Cluster scoped. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +message DeviceClass { + // Standard object metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec defines what can be allocated and how to configure it. + // + // This is mutable. Consumers have to be prepared for classes changing + // at any time, either because they get updated or replaced. Claim + // allocations are done once based on whatever was set in classes at + // the time of allocation. + // + // Changing the spec automatically increments the metadata.generation number. + optional DeviceClassSpec spec = 2; +} + +// DeviceClassConfiguration is used in DeviceClass. +message DeviceClassConfiguration { + optional DeviceConfiguration deviceConfiguration = 1; +} + +// DeviceClassList is a collection of classes. +message DeviceClassList { + // Standard list metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of resource classes. + repeated DeviceClass items = 2; +} + +// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated +// and how to configure it. +message DeviceClassSpec { + // Each selector must be satisfied by a device which is claimed via this class. + // + // +optional + // +listType=atomic + repeated DeviceSelector selectors = 1; + + // Config defines configuration parameters that apply to each device that is claimed via this class. + // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor + // configuration applies to exactly one driver. + // + // They are passed to the driver, but are not considered while allocating the claim. + // + // +optional + // +listType=atomic + repeated DeviceClassConfiguration config = 2; +} + +// DeviceConfiguration must have exactly one field set. It gets embedded +// inline in some other structs which have other fields, so field names must +// not conflict with those. +message DeviceConfiguration { + // Opaque provides driver-specific configuration parameters. + // + // +optional + // +oneOf=ConfigurationType + optional OpaqueDeviceConfiguration opaque = 1; +} + +// DeviceConstraint must have exactly one field set besides Requests. +message DeviceConstraint { + // Requests is a list of the one or more requests in this claim which + // must co-satisfy this constraint. If a request is fulfilled by + // multiple devices, then all of the devices must satisfy the + // constraint. If this is not specified, this constraint applies to all + // requests in this claim. + // + // +optional + // +listType=atomic + repeated string requests = 1; + + // MatchAttribute requires that all devices in question have this + // attribute and that its type and value are the same across those + // devices. + // + // For example, if you specified "dra.example.com/numa" (a hypothetical example!), + // then only devices in the same NUMA node will be chosen. A device which + // does not have that attribute will not be chosen. All devices should + // use a value of the same type for this attribute because that is part of + // its specification, but if one device doesn't, then it also will not be + // chosen. + // + // Must include the domain qualifier. + // + // +optional + // +oneOf=ConstraintType + optional string matchAttribute = 2; +} + +// DeviceRequest is a request for devices required for a claim. +// This is typically a request for a single resource like a device, but can +// also ask for several identical devices. +// +// A DeviceClassName is currently required. Clients must check that it is +// indeed set. It's absence indicates that something changed in a way that +// is not supported by the client yet, in which case it must refuse to +// handle the request. +message DeviceRequest { + // Name can be used to reference this request in a pod.spec.containers[].resources.claims + // entry and in a constraint of the claim. + // + // Must be a DNS label. + // + // +required + optional string name = 1; + + // DeviceClassName references a specific DeviceClass, which can define + // additional configuration and selectors to be inherited by this + // request. + // + // A class is required. Which classes are available depends on the cluster. + // + // Administrators may use this to restrict which devices may get + // requested by only installing classes with selectors for permitted + // devices. If users are free to request anything without restrictions, + // then administrators can create an empty DeviceClass for users + // to reference. + // + // +required + optional string deviceClassName = 2; + + // Selectors define criteria which must be satisfied by a specific + // device in order for that device to be considered for this + // request. All selectors must be satisfied for a device to be + // considered. + // + // +optional + // +listType=atomic + repeated DeviceSelector selectors = 3; + + // AllocationMode and its related fields define how devices are allocated + // to satisfy this request. Supported values are: + // + // - ExactCount: This request is for a specific number of devices. + // This is the default. The exact number is provided in the + // count field. + // + // - All: This request is for all of the matching devices in a pool. + // Allocation will fail if some devices are already allocated, + // unless adminAccess is requested. + // + // If AlloctionMode is not specified, the default mode is ExactCount. If + // the mode is ExactCount and count is not specified, the default count is + // one. Any other requests must specify this field. + // + // More modes may get added in the future. Clients must refuse to handle + // requests with unknown modes. + // + // +optional + optional string allocationMode = 4; + + // Count is used only when the count mode is "ExactCount". Must be greater than zero. + // If AllocationMode is ExactCount and this field is not specified, the default is one. + // + // +optional + // +oneOf=AllocationMode + optional int64 count = 5; + + // AdminAccess indicates that this is a claim for administrative access + // to the device(s). Claims with AdminAccess are expected to be used for + // monitoring or other management services for a device. They ignore + // all ordinary claims to the device with respect to access modes and + // any resource allocations. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // + // +optional + // +featureGate=DRAAdminAccess + optional bool adminAccess = 6; +} + +// DeviceRequestAllocationResult contains the allocation result for one request. +message DeviceRequestAllocationResult { + // Request is the name of the request in the claim which caused this + // device to be allocated. Multiple devices may have been allocated + // per request. + // + // +required + optional string request = 1; + + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + optional string driver = 2; + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + optional string pool = 3; + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + optional string device = 4; + + // AdminAccess indicates that this device was allocated for + // administrative access. See the corresponding request field + // for a definition of mode. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // + // +optional + // +featureGate=DRAAdminAccess + optional bool adminAccess = 5; +} + +// DeviceSelector must have exactly one field set. +message DeviceSelector { + // CEL contains a CEL expression for selecting a device. + // + // +optional + // +oneOf=SelectorType + optional CELDeviceSelector cel = 1; +} + +// NetworkDeviceData provides network-related details for the allocated device. +// This information may be filled by drivers or other components to configure +// or identify the device within a network context. +message NetworkDeviceData { + // InterfaceName specifies the name of the network interface associated with + // the allocated device. This might be the name of a physical or virtual + // network interface being configured in the pod. + // + // Must not be longer than 256 characters. + // + // +optional + optional string interfaceName = 1; + + // IPs lists the network addresses assigned to the device's network interface. + // This can include both IPv4 and IPv6 addresses. + // The IPs are in the CIDR notation, which includes both the address and the + // associated subnet mask. + // e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6. + // + // +optional + // +listType=atomic + repeated string ips = 2; + + // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. + // + // Must not be longer than 128 characters. + // + // +optional + optional string hardwareAddress = 3; +} + +// OpaqueDeviceConfiguration contains configuration parameters for a driver +// in a format defined by the driver vendor. +message OpaqueDeviceConfiguration { + // Driver is used to determine which kubelet plugin needs + // to be passed these configuration parameters. + // + // An admission policy provided by the driver developer could use this + // to decide whether it needs to validate them. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + optional string driver = 1; + + // Parameters can contain arbitrary data. It is the responsibility of + // the driver developer to handle validation and versioning. Typically this + // includes self-identification and a version ("kind" + "apiVersion" for + // Kubernetes types), with conversion between different versions. + // + // The length of the raw data must be smaller or equal to 10 Ki. + // + // +required + optional .k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; +} + +// ResourceClaim describes a request for access to resources in the cluster, +// for use by workloads. For example, if a workload needs an accelerator device +// with specific properties, this is how that request is expressed. The status +// stanza tracks whether this claim has been satisfied and what specific +// resources have been allocated. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +message ResourceClaim { + // Standard object metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec describes what is being requested and how to configure it. + // The spec is immutable. + optional ResourceClaimSpec spec = 2; + + // Status describes whether the claim is ready to use and what has been allocated. + // +optional + optional ResourceClaimStatus status = 3; +} + +// ResourceClaimConsumerReference contains enough information to let you +// locate the consumer of a ResourceClaim. The user must be a resource in the same +// namespace as the ResourceClaim. +message ResourceClaimConsumerReference { + // APIGroup is the group for the resource being referenced. It is + // empty for the core API. This matches the group in the APIVersion + // that is used when creating the resources. + // +optional + optional string apiGroup = 1; + + // Resource is the type of resource being referenced, for example "pods". + // +required + optional string resource = 3; + + // Name is the name of resource being referenced. + // +required + optional string name = 4; + + // UID identifies exactly one incarnation of the resource. + // +required + optional string uid = 5; +} + +// ResourceClaimList is a collection of claims. +message ResourceClaimList { + // Standard list metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of resource claims. + repeated ResourceClaim items = 2; +} + +// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. +message ResourceClaimSpec { + // Devices defines how to request devices. + // + // +optional + optional DeviceClaim devices = 1; +} + +// ResourceClaimStatus tracks whether the resource has been allocated and what +// the result of that was. +message ResourceClaimStatus { + // Allocation is set once the claim has been allocated successfully. + // + // +optional + optional AllocationResult allocation = 1; + + // ReservedFor indicates which entities are currently allowed to use + // the claim. A Pod which references a ResourceClaim which is not + // reserved for that Pod will not be started. A claim that is in + // use or might be in use because it has been reserved must not get + // deallocated. + // + // In a cluster with multiple scheduler instances, two pods might get + // scheduled concurrently by different schedulers. When they reference + // the same ResourceClaim which already has reached its maximum number + // of consumers, only one pod can be scheduled. + // + // Both schedulers try to add their pod to the claim.status.reservedFor + // field, but only the update that reaches the API server first gets + // stored. The other one fails with an error and the scheduler + // which issued it knows that it must put the pod back into the queue, + // waiting for the ResourceClaim to become usable again. + // + // There can be at most 32 such reservations. This may get increased in + // the future, but not reduced. + // + // +optional + // +listType=map + // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid + repeated ResourceClaimConsumerReference reservedFor = 2; + + // Devices contains the status of each device allocated for this + // claim, as reported by the driver. This can include driver-specific + // information. Entries are owned by their respective drivers. + // + // +optional + // +listType=map + // +listMapKey=driver + // +listMapKey=device + // +listMapKey=pool + // +featureGate=DRAResourceClaimDeviceStatus + repeated AllocatedDeviceStatus devices = 4; +} + +// ResourceClaimTemplate is used to produce ResourceClaim objects. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +message ResourceClaimTemplate { + // Standard object metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Describes the ResourceClaim that is to be generated. + // + // This field is immutable. A ResourceClaim will get created by the + // control plane for a Pod when needed and then not get updated + // anymore. + optional ResourceClaimTemplateSpec spec = 2; +} + +// ResourceClaimTemplateList is a collection of claim templates. +message ResourceClaimTemplateList { + // Standard list metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of resource claim templates. + repeated ResourceClaimTemplate items = 2; +} + +// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. +message ResourceClaimTemplateSpec { + // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim + // when creating it. No other fields are allowed and will be rejected during + // validation. + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec for the ResourceClaim. The entire content is copied unchanged + // into the ResourceClaim that gets created from this template. The + // same fields as in a ResourceClaim are also valid here. + optional ResourceClaimSpec spec = 2; +} + +// ResourcePool describes the pool that ResourceSlices belong to. +message ResourcePool { + // Name is used to identify the pool. For node-local devices, this + // is often the node name, but this is not required. + // + // It must not be longer than 253 characters and must consist of one or more DNS sub-domains + // separated by slashes. This field is immutable. + // + // +required + optional string name = 1; + + // Generation tracks the change in a pool over time. Whenever a driver + // changes something about one or more of the resources in a pool, it + // must change the generation in all ResourceSlices which are part of + // that pool. Consumers of ResourceSlices should only consider + // resources from the pool with the highest generation number. The + // generation may be reset by drivers, which should be fine for + // consumers, assuming that all ResourceSlices in a pool are updated to + // match or deleted. + // + // Combined with ResourceSliceCount, this mechanism enables consumers to + // detect pools which are comprised of multiple ResourceSlices and are + // in an incomplete state. + // + // +required + optional int64 generation = 2; + + // ResourceSliceCount is the total number of ResourceSlices in the pool at this + // generation number. Must be greater than zero. + // + // Consumers can use this to check whether they have seen all ResourceSlices + // belonging to the same pool. + // + // +required + optional int64 resourceSliceCount = 3; +} + +// ResourceSlice represents one or more resources in a pool of similar resources, +// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many +// ResourceSlices comprise a pool is determined by the driver. +// +// At the moment, the only supported resources are devices with attributes and capacities. +// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. +// The ResourceSlice in which a device gets published may change over time. The unique identifier +// for a device is the tuple , , . +// +// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number +// and updates all ResourceSlices with that new number and new resource definitions. A consumer +// must only use ResourceSlices with the highest generation number and ignore all others. +// +// When allocating all resources in a pool matching certain criteria or when +// looking for the best solution among several different alternatives, a +// consumer should check the number of ResourceSlices in a pool (included in +// each ResourceSlice) to determine whether its view of a pool is complete and +// if not, should wait until the driver has completed updating the pool. +// +// For resources that are not local to a node, the node name is not set. Instead, +// the driver may use a node selector to specify where the devices are available. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +message ResourceSlice { + // Standard object metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Contains the information published by the driver. + // + // Changing the spec automatically increments the metadata.generation number. + optional ResourceSliceSpec spec = 2; +} + +// ResourceSliceList is a collection of ResourceSlices. +message ResourceSliceList { + // Standard list metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of resource ResourceSlices. + repeated ResourceSlice items = 2; +} + +// ResourceSliceSpec contains the information published by the driver in one ResourceSlice. +message ResourceSliceSpec { + // Driver identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. This field is immutable. + // + // +required + optional string driver = 1; + + // Pool describes the pool that this ResourceSlice belongs to. + // + // +required + optional ResourcePool pool = 2; + + // NodeName identifies the node which provides the resources in this pool. + // A field selector can be used to list only ResourceSlice + // objects belonging to a certain node. + // + // This field can be used to limit access from nodes to ResourceSlices with + // the same node name. It also indicates to autoscalers that adding + // new nodes of the same type as some old node might also make new + // resources available. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // This field is immutable. + // + // +optional + // +oneOf=NodeSelection + optional string nodeName = 3; + + // NodeSelector defines which nodes have access to the resources in the pool, + // when that pool is not limited to a single node. + // + // Must use exactly one term. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 4; + + // AllNodes indicates that all nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + optional bool allNodes = 5; + + // Devices lists some or all of the devices in this pool. + // + // Must not have more than 128 entries. + // + // +optional + // +listType=atomic + repeated Device devices = 6; +} + diff --git a/vendor/k8s.io/api/resource/v1beta1/register.go b/vendor/k8s.io/api/resource/v1beta1/register.go new file mode 100644 index 0000000000..ce0a1d9305 --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/register.go @@ -0,0 +1,60 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "resource.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 ( + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &DeviceClass{}, + &DeviceClassList{}, + &ResourceClaim{}, + &ResourceClaimList{}, + &ResourceClaimTemplate{}, + &ResourceClaimTemplateList{}, + &ResourceSlice{}, + &ResourceSliceList{}, + ) + + // Add the watch version that applies + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/api/resource/v1beta1/types.go b/vendor/k8s.io/api/resource/v1beta1/types.go new file mode 100644 index 0000000000..a7f1ee7b54 --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/types.go @@ -0,0 +1,1084 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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/api/core/v1" + "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/validation" +) + +const ( + // Finalizer is the finalizer that gets set for claims + // which were allocated through a builtin controller. + // Reserved for use by Kubernetes, DRA driver controllers must + // use their own finalizer. + Finalizer = "resource.kubernetes.io/delete-protection" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// ResourceSlice represents one or more resources in a pool of similar resources, +// managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many +// ResourceSlices comprise a pool is determined by the driver. +// +// At the moment, the only supported resources are devices with attributes and capacities. +// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. +// The ResourceSlice in which a device gets published may change over time. The unique identifier +// for a device is the tuple , , . +// +// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number +// and updates all ResourceSlices with that new number and new resource definitions. A consumer +// must only use ResourceSlices with the highest generation number and ignore all others. +// +// When allocating all resources in a pool matching certain criteria or when +// looking for the best solution among several different alternatives, a +// consumer should check the number of ResourceSlices in a pool (included in +// each ResourceSlice) to determine whether its view of a pool is complete and +// if not, should wait until the driver has completed updating the pool. +// +// For resources that are not local to a node, the node name is not set. Instead, +// the driver may use a node selector to specify where the devices are available. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +type ResourceSlice struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Contains the information published by the driver. + // + // Changing the spec automatically increments the metadata.generation number. + Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + +const ( + // ResourceSliceSelectorNodeName can be used in a [metav1.ListOptions] + // field selector to filter based on [ResourceSliceSpec.NodeName]. + ResourceSliceSelectorNodeName = "spec.nodeName" + // ResourceSliceSelectorDriver can be used in a [metav1.ListOptions] + // field selector to filter based on [ResourceSliceSpec.Driver]. + ResourceSliceSelectorDriver = "spec.driver" +) + +// ResourceSliceSpec contains the information published by the driver in one ResourceSlice. +type ResourceSliceSpec struct { + // Driver identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. This field is immutable. + // + // +required + Driver string `json:"driver" protobuf:"bytes,1,name=driver"` + + // Pool describes the pool that this ResourceSlice belongs to. + // + // +required + Pool ResourcePool `json:"pool" protobuf:"bytes,2,name=pool"` + + // NodeName identifies the node which provides the resources in this pool. + // A field selector can be used to list only ResourceSlice + // objects belonging to a certain node. + // + // This field can be used to limit access from nodes to ResourceSlices with + // the same node name. It also indicates to autoscalers that adding + // new nodes of the same type as some old node might also make new + // resources available. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // This field is immutable. + // + // +optional + // +oneOf=NodeSelection + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,3,opt,name=nodeName"` + + // NodeSelector defines which nodes have access to the resources in the pool, + // when that pool is not limited to a single node. + // + // Must use exactly one term. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,4,opt,name=nodeSelector"` + + // AllNodes indicates that all nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + AllNodes bool `json:"allNodes,omitempty" protobuf:"bytes,5,opt,name=allNodes"` + + // Devices lists some or all of the devices in this pool. + // + // Must not have more than 128 entries. + // + // +optional + // +listType=atomic + Devices []Device `json:"devices" protobuf:"bytes,6,name=devices"` +} + +// ResourcePool describes the pool that ResourceSlices belong to. +type ResourcePool struct { + // Name is used to identify the pool. For node-local devices, this + // is often the node name, but this is not required. + // + // It must not be longer than 253 characters and must consist of one or more DNS sub-domains + // separated by slashes. This field is immutable. + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // Generation tracks the change in a pool over time. Whenever a driver + // changes something about one or more of the resources in a pool, it + // must change the generation in all ResourceSlices which are part of + // that pool. Consumers of ResourceSlices should only consider + // resources from the pool with the highest generation number. The + // generation may be reset by drivers, which should be fine for + // consumers, assuming that all ResourceSlices in a pool are updated to + // match or deleted. + // + // Combined with ResourceSliceCount, this mechanism enables consumers to + // detect pools which are comprised of multiple ResourceSlices and are + // in an incomplete state. + // + // +required + Generation int64 `json:"generation" protobuf:"bytes,2,name=generation"` + + // ResourceSliceCount is the total number of ResourceSlices in the pool at this + // generation number. Must be greater than zero. + // + // Consumers can use this to check whether they have seen all ResourceSlices + // belonging to the same pool. + // + // +required + ResourceSliceCount int64 `json:"resourceSliceCount" protobuf:"bytes,3,name=resourceSliceCount"` +} + +const ResourceSliceMaxSharedCapacity = 128 +const ResourceSliceMaxDevices = 128 +const PoolNameMaxLength = validation.DNS1123SubdomainMaxLength // Same as for a single node name. + +// Device represents one individual hardware instance that can be selected based +// on its attributes. Besides the name, exactly one field must be set. +type Device struct { + // Name is unique identifier among all devices managed by + // the driver in the pool. It must be a DNS label. + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // Basic defines one device instance. + // + // +optional + // +oneOf=deviceType + Basic *BasicDevice `json:"basic,omitempty" protobuf:"bytes,2,opt,name=basic"` +} + +// BasicDevice defines one device instance. +type BasicDevice struct { + // Attributes defines the set of attributes for this device. + // The name of each attribute must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + Attributes map[QualifiedName]DeviceAttribute `json:"attributes,omitempty" protobuf:"bytes,1,rep,name=attributes"` + + // Capacity defines the set of capacities for this device. + // The name of each capacity must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + Capacity map[QualifiedName]DeviceCapacity `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity"` +} + +// DeviceCapacity describes a quantity associated with a device. +type DeviceCapacity struct { + // Value defines how much of a certain device capacity is available. + // + // +required + Value resource.Quantity `json:"value" protobuf:"bytes,1,rep,name=value"` + + // potential future addition: fields which define how to "consume" + // capacity (= share a single device between different consumers). +} + +// Limit for the sum of the number of entries in both attributes and capacity. +const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32 + +// QualifiedName is the name of a device attribute or capacity. +// +// Attributes and capacities are defined either by the owner of the specific +// driver (usually the vendor) or by some 3rd party (e.g. the Kubernetes +// project). Because they are sometimes compared across devices, a given name +// is expected to mean the same thing and have the same type on all devices. +// +// Names must be either a C identifier (e.g. "theName") or a DNS subdomain +// followed by a slash ("/") followed by a C identifier +// (e.g. "dra.example.com/theName"). Names which do not include the +// domain prefix are assumed to be part of the driver's domain. Attributes +// or capacities defined by 3rd parties must include the domain prefix. +// +// The maximum length for the DNS subdomain is 63 characters (same as +// for driver names) and the maximum length of the C identifier +// is 32. +type QualifiedName string + +// FullyQualifiedName is a QualifiedName where the domain is set. +type FullyQualifiedName string + +// DeviceMaxDomainLength is the maximum length of the domain prefix in a fully-qualified name. +const DeviceMaxDomainLength = 63 + +// DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`/`). +const DeviceMaxIDLength = 32 + +// DeviceAttribute must have exactly one field set. +type DeviceAttribute struct { + // The Go field names below have a Value suffix to avoid a conflict between the + // field "String" and the corresponding method. That method is required. + // The Kubernetes API is defined without that suffix to keep it more natural. + + // IntValue is a number. + // + // +optional + // +oneOf=ValueType + IntValue *int64 `json:"int,omitempty" protobuf:"varint,2,opt,name=int"` + + // BoolValue is a true/false value. + // + // +optional + // +oneOf=ValueType + BoolValue *bool `json:"bool,omitempty" protobuf:"varint,3,opt,name=bool"` + + // StringValue is a string. Must not be longer than 64 characters. + // + // +optional + // +oneOf=ValueType + StringValue *string `json:"string,omitempty" protobuf:"bytes,4,opt,name=string"` + + // VersionValue is a semantic version according to semver.org spec 2.0.0. + // Must not be longer than 64 characters. + // + // +optional + // +oneOf=ValueType + VersionValue *string `json:"version,omitempty" protobuf:"bytes,5,opt,name=version"` +} + +// DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value. +const DeviceAttributeMaxValueLength = 64 + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// ResourceSliceList is a collection of ResourceSlices. +type ResourceSliceList 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 resource ResourceSlices. + Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// ResourceClaim describes a request for access to resources in the cluster, +// for use by workloads. For example, if a workload needs an accelerator device +// with specific properties, this is how that request is expressed. The status +// stanza tracks whether this claim has been satisfied and what specific +// resources have been allocated. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +type ResourceClaim struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec describes what is being requested and how to configure it. + // The spec is immutable. + Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` + + // Status describes whether the claim is ready to use and what has been allocated. + // +optional + Status ResourceClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. +type ResourceClaimSpec struct { + // Devices defines how to request devices. + // + // +optional + Devices DeviceClaim `json:"devices" protobuf:"bytes,1,name=devices"` + + // Controller is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // Controller string `json:"controller,omitempty" protobuf:"bytes,2,opt,name=controller"` +} + +// DeviceClaim defines how to request devices with a ResourceClaim. +type DeviceClaim struct { + // Requests represent individual requests for distinct devices which + // must all be satisfied. If empty, nothing needs to be allocated. + // + // +optional + // +listType=atomic + Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"` + + // These constraints must be satisfied by the set of devices that get + // allocated for the claim. + // + // +optional + // +listType=atomic + Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"` + + // This field holds configuration for multiple potential drivers which + // could satisfy requests in this claim. It is ignored while allocating + // the claim. + // + // +optional + // +listType=atomic + Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"` + + // Potential future extension, ignored by older schedulers. This is + // fine because scoring allows users to define a preference, without + // making it a hard requirement. + // + // Score *SomeScoringStruct +} + +const ( + DeviceRequestsMaxSize = AllocationResultsMaxSize + DeviceConstraintsMaxSize = 32 + DeviceConfigMaxSize = 32 +) + +// DeviceRequest is a request for devices required for a claim. +// This is typically a request for a single resource like a device, but can +// also ask for several identical devices. +// +// A DeviceClassName is currently required. Clients must check that it is +// indeed set. It's absence indicates that something changed in a way that +// is not supported by the client yet, in which case it must refuse to +// handle the request. +type DeviceRequest struct { + // Name can be used to reference this request in a pod.spec.containers[].resources.claims + // entry and in a constraint of the claim. + // + // Must be a DNS label. + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // DeviceClassName references a specific DeviceClass, which can define + // additional configuration and selectors to be inherited by this + // request. + // + // A class is required. Which classes are available depends on the cluster. + // + // Administrators may use this to restrict which devices may get + // requested by only installing classes with selectors for permitted + // devices. If users are free to request anything without restrictions, + // then administrators can create an empty DeviceClass for users + // to reference. + // + // +required + DeviceClassName string `json:"deviceClassName" protobuf:"bytes,2,name=deviceClassName"` + + // Selectors define criteria which must be satisfied by a specific + // device in order for that device to be considered for this + // request. All selectors must be satisfied for a device to be + // considered. + // + // +optional + // +listType=atomic + Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"` + + // AllocationMode and its related fields define how devices are allocated + // to satisfy this request. Supported values are: + // + // - ExactCount: This request is for a specific number of devices. + // This is the default. The exact number is provided in the + // count field. + // + // - All: This request is for all of the matching devices in a pool. + // Allocation will fail if some devices are already allocated, + // unless adminAccess is requested. + // + // If AlloctionMode is not specified, the default mode is ExactCount. If + // the mode is ExactCount and count is not specified, the default count is + // one. Any other requests must specify this field. + // + // More modes may get added in the future. Clients must refuse to handle + // requests with unknown modes. + // + // +optional + AllocationMode DeviceAllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,4,opt,name=allocationMode"` + + // Count is used only when the count mode is "ExactCount". Must be greater than zero. + // If AllocationMode is ExactCount and this field is not specified, the default is one. + // + // +optional + // +oneOf=AllocationMode + Count int64 `json:"count,omitempty" protobuf:"bytes,5,opt,name=count"` + + // AdminAccess indicates that this is a claim for administrative access + // to the device(s). Claims with AdminAccess are expected to be used for + // monitoring or other management services for a device. They ignore + // all ordinary claims to the device with respect to access modes and + // any resource allocations. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // + // +optional + // +featureGate=DRAAdminAccess + AdminAccess *bool `json:"adminAccess,omitempty" protobuf:"bytes,6,opt,name=adminAccess"` +} + +const ( + DeviceSelectorsMaxSize = 32 +) + +type DeviceAllocationMode string + +// Valid [DeviceRequest.CountMode] values. +const ( + DeviceAllocationModeExactCount = DeviceAllocationMode("ExactCount") + DeviceAllocationModeAll = DeviceAllocationMode("All") +) + +// DeviceSelector must have exactly one field set. +type DeviceSelector struct { + // CEL contains a CEL expression for selecting a device. + // + // +optional + // +oneOf=SelectorType + CEL *CELDeviceSelector `json:"cel,omitempty" protobuf:"bytes,1,opt,name=cel"` +} + +// CELDeviceSelector contains a CEL expression for selecting a device. +type CELDeviceSelector struct { + // Expression is a CEL expression which evaluates a single device. It + // must evaluate to true when the device under consideration satisfies + // the desired criteria, and false when it does not. Any other result + // is an error and causes allocation of devices to abort. + // + // The expression's input is an object named "device", which carries + // the following properties: + // - driver (string): the name of the driver which defines this device. + // - attributes (map[string]object): the device's attributes, grouped by prefix + // (e.g. device.attributes["dra.example.com"] evaluates to an object with all + // of the attributes which were prefixed by "dra.example.com". + // - capacity (map[string]object): the device's capacities, grouped by prefix. + // + // Example: Consider a device with driver="dra.example.com", which exposes + // two attributes named "model" and "ext.example.com/family" and which + // exposes one capacity named "modules". This input to this expression + // would have the following fields: + // + // device.driver + // device.attributes["dra.example.com"].model + // device.attributes["ext.example.com"].family + // device.capacity["dra.example.com"].modules + // + // The device.driver field can be used to check for a specific driver, + // either as a high-level precondition (i.e. you only want to consider + // devices from this driver) or as part of a multi-clause expression + // that is meant to consider devices from different drivers. + // + // The value type of each attribute is defined by the device + // definition, and users who write these expressions must consult the + // documentation for their specific drivers. The value type of each + // capacity is Quantity. + // + // If an unknown prefix is used as a lookup in either device.attributes + // or device.capacity, an empty map will be returned. Any reference to + // an unknown field will cause an evaluation error and allocation to + // abort. + // + // A robust expression should check for the existence of attributes + // before referencing them. + // + // For ease of use, the cel.bind() function is enabled, and can be used + // to simplify expressions that access multiple attributes with the + // same domain. For example: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) + // + // The length of the expression must be smaller or equal to 10 Ki. The + // cost of evaluating it is also limited based on the estimated number + // of logical steps. + // + // +required + Expression string `json:"expression" protobuf:"bytes,1,name=expression"` +} + +// CELSelectorExpressionMaxCost specifies the cost limit for a single CEL selector +// evaluation. +// +// There is no overall budget for selecting a device, so the actual time +// required for that is proportional to the number of CEL selectors and how +// often they need to be evaluated, which can vary depending on several factors +// (number of devices, cluster utilization, additional constraints). +// +// Validation against this limit and [CELSelectorExpressionMaxLength] happens +// only when setting an expression for the first time or when changing it. If +// the limits are changed in a future Kubernetes release, existing users are +// guaranteed that existing expressions will continue to be valid. +// +// However, the kube-scheduler also applies this cost limit at runtime, so it +// could happen that a valid expression fails at runtime after an up- or +// downgrade. This can also happen without version skew when the cost estimate +// underestimated the actual cost. That this might happen is the reason why +// kube-scheduler enforces the runtime limit instead of relying on validation. +// +// According to +// https://github.com/kubernetes/kubernetes/blob/4aeaf1e99e82da8334c0d6dddd848a194cd44b4f/staging/src/k8s.io/apiserver/pkg/apis/cel/config.go#L20-L22, +// this gives roughly 0.1 second for each expression evaluation. +// However, this depends on how fast the machine is. +const CELSelectorExpressionMaxCost = 1000000 + +// CELSelectorExpressionMaxLength is the maximum length of a CEL selector expression string. +const CELSelectorExpressionMaxLength = 10 * 1024 + +// DeviceConstraint must have exactly one field set besides Requests. +type DeviceConstraint struct { + // Requests is a list of the one or more requests in this claim which + // must co-satisfy this constraint. If a request is fulfilled by + // multiple devices, then all of the devices must satisfy the + // constraint. If this is not specified, this constraint applies to all + // requests in this claim. + // + // +optional + // +listType=atomic + Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` + + // MatchAttribute requires that all devices in question have this + // attribute and that its type and value are the same across those + // devices. + // + // For example, if you specified "dra.example.com/numa" (a hypothetical example!), + // then only devices in the same NUMA node will be chosen. A device which + // does not have that attribute will not be chosen. All devices should + // use a value of the same type for this attribute because that is part of + // its specification, but if one device doesn't, then it also will not be + // chosen. + // + // Must include the domain qualifier. + // + // +optional + // +oneOf=ConstraintType + MatchAttribute *FullyQualifiedName `json:"matchAttribute,omitempty" protobuf:"bytes,2,opt,name=matchAttribute"` + + // Potential future extension, not part of the current design: + // A CEL expression which compares different devices and returns + // true if they match. + // + // Because it would be part of a one-of, old schedulers will not + // accidentally ignore this additional, for them unknown match + // criteria. + // + // MatchExpression string +} + +// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. +type DeviceClaimConfiguration struct { + // Requests lists the names of requests where the configuration applies. + // If empty, it applies to all requests. + // + // +optional + // +listType=atomic + Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` + + DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"` +} + +// DeviceConfiguration must have exactly one field set. It gets embedded +// inline in some other structs which have other fields, so field names must +// not conflict with those. +type DeviceConfiguration struct { + // Opaque provides driver-specific configuration parameters. + // + // +optional + // +oneOf=ConfigurationType + Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"` +} + +// OpaqueDeviceConfiguration contains configuration parameters for a driver +// in a format defined by the driver vendor. +type OpaqueDeviceConfiguration struct { + // Driver is used to determine which kubelet plugin needs + // to be passed these configuration parameters. + // + // An admission policy provided by the driver developer could use this + // to decide whether it needs to validate them. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string `json:"driver" protobuf:"bytes,1,name=driver"` + + // Parameters can contain arbitrary data. It is the responsibility of + // the driver developer to handle validation and versioning. Typically this + // includes self-identification and a version ("kind" + "apiVersion" for + // Kubernetes types), with conversion between different versions. + // + // The length of the raw data must be smaller or equal to 10 Ki. + // + // +required + Parameters runtime.RawExtension `json:"parameters" protobuf:"bytes,2,name=parameters"` +} + +// OpaqueParametersMaxLength is the maximum length of the raw data in an +// [OpaqueDeviceConfiguration.Parameters] field. +const OpaqueParametersMaxLength = 10 * 1024 + +// ResourceClaimStatus tracks whether the resource has been allocated and what +// the result of that was. +type ResourceClaimStatus struct { + // Allocation is set once the claim has been allocated successfully. + // + // +optional + Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"` + + // ReservedFor indicates which entities are currently allowed to use + // the claim. A Pod which references a ResourceClaim which is not + // reserved for that Pod will not be started. A claim that is in + // use or might be in use because it has been reserved must not get + // deallocated. + // + // In a cluster with multiple scheduler instances, two pods might get + // scheduled concurrently by different schedulers. When they reference + // the same ResourceClaim which already has reached its maximum number + // of consumers, only one pod can be scheduled. + // + // Both schedulers try to add their pod to the claim.status.reservedFor + // field, but only the update that reaches the API server first gets + // stored. The other one fails with an error and the scheduler + // which issued it knows that it must put the pod back into the queue, + // waiting for the ResourceClaim to become usable again. + // + // There can be at most 32 such reservations. This may get increased in + // the future, but not reduced. + // + // +optional + // +listType=map + // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid + ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` + + // DeallocationRequested is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"bytes,3,opt,name=deallocationRequested"` + + // Devices contains the status of each device allocated for this + // claim, as reported by the driver. This can include driver-specific + // information. Entries are owned by their respective drivers. + // + // +optional + // +listType=map + // +listMapKey=driver + // +listMapKey=device + // +listMapKey=pool + // +featureGate=DRAResourceClaimDeviceStatus + Devices []AllocatedDeviceStatus `json:"devices,omitempty" protobuf:"bytes,4,opt,name=devices"` +} + +// ReservedForMaxSize is the maximum number of entries in +// claim.status.reservedFor. +const ResourceClaimReservedForMaxSize = 32 + +// ResourceClaimConsumerReference contains enough information to let you +// locate the consumer of a ResourceClaim. The user must be a resource in the same +// namespace as the ResourceClaim. +type ResourceClaimConsumerReference struct { + // APIGroup is the group for the resource being referenced. It is + // empty for the core API. This matches the group in the APIVersion + // that is used when creating the resources. + // +optional + APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"` + // Resource is the type of resource being referenced, for example "pods". + // +required + Resource string `json:"resource" protobuf:"bytes,3,name=resource"` + // Name is the name of resource being referenced. + // +required + Name string `json:"name" protobuf:"bytes,4,name=name"` + // UID identifies exactly one incarnation of the resource. + // +required + UID types.UID `json:"uid" protobuf:"bytes,5,name=uid"` +} + +// AllocationResult contains attributes of an allocated resource. +type AllocationResult struct { + // Devices is the result of allocating devices. + // + // +optional + Devices DeviceAllocationResult `json:"devices,omitempty" protobuf:"bytes,1,opt,name=devices"` + + // NodeSelector defines where the allocated resources are available. If + // unset, they are available everywhere. + // + // +optional + NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,3,opt,name=nodeSelector"` + + // Controller is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // Controller string `json:"controller,omitempty" protobuf:"bytes,4,opt,name=controller"` +} + +// DeviceAllocationResult is the result of allocating devices. +type DeviceAllocationResult struct { + // Results lists all allocated devices. + // + // +optional + // +listType=atomic + Results []DeviceRequestAllocationResult `json:"results,omitempty" protobuf:"bytes,1,opt,name=results"` + + // This field is a combination of all the claim and class configuration parameters. + // Drivers can distinguish between those based on a flag. + // + // This includes configuration parameters for drivers which have no allocated + // devices in the result because it is up to the drivers which configuration + // parameters they support. They can silently ignore unknown configuration + // parameters. + // + // +optional + // +listType=atomic + Config []DeviceAllocationConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` +} + +// AllocationResultsMaxSize represents the maximum number of +// entries in allocation.devices.results. +const AllocationResultsMaxSize = 32 + +// DeviceRequestAllocationResult contains the allocation result for one request. +type DeviceRequestAllocationResult struct { + // Request is the name of the request in the claim which caused this + // device to be allocated. Multiple devices may have been allocated + // per request. + // + // +required + Request string `json:"request" protobuf:"bytes,1,name=request"` + + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string `json:"driver" protobuf:"bytes,2,name=driver"` + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + Pool string `json:"pool" protobuf:"bytes,3,name=pool"` + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + Device string `json:"device" protobuf:"bytes,4,name=device"` + + // AdminAccess indicates that this device was allocated for + // administrative access. See the corresponding request field + // for a definition of mode. + // + // This is an alpha field and requires enabling the DRAAdminAccess + // feature gate. Admin access is disabled if this field is unset or + // set to false, otherwise it is enabled. + // + // +optional + // +featureGate=DRAAdminAccess + AdminAccess *bool `json:"adminAccess" protobuf:"bytes,5,name=adminAccess"` +} + +// DeviceAllocationConfiguration gets embedded in an AllocationResult. +type DeviceAllocationConfiguration struct { + // Source records whether the configuration comes from a class and thus + // is not something that a normal user would have been able to set + // or from a claim. + // + // +required + Source AllocationConfigSource `json:"source" protobuf:"bytes,1,name=source"` + + // Requests lists the names of requests where the configuration applies. + // If empty, its applies to all requests. + // + // +optional + // +listType=atomic + Requests []string `json:"requests,omitempty" protobuf:"bytes,2,opt,name=requests"` + + DeviceConfiguration `json:",inline" protobuf:"bytes,3,name=deviceConfiguration"` +} + +type AllocationConfigSource string + +// Valid [DeviceAllocationConfiguration.Source] values. +const ( + AllocationConfigSourceClass = "FromClass" + AllocationConfigSourceClaim = "FromClaim" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// ResourceClaimList is a collection of claims. +type ResourceClaimList 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 resource claims. + Items []ResourceClaim `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// DeviceClass is a vendor- or admin-provided resource that contains +// device configuration and selectors. It can be referenced in +// the device requests of a claim to apply these presets. +// Cluster scoped. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +type DeviceClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines what can be allocated and how to configure it. + // + // This is mutable. Consumers have to be prepared for classes changing + // at any time, either because they get updated or replaced. Claim + // allocations are done once based on whatever was set in classes at + // the time of allocation. + // + // Changing the spec automatically increments the metadata.generation number. + Spec DeviceClassSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + +// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated +// and how to configure it. +type DeviceClassSpec struct { + // Each selector must be satisfied by a device which is claimed via this class. + // + // +optional + // +listType=atomic + Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"` + + // Config defines configuration parameters that apply to each device that is claimed via this class. + // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor + // configuration applies to exactly one driver. + // + // They are passed to the driver, but are not considered while allocating the claim. + // + // +optional + // +listType=atomic + Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` + + // SuitableNodes is tombstoned since Kubernetes 1.32 where + // it got removed. May be reused once decoding v1alpha3 is no longer + // supported. + // SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,3,opt,name=suitableNodes"` +} + +// DeviceClassConfiguration is used in DeviceClass. +type DeviceClassConfiguration struct { + DeviceConfiguration `json:",inline" protobuf:"bytes,1,opt,name=deviceConfiguration"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// DeviceClassList is a collection of classes. +type DeviceClassList 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 resource classes. + Items []DeviceClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// ResourceClaimTemplate is used to produce ResourceClaim objects. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +type ResourceClaimTemplate struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Describes the ResourceClaim that is to be generated. + // + // This field is immutable. A ResourceClaim will get created by the + // control plane for a Pod when needed and then not get updated + // anymore. + Spec ResourceClaimTemplateSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + +// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim. +type ResourceClaimTemplateSpec struct { + // ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim + // when creating it. No other fields are allowed and will be rejected during + // validation. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec for the ResourceClaim. The entire content is copied unchanged + // into the ResourceClaim that gets created from this template. The + // same fields as in a ResourceClaim are also valid here. + Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.32 + +// ResourceClaimTemplateList is a collection of claim templates. +type ResourceClaimTemplateList 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 resource claim templates. + Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// AllocatedDeviceStatus contains the status of an allocated device, if the +// driver chooses to report it. This may include driver-specific information. +type AllocatedDeviceStatus struct { + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string `json:"driver" protobuf:"bytes,1,rep,name=driver"` + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + Pool string `json:"pool" protobuf:"bytes,2,rep,name=pool"` + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + Device string `json:"device" protobuf:"bytes,3,rep,name=device"` + + // Conditions contains the latest observation of the device's state. + // If the device has been configured according to the class and claim + // config references, the `Ready` condition should be True. + // + // +optional + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions" protobuf:"bytes,4,opt,name=conditions"` + + // Data contains arbitrary driver-specific data. + // + // The length of the raw data must be smaller or equal to 10 Ki. + // + // +optional + Data runtime.RawExtension `json:"data,omitempty" protobuf:"bytes,5,opt,name=data"` + + // NetworkData contains network-related information specific to the device. + // + // +optional + NetworkData *NetworkDeviceData `json:"networkData,omitempty" protobuf:"bytes,6,opt,name=networkData"` +} + +// NetworkDeviceData provides network-related details for the allocated device. +// This information may be filled by drivers or other components to configure +// or identify the device within a network context. +type NetworkDeviceData struct { + // InterfaceName specifies the name of the network interface associated with + // the allocated device. This might be the name of a physical or virtual + // network interface being configured in the pod. + // + // Must not be longer than 256 characters. + // + // +optional + InterfaceName string `json:"interfaceName,omitempty" protobuf:"bytes,1,opt,name=interfaceName"` + + // IPs lists the network addresses assigned to the device's network interface. + // This can include both IPv4 and IPv6 addresses. + // The IPs are in the CIDR notation, which includes both the address and the + // associated subnet mask. + // e.g.: "192.0.2.5/24" for IPv4 and "2001:db8::5/64" for IPv6. + // + // +optional + // +listType=atomic + IPs []string `json:"ips,omitempty" protobuf:"bytes,2,opt,name=ips"` + + // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. + // + // Must not be longer than 128 characters. + // + // +optional + HardwareAddress string `json:"hardwareAddress,omitempty" protobuf:"bytes,3,opt,name=hardwareAddress"` +} diff --git a/vendor/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 0000000000..1d0176cbca --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,386 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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-codegen.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_AllocatedDeviceStatus = map[string]string{ + "": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", + "data": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", + "networkData": "NetworkData contains network-related information specific to the device.", +} + +func (AllocatedDeviceStatus) SwaggerDoc() map[string]string { + return map_AllocatedDeviceStatus +} + +var map_AllocationResult = map[string]string{ + "": "AllocationResult contains attributes of an allocated resource.", + "devices": "Devices is the result of allocating devices.", + "nodeSelector": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", +} + +func (AllocationResult) SwaggerDoc() map[string]string { + return map_AllocationResult +} + +var map_BasicDevice = map[string]string{ + "": "BasicDevice defines one device instance.", + "attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", +} + +func (BasicDevice) SwaggerDoc() map[string]string { + return map_BasicDevice +} + +var map_CELDeviceSelector = map[string]string{ + "": "CELDeviceSelector contains a CEL expression for selecting a device.", + "expression": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)\n\nThe length of the expression must be smaller or equal to 10 Ki. The cost of evaluating it is also limited based on the estimated number of logical steps.", +} + +func (CELDeviceSelector) SwaggerDoc() map[string]string { + return map_CELDeviceSelector +} + +var map_Device = map[string]string{ + "": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", + "name": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", + "basic": "Basic defines one device instance.", +} + +func (Device) SwaggerDoc() map[string]string { + return map_Device +} + +var map_DeviceAllocationConfiguration = map[string]string{ + "": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", + "source": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", + "requests": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", +} + +func (DeviceAllocationConfiguration) SwaggerDoc() map[string]string { + return map_DeviceAllocationConfiguration +} + +var map_DeviceAllocationResult = map[string]string{ + "": "DeviceAllocationResult is the result of allocating devices.", + "results": "Results lists all allocated devices.", + "config": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", +} + +func (DeviceAllocationResult) SwaggerDoc() map[string]string { + return map_DeviceAllocationResult +} + +var map_DeviceAttribute = map[string]string{ + "": "DeviceAttribute must have exactly one field set.", + "int": "IntValue is a number.", + "bool": "BoolValue is a true/false value.", + "string": "StringValue is a string. Must not be longer than 64 characters.", + "version": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", +} + +func (DeviceAttribute) SwaggerDoc() map[string]string { + return map_DeviceAttribute +} + +var map_DeviceCapacity = map[string]string{ + "": "DeviceCapacity describes a quantity associated with a device.", + "value": "Value defines how much of a certain device capacity is available.", +} + +func (DeviceCapacity) SwaggerDoc() map[string]string { + return map_DeviceCapacity +} + +var map_DeviceClaim = map[string]string{ + "": "DeviceClaim defines how to request devices with a ResourceClaim.", + "requests": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", + "constraints": "These constraints must be satisfied by the set of devices that get allocated for the claim.", + "config": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", +} + +func (DeviceClaim) SwaggerDoc() map[string]string { + return map_DeviceClaim +} + +var map_DeviceClaimConfiguration = map[string]string{ + "": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", + "requests": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", +} + +func (DeviceClaimConfiguration) SwaggerDoc() map[string]string { + return map_DeviceClaimConfiguration +} + +var map_DeviceClass = map[string]string{ + "": "DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "spec": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.", +} + +func (DeviceClass) SwaggerDoc() map[string]string { + return map_DeviceClass +} + +var map_DeviceClassConfiguration = map[string]string{ + "": "DeviceClassConfiguration is used in DeviceClass.", +} + +func (DeviceClassConfiguration) SwaggerDoc() map[string]string { + return map_DeviceClassConfiguration +} + +var map_DeviceClassList = map[string]string{ + "": "DeviceClassList is a collection of classes.", + "metadata": "Standard list metadata", + "items": "Items is the list of resource classes.", +} + +func (DeviceClassList) SwaggerDoc() map[string]string { + return map_DeviceClassList +} + +var map_DeviceClassSpec = map[string]string{ + "": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", + "selectors": "Each selector must be satisfied by a device which is claimed via this class.", + "config": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", +} + +func (DeviceClassSpec) SwaggerDoc() map[string]string { + return map_DeviceClassSpec +} + +var map_DeviceConfiguration = map[string]string{ + "": "DeviceConfiguration must have exactly one field set. It gets embedded inline in some other structs which have other fields, so field names must not conflict with those.", + "opaque": "Opaque provides driver-specific configuration parameters.", +} + +func (DeviceConfiguration) SwaggerDoc() map[string]string { + return map_DeviceConfiguration +} + +var map_DeviceConstraint = map[string]string{ + "": "DeviceConstraint must have exactly one field set besides Requests.", + "requests": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", + "matchAttribute": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", +} + +func (DeviceConstraint) SwaggerDoc() map[string]string { + return map_DeviceConstraint +} + +var map_DeviceRequest = map[string]string{ + "": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", + "name": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", + "deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + "selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", + "allocationMode": "AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:\n\n- ExactCount: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + "count": "Count is used only when the count mode is \"ExactCount\". Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.", + "adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", +} + +func (DeviceRequest) SwaggerDoc() map[string]string { + return map_DeviceRequest +} + +var map_DeviceRequestAllocationResult = map[string]string{ + "": "DeviceRequestAllocationResult contains the allocation result for one request.", + "request": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "adminAccess": "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.\n\nThis is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.", +} + +func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string { + return map_DeviceRequestAllocationResult +} + +var map_DeviceSelector = map[string]string{ + "": "DeviceSelector must have exactly one field set.", + "cel": "CEL contains a CEL expression for selecting a device.", +} + +func (DeviceSelector) SwaggerDoc() map[string]string { + return map_DeviceSelector +} + +var map_NetworkDeviceData = map[string]string{ + "": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", + "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", + "ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", + "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", +} + +func (NetworkDeviceData) SwaggerDoc() map[string]string { + return map_NetworkDeviceData +} + +var map_OpaqueDeviceConfiguration = map[string]string{ + "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", + "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", +} + +func (OpaqueDeviceConfiguration) SwaggerDoc() map[string]string { + return map_OpaqueDeviceConfiguration +} + +var map_ResourceClaim = map[string]string{ + "": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "spec": "Spec describes what is being requested and how to configure it. The spec is immutable.", + "status": "Status describes whether the claim is ready to use and what has been allocated.", +} + +func (ResourceClaim) SwaggerDoc() map[string]string { + return map_ResourceClaim +} + +var map_ResourceClaimConsumerReference = map[string]string{ + "": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", + "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", + "resource": "Resource is the type of resource being referenced, for example \"pods\".", + "name": "Name is the name of resource being referenced.", + "uid": "UID identifies exactly one incarnation of the resource.", +} + +func (ResourceClaimConsumerReference) SwaggerDoc() map[string]string { + return map_ResourceClaimConsumerReference +} + +var map_ResourceClaimList = map[string]string{ + "": "ResourceClaimList is a collection of claims.", + "metadata": "Standard list metadata", + "items": "Items is the list of resource claims.", +} + +func (ResourceClaimList) SwaggerDoc() map[string]string { + return map_ResourceClaimList +} + +var map_ResourceClaimSpec = map[string]string{ + "": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", + "devices": "Devices defines how to request devices.", +} + +func (ResourceClaimSpec) SwaggerDoc() map[string]string { + return map_ResourceClaimSpec +} + +var map_ResourceClaimStatus = map[string]string{ + "": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", + "allocation": "Allocation is set once the claim has been allocated successfully.", + "reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "devices": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.", +} + +func (ResourceClaimStatus) SwaggerDoc() map[string]string { + return map_ResourceClaimStatus +} + +var map_ResourceClaimTemplate = map[string]string{ + "": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "spec": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", +} + +func (ResourceClaimTemplate) SwaggerDoc() map[string]string { + return map_ResourceClaimTemplate +} + +var map_ResourceClaimTemplateList = map[string]string{ + "": "ResourceClaimTemplateList is a collection of claim templates.", + "metadata": "Standard list metadata", + "items": "Items is the list of resource claim templates.", +} + +func (ResourceClaimTemplateList) SwaggerDoc() map[string]string { + return map_ResourceClaimTemplateList +} + +var map_ResourceClaimTemplateSpec = map[string]string{ + "": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", + "metadata": "ObjectMeta may contain labels and annotations that will be copied into the ResourceClaim when creating it. No other fields are allowed and will be rejected during validation.", + "spec": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", +} + +func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string { + return map_ResourceClaimTemplateSpec +} + +var map_ResourcePool = map[string]string{ + "": "ResourcePool describes the pool that ResourceSlices belong to.", + "name": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.", + "generation": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + "resourceSliceCount": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", +} + +func (ResourcePool) SwaggerDoc() map[string]string { + return map_ResourcePool +} + +var map_ResourceSlice = map[string]string{ + "": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "spec": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", +} + +func (ResourceSlice) SwaggerDoc() map[string]string { + return map_ResourceSlice +} + +var map_ResourceSliceList = map[string]string{ + "": "ResourceSliceList is a collection of ResourceSlices.", + "metadata": "Standard list metadata", + "items": "Items is the list of resource ResourceSlices.", +} + +func (ResourceSliceList) SwaggerDoc() map[string]string { + return map_ResourceSliceList +} + +var map_ResourceSliceSpec = map[string]string{ + "": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", + "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "pool": "Pool describes the pool that this ResourceSlice belongs to.", + "nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", + "nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.\n\nMust use exactly one term.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "allNodes": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "devices": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", +} + +func (ResourceSliceSpec) SwaggerDoc() map[string]string { + return map_ResourceSliceSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/resource/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/resource/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..3be61333ff --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,882 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Data.DeepCopyInto(&out.Data) + if in.NetworkData != nil { + in, out := &in.NetworkData, &out.NetworkData + *out = new(NetworkDeviceData) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus. +func (in *AllocatedDeviceStatus) DeepCopy() *AllocatedDeviceStatus { + if in == nil { + return nil + } + out := new(AllocatedDeviceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { + *out = *in + in.Devices.DeepCopyInto(&out.Devices) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = new(corev1.NodeSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResult. +func (in *AllocationResult) DeepCopy() *AllocationResult { + if in == nil { + return nil + } + out := new(AllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BasicDevice) DeepCopyInto(out *BasicDevice) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[QualifiedName]DeviceAttribute, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(map[QualifiedName]DeviceCapacity, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicDevice. +func (in *BasicDevice) DeepCopy() *BasicDevice { + if in == nil { + return nil + } + out := new(BasicDevice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector. +func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector { + if in == nil { + return nil + } + out := new(CELDeviceSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Device) DeepCopyInto(out *Device) { + *out = *in + if in.Basic != nil { + in, out := &in.Basic, &out.Basic + *out = new(BasicDevice) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device. +func (in *Device) DeepCopy() *Device { + if in == nil { + return nil + } + out := new(Device) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceAllocationConfiguration) DeepCopyInto(out *DeviceAllocationConfiguration) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationConfiguration. +func (in *DeviceAllocationConfiguration) DeepCopy() *DeviceAllocationConfiguration { + if in == nil { + return nil + } + out := new(DeviceAllocationConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult) { + *out = *in + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DeviceRequestAllocationResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceAllocationConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationResult. +func (in *DeviceAllocationResult) DeepCopy() *DeviceAllocationResult { + if in == nil { + return nil + } + out := new(DeviceAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceAttribute) DeepCopyInto(out *DeviceAttribute) { + *out = *in + if in.IntValue != nil { + in, out := &in.IntValue, &out.IntValue + *out = new(int64) + **out = **in + } + if in.BoolValue != nil { + in, out := &in.BoolValue, &out.BoolValue + *out = new(bool) + **out = **in + } + if in.StringValue != nil { + in, out := &in.StringValue, &out.StringValue + *out = new(string) + **out = **in + } + if in.VersionValue != nil { + in, out := &in.VersionValue, &out.VersionValue + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAttribute. +func (in *DeviceAttribute) DeepCopy() *DeviceAttribute { + if in == nil { + return nil + } + out := new(DeviceAttribute) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceCapacity) DeepCopyInto(out *DeviceCapacity) { + *out = *in + out.Value = in.Value.DeepCopy() + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceCapacity. +func (in *DeviceCapacity) DeepCopy() *DeviceCapacity { + if in == nil { + return nil + } + out := new(DeviceCapacity) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]DeviceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]DeviceConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceClaimConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaim. +func (in *DeviceClaim) DeepCopy() *DeviceClaim { + if in == nil { + return nil + } + out := new(DeviceClaim) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClaimConfiguration) DeepCopyInto(out *DeviceClaimConfiguration) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaimConfiguration. +func (in *DeviceClaimConfiguration) DeepCopy() *DeviceClaimConfiguration { + if in == nil { + return nil + } + out := new(DeviceClaimConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClass) DeepCopyInto(out *DeviceClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass. +func (in *DeviceClass) DeepCopy() *DeviceClass { + if in == nil { + return nil + } + out := new(DeviceClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviceClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassConfiguration) DeepCopyInto(out *DeviceClassConfiguration) { + *out = *in + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassConfiguration. +func (in *DeviceClassConfiguration) DeepCopy() *DeviceClassConfiguration { + if in == nil { + return nil + } + out := new(DeviceClassConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassList) DeepCopyInto(out *DeviceClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DeviceClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassList. +func (in *DeviceClassList) DeepCopy() *DeviceClassList { + if in == nil { + return nil + } + out := new(DeviceClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviceClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec) { + *out = *in + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]DeviceSelector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceClassConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassSpec. +func (in *DeviceClassSpec) DeepCopy() *DeviceClassSpec { + if in == nil { + return nil + } + out := new(DeviceClassSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceConfiguration) DeepCopyInto(out *DeviceConfiguration) { + *out = *in + if in.Opaque != nil { + in, out := &in.Opaque, &out.Opaque + *out = new(OpaqueDeviceConfiguration) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConfiguration. +func (in *DeviceConfiguration) DeepCopy() *DeviceConfiguration { + if in == nil { + return nil + } + out := new(DeviceConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceConstraint) DeepCopyInto(out *DeviceConstraint) { + *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MatchAttribute != nil { + in, out := &in.MatchAttribute, &out.MatchAttribute + *out = new(FullyQualifiedName) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConstraint. +func (in *DeviceConstraint) DeepCopy() *DeviceConstraint { + if in == nil { + return nil + } + out := new(DeviceConstraint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) { + *out = *in + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]DeviceSelector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdminAccess != nil { + in, out := &in.AdminAccess, &out.AdminAccess + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequest. +func (in *DeviceRequest) DeepCopy() *DeviceRequest { + if in == nil { + return nil + } + out := new(DeviceRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocationResult) { + *out = *in + if in.AdminAccess != nil { + in, out := &in.AdminAccess, &out.AdminAccess + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequestAllocationResult. +func (in *DeviceRequestAllocationResult) DeepCopy() *DeviceRequestAllocationResult { + if in == nil { + return nil + } + out := new(DeviceRequestAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector) { + *out = *in + if in.CEL != nil { + in, out := &in.CEL, &out.CEL + *out = new(CELDeviceSelector) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector. +func (in *DeviceSelector) DeepCopy() *DeviceSelector { + if in == nil { + return nil + } + out := new(DeviceSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) { + *out = *in + if in.IPs != nil { + in, out := &in.IPs, &out.IPs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData. +func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData { + if in == nil { + return nil + } + out := new(NetworkDeviceData) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration. +func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration { + if in == nil { + return nil + } + out := new(OpaqueDeviceConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim. +func (in *ResourceClaim) DeepCopy() *ResourceClaim { + if in == nil { + return nil + } + out := new(ResourceClaim) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaim) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimConsumerReference) DeepCopyInto(out *ResourceClaimConsumerReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimConsumerReference. +func (in *ResourceClaimConsumerReference) DeepCopy() *ResourceClaimConsumerReference { + if in == nil { + return nil + } + out := new(ResourceClaimConsumerReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimList) DeepCopyInto(out *ResourceClaimList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimList. +func (in *ResourceClaimList) DeepCopy() *ResourceClaimList { + if in == nil { + return nil + } + out := new(ResourceClaimList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) { + *out = *in + in.Devices.DeepCopyInto(&out.Devices) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec. +func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec { + if in == nil { + return nil + } + out := new(ResourceClaimSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) { + *out = *in + if in.Allocation != nil { + in, out := &in.Allocation, &out.Allocation + *out = new(AllocationResult) + (*in).DeepCopyInto(*out) + } + if in.ReservedFor != nil { + in, out := &in.ReservedFor, &out.ReservedFor + *out = make([]ResourceClaimConsumerReference, len(*in)) + copy(*out, *in) + } + if in.Devices != nil { + in, out := &in.Devices, &out.Devices + *out = make([]AllocatedDeviceStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus. +func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus { + if in == nil { + return nil + } + out := new(ResourceClaimStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimTemplate) DeepCopyInto(out *ResourceClaimTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplate. +func (in *ResourceClaimTemplate) DeepCopy() *ResourceClaimTemplate { + if in == nil { + return nil + } + out := new(ResourceClaimTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimTemplateList) DeepCopyInto(out *ResourceClaimTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceClaimTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateList. +func (in *ResourceClaimTemplateList) DeepCopy() *ResourceClaimTemplateList { + if in == nil { + return nil + } + out := new(ResourceClaimTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceClaimTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceClaimTemplateSpec) DeepCopyInto(out *ResourceClaimTemplateSpec) { + *out = *in + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateSpec. +func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec { + if in == nil { + return nil + } + out := new(ResourceClaimTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourcePool) DeepCopyInto(out *ResourcePool) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool. +func (in *ResourcePool) DeepCopy() *ResourcePool { + if in == nil { + return nil + } + out := new(ResourcePool) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSlice. +func (in *ResourceSlice) DeepCopy() *ResourceSlice { + if in == nil { + return nil + } + out := new(ResourceSlice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceSlice) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSliceList) DeepCopyInto(out *ResourceSliceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ResourceSlice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceList. +func (in *ResourceSliceList) DeepCopy() *ResourceSliceList { + if in == nil { + return nil + } + out := new(ResourceSliceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ResourceSliceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) { + *out = *in + out.Pool = in.Pool + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = new(corev1.NodeSelector) + (*in).DeepCopyInto(*out) + } + if in.Devices != nil { + in, out := &in.Devices, &out.Devices + *out = make([]Device, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceSpec. +func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec { + if in == nil { + return nil + } + out := new(ResourceSliceSpec) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/api/resource/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/resource/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 0000000000..b79111b81e --- /dev/null +++ b/vendor/k8s.io/api/resource/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,166 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeviceClass) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeviceClass) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeviceClass) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *DeviceClassList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *DeviceClassList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *DeviceClassList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaim) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaim) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaim) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaimList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaimList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaimList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaimTemplate) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaimTemplate) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaimTemplate) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceClaimTemplateList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceClaimTemplateList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceClaimTemplateList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceSlice) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceSlice) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceSlice) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *ResourceSliceList) APILifecycleIntroduced() (major, minor int) { + return 1, 32 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *ResourceSliceList) APILifecycleDeprecated() (major, minor int) { + return 1, 35 +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *ResourceSliceList) APILifecycleRemoved() (major, minor int) { + return 1, 38 +} diff --git a/vendor/k8s.io/api/storage/v1/generated.proto b/vendor/k8s.io/api/storage/v1/generated.proto index ec2beac468..dfc309bb42 100644 --- a/vendor/k8s.io/api/storage/v1/generated.proto +++ b/vendor/k8s.io/api/storage/v1/generated.proto @@ -491,8 +491,8 @@ message VolumeAttachmentList { } // VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. +// Right now only PersistentVolumes can be attached via external attacher, +// in the future we may allow also inline volumes in pods. // Exactly one member can be set. message VolumeAttachmentSource { // persistentVolumeName represents the name of the persistent volume to attach. diff --git a/vendor/k8s.io/api/storage/v1/types.go b/vendor/k8s.io/api/storage/v1/types.go index de2bbc2e06..3936dc83bc 100644 --- a/vendor/k8s.io/api/storage/v1/types.go +++ b/vendor/k8s.io/api/storage/v1/types.go @@ -169,8 +169,8 @@ type VolumeAttachmentSpec struct { } // VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. +// Right now only PersistentVolumes can be attached via external attacher, +// in the future we may allow also inline volumes in pods. // Exactly one member can be set. type VolumeAttachmentSource struct { // persistentVolumeName represents the name of the persistent volume to attach. @@ -433,7 +433,7 @@ const ( // ReadWriteOnceWithFSTypeFSGroupPolicy indicates that each volume will be examined // to determine if the volume ownership and permissions // should be modified. If a fstype is defined and the volume's access mode - // contains ReadWriteOnce, then the defined fsGroup will be applied. + // contains ReadWriteOnce or ReadWriteOncePod, then the defined fsGroup will be applied. // This mode should be defined if it's expected that the // fsGroup may need to be modified depending on the pod's SecurityPolicy. // This is the default behavior if no other FSGroupPolicy is defined. diff --git a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index 89b1cbb201..eee18bd182 100644 --- a/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -185,7 +185,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "persistentVolumeName represents the name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/vendor/k8s.io/api/storage/v1alpha1/generated.proto index 380adbf66e..79acbebd83 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -155,8 +155,8 @@ message VolumeAttachmentList { } // VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. +// Right now only PersistentVolumes can be attached via external attacher, +// in the future we may allow also inline volumes in pods. // Exactly one member can be set. message VolumeAttachmentSource { // persistentVolumeName represents the name of the persistent volume to attach. diff --git a/vendor/k8s.io/api/storage/v1alpha1/types.go b/vendor/k8s.io/api/storage/v1alpha1/types.go index 1fbf65f819..7ef7353ebc 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types.go @@ -84,8 +84,8 @@ type VolumeAttachmentSpec struct { } // VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. +// Right now only PersistentVolumes can be attached via external attacher, +// in the future we may allow also inline volumes in pods. // Exactly one member can be set. type VolumeAttachmentSource struct { // persistentVolumeName represents the name of the persistent volume to attach. diff --git a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index ac87dbdca3..e44f37b2dd 100644 --- a/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -72,7 +72,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "persistentVolumeName represents the name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/api/storage/v1beta1/generated.proto b/vendor/k8s.io/api/storage/v1beta1/generated.proto index dfef3f6cc5..64dcc8262e 100644 --- a/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -493,8 +493,8 @@ message VolumeAttachmentList { } // VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. +// Right now only PersistentVolumes can be attached via external attacher, +// in the future we may allow also inline volumes in pods. // Exactly one member can be set. message VolumeAttachmentSource { // persistentVolumeName represents the name of the persistent volume to attach. diff --git a/vendor/k8s.io/api/storage/v1beta1/types.go b/vendor/k8s.io/api/storage/v1beta1/types.go index ce294e3dba..d9b6b76853 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types.go +++ b/vendor/k8s.io/api/storage/v1beta1/types.go @@ -176,8 +176,8 @@ type VolumeAttachmentSpec struct { } // VolumeAttachmentSource represents a volume that should be attached. -// Right now only PersistenVolumes can be attached via external attacher, -// in future we may allow also inline volumes in pods. +// Right now only PersistentVolumes can be attached via external attacher, +// in the future we may allow also inline volumes in pods. // Exactly one member can be set. type VolumeAttachmentSource struct { // persistentVolumeName represents the name of the persistent volume to attach. diff --git a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index 8c1a663507..58da44fc84 100644 --- a/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -185,7 +185,7 @@ func (VolumeAttachmentList) SwaggerDoc() map[string]string { } var map_VolumeAttachmentSource = map[string]string{ - "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.", + "": "VolumeAttachmentSource represents a volume that should be attached. Right now only PersistentVolumes can be attached via external attacher, in the future we may allow also inline volumes in pods. Exactly one member can be set.", "persistentVolumeName": "persistentVolumeName represents the name of the persistent volume to attach.", } diff --git a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go index 57e0e71f67..6a3ab8f24e 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -54,6 +54,7 @@ var knownReasons = map[metav1.StatusReason]struct{}{ metav1.StatusReasonGone: {}, metav1.StatusReasonInvalid: {}, metav1.StatusReasonServerTimeout: {}, + metav1.StatusReasonStoreReadError: {}, metav1.StatusReasonTimeout: {}, metav1.StatusReasonTooManyRequests: {}, metav1.StatusReasonBadRequest: {}, @@ -775,6 +776,12 @@ func IsUnexpectedObjectError(err error) bool { return err != nil && (ok || errors.As(err, &uoe)) } +// IsStoreReadError determines if err is due to either failure to transform the +// data from the storage, or failure to decode the object appropriately. +func IsStoreReadError(err error) bool { + return ReasonForError(err) == metav1.StatusReasonStoreReadError +} + // SuggestsClientDelay returns true if this error suggests a client delay as well as the // suggested seconds to wait, or false if the error does not imply a wait. It does not // address whether the error *should* be retried, since some errors (like a 3xx) may diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS index 1e1330fff2..3bd8bf535e 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS +++ b/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS @@ -10,5 +10,6 @@ reviewers: - mikedanese - liggitt - janetkuo - - ncdc - dims +emeritus_reviewers: + - ncdc diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go index 50af8334f0..d0aada9dd7 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -20,7 +20,7 @@ import ( "bytes" "errors" "fmt" - "math" + math "math" "math/big" "strconv" "strings" @@ -460,9 +460,10 @@ func (q *Quantity) CanonicalizeBytes(out []byte) (result, suffix []byte) { } } -// AsApproximateFloat64 returns a float64 representation of the quantity which may -// lose precision. If the value of the quantity is outside the range of a float64 -// +Inf/-Inf will be returned. +// AsApproximateFloat64 returns a float64 representation of the quantity which +// may lose precision. If precision matter more than performance, see +// AsFloat64Slow. If the value of the quantity is outside the range of a +// float64 +Inf/-Inf will be returned. func (q *Quantity) AsApproximateFloat64() float64 { var base float64 var exponent int @@ -480,6 +481,36 @@ func (q *Quantity) AsApproximateFloat64() float64 { return base * math.Pow10(exponent) } +// AsFloat64Slow returns a float64 representation of the quantity. This is +// more precise than AsApproximateFloat64 but significantly slower. If the +// value of the quantity is outside the range of a float64 +Inf/-Inf will be +// returned. +func (q *Quantity) AsFloat64Slow() float64 { + infDec := q.AsDec() + + var absScale int64 + if infDec.Scale() < 0 { + absScale = int64(-infDec.Scale()) + } else { + absScale = int64(infDec.Scale()) + } + pow10AbsScale := big.NewInt(10) + pow10AbsScale = pow10AbsScale.Exp(pow10AbsScale, big.NewInt(absScale), nil) + + var resultBigFloat *big.Float + if infDec.Scale() < 0 { + resultBigInt := new(big.Int).Mul(infDec.UnscaledBig(), pow10AbsScale) + resultBigFloat = new(big.Float).SetInt(resultBigInt) + } else { + pow10AbsScaleFloat := new(big.Float).SetInt(pow10AbsScale) + resultBigFloat = new(big.Float).SetInt(infDec.UnscaledBig()) + resultBigFloat = resultBigFloat.Quo(resultBigFloat, pow10AbsScaleFloat) + } + + result, _ := resultBigFloat.Float64() + return result +} + // AsInt64 returns a representation of the current value as an int64 if a fast conversion // is possible. If false is returned, callers must use the inf.Dec form of this quantity. func (q *Quantity) AsInt64() (int64, bool) { diff --git a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 593d7ba8cf..54a2883a35 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -50,7 +50,7 @@ func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) fie } } if err := ValidateAnnotationsSize(annotations); err != nil { - allErrs = append(allErrs, field.TooLong(fldPath, "", TotalAnnotationSizeLimitB)) + allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, TotalAnnotationSizeLimitB)) } return allErrs } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS index e7e5c152d0..ec414a84b9 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS @@ -11,6 +11,7 @@ reviewers: - luxas - janetkuo - justinsb - - ncdc - soltysh - dims +emeritus_reviewers: + - ncdc diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 229ea2c2c2..9ee6c05918 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -1355,187 +1355,190 @@ func init() { } var fileDescriptor_a8431b6e0aeeb761 = []byte{ - // 2873 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x5d, 0x6f, 0x23, 0x57, - 0x35, 0x63, 0xc7, 0x89, 0x7d, 0x6c, 0xe7, 0xe3, 0x6e, 0x16, 0xbc, 0x41, 0xc4, 0xe9, 0xb4, 0xaa, - 0xb6, 0xd0, 0x3a, 0xdd, 0xa5, 0x54, 0xdb, 0x2d, 0x2d, 0xc4, 0xf1, 0x66, 0x9b, 0x76, 0xd3, 0x44, - 0x37, 0xbb, 0x0b, 0x94, 0x0a, 0x75, 0xe2, 0xb9, 0x71, 0x86, 0x8c, 0x67, 0xdc, 0x7b, 0xc7, 0x49, - 0x0d, 0x0f, 0xf4, 0x01, 0x04, 0x48, 0xa8, 0x2a, 0x6f, 0x3c, 0xa1, 0x56, 0xf0, 0x03, 0x10, 0x4f, - 0xbc, 0x83, 0x44, 0x1f, 0x8b, 0x78, 0xa9, 0x04, 0xb2, 0xba, 0xe1, 0x81, 0x47, 0xc4, 0x6b, 0x84, - 0x04, 0xba, 0x1f, 0x33, 0x73, 0xc7, 0x1f, 0x9b, 0xf1, 0xee, 0x52, 0xf1, 0xe6, 0x39, 0xdf, 0xf7, - 0xde, 0x73, 0xce, 0x3d, 0xe7, 0x5c, 0xc3, 0x73, 0x47, 0xd7, 0x58, 0xcd, 0xf1, 0xd7, 0xac, 0x8e, - 0xd3, 0xb6, 0x9a, 0x87, 0x8e, 0x47, 0x68, 0x6f, 0xad, 0x73, 0xd4, 0xe2, 0x00, 0xb6, 0xd6, 0x26, - 0x81, 0xb5, 0x76, 0x7c, 0x65, 0xad, 0x45, 0x3c, 0x42, 0xad, 0x80, 0xd8, 0xb5, 0x0e, 0xf5, 0x03, - 0x1f, 0x3d, 0x21, 0xb9, 0x6a, 0x3a, 0x57, 0xad, 0x73, 0xd4, 0xe2, 0x00, 0x56, 0xe3, 0x5c, 0xb5, - 0xe3, 0x2b, 0xcb, 0xcf, 0xb4, 0x9c, 0xe0, 0xb0, 0xbb, 0x5f, 0x6b, 0xfa, 0xed, 0xb5, 0x96, 0xdf, - 0xf2, 0xd7, 0x04, 0xf3, 0x7e, 0xf7, 0x40, 0x7c, 0x89, 0x0f, 0xf1, 0x4b, 0x0a, 0x5d, 0x5e, 0x1b, - 0x67, 0x0a, 0xed, 0x7a, 0x81, 0xd3, 0x26, 0x83, 0x56, 0x2c, 0x3f, 0x7f, 0x1e, 0x03, 0x6b, 0x1e, - 0x92, 0xb6, 0x35, 0xc8, 0x67, 0xfe, 0x29, 0x0b, 0xf9, 0xf5, 0xdd, 0xad, 0x9b, 0xd4, 0xef, 0x76, - 0xd0, 0x2a, 0x4c, 0x7b, 0x56, 0x9b, 0x54, 0x8c, 0x55, 0xe3, 0x72, 0xa1, 0x5e, 0xfa, 0xa8, 0x5f, - 0x9d, 0x3a, 0xed, 0x57, 0xa7, 0x5f, 0xb7, 0xda, 0x04, 0x0b, 0x0c, 0x72, 0x21, 0x7f, 0x4c, 0x28, - 0x73, 0x7c, 0x8f, 0x55, 0x32, 0xab, 0xd9, 0xcb, 0xc5, 0xab, 0x2f, 0xd7, 0xd2, 0xac, 0xbf, 0x26, - 0x14, 0xdc, 0x95, 0xac, 0x9b, 0x3e, 0x6d, 0x38, 0xac, 0xe9, 0x1f, 0x13, 0xda, 0xab, 0x2f, 0x28, - 0x2d, 0x79, 0x85, 0x64, 0x38, 0xd2, 0x80, 0x7e, 0x64, 0xc0, 0x42, 0x87, 0x92, 0x03, 0x42, 0x29, - 0xb1, 0x15, 0xbe, 0x92, 0x5d, 0x35, 0x1e, 0x81, 0xda, 0x8a, 0x52, 0xbb, 0xb0, 0x3b, 0x20, 0x1f, - 0x0f, 0x69, 0x44, 0xbf, 0x36, 0x60, 0x99, 0x11, 0x7a, 0x4c, 0xe8, 0xba, 0x6d, 0x53, 0xc2, 0x58, - 0xbd, 0xb7, 0xe1, 0x3a, 0xc4, 0x0b, 0x36, 0xb6, 0x1a, 0x98, 0x55, 0xa6, 0xc5, 0x3e, 0x7c, 0x3d, - 0x9d, 0x41, 0x7b, 0xe3, 0xe4, 0xd4, 0x4d, 0x65, 0xd1, 0xf2, 0x58, 0x12, 0x86, 0xef, 0x63, 0x86, - 0x79, 0x00, 0xa5, 0xf0, 0x20, 0x6f, 0x39, 0x2c, 0x40, 0x77, 0x61, 0xa6, 0xc5, 0x3f, 0x58, 0xc5, - 0x10, 0x06, 0xd6, 0xd2, 0x19, 0x18, 0xca, 0xa8, 0xcf, 0x29, 0x7b, 0x66, 0xc4, 0x27, 0xc3, 0x4a, - 0x9a, 0xf9, 0xb3, 0x69, 0x28, 0xae, 0xef, 0x6e, 0x61, 0xc2, 0xfc, 0x2e, 0x6d, 0x92, 0x14, 0x4e, - 0x73, 0x0d, 0x4a, 0xcc, 0xf1, 0x5a, 0x5d, 0xd7, 0xa2, 0x1c, 0x5a, 0x99, 0x11, 0x94, 0x4b, 0x8a, - 0xb2, 0xb4, 0xa7, 0xe1, 0x70, 0x82, 0x12, 0x5d, 0x05, 0xe0, 0x12, 0x58, 0xc7, 0x6a, 0x12, 0xbb, - 0x92, 0x59, 0x35, 0x2e, 0xe7, 0xeb, 0x48, 0xf1, 0xc1, 0xeb, 0x11, 0x06, 0x6b, 0x54, 0xe8, 0x71, - 0xc8, 0x09, 0x4b, 0x2b, 0x79, 0xa1, 0xa6, 0xac, 0xc8, 0x73, 0x62, 0x19, 0x58, 0xe2, 0xd0, 0x53, - 0x30, 0xab, 0xbc, 0xac, 0x52, 0x10, 0x64, 0xf3, 0x8a, 0x6c, 0x36, 0x74, 0x83, 0x10, 0xcf, 0xd7, - 0x77, 0xe4, 0x78, 0xb6, 0xf0, 0x3b, 0x6d, 0x7d, 0xaf, 0x39, 0x9e, 0x8d, 0x05, 0x06, 0xdd, 0x82, - 0xdc, 0x31, 0xa1, 0xfb, 0xdc, 0x13, 0xb8, 0x6b, 0x7e, 0x39, 0xdd, 0x46, 0xdf, 0xe5, 0x2c, 0xf5, - 0x02, 0x37, 0x4d, 0xfc, 0xc4, 0x52, 0x08, 0xaa, 0x01, 0xb0, 0x43, 0x9f, 0x06, 0x62, 0x79, 0x95, - 0xdc, 0x6a, 0xf6, 0x72, 0xa1, 0x3e, 0xc7, 0xd7, 0xbb, 0x17, 0x41, 0xb1, 0x46, 0xc1, 0xe9, 0x9b, - 0x56, 0x40, 0x5a, 0x3e, 0x75, 0x08, 0xab, 0xcc, 0xc6, 0xf4, 0x1b, 0x11, 0x14, 0x6b, 0x14, 0xe8, - 0x55, 0x40, 0x2c, 0xf0, 0xa9, 0xd5, 0x22, 0x6a, 0xa9, 0xaf, 0x58, 0xec, 0xb0, 0x02, 0x62, 0x75, - 0xcb, 0x6a, 0x75, 0x68, 0x6f, 0x88, 0x02, 0x8f, 0xe0, 0x32, 0x7f, 0x67, 0xc0, 0xbc, 0xe6, 0x0b, - 0xc2, 0xef, 0xae, 0x41, 0xa9, 0xa5, 0x45, 0x9d, 0xf2, 0x8b, 0xe8, 0xb4, 0xf5, 0x88, 0xc4, 0x09, - 0x4a, 0x44, 0xa0, 0x40, 0x95, 0xa4, 0x30, 0xbb, 0x5c, 0x49, 0xed, 0xb4, 0xa1, 0x0d, 0xb1, 0x26, - 0x0d, 0xc8, 0x70, 0x2c, 0xd9, 0xfc, 0x87, 0x21, 0x1c, 0x38, 0xcc, 0x37, 0xe8, 0xb2, 0x96, 0xd3, - 0x0c, 0xb1, 0x7d, 0xa5, 0x31, 0xf9, 0xe8, 0x9c, 0x44, 0x90, 0xf9, 0xbf, 0x48, 0x04, 0xd7, 0xf3, - 0xbf, 0xfc, 0xa0, 0x3a, 0xf5, 0xee, 0xdf, 0x56, 0xa7, 0xcc, 0x5f, 0x18, 0x50, 0x5a, 0xef, 0x74, - 0xdc, 0xde, 0x4e, 0x27, 0x10, 0x0b, 0x30, 0x61, 0xc6, 0xa6, 0x3d, 0xdc, 0xf5, 0xd4, 0x42, 0x81, - 0xc7, 0x77, 0x43, 0x40, 0xb0, 0xc2, 0xf0, 0xf8, 0x39, 0xf0, 0x69, 0x93, 0xa8, 0x70, 0x8b, 0xe2, - 0x67, 0x93, 0x03, 0xb1, 0xc4, 0xf1, 0x43, 0x3e, 0x70, 0x88, 0x6b, 0x6f, 0x5b, 0x9e, 0xd5, 0x22, - 0x54, 0x05, 0x47, 0xb4, 0xf5, 0x9b, 0x1a, 0x0e, 0x27, 0x28, 0xcd, 0xff, 0x64, 0xa0, 0xb0, 0xe1, - 0x7b, 0xb6, 0x13, 0xa8, 0xe0, 0x0a, 0x7a, 0x9d, 0xa1, 0xe4, 0x71, 0xbb, 0xd7, 0x21, 0x58, 0x60, - 0xd0, 0x0b, 0x30, 0xc3, 0x02, 0x2b, 0xe8, 0x32, 0x61, 0x4f, 0xa1, 0xfe, 0x58, 0x98, 0x96, 0xf6, - 0x04, 0xf4, 0xac, 0x5f, 0x9d, 0x8f, 0xc4, 0x49, 0x10, 0x56, 0x0c, 0xdc, 0xd3, 0xfd, 0x7d, 0xb1, - 0x51, 0xf6, 0x4d, 0x79, 0xed, 0x85, 0xf7, 0x47, 0x36, 0xf6, 0xf4, 0x9d, 0x21, 0x0a, 0x3c, 0x82, - 0x0b, 0x1d, 0x03, 0x72, 0x2d, 0x16, 0xdc, 0xa6, 0x96, 0xc7, 0x84, 0xae, 0xdb, 0x4e, 0x9b, 0xa8, - 0x80, 0xff, 0x52, 0xba, 0x13, 0xe7, 0x1c, 0xb1, 0xde, 0x5b, 0x43, 0xd2, 0xf0, 0x08, 0x0d, 0xe8, - 0x49, 0x98, 0xa1, 0xc4, 0x62, 0xbe, 0x57, 0xc9, 0x89, 0xe5, 0x47, 0x59, 0x19, 0x0b, 0x28, 0x56, - 0x58, 0x9e, 0xd0, 0xda, 0x84, 0x31, 0xab, 0x15, 0xa6, 0xd7, 0x28, 0xa1, 0x6d, 0x4b, 0x30, 0x0e, - 0xf1, 0xe6, 0x6f, 0x0d, 0x28, 0x6f, 0x50, 0x62, 0x05, 0x64, 0x12, 0xb7, 0x78, 0xe0, 0x13, 0x47, - 0xeb, 0x30, 0x2f, 0xbe, 0xef, 0x5a, 0xae, 0x63, 0xcb, 0x33, 0x98, 0x16, 0xcc, 0x9f, 0x57, 0xcc, - 0xf3, 0x9b, 0x49, 0x34, 0x1e, 0xa4, 0x37, 0x7f, 0x92, 0x85, 0x72, 0x83, 0xb8, 0x24, 0x36, 0x79, - 0x13, 0x50, 0x8b, 0x5a, 0x4d, 0xb2, 0x4b, 0xa8, 0xe3, 0xdb, 0x7b, 0xa4, 0xe9, 0x7b, 0x36, 0x13, - 0x6e, 0x94, 0xad, 0x7f, 0x8e, 0xef, 0xef, 0xcd, 0x21, 0x2c, 0x1e, 0xc1, 0x81, 0x5c, 0x28, 0x77, - 0xa8, 0xf8, 0x2d, 0xf6, 0x5c, 0x7a, 0x59, 0xf1, 0xea, 0x57, 0xd2, 0x1d, 0xe9, 0xae, 0xce, 0x5a, - 0x5f, 0x3c, 0xed, 0x57, 0xcb, 0x09, 0x10, 0x4e, 0x0a, 0x47, 0xdf, 0x80, 0x05, 0x9f, 0x76, 0x0e, - 0x2d, 0xaf, 0x41, 0x3a, 0xc4, 0xb3, 0x89, 0x17, 0x30, 0xb1, 0x91, 0xf9, 0xfa, 0x12, 0xaf, 0x45, - 0x76, 0x06, 0x70, 0x78, 0x88, 0x1a, 0xbd, 0x01, 0x8b, 0x1d, 0xea, 0x77, 0xac, 0x96, 0xd8, 0x98, - 0x5d, 0xdf, 0x75, 0x9a, 0x3d, 0xb5, 0x9d, 0x4f, 0x9f, 0xf6, 0xab, 0x8b, 0xbb, 0x83, 0xc8, 0xb3, - 0x7e, 0xf5, 0x82, 0xd8, 0x3a, 0x0e, 0x89, 0x91, 0x78, 0x58, 0x8c, 0xe6, 0x06, 0xb9, 0x71, 0x6e, - 0x60, 0x6e, 0x41, 0xbe, 0xd1, 0x55, 0x31, 0xf1, 0x12, 0xe4, 0x6d, 0xf5, 0x5b, 0xed, 0x7c, 0x18, - 0x9c, 0x11, 0xcd, 0x59, 0xbf, 0x5a, 0xe6, 0xe5, 0x67, 0x2d, 0x04, 0xe0, 0x88, 0xc5, 0xfc, 0x8d, - 0x01, 0x15, 0x71, 0xf2, 0x7b, 0xc4, 0x25, 0xcd, 0xc0, 0xa7, 0x98, 0xbc, 0xdd, 0x75, 0x28, 0x69, - 0x13, 0x2f, 0x40, 0x5f, 0x84, 0xec, 0x11, 0xe9, 0xa9, 0xbc, 0x50, 0x54, 0x62, 0xb3, 0xaf, 0x91, - 0x1e, 0xe6, 0x70, 0x74, 0x03, 0xf2, 0x7e, 0x87, 0xc7, 0xa6, 0x4f, 0x55, 0x5e, 0x78, 0x2a, 0x54, - 0xbd, 0xa3, 0xe0, 0x67, 0xfd, 0xea, 0xc5, 0x84, 0xf8, 0x10, 0x81, 0x23, 0x56, 0xbe, 0xe2, 0x63, - 0xcb, 0xed, 0x12, 0x7e, 0x0a, 0xd1, 0x8a, 0xef, 0x0a, 0x08, 0x56, 0x18, 0xf3, 0x49, 0xc8, 0x0b, - 0x31, 0xec, 0xee, 0x15, 0xb4, 0x00, 0x59, 0x6c, 0x9d, 0x08, 0xab, 0x4a, 0x98, 0xff, 0xd4, 0x92, - 0xed, 0x0e, 0xc0, 0x4d, 0x12, 0x84, 0xfe, 0xb9, 0x0e, 0xf3, 0xe1, 0x8d, 0x93, 0xbc, 0x08, 0x23, - 0xa7, 0xc7, 0x49, 0x34, 0x1e, 0xa4, 0x37, 0xdf, 0x84, 0x82, 0xb8, 0x2c, 0x79, 0xa5, 0x11, 0x57, - 0x35, 0xc6, 0x7d, 0xaa, 0x9a, 0xb0, 0x54, 0xc9, 0x8c, 0x2b, 0x55, 0x34, 0x73, 0x5d, 0x28, 0x4b, - 0xde, 0xb0, 0x8e, 0x4b, 0xa5, 0xe1, 0x69, 0xc8, 0x87, 0x66, 0x2a, 0x2d, 0x51, 0xfd, 0x1e, 0x0a, - 0xc2, 0x11, 0x85, 0xa6, 0xed, 0x10, 0x12, 0x17, 0x7f, 0x3a, 0x65, 0x5a, 0x91, 0x96, 0xb9, 0x7f, - 0x91, 0xa6, 0x69, 0xfa, 0x21, 0x54, 0xc6, 0x15, 0xfd, 0x0f, 0x51, 0x9a, 0xa4, 0x37, 0xc5, 0x7c, - 0xcf, 0x80, 0x05, 0x5d, 0x52, 0xfa, 0xe3, 0x4b, 0xaf, 0xe4, 0xfc, 0xa2, 0x54, 0xdb, 0x91, 0x5f, - 0x19, 0xb0, 0x94, 0x58, 0xda, 0x44, 0x27, 0x3e, 0x81, 0x51, 0xba, 0x73, 0x64, 0x27, 0x70, 0x8e, - 0xbf, 0x64, 0xa0, 0x7c, 0xcb, 0xda, 0x27, 0x6e, 0x18, 0xa9, 0xe8, 0x07, 0x50, 0x6c, 0x5b, 0x41, - 0xf3, 0x50, 0x40, 0xc3, 0x06, 0xa6, 0x91, 0x2e, 0x27, 0x27, 0x24, 0xd5, 0xb6, 0x63, 0x31, 0x37, - 0xbc, 0x80, 0xf6, 0xea, 0x17, 0x94, 0x49, 0x45, 0x0d, 0x83, 0x75, 0x6d, 0xa2, 0xeb, 0x14, 0xdf, - 0x37, 0xde, 0xe9, 0xf0, 0xea, 0x6a, 0xf2, 0x66, 0x37, 0x61, 0x82, 0x96, 0xd5, 0xe2, 0xae, 0x73, - 0x7b, 0x40, 0x3e, 0x1e, 0xd2, 0xb8, 0xfc, 0x32, 0x2c, 0x0c, 0x1a, 0xcf, 0xf3, 0x4f, 0x94, 0x15, - 0x65, 0x22, 0x5c, 0x82, 0x9c, 0xc8, 0x53, 0xf2, 0x70, 0xb0, 0xfc, 0xb8, 0x9e, 0xb9, 0x66, 0x88, - 0xf4, 0x3a, 0xce, 0x90, 0x47, 0x94, 0x5e, 0x13, 0xe2, 0x1f, 0x30, 0xbd, 0xfe, 0xde, 0x80, 0x69, - 0xd1, 0x37, 0xbc, 0x09, 0x79, 0xbe, 0x7f, 0xb6, 0x15, 0x58, 0xc2, 0xae, 0xd4, 0x1d, 0x2b, 0xe7, - 0xde, 0x26, 0x81, 0x15, 0x7b, 0x5b, 0x08, 0xc1, 0x91, 0x44, 0x84, 0x21, 0xe7, 0x04, 0xa4, 0x1d, - 0x1e, 0xe4, 0x33, 0x63, 0x45, 0xab, 0x79, 0x49, 0x0d, 0x5b, 0x27, 0x37, 0xde, 0x09, 0x88, 0xc7, - 0x0f, 0x23, 0x0e, 0x8d, 0x2d, 0x2e, 0x03, 0x4b, 0x51, 0xe6, 0xbf, 0x0c, 0x88, 0x54, 0x71, 0xe7, - 0x67, 0xc4, 0x3d, 0xb8, 0xe5, 0x78, 0x47, 0x6a, 0x5b, 0x23, 0x73, 0xf6, 0x14, 0x1c, 0x47, 0x14, - 0xa3, 0xae, 0x87, 0xcc, 0x64, 0xd7, 0x03, 0x57, 0xd8, 0xf4, 0xbd, 0xc0, 0xf1, 0xba, 0x43, 0xd1, - 0xb6, 0xa1, 0xe0, 0x38, 0xa2, 0xe0, 0xf5, 0x12, 0x25, 0x6d, 0xcb, 0xf1, 0x1c, 0xaf, 0xc5, 0x17, - 0xb1, 0xe1, 0x77, 0xbd, 0x40, 0x14, 0x0e, 0xaa, 0x5e, 0xc2, 0x43, 0x58, 0x3c, 0x82, 0xc3, 0xfc, - 0xf7, 0x34, 0x14, 0xf9, 0x9a, 0xc3, 0x7b, 0xee, 0x45, 0x28, 0xbb, 0xba, 0x17, 0xa8, 0xb5, 0x5f, - 0x54, 0xa6, 0x24, 0xe3, 0x1a, 0x27, 0x69, 0x39, 0xf3, 0x81, 0x7e, 0x43, 0xab, 0x3d, 0x88, 0x98, - 0x93, 0xd5, 0x41, 0x92, 0x96, 0x67, 0xaf, 0x13, 0x1e, 0x1f, 0xaa, 0x80, 0x8a, 0x8e, 0xe8, 0x9b, - 0x1c, 0x88, 0x25, 0x0e, 0x6d, 0xc3, 0x05, 0xcb, 0x75, 0xfd, 0x13, 0x01, 0xac, 0xfb, 0xfe, 0x51, - 0xdb, 0xa2, 0x47, 0x4c, 0xf4, 0xfc, 0xf9, 0xfa, 0x17, 0x14, 0xcb, 0x85, 0xf5, 0x61, 0x12, 0x3c, - 0x8a, 0x6f, 0xd4, 0xb1, 0x4d, 0x4f, 0x78, 0x6c, 0x87, 0xb0, 0x34, 0x00, 0x12, 0x51, 0xae, 0x1a, - 0xf0, 0xe7, 0x94, 0x9c, 0x25, 0x3c, 0x82, 0xe6, 0x6c, 0x0c, 0x1c, 0x8f, 0x94, 0x88, 0xae, 0xc3, - 0x1c, 0xf7, 0x64, 0xbf, 0x1b, 0x84, 0xe5, 0x71, 0x4e, 0x1c, 0x37, 0x3a, 0xed, 0x57, 0xe7, 0x6e, - 0x27, 0x30, 0x78, 0x80, 0x92, 0x6f, 0xae, 0xeb, 0xb4, 0x9d, 0xa0, 0x32, 0x2b, 0x58, 0xa2, 0xcd, - 0xbd, 0xc5, 0x81, 0x58, 0xe2, 0x12, 0x1e, 0x98, 0x3f, 0xd7, 0x03, 0x37, 0x60, 0x91, 0x11, 0xcf, - 0xde, 0xf2, 0x9c, 0xc0, 0xb1, 0xdc, 0x1b, 0xc7, 0xa2, 0xf8, 0x2d, 0x8a, 0x83, 0xb8, 0xc8, 0x2b, - 0xd7, 0xbd, 0x41, 0x24, 0x1e, 0xa6, 0x37, 0xff, 0x9c, 0x05, 0x24, 0xfb, 0x0a, 0x5b, 0x16, 0x65, - 0x32, 0x2f, 0xf2, 0xee, 0x47, 0xf5, 0x25, 0xc6, 0x40, 0xf7, 0xa3, 0x5a, 0x92, 0x10, 0x8f, 0xb6, - 0xa1, 0x20, 0xf3, 0x53, 0x1c, 0x73, 0x6b, 0x8a, 0xb8, 0xb0, 0x13, 0x22, 0xce, 0xfa, 0xd5, 0xe5, - 0x84, 0x9a, 0x08, 0x23, 0x3a, 0xd3, 0x58, 0x02, 0xba, 0x0a, 0x60, 0x75, 0x1c, 0x7d, 0x36, 0x59, - 0x88, 0x27, 0x54, 0xf1, 0x94, 0x01, 0x6b, 0x54, 0xe8, 0x15, 0x98, 0x0e, 0x1e, 0xac, 0x7b, 0xcc, - 0x8b, 0xe6, 0x98, 0xf7, 0x8a, 0x42, 0x02, 0xd7, 0x2e, 0x82, 0x82, 0x71, 0xb3, 0x54, 0xe3, 0x17, - 0x69, 0xdf, 0x8c, 0x30, 0x58, 0xa3, 0x42, 0xdf, 0x82, 0xfc, 0x81, 0xaa, 0x67, 0xc5, 0xe9, 0xa6, - 0xce, 0xb3, 0x61, 0x15, 0x2c, 0xc7, 0x23, 0xe1, 0x17, 0x8e, 0xa4, 0xa1, 0xaf, 0x42, 0x91, 0x75, - 0xf7, 0xa3, 0x12, 0x40, 0xba, 0x44, 0x74, 0xdf, 0xee, 0xc5, 0x28, 0xac, 0xd3, 0x99, 0x6f, 0x43, - 0x61, 0xdb, 0x69, 0x52, 0x5f, 0xf4, 0xbb, 0x4f, 0xc1, 0x2c, 0x4b, 0x34, 0x73, 0xd1, 0x49, 0x86, - 0xae, 0x1a, 0xe2, 0xb9, 0x8f, 0x7a, 0x96, 0xe7, 0xcb, 0x96, 0x2d, 0x17, 0xfb, 0xe8, 0xeb, 0x1c, - 0x88, 0x25, 0xee, 0xfa, 0x12, 0xaf, 0x32, 0x7e, 0xfa, 0x61, 0x75, 0xea, 0xfd, 0x0f, 0xab, 0x53, - 0x1f, 0x7c, 0xa8, 0x2a, 0x8e, 0x3f, 0x00, 0xc0, 0xce, 0xfe, 0xf7, 0x48, 0x53, 0xe6, 0xee, 0x54, - 0x23, 0xcc, 0x70, 0x72, 0x2e, 0x46, 0x98, 0x99, 0x81, 0xca, 0x51, 0xc3, 0xe1, 0x04, 0x25, 0x5a, - 0x83, 0x42, 0x34, 0x9c, 0x54, 0xfe, 0xb1, 0x18, 0xfa, 0x5b, 0x34, 0xc1, 0xc4, 0x31, 0x4d, 0xe2, - 0x22, 0x99, 0x3e, 0xf7, 0x22, 0xa9, 0x43, 0xb6, 0xeb, 0xd8, 0x6a, 0x38, 0xf0, 0x6c, 0x78, 0x91, - 0xdf, 0xd9, 0x6a, 0x9c, 0xf5, 0xab, 0x8f, 0x8d, 0x7b, 0x13, 0x08, 0x7a, 0x1d, 0xc2, 0x6a, 0x77, - 0xb6, 0x1a, 0x98, 0x33, 0x8f, 0xca, 0x6a, 0x33, 0x13, 0x66, 0xb5, 0xab, 0x00, 0xad, 0x78, 0xc4, - 0x22, 0x93, 0x46, 0xe4, 0x88, 0xda, 0x68, 0x45, 0xa3, 0x42, 0x0c, 0x16, 0x9b, 0x94, 0x58, 0xe1, - 0xa8, 0x83, 0x05, 0x56, 0x5b, 0x0e, 0x6d, 0x27, 0x8b, 0x89, 0x4b, 0x4a, 0xcd, 0xe2, 0xc6, 0xa0, - 0x30, 0x3c, 0x2c, 0x1f, 0xf9, 0xb0, 0x68, 0xab, 0x6e, 0x38, 0x56, 0x5a, 0x98, 0x58, 0xa9, 0xc8, - 0x58, 0x8d, 0x41, 0x41, 0x78, 0x58, 0x36, 0xfa, 0x2e, 0x2c, 0x87, 0xc0, 0xe1, 0x91, 0x84, 0xc8, - 0xfa, 0xd9, 0xfa, 0xca, 0x69, 0xbf, 0xba, 0xdc, 0x18, 0x4b, 0x85, 0xef, 0x23, 0x01, 0xd9, 0x30, - 0xe3, 0xca, 0x2a, 0xb9, 0x28, 0x2a, 0x9b, 0xaf, 0xa5, 0x5b, 0x45, 0xec, 0xfd, 0x35, 0xbd, 0x3a, - 0x8e, 0xc6, 0x4b, 0xaa, 0x30, 0x56, 0xb2, 0xd1, 0x3b, 0x50, 0xb4, 0x3c, 0xcf, 0x0f, 0x2c, 0x39, - 0x24, 0x29, 0x09, 0x55, 0xeb, 0x13, 0xab, 0x5a, 0x8f, 0x65, 0x0c, 0x54, 0xe3, 0x1a, 0x06, 0xeb, - 0xaa, 0xd0, 0x09, 0xcc, 0xfb, 0x27, 0x1e, 0xa1, 0x98, 0x1c, 0x10, 0x4a, 0xbc, 0x26, 0x61, 0x95, - 0xb2, 0xd0, 0xfe, 0x5c, 0x4a, 0xed, 0x09, 0xe6, 0xd8, 0xa5, 0x93, 0x70, 0x86, 0x07, 0xb5, 0xa0, - 0x1a, 0xcf, 0xad, 0x9e, 0xe5, 0x3a, 0xdf, 0x27, 0x94, 0x55, 0xe6, 0xe2, 0xb9, 0xfa, 0x66, 0x04, - 0xc5, 0x1a, 0x05, 0xea, 0x42, 0xb9, 0xad, 0x5f, 0x19, 0x95, 0x45, 0x61, 0xe6, 0xb5, 0x74, 0x66, - 0x0e, 0x5f, 0x6a, 0x71, 0x19, 0x94, 0xc0, 0xe1, 0xa4, 0x96, 0xe5, 0x17, 0xa0, 0xf8, 0x80, 0x1d, - 0x02, 0xef, 0x30, 0x06, 0x0f, 0x64, 0xa2, 0x0e, 0xe3, 0x8f, 0x19, 0x98, 0x4b, 0x6e, 0xe3, 0xc0, - 0x75, 0x98, 0x4b, 0x75, 0x1d, 0x86, 0xbd, 0xac, 0x31, 0xf6, 0x81, 0x25, 0xcc, 0xcf, 0xd9, 0xb1, - 0xf9, 0x59, 0xa5, 0xc1, 0xe9, 0x87, 0x49, 0x83, 0x35, 0x00, 0x5e, 0xac, 0x50, 0xdf, 0x75, 0x09, - 0x15, 0x19, 0x30, 0xaf, 0x1e, 0x52, 0x22, 0x28, 0xd6, 0x28, 0x78, 0x49, 0xbd, 0xef, 0xfa, 0xcd, - 0x23, 0xb1, 0x05, 0x61, 0xf4, 0x8a, 0xdc, 0x97, 0x97, 0x25, 0x75, 0x7d, 0x08, 0x8b, 0x47, 0x70, - 0x98, 0x3d, 0xb8, 0xb8, 0x6b, 0x51, 0x5e, 0xe4, 0xc4, 0x91, 0x22, 0x7a, 0x96, 0xb7, 0x86, 0x3a, - 0xa2, 0x67, 0x27, 0x8d, 0xb8, 0x78, 0xf3, 0x63, 0x58, 0xdc, 0x15, 0x99, 0x7f, 0x35, 0xe0, 0xd2, - 0x48, 0xdd, 0x9f, 0x41, 0x47, 0xf6, 0x56, 0xb2, 0x23, 0x7b, 0x31, 0xe5, 0xc4, 0x75, 0x94, 0xb5, - 0x63, 0xfa, 0xb3, 0x59, 0xc8, 0xed, 0xf2, 0x4a, 0xd8, 0xfc, 0xd8, 0x80, 0x92, 0xf8, 0x35, 0xc9, - 0xc0, 0xbb, 0x9a, 0x7c, 0x07, 0x29, 0x3c, 0xba, 0x37, 0x90, 0x47, 0x31, 0x11, 0x7f, 0xcf, 0x80, - 0xe4, 0xa8, 0x19, 0xbd, 0x2c, 0x43, 0xc0, 0x88, 0x66, 0xc1, 0x13, 0xba, 0xff, 0x4b, 0xe3, 0x5a, - 0xd2, 0x0b, 0xa9, 0xa6, 0x95, 0x4f, 0x43, 0x01, 0xfb, 0x7e, 0xb0, 0x6b, 0x05, 0x87, 0x8c, 0xef, - 0x5d, 0x87, 0xff, 0x50, 0xdb, 0x2b, 0xf6, 0x4e, 0x60, 0xb0, 0x84, 0x9b, 0x3f, 0x37, 0xe0, 0xd2, - 0xd8, 0xe7, 0x2d, 0x9e, 0x45, 0x9a, 0xd1, 0x97, 0x5a, 0x51, 0xe4, 0xc8, 0x31, 0x1d, 0xd6, 0xa8, - 0x78, 0x2f, 0x99, 0x78, 0x13, 0x1b, 0xec, 0x25, 0x13, 0xda, 0x70, 0x92, 0xd6, 0xfc, 0x67, 0x06, - 0xd4, 0x7b, 0xd2, 0xff, 0xd8, 0xe9, 0x9f, 0x1c, 0x78, 0xcd, 0x9a, 0x4b, 0xbe, 0x66, 0x45, 0x4f, - 0x57, 0xda, 0x73, 0x4e, 0xf6, 0xfe, 0xcf, 0x39, 0xe8, 0xf9, 0xe8, 0x85, 0x48, 0xfa, 0xd0, 0x4a, - 0xf2, 0x85, 0xe8, 0xac, 0x5f, 0x2d, 0x29, 0xe1, 0xc9, 0x17, 0xa3, 0x37, 0x60, 0xd6, 0x26, 0x81, - 0xe5, 0xb8, 0xb2, 0x2f, 0x4c, 0xfd, 0xe6, 0x21, 0x85, 0x35, 0x24, 0x6b, 0xbd, 0xc8, 0x6d, 0x52, - 0x1f, 0x38, 0x14, 0xc8, 0x13, 0x76, 0xd3, 0xb7, 0x65, 0x47, 0x92, 0x8b, 0x13, 0xf6, 0x86, 0x6f, - 0x13, 0x2c, 0x30, 0xe6, 0xfb, 0x06, 0x14, 0xa5, 0xa4, 0x0d, 0xab, 0xcb, 0x08, 0xba, 0x12, 0xad, - 0x42, 0x1e, 0xf7, 0x25, 0xfd, 0x29, 0xf0, 0xac, 0x5f, 0x2d, 0x08, 0x32, 0xd1, 0xcc, 0x8c, 0x78, - 0xf2, 0xca, 0x9c, 0xb3, 0x47, 0x8f, 0x43, 0x4e, 0x04, 0x90, 0xda, 0xcc, 0xf8, 0x4d, 0x93, 0x03, - 0xb1, 0xc4, 0x99, 0x9f, 0x66, 0xa0, 0x9c, 0x58, 0x5c, 0x8a, 0xbe, 0x20, 0x1a, 0xa1, 0x66, 0x52, - 0x8c, 0xe5, 0xc7, 0xff, 0x83, 0x40, 0x5d, 0x5f, 0x33, 0x0f, 0x73, 0x7d, 0x7d, 0x1b, 0x66, 0x9a, - 0x7c, 0x8f, 0xc2, 0x3f, 0xa4, 0x5c, 0x99, 0xe4, 0x38, 0xc5, 0xee, 0xc6, 0xde, 0x28, 0x3e, 0x19, - 0x56, 0x02, 0xd1, 0x4d, 0x58, 0xa4, 0x24, 0xa0, 0xbd, 0xf5, 0x83, 0x80, 0x50, 0x7d, 0x98, 0x90, - 0x8b, 0xab, 0x6f, 0x3c, 0x48, 0x80, 0x87, 0x79, 0xcc, 0x7d, 0x28, 0xdd, 0xb6, 0xf6, 0xdd, 0xe8, - 0x15, 0x0f, 0x43, 0xd9, 0xf1, 0x9a, 0x6e, 0xd7, 0x26, 0x32, 0xa1, 0x87, 0xd9, 0x2b, 0x0c, 0xda, - 0x2d, 0x1d, 0x79, 0xd6, 0xaf, 0x5e, 0x48, 0x00, 0xe4, 0xb3, 0x15, 0x4e, 0x8a, 0x30, 0x5d, 0x98, - 0xfe, 0x0c, 0x3b, 0xc9, 0xef, 0x40, 0x21, 0xae, 0xf5, 0x1f, 0xb1, 0x4a, 0xf3, 0x2d, 0xc8, 0x73, - 0x8f, 0x0f, 0x7b, 0xd4, 0x73, 0xaa, 0xa4, 0x64, 0xed, 0x95, 0x49, 0x53, 0x7b, 0x89, 0xb7, 0xe0, - 0x3b, 0x1d, 0xfb, 0x21, 0xdf, 0x82, 0x33, 0x0f, 0x73, 0xf3, 0x65, 0x27, 0xbc, 0xf9, 0xae, 0x82, - 0xfc, 0xbf, 0x0c, 0xbf, 0x64, 0x64, 0x01, 0xa1, 0x5d, 0x32, 0xfa, 0xfd, 0xaf, 0xbd, 0x30, 0xfc, - 0xd8, 0x00, 0x10, 0xa3, 0x3c, 0x31, 0x46, 0x4a, 0xf1, 0xaf, 0x83, 0x3b, 0x30, 0xe3, 0x4b, 0x8f, - 0x94, 0xef, 0xc1, 0x13, 0xce, 0x8b, 0xa3, 0x40, 0x92, 0x3e, 0x89, 0x95, 0xb0, 0xfa, 0xab, 0x1f, - 0xdd, 0x5b, 0x99, 0xfa, 0xf8, 0xde, 0xca, 0xd4, 0x27, 0xf7, 0x56, 0xa6, 0xde, 0x3d, 0x5d, 0x31, - 0x3e, 0x3a, 0x5d, 0x31, 0x3e, 0x3e, 0x5d, 0x31, 0x3e, 0x39, 0x5d, 0x31, 0x3e, 0x3d, 0x5d, 0x31, - 0xde, 0xff, 0xfb, 0xca, 0xd4, 0x1b, 0x4f, 0xa4, 0xf9, 0x1f, 0xe2, 0x7f, 0x03, 0x00, 0x00, 0xff, - 0xff, 0xd3, 0xee, 0xe4, 0x1c, 0xae, 0x28, 0x00, 0x00, + // 2928 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0x4d, 0x6c, 0x24, 0x47, + 0xd5, 0xee, 0xf9, 0xb1, 0x67, 0xde, 0x78, 0xfc, 0x53, 0xeb, 0xfd, 0xbe, 0x59, 0x23, 0x3c, 0x4e, + 0x27, 0x8a, 0x36, 0x90, 0x8c, 0x77, 0x97, 0x25, 0xda, 0x6c, 0x48, 0xc0, 0xe3, 0x59, 0x6f, 0x9c, + 0xac, 0x63, 0xab, 0xbc, 0xbb, 0x81, 0x10, 0xa1, 0x94, 0xa7, 0xcb, 0xe3, 0xc6, 0x3d, 0xdd, 0x93, + 0xaa, 0x1e, 0x6f, 0x06, 0x0e, 0xe4, 0x00, 0x12, 0x48, 0x28, 0x0a, 0x37, 0x4e, 0x28, 0x11, 0x9c, + 0x38, 0x21, 0x4e, 0xdc, 0x41, 0x22, 0xc7, 0x20, 0x2e, 0x91, 0x40, 0xa3, 0xac, 0x39, 0x70, 0x44, + 0x5c, 0x2d, 0x24, 0x50, 0xfd, 0xf4, 0xdf, 0xfc, 0xac, 0x7b, 0x76, 0x97, 0x88, 0xdb, 0xf4, 0xfb, + 0xaf, 0xaa, 0xf7, 0x5e, 0xbd, 0xf7, 0x6a, 0xe0, 0xea, 0xd1, 0x35, 0x5e, 0xb3, 0xbd, 0x35, 0xd2, + 0xb1, 0xdb, 0xa4, 0x79, 0x68, 0xbb, 0x94, 0xf5, 0xd6, 0x3a, 0x47, 0x2d, 0x01, 0xe0, 0x6b, 0x6d, + 0xea, 0x93, 0xb5, 0xe3, 0xcb, 0x6b, 0x2d, 0xea, 0x52, 0x46, 0x7c, 0x6a, 0xd5, 0x3a, 0xcc, 0xf3, + 0x3d, 0xf4, 0x94, 0xe2, 0xaa, 0xc5, 0xb9, 0x6a, 0x9d, 0xa3, 0x96, 0x00, 0xf0, 0x9a, 0xe0, 0xaa, + 0x1d, 0x5f, 0x5e, 0x7e, 0xae, 0x65, 0xfb, 0x87, 0xdd, 0xfd, 0x5a, 0xd3, 0x6b, 0xaf, 0xb5, 0xbc, + 0x96, 0xb7, 0x26, 0x99, 0xf7, 0xbb, 0x07, 0xf2, 0x4b, 0x7e, 0xc8, 0x5f, 0x4a, 0xe8, 0xf2, 0xda, + 0x38, 0x53, 0x58, 0xd7, 0xf5, 0xed, 0x36, 0x1d, 0xb4, 0x62, 0xf9, 0xf9, 0xb3, 0x18, 0x78, 0xf3, + 0x90, 0xb6, 0xc9, 0x20, 0x9f, 0xf9, 0xc7, 0x2c, 0x14, 0xd6, 0x77, 0xb7, 0x6e, 0x32, 0xaf, 0xdb, + 0x41, 0xab, 0x90, 0x73, 0x49, 0x9b, 0x56, 0x8c, 0x55, 0xe3, 0x62, 0xb1, 0x3e, 0xfb, 0x71, 0xbf, + 0x3a, 0x75, 0xd2, 0xaf, 0xe6, 0x5e, 0x27, 0x6d, 0x8a, 0x25, 0x06, 0x39, 0x50, 0x38, 0xa6, 0x8c, + 0xdb, 0x9e, 0xcb, 0x2b, 0x99, 0xd5, 0xec, 0xc5, 0xd2, 0x95, 0x97, 0x6b, 0x69, 0xd6, 0x5f, 0x93, + 0x0a, 0xee, 0x2a, 0xd6, 0x4d, 0x8f, 0x35, 0x6c, 0xde, 0xf4, 0x8e, 0x29, 0xeb, 0xd5, 0x17, 0xb4, + 0x96, 0x82, 0x46, 0x72, 0x1c, 0x6a, 0x40, 0x3f, 0x34, 0x60, 0xa1, 0xc3, 0xe8, 0x01, 0x65, 0x8c, + 0x5a, 0x1a, 0x5f, 0xc9, 0xae, 0x1a, 0x8f, 0x41, 0x6d, 0x45, 0xab, 0x5d, 0xd8, 0x1d, 0x90, 0x8f, + 0x87, 0x34, 0xa2, 0x5f, 0x1a, 0xb0, 0xcc, 0x29, 0x3b, 0xa6, 0x6c, 0xdd, 0xb2, 0x18, 0xe5, 0xbc, + 0xde, 0xdb, 0x70, 0x6c, 0xea, 0xfa, 0x1b, 0x5b, 0x0d, 0xcc, 0x2b, 0x39, 0xb9, 0x0f, 0x5f, 0x4f, + 0x67, 0xd0, 0xde, 0x38, 0x39, 0x75, 0x53, 0x5b, 0xb4, 0x3c, 0x96, 0x84, 0xe3, 0x07, 0x98, 0x61, + 0x1e, 0xc0, 0x6c, 0x70, 0x90, 0xb7, 0x6c, 0xee, 0xa3, 0xbb, 0x30, 0xdd, 0x12, 0x1f, 0xbc, 0x62, + 0x48, 0x03, 0x6b, 0xe9, 0x0c, 0x0c, 0x64, 0xd4, 0xe7, 0xb4, 0x3d, 0xd3, 0xf2, 0x93, 0x63, 0x2d, + 0xcd, 0xfc, 0x49, 0x0e, 0x4a, 0xeb, 0xbb, 0x5b, 0x98, 0x72, 0xaf, 0xcb, 0x9a, 0x34, 0x85, 0xd3, + 0x5c, 0x83, 0x59, 0x6e, 0xbb, 0xad, 0xae, 0x43, 0x98, 0x80, 0x56, 0xa6, 0x25, 0xe5, 0x92, 0xa6, + 0x9c, 0xdd, 0x8b, 0xe1, 0x70, 0x82, 0x12, 0x5d, 0x01, 0x10, 0x12, 0x78, 0x87, 0x34, 0xa9, 0x55, + 0xc9, 0xac, 0x1a, 0x17, 0x0b, 0x75, 0xa4, 0xf9, 0xe0, 0xf5, 0x10, 0x83, 0x63, 0x54, 0xe8, 0x49, + 0xc8, 0x4b, 0x4b, 0x2b, 0x05, 0xa9, 0xa6, 0xac, 0xc9, 0xf3, 0x72, 0x19, 0x58, 0xe1, 0xd0, 0x33, + 0x30, 0xa3, 0xbd, 0xac, 0x52, 0x94, 0x64, 0xf3, 0x9a, 0x6c, 0x26, 0x70, 0x83, 0x00, 0x2f, 0xd6, + 0x77, 0x64, 0xbb, 0x96, 0xf4, 0xbb, 0xd8, 0xfa, 0x5e, 0xb3, 0x5d, 0x0b, 0x4b, 0x0c, 0xba, 0x05, + 0xf9, 0x63, 0xca, 0xf6, 0x85, 0x27, 0x08, 0xd7, 0xfc, 0x72, 0xba, 0x8d, 0xbe, 0x2b, 0x58, 0xea, + 0x45, 0x61, 0x9a, 0xfc, 0x89, 0x95, 0x10, 0x54, 0x03, 0xe0, 0x87, 0x1e, 0xf3, 0xe5, 0xf2, 0x2a, + 0xf9, 0xd5, 0xec, 0xc5, 0x62, 0x7d, 0x4e, 0xac, 0x77, 0x2f, 0x84, 0xe2, 0x18, 0x85, 0xa0, 0x6f, + 0x12, 0x9f, 0xb6, 0x3c, 0x66, 0x53, 0x5e, 0x99, 0x89, 0xe8, 0x37, 0x42, 0x28, 0x8e, 0x51, 0xa0, + 0x57, 0x01, 0x71, 0xdf, 0x63, 0xa4, 0x45, 0xf5, 0x52, 0x5f, 0x21, 0xfc, 0xb0, 0x02, 0x72, 0x75, + 0xcb, 0x7a, 0x75, 0x68, 0x6f, 0x88, 0x02, 0x8f, 0xe0, 0x32, 0x7f, 0x6b, 0xc0, 0x7c, 0xcc, 0x17, + 0xa4, 0xdf, 0x5d, 0x83, 0xd9, 0x56, 0x2c, 0xea, 0xb4, 0x5f, 0x84, 0xa7, 0x1d, 0x8f, 0x48, 0x9c, + 0xa0, 0x44, 0x14, 0x8a, 0x4c, 0x4b, 0x0a, 0xb2, 0xcb, 0xe5, 0xd4, 0x4e, 0x1b, 0xd8, 0x10, 0x69, + 0x8a, 0x01, 0x39, 0x8e, 0x24, 0x9b, 0x7f, 0x37, 0xa4, 0x03, 0x07, 0xf9, 0x06, 0x5d, 0x8c, 0xe5, + 0x34, 0x43, 0x6e, 0xdf, 0xec, 0x98, 0x7c, 0x74, 0x46, 0x22, 0xc8, 0xfc, 0x4f, 0x24, 0x82, 0xeb, + 0x85, 0x9f, 0x7f, 0x58, 0x9d, 0x7a, 0xef, 0xaf, 0xab, 0x53, 0xe6, 0xcf, 0x0c, 0x98, 0x5d, 0xef, + 0x74, 0x9c, 0xde, 0x4e, 0xc7, 0x97, 0x0b, 0x30, 0x61, 0xda, 0x62, 0x3d, 0xdc, 0x75, 0xf5, 0x42, + 0x41, 0xc4, 0x77, 0x43, 0x42, 0xb0, 0xc6, 0x88, 0xf8, 0x39, 0xf0, 0x58, 0x93, 0xea, 0x70, 0x0b, + 0xe3, 0x67, 0x53, 0x00, 0xb1, 0xc2, 0x89, 0x43, 0x3e, 0xb0, 0xa9, 0x63, 0x6d, 0x13, 0x97, 0xb4, + 0x28, 0xd3, 0xc1, 0x11, 0x6e, 0xfd, 0x66, 0x0c, 0x87, 0x13, 0x94, 0xe6, 0xbf, 0x33, 0x50, 0xdc, + 0xf0, 0x5c, 0xcb, 0xf6, 0x75, 0x70, 0xf9, 0xbd, 0xce, 0x50, 0xf2, 0xb8, 0xdd, 0xeb, 0x50, 0x2c, + 0x31, 0xe8, 0x05, 0x98, 0xe6, 0x3e, 0xf1, 0xbb, 0x5c, 0xda, 0x53, 0xac, 0x3f, 0x11, 0xa4, 0xa5, + 0x3d, 0x09, 0x3d, 0xed, 0x57, 0xe7, 0x43, 0x71, 0x0a, 0x84, 0x35, 0x83, 0xf0, 0x74, 0x6f, 0x5f, + 0x6e, 0x94, 0x75, 0x53, 0x5d, 0x7b, 0xc1, 0xfd, 0x91, 0x8d, 0x3c, 0x7d, 0x67, 0x88, 0x02, 0x8f, + 0xe0, 0x42, 0xc7, 0x80, 0x1c, 0xc2, 0xfd, 0xdb, 0x8c, 0xb8, 0x5c, 0xea, 0xba, 0x6d, 0xb7, 0xa9, + 0x0e, 0xf8, 0x2f, 0xa5, 0x3b, 0x71, 0xc1, 0x11, 0xe9, 0xbd, 0x35, 0x24, 0x0d, 0x8f, 0xd0, 0x80, + 0x9e, 0x86, 0x69, 0x46, 0x09, 0xf7, 0xdc, 0x4a, 0x5e, 0x2e, 0x3f, 0xcc, 0xca, 0x58, 0x42, 0xb1, + 0xc6, 0x8a, 0x84, 0xd6, 0xa6, 0x9c, 0x93, 0x56, 0x90, 0x5e, 0xc3, 0x84, 0xb6, 0xad, 0xc0, 0x38, + 0xc0, 0x9b, 0xbf, 0x31, 0xa0, 0xbc, 0xc1, 0x28, 0xf1, 0xe9, 0x24, 0x6e, 0xf1, 0xd0, 0x27, 0x8e, + 0xd6, 0x61, 0x5e, 0x7e, 0xdf, 0x25, 0x8e, 0x6d, 0xa9, 0x33, 0xc8, 0x49, 0xe6, 0xff, 0xd7, 0xcc, + 0xf3, 0x9b, 0x49, 0x34, 0x1e, 0xa4, 0x37, 0x7f, 0x9d, 0x83, 0x72, 0x83, 0x3a, 0x34, 0x32, 0x79, + 0x13, 0x50, 0x8b, 0x91, 0x26, 0xdd, 0xa5, 0xcc, 0xf6, 0xac, 0x3d, 0xda, 0xf4, 0x5c, 0x8b, 0x4b, + 0x37, 0xca, 0xd6, 0xff, 0x4f, 0xec, 0xef, 0xcd, 0x21, 0x2c, 0x1e, 0xc1, 0x81, 0x1c, 0x28, 0x77, + 0x98, 0xfc, 0x2d, 0xf7, 0x5c, 0x79, 0x59, 0xe9, 0xca, 0x57, 0xd2, 0x1d, 0xe9, 0x6e, 0x9c, 0xb5, + 0xbe, 0x78, 0xd2, 0xaf, 0x96, 0x13, 0x20, 0x9c, 0x14, 0x8e, 0xbe, 0x01, 0x0b, 0x1e, 0xeb, 0x1c, + 0x12, 0xb7, 0x41, 0x3b, 0xd4, 0xb5, 0xa8, 0xeb, 0x73, 0xb9, 0x91, 0x85, 0xfa, 0x92, 0xa8, 0x45, + 0x76, 0x06, 0x70, 0x78, 0x88, 0x1a, 0xbd, 0x09, 0x8b, 0x1d, 0xe6, 0x75, 0x48, 0x4b, 0x6e, 0xcc, + 0xae, 0xe7, 0xd8, 0xcd, 0x9e, 0xde, 0xce, 0x67, 0x4f, 0xfa, 0xd5, 0xc5, 0xdd, 0x41, 0xe4, 0x69, + 0xbf, 0x7a, 0x4e, 0x6e, 0x9d, 0x80, 0x44, 0x48, 0x3c, 0x2c, 0x26, 0xe6, 0x06, 0xf9, 0xb1, 0x6e, + 0xf0, 0xa1, 0x01, 0x97, 0xec, 0x96, 0xeb, 0x31, 0x2a, 0xae, 0x08, 0x8a, 0x29, 0xb1, 0x6e, 0x30, + 0xe6, 0xb1, 0x37, 0x6c, 0xff, 0x70, 0xc3, 0xe9, 0x72, 0x9f, 0xb2, 0x3a, 0xa3, 0xe4, 0xc8, 0x76, + 0x5b, 0xbb, 0x9e, 0x4f, 0x5d, 0xdf, 0x26, 0x8e, 0xf4, 0xc8, 0x42, 0xfd, 0xea, 0x49, 0xbf, 0x7a, + 0x69, 0x6b, 0x42, 0x5e, 0x3c, 0xb1, 0x36, 0x73, 0x0b, 0x0a, 0x8d, 0xae, 0x0e, 0xdb, 0x97, 0xa0, + 0x60, 0xe9, 0xdf, 0xda, 0x39, 0x82, 0xfc, 0x11, 0xd2, 0x9c, 0xf6, 0xab, 0x65, 0x51, 0x21, 0xd7, + 0x02, 0x00, 0x0e, 0x59, 0xcc, 0x5f, 0x19, 0x50, 0x91, 0xce, 0xb9, 0x47, 0x1d, 0xda, 0xf4, 0x3d, + 0x86, 0xe9, 0x3b, 0x5d, 0x9b, 0xd1, 0x36, 0x75, 0x7d, 0xf4, 0x45, 0xc8, 0x1e, 0xd1, 0x9e, 0x4e, + 0x5d, 0x25, 0x2d, 0x36, 0xfb, 0x1a, 0xed, 0x61, 0x01, 0x47, 0x37, 0xa0, 0xe0, 0x75, 0x44, 0xfa, + 0xf0, 0x98, 0x4e, 0x5d, 0xcf, 0x04, 0xaa, 0x77, 0x34, 0xfc, 0xb4, 0x5f, 0x3d, 0x9f, 0x10, 0x1f, + 0x20, 0x70, 0xc8, 0x2a, 0x0e, 0xe5, 0x98, 0x38, 0x5d, 0x2a, 0x1c, 0x25, 0x3c, 0x94, 0xbb, 0x12, + 0x82, 0x35, 0xc6, 0x7c, 0x1a, 0x0a, 0x52, 0x0c, 0xbf, 0x7b, 0x19, 0x2d, 0x40, 0x16, 0x93, 0x7b, + 0xd2, 0xaa, 0x59, 0x2c, 0x7e, 0xc6, 0xee, 0x83, 0x1d, 0x80, 0x9b, 0xd4, 0x0f, 0x42, 0x68, 0x1d, + 0xe6, 0x83, 0x4b, 0x31, 0x79, 0x57, 0x87, 0x71, 0x89, 0x93, 0x68, 0x3c, 0x48, 0x6f, 0xbe, 0x05, + 0x45, 0x79, 0x9f, 0x8b, 0x62, 0x28, 0x2a, 0xbc, 0x8c, 0x07, 0x14, 0x5e, 0x41, 0x35, 0x95, 0x19, + 0x57, 0x4d, 0xc5, 0xcc, 0x75, 0xa0, 0xac, 0x78, 0x83, 0x52, 0x33, 0x95, 0x86, 0x67, 0xa1, 0x10, + 0x98, 0xa9, 0xb5, 0x84, 0x2d, 0x46, 0x20, 0x08, 0x87, 0x14, 0x31, 0x6d, 0x87, 0x90, 0xa8, 0x4d, + 0xd2, 0x29, 0x8b, 0xd5, 0x91, 0x99, 0x07, 0xd7, 0x91, 0x31, 0x4d, 0x3f, 0x80, 0xca, 0xb8, 0xbe, + 0xe4, 0x11, 0xaa, 0xa7, 0xf4, 0xa6, 0x98, 0xef, 0x1b, 0xb0, 0x10, 0x97, 0x94, 0xfe, 0xf8, 0xd2, + 0x2b, 0x39, 0xbb, 0x6e, 0x8e, 0xed, 0xc8, 0x2f, 0x0c, 0x58, 0x4a, 0x2c, 0x6d, 0xa2, 0x13, 0x9f, + 0xc0, 0xa8, 0xb8, 0x73, 0x64, 0x27, 0x70, 0x8e, 0x3f, 0x67, 0xa0, 0x7c, 0x8b, 0xec, 0x53, 0x27, + 0x88, 0x54, 0xf4, 0x7d, 0x28, 0xb5, 0x89, 0xdf, 0x3c, 0x94, 0xd0, 0xa0, 0xc7, 0x6a, 0xa4, 0xbb, + 0x36, 0x12, 0x92, 0x6a, 0xdb, 0x91, 0x98, 0x1b, 0xae, 0xcf, 0x7a, 0xf5, 0x73, 0xda, 0xa4, 0x52, + 0x0c, 0x83, 0xe3, 0xda, 0x64, 0x63, 0x2c, 0xbf, 0x6f, 0xbc, 0xdb, 0x11, 0x05, 0xe0, 0xe4, 0xfd, + 0x78, 0xc2, 0x84, 0x58, 0x56, 0x8b, 0x1a, 0xe3, 0xed, 0x01, 0xf9, 0x78, 0x48, 0xe3, 0xf2, 0xcb, + 0xb0, 0x30, 0x68, 0xbc, 0xc8, 0x3f, 0x61, 0x56, 0x54, 0x89, 0x70, 0x09, 0xf2, 0x32, 0x4f, 0xa9, + 0xc3, 0xc1, 0xea, 0xe3, 0x7a, 0xe6, 0x9a, 0x21, 0xd3, 0xeb, 0x38, 0x43, 0x1e, 0x53, 0x7a, 0x4d, + 0x88, 0x7f, 0xc8, 0xf4, 0xfa, 0x3b, 0x03, 0x72, 0xb2, 0xb5, 0x79, 0x0b, 0x0a, 0x62, 0xff, 0x2c, + 0xe2, 0x13, 0x69, 0x57, 0xea, 0xa6, 0x5a, 0x70, 0x6f, 0x53, 0x9f, 0x44, 0xde, 0x16, 0x40, 0x70, + 0x28, 0x11, 0x61, 0xc8, 0xdb, 0x3e, 0x6d, 0x07, 0x07, 0xf9, 0xdc, 0x58, 0xd1, 0x7a, 0xa4, 0x53, + 0xc3, 0xe4, 0xde, 0x8d, 0x77, 0x7d, 0xea, 0x8a, 0xc3, 0x88, 0x42, 0x63, 0x4b, 0xc8, 0xc0, 0x4a, + 0x94, 0xf9, 0x4f, 0x03, 0x42, 0x55, 0xc2, 0xf9, 0x39, 0x75, 0x0e, 0x6e, 0xd9, 0xee, 0x91, 0xde, + 0xd6, 0xd0, 0x9c, 0x3d, 0x0d, 0xc7, 0x21, 0xc5, 0xa8, 0xeb, 0x21, 0x33, 0xd9, 0xf5, 0x20, 0x14, + 0x36, 0x3d, 0xd7, 0xb7, 0xdd, 0xee, 0x50, 0xb4, 0x6d, 0x68, 0x38, 0x0e, 0x29, 0x44, 0x49, 0xc7, + 0x68, 0x9b, 0xd8, 0xae, 0xed, 0xb6, 0xc4, 0x22, 0x36, 0xbc, 0xae, 0xeb, 0xcb, 0xda, 0x46, 0x97, + 0x74, 0x78, 0x08, 0x8b, 0x47, 0x70, 0x98, 0xff, 0xca, 0x41, 0x49, 0xac, 0x39, 0xb8, 0xe7, 0x5e, + 0x84, 0xb2, 0x13, 0xf7, 0x02, 0xbd, 0xf6, 0xf3, 0xda, 0x94, 0x64, 0x5c, 0xe3, 0x24, 0xad, 0x60, + 0x3e, 0x88, 0xdf, 0xd0, 0x7a, 0x0f, 0x42, 0xe6, 0x64, 0x75, 0x90, 0xa4, 0x15, 0xd9, 0xeb, 0x9e, + 0x88, 0x0f, 0x5d, 0xe3, 0x85, 0x47, 0xf4, 0x86, 0x00, 0x62, 0x85, 0x43, 0xdb, 0x70, 0x8e, 0x38, + 0x8e, 0x77, 0x4f, 0x02, 0xeb, 0x9e, 0x77, 0xd4, 0x26, 0xec, 0x88, 0xcb, 0xb1, 0x44, 0xa1, 0xfe, + 0x05, 0xcd, 0x72, 0x6e, 0x7d, 0x98, 0x04, 0x8f, 0xe2, 0x1b, 0x75, 0x6c, 0xb9, 0x09, 0x8f, 0xed, + 0x10, 0x96, 0x06, 0x40, 0x32, 0xca, 0xf5, 0x8c, 0xe0, 0xaa, 0x96, 0xb3, 0x84, 0x47, 0xd0, 0x9c, + 0x8e, 0x81, 0xe3, 0x91, 0x12, 0xd1, 0x75, 0x98, 0x13, 0x9e, 0xec, 0x75, 0xfd, 0xa0, 0x82, 0xcf, + 0xcb, 0xe3, 0x46, 0x27, 0xfd, 0xea, 0xdc, 0xed, 0x04, 0x06, 0x0f, 0x50, 0x8a, 0xcd, 0x75, 0xec, + 0xb6, 0xed, 0x57, 0x66, 0x24, 0x4b, 0xb8, 0xb9, 0xb7, 0x04, 0x10, 0x2b, 0x5c, 0xc2, 0x03, 0x0b, + 0x67, 0x7a, 0xe0, 0x06, 0x2c, 0x72, 0xea, 0x5a, 0x5b, 0xae, 0x2d, 0x0a, 0xc9, 0x1b, 0xc7, 0xb2, + 0x3e, 0x2f, 0xc9, 0x83, 0x38, 0x2f, 0x8a, 0xeb, 0xbd, 0x41, 0x24, 0x1e, 0xa6, 0x37, 0xff, 0x94, + 0x05, 0xa4, 0x5a, 0x1f, 0x4b, 0x15, 0x65, 0x2a, 0x2f, 0x8a, 0x06, 0x4d, 0xb7, 0x4e, 0xc6, 0x40, + 0x83, 0xa6, 0xbb, 0xa6, 0x00, 0x8f, 0xb6, 0xa1, 0xa8, 0xf2, 0x53, 0x14, 0x73, 0x6b, 0x9a, 0xb8, + 0xb8, 0x13, 0x20, 0x4e, 0xfb, 0xd5, 0xe5, 0x84, 0x9a, 0x10, 0x23, 0x9b, 0xe7, 0x48, 0x02, 0xba, + 0x02, 0x40, 0x3a, 0x76, 0x7c, 0x7c, 0x5a, 0x8c, 0x86, 0x68, 0xd1, 0x20, 0x04, 0xc7, 0xa8, 0xd0, + 0x2b, 0x90, 0xf3, 0x1f, 0xae, 0xc1, 0x2d, 0xc8, 0xfe, 0x5d, 0xb4, 0xb3, 0x52, 0x82, 0xd0, 0x2e, + 0x83, 0x82, 0x0b, 0xb3, 0x74, 0x6f, 0x1a, 0x6a, 0xdf, 0x0c, 0x31, 0x38, 0x46, 0x85, 0xbe, 0x09, + 0x85, 0x03, 0x5d, 0xcf, 0xca, 0xd3, 0x4d, 0x9d, 0x67, 0x83, 0x2a, 0x58, 0x4d, 0x70, 0x82, 0x2f, + 0x1c, 0x4a, 0x43, 0x5f, 0x85, 0x12, 0xef, 0xee, 0x87, 0x25, 0x80, 0x72, 0x89, 0xf0, 0xbe, 0xdd, + 0x8b, 0x50, 0x38, 0x4e, 0x67, 0xbe, 0x03, 0xc5, 0x6d, 0xbb, 0xc9, 0x3c, 0xd9, 0x92, 0x3f, 0x03, + 0x33, 0x3c, 0xd1, 0x6f, 0x86, 0x27, 0x19, 0xb8, 0x6a, 0x80, 0x17, 0x3e, 0xea, 0x12, 0xd7, 0x53, + 0x5d, 0x65, 0x3e, 0xf2, 0xd1, 0xd7, 0x05, 0x10, 0x2b, 0xdc, 0xf5, 0x25, 0x51, 0x65, 0xfc, 0xf8, + 0xa3, 0xea, 0xd4, 0x07, 0x1f, 0x55, 0xa7, 0x3e, 0xfc, 0x48, 0x57, 0x1c, 0xbf, 0x07, 0x80, 0x9d, + 0xfd, 0xef, 0xd2, 0xa6, 0xca, 0xdd, 0xa9, 0xa6, 0xac, 0xc1, 0x70, 0x5f, 0x4e, 0x59, 0x33, 0x03, + 0x95, 0x63, 0x0c, 0x87, 0x13, 0x94, 0x68, 0x0d, 0x8a, 0xe1, 0xfc, 0x54, 0xfb, 0xc7, 0x62, 0xe0, + 0x6f, 0xe1, 0x90, 0x15, 0x47, 0x34, 0x89, 0x8b, 0x24, 0x77, 0xe6, 0x45, 0x52, 0x87, 0x6c, 0xd7, + 0xb6, 0xf4, 0xfc, 0xe2, 0x52, 0x70, 0x91, 0xdf, 0xd9, 0x6a, 0x9c, 0xf6, 0xab, 0x4f, 0x8c, 0x7b, + 0xb6, 0xf0, 0x7b, 0x1d, 0xca, 0x6b, 0x77, 0xb6, 0x1a, 0x58, 0x30, 0x8f, 0xca, 0x6a, 0xd3, 0x13, + 0x66, 0xb5, 0x2b, 0x00, 0xad, 0x68, 0x0a, 0xa4, 0x92, 0x46, 0xe8, 0x88, 0xb1, 0xe9, 0x4f, 0x8c, + 0x0a, 0x71, 0x58, 0x6c, 0x32, 0x4a, 0x82, 0x69, 0x0c, 0xf7, 0x49, 0x5b, 0xcd, 0x95, 0x27, 0x8b, + 0x89, 0x0b, 0x5a, 0xcd, 0xe2, 0xc6, 0xa0, 0x30, 0x3c, 0x2c, 0x1f, 0x79, 0xb0, 0x68, 0xe9, 0x86, + 0x3d, 0x52, 0x5a, 0x9c, 0x58, 0xa9, 0xcc, 0x58, 0x8d, 0x41, 0x41, 0x78, 0x58, 0x36, 0xfa, 0x0e, + 0x2c, 0x07, 0xc0, 0xe1, 0xa9, 0x89, 0xcc, 0xfa, 0xd9, 0xfa, 0xca, 0x49, 0xbf, 0xba, 0xdc, 0x18, + 0x4b, 0x85, 0x1f, 0x20, 0x01, 0x59, 0x30, 0xed, 0xa8, 0x2a, 0xb9, 0x24, 0x2b, 0x9b, 0xaf, 0xa5, + 0x5b, 0x45, 0xe4, 0xfd, 0xb5, 0x78, 0x75, 0x1c, 0x4e, 0xc0, 0x74, 0x61, 0xac, 0x65, 0xa3, 0x77, + 0xa1, 0x44, 0x5c, 0xd7, 0xf3, 0x89, 0x9a, 0xe3, 0xcc, 0x4a, 0x55, 0xeb, 0x13, 0xab, 0x5a, 0x8f, + 0x64, 0x0c, 0x54, 0xe3, 0x31, 0x0c, 0x8e, 0xab, 0x42, 0xf7, 0x60, 0xde, 0xbb, 0xe7, 0x52, 0x86, + 0xe9, 0x01, 0x65, 0xd4, 0x6d, 0x52, 0x5e, 0x29, 0x4b, 0xed, 0x57, 0x53, 0x6a, 0x4f, 0x30, 0x47, + 0x2e, 0x9d, 0x84, 0x73, 0x3c, 0xa8, 0x05, 0xd5, 0x44, 0x6e, 0x75, 0x89, 0x63, 0x7f, 0x8f, 0x32, + 0x5e, 0x99, 0x8b, 0x46, 0xff, 0x9b, 0x21, 0x14, 0xc7, 0x28, 0x50, 0x17, 0xca, 0xed, 0xf8, 0x95, + 0x51, 0x59, 0x94, 0x66, 0x5e, 0x4b, 0x67, 0xe6, 0xf0, 0xa5, 0x16, 0x95, 0x41, 0x09, 0x1c, 0x4e, + 0x6a, 0x59, 0x7e, 0x01, 0x4a, 0x0f, 0xd9, 0x21, 0x88, 0x0e, 0x63, 0xf0, 0x40, 0x26, 0xea, 0x30, + 0xfe, 0x90, 0x81, 0xb9, 0xe4, 0x36, 0x0e, 0x5c, 0x87, 0xf9, 0x54, 0xd7, 0x61, 0xd0, 0xcb, 0x1a, + 0x63, 0xdf, 0x80, 0x82, 0xfc, 0x9c, 0x1d, 0x9b, 0x9f, 0x75, 0x1a, 0xcc, 0x3d, 0x4a, 0x1a, 0xac, + 0x01, 0x88, 0x62, 0x85, 0x79, 0x8e, 0x43, 0x99, 0x1e, 0xab, 0xa9, 0xb7, 0x9e, 0x10, 0x8a, 0x63, + 0x14, 0xa2, 0xa4, 0xde, 0x77, 0xbc, 0xe6, 0x91, 0xdc, 0x82, 0x20, 0x7a, 0x65, 0xee, 0x2b, 0xa8, + 0x92, 0xba, 0x3e, 0x84, 0xc5, 0x23, 0x38, 0xcc, 0x1e, 0x9c, 0xdf, 0x25, 0x4c, 0x14, 0x39, 0x51, + 0xa4, 0xc8, 0x9e, 0xe5, 0xed, 0xa1, 0x8e, 0xe8, 0xd2, 0xa4, 0x11, 0x17, 0x6d, 0x7e, 0x04, 0x8b, + 0xba, 0x22, 0xf3, 0x2f, 0x06, 0x5c, 0x18, 0xa9, 0xfb, 0x73, 0xe8, 0xc8, 0xde, 0x4e, 0x76, 0x64, + 0x2f, 0xa6, 0x1c, 0x0a, 0x8f, 0xb2, 0x76, 0x4c, 0x7f, 0x36, 0x03, 0xf9, 0x5d, 0x51, 0x09, 0x9b, + 0x9f, 0x18, 0x30, 0x2b, 0x7f, 0x4d, 0x32, 0x93, 0xaf, 0x26, 0x9f, 0x6a, 0x8a, 0x8f, 0xef, 0x99, + 0xe6, 0x71, 0x0c, 0xed, 0xdf, 0x37, 0x20, 0x39, 0x0d, 0x47, 0x2f, 0xab, 0x10, 0x30, 0xc2, 0x71, + 0xf5, 0x84, 0xee, 0xff, 0xd2, 0xb8, 0x96, 0xf4, 0x5c, 0xaa, 0x69, 0xe5, 0xb3, 0x50, 0xc4, 0x9e, + 0xe7, 0xef, 0x12, 0xff, 0x90, 0x8b, 0xbd, 0xeb, 0x88, 0x1f, 0x7a, 0x7b, 0xe5, 0xde, 0x49, 0x0c, + 0x56, 0x70, 0xf3, 0xa7, 0x06, 0x5c, 0x18, 0xfb, 0x02, 0x27, 0xb2, 0x48, 0x33, 0xfc, 0xd2, 0x2b, + 0x0a, 0x1d, 0x39, 0xa2, 0xc3, 0x31, 0x2a, 0xd1, 0x4b, 0x26, 0x9e, 0xed, 0x06, 0x7b, 0xc9, 0x84, + 0x36, 0x9c, 0xa4, 0x35, 0xff, 0x91, 0x01, 0xfd, 0xe4, 0xf5, 0x5f, 0x76, 0xfa, 0xa7, 0x07, 0x1e, + 0xdc, 0xe6, 0x92, 0x0f, 0x6e, 0xe1, 0xeb, 0x5a, 0xec, 0xc5, 0x29, 0xfb, 0xe0, 0x17, 0x27, 0xf4, + 0x7c, 0xf8, 0x88, 0xa5, 0x7c, 0x68, 0x25, 0xf9, 0x88, 0x75, 0xda, 0xaf, 0xce, 0x6a, 0xe1, 0xc9, + 0x47, 0xad, 0x37, 0x61, 0xc6, 0xa2, 0x3e, 0xb1, 0x1d, 0xd5, 0x17, 0xa6, 0x7e, 0x96, 0x51, 0xc2, + 0x1a, 0x8a, 0xb5, 0x5e, 0x12, 0x36, 0xe9, 0x0f, 0x1c, 0x08, 0x14, 0x09, 0xbb, 0xe9, 0x59, 0xaa, + 0x23, 0xc9, 0x47, 0x09, 0x7b, 0xc3, 0xb3, 0x28, 0x96, 0x18, 0xf3, 0x03, 0x03, 0x4a, 0x4a, 0xd2, + 0x06, 0xe9, 0x72, 0x8a, 0x2e, 0x87, 0xab, 0x50, 0xc7, 0x7d, 0x21, 0xfe, 0x5a, 0x79, 0xda, 0xaf, + 0x16, 0x25, 0x99, 0x6c, 0x66, 0x46, 0xbc, 0xca, 0x65, 0xce, 0xd8, 0xa3, 0x27, 0x21, 0x2f, 0x03, + 0x48, 0x6f, 0x66, 0xf4, 0xec, 0x2a, 0x80, 0x58, 0xe1, 0xcc, 0xcf, 0x32, 0x50, 0x4e, 0x2c, 0x2e, + 0x45, 0x5f, 0x10, 0x8e, 0x50, 0x33, 0x29, 0xc6, 0xf2, 0xe3, 0xff, 0xe4, 0xa0, 0xaf, 0xaf, 0xe9, + 0x47, 0xb9, 0xbe, 0xbe, 0x05, 0xd3, 0x4d, 0xb1, 0x47, 0xc1, 0x7f, 0x66, 0x2e, 0x4f, 0x72, 0x9c, + 0x72, 0x77, 0x23, 0x6f, 0x94, 0x9f, 0x1c, 0x6b, 0x81, 0xe8, 0x26, 0x2c, 0x32, 0xea, 0xb3, 0xde, + 0xfa, 0x81, 0x4f, 0x59, 0x7c, 0x98, 0x90, 0x8f, 0xaa, 0x6f, 0x3c, 0x48, 0x80, 0x87, 0x79, 0xcc, + 0x7d, 0x98, 0xbd, 0x4d, 0xf6, 0x9d, 0xf0, 0xa1, 0x11, 0x43, 0xd9, 0x76, 0x9b, 0x4e, 0xd7, 0xa2, + 0x2a, 0xa1, 0x07, 0xd9, 0x2b, 0x08, 0xda, 0xad, 0x38, 0xf2, 0xb4, 0x5f, 0x3d, 0x97, 0x00, 0xa8, + 0x97, 0x35, 0x9c, 0x14, 0x61, 0x3a, 0x90, 0xfb, 0x1c, 0x3b, 0xc9, 0x6f, 0x43, 0x31, 0xaa, 0xf5, + 0x1f, 0xb3, 0x4a, 0xf3, 0x6d, 0x28, 0x08, 0x8f, 0x0f, 0x7a, 0xd4, 0x33, 0xaa, 0xa4, 0x64, 0xed, + 0x95, 0x49, 0x53, 0x7b, 0xc9, 0xe7, 0xea, 0x3b, 0x1d, 0xeb, 0x11, 0x9f, 0xab, 0x33, 0x8f, 0x72, + 0xf3, 0x65, 0x27, 0xbc, 0xf9, 0xae, 0x80, 0xfa, 0x4b, 0x8f, 0xb8, 0x64, 0x54, 0x01, 0x11, 0xbb, + 0x64, 0xe2, 0xf7, 0x7f, 0xec, 0x85, 0xe1, 0x47, 0x06, 0x80, 0x1c, 0xe5, 0xc9, 0x31, 0x52, 0x8a, + 0x3f, 0x46, 0xdc, 0x81, 0x69, 0x4f, 0x79, 0xa4, 0x7a, 0xb2, 0x9e, 0x70, 0x5e, 0x1c, 0x06, 0x92, + 0xf2, 0x49, 0xac, 0x85, 0xd5, 0x5f, 0xfd, 0xf8, 0xfe, 0xca, 0xd4, 0x27, 0xf7, 0x57, 0xa6, 0x3e, + 0xbd, 0xbf, 0x32, 0xf5, 0xde, 0xc9, 0x8a, 0xf1, 0xf1, 0xc9, 0x8a, 0xf1, 0xc9, 0xc9, 0x8a, 0xf1, + 0xe9, 0xc9, 0x8a, 0xf1, 0xd9, 0xc9, 0x8a, 0xf1, 0xc1, 0xdf, 0x56, 0xa6, 0xde, 0x7c, 0x2a, 0xcd, + 0x5f, 0x25, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xda, 0x63, 0x4c, 0x51, 0x29, 0x00, 0x00, } func (m *APIGroup) Marshal() (dAtA []byte, err error) { @@ -1983,6 +1986,16 @@ func (m *DeleteOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.IgnoreStoreReadErrorWithClusterBreakingPotential != nil { + i-- + if *m.IgnoreStoreReadErrorWithClusterBreakingPotential { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } if len(m.DryRun) > 0 { for iNdEx := len(m.DryRun) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.DryRun[iNdEx]) @@ -3773,6 +3786,9 @@ func (m *DeleteOptions) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.IgnoreStoreReadErrorWithClusterBreakingPotential != nil { + n += 2 + } return n } @@ -4506,6 +4522,7 @@ func (this *DeleteOptions) String() string { `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, + `IgnoreStoreReadErrorWithClusterBreakingPotential:` + valueToStringGenerated(this.IgnoreStoreReadErrorWithClusterBreakingPotential) + `,`, `}`, }, "") return s @@ -6456,6 +6473,27 @@ func (m *DeleteOptions) Unmarshal(dAtA []byte) error { } m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IgnoreStoreReadErrorWithClusterBreakingPotential", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + 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.IgnoreStoreReadErrorWithClusterBreakingPotential = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index 18dd0b067c..865d3e7caa 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -315,6 +315,21 @@ message DeleteOptions { // +optional // +listType=atomic repeated string dryRun = 5; + + // if set to true, it will trigger an unsafe deletion of the resource in + // case the normal deletion flow fails with a corrupt object error. + // A resource is considered corrupt if it can not be retrieved from + // the underlying storage successfully because of a) its data can + // not be transformed e.g. decryption failure, or b) it fails + // to decode into an object. + // NOTE: unsafe deletion ignores finalizer constraints, skips + // precondition checks, and removes the object from the storage. + // WARNING: This may potentially break the cluster if the workload + // associated with the resource being unsafe-deleted relies on normal + // deletion flow. Use only if you REALLY know what you are doing. + // The default value is false, and the user must opt in to enable it + // +optional + optional bool ignoreStoreReadErrorWithClusterBreakingPotential = 6; } // Duration is a wrapper around time.Duration which supports correct diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 473adb9ef5..4cf3f47956 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -439,6 +439,20 @@ const ( // // The annotation is added to a "Bookmark" event. InitialEventsAnnotationKey = "k8s.io/initial-events-end" + + // InitialEventsListBlueprintAnnotationKey is the name of the key + // where an empty, versioned list is encoded in the requested format + // (e.g., protobuf, JSON, CBOR), then base64-encoded and stored as a string. + // + // This encoding matches the request encoding format, which may be + // protobuf, JSON, CBOR, or others, depending on what the client requested. + // This ensures that the reconstructed list can be processed through the + // same decoder chain that would handle a standard LIST call response. + // + // The annotation is added to a "Bookmark" event and is used by clients + // to guarantee the format consistency when reconstructing + // the list during WatchList processing. + InitialEventsListBlueprintAnnotationKey = "kubernetes.io/initial-events-list-blueprint" ) // resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch @@ -546,6 +560,21 @@ type DeleteOptions struct { // +optional // +listType=atomic DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` + + // if set to true, it will trigger an unsafe deletion of the resource in + // case the normal deletion flow fails with a corrupt object error. + // A resource is considered corrupt if it can not be retrieved from + // the underlying storage successfully because of a) its data can + // not be transformed e.g. decryption failure, or b) it fails + // to decode into an object. + // NOTE: unsafe deletion ignores finalizer constraints, skips + // precondition checks, and removes the object from the storage. + // WARNING: This may potentially break the cluster if the workload + // associated with the resource being unsafe-deleted relies on normal + // deletion flow. Use only if you REALLY know what you are doing. + // The default value is false, and the user must opt in to enable it + // +optional + IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty" protobuf:"varint,6,opt,name=ignoreStoreReadErrorWithClusterBreakingPotential"` } const ( @@ -902,6 +931,22 @@ const ( // Status code 500 StatusReasonServerTimeout StatusReason = "ServerTimeout" + // StatusReasonStoreReadError means that the server encountered an error while + // retrieving resources from the backend object store. + // This may be due to backend database error, or because processing of the read + // resource failed. + // Details: + // "kind" string - the kind attribute of the resource being acted on. + // "name" string - the prefix where the reading error(s) occurred + // "causes" []StatusCause + // - (optional): + // - "type" CauseType - CauseTypeUnexpectedServerResponse + // - "message" string - the error message from the store backend + // - "field" string - the full path with the key of the resource that failed reading + // + // Status code 500 + StatusReasonStoreReadError StatusReason = "StorageReadError" + // StatusReasonTimeout means that the request could not be completed within the given time. // Clients can get this response only when they specified a timeout param in the request, // or if the server cannot complete the operation within a reasonable amount of time. diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index 1fa37215cd..405496d3df 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -129,6 +129,7 @@ var map_DeleteOptions = map[string]string{ "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. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "ignoreStoreReadErrorWithClusterBreakingPotential": "if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it", } func (DeleteOptions) SwaggerDoc() map[string]string { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go index 0f58d66c09..71f7b163a1 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go @@ -20,6 +20,7 @@ import ( gojson "encoding/json" "fmt" "io" + "math/big" "strings" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -125,6 +126,29 @@ func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, err return i, true, nil } +// NestedNumberAsFloat64 returns the float64 value of a nested field. If the field's value is a +// float64, it is returned. If the field's value is an int64 that can be losslessly converted to +// float64, it will be converted and returned. Returns false if value is not found and an error if +// not a float64 or an int64 that can be accurately represented as a float64. +func NestedNumberAsFloat64(obj map[string]interface{}, fields ...string) (float64, bool, error) { + val, found, err := NestedFieldNoCopy(obj, fields...) + if !found || err != nil { + return 0, found, err + } + switch x := val.(type) { + case int64: + f, accuracy := big.NewInt(x).Float64() + if accuracy != big.Exact { + return 0, false, fmt.Errorf("%v accessor error: int64 value %v cannot be losslessly converted to float64", jsonPath(fields), x) + } + return f, true, nil + case float64: + return x, true, nil + default: + return 0, false, fmt.Errorf("%v accessor error: %v is of the type %T, expected float64 or int64", jsonPath(fields), val, val) + } +} + // NestedStringSlice returns a copy of []string value of a nested field. // Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice. func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool, error) { diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go index 40d289f375..5e36a91ee4 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go @@ -450,10 +450,14 @@ func (u *Unstructured) SetFinalizers(finalizers []string) { } func (u *Unstructured) GetManagedFields() []metav1.ManagedFieldsEntry { - items, found, err := NestedSlice(u.Object, "metadata", "managedFields") + v, found, err := NestedFieldNoCopy(u.Object, "metadata", "managedFields") if !found || err != nil { return nil } + items, ok := v.([]interface{}) + if !ok { + return nil + } managedFields := []metav1.ManagedFieldsEntry{} for _, item := range items { m, ok := item.(map[string]interface{}) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index 3eba5ba541..b1eb1bbfc4 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -26,6 +26,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" + + "k8s.io/utils/ptr" ) // LabelSelectorValidationOptions is a struct that can be passed to ValidateLabelSelector to record the validate options @@ -165,6 +167,7 @@ func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList { allErrs = append(allErrs, field.NotSupported(field.NewPath("propagationPolicy"), options.PropagationPolicy, []string{string(metav1.DeletePropagationForeground), string(metav1.DeletePropagationBackground), string(metav1.DeletePropagationOrphan), "nil"})) } allErrs = append(allErrs, ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...) + allErrs = append(allErrs, ValidateIgnoreStoreReadError(field.NewPath("ignoreStoreReadErrorWithClusterBreakingPotential"), options)...) return allErrs } @@ -186,15 +189,16 @@ func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList { func ValidatePatchOptions(options *metav1.PatchOptions, patchType types.PatchType) field.ErrorList { allErrs := field.ErrorList{} - if patchType != types.ApplyPatchType { - if options.Force != nil { - allErrs = append(allErrs, field.Forbidden(field.NewPath("force"), "may not be specified for non-apply patch")) - } - } else { + switch patchType { + case types.ApplyYAMLPatchType, types.ApplyCBORPatchType: if options.FieldManager == "" { // This field is defaulted to "kubectl" by kubectl, but HAS TO be explicitly set by controllers. allErrs = append(allErrs, field.Required(field.NewPath("fieldManager"), "is required for apply patch")) } + default: + if options.Force != nil { + allErrs = append(allErrs, field.Forbidden(field.NewPath("force"), "may not be specified for non-apply patch")) + } } allErrs = append(allErrs, ValidateFieldManager(options.FieldManager, field.NewPath("fieldManager"))...) allErrs = append(allErrs, ValidateDryRun(field.NewPath("dryRun"), options.DryRun)...) @@ -212,7 +216,7 @@ func ValidateFieldManager(fieldManager string, fldPath *field.Path) field.ErrorL // considered as not set and is defaulted by the rest of the process // (unless apply is used, in which case it is required). if len(fieldManager) > FieldManagerMaxLength { - allErrs = append(allErrs, field.TooLong(fldPath, fieldManager, FieldManagerMaxLength)) + allErrs = append(allErrs, field.TooLong(fldPath, "" /*unused*/, FieldManagerMaxLength)) } // Verify that all characters are printable. for i, r := range fieldManager { @@ -277,7 +281,7 @@ func ValidateManagedFields(fieldsList []metav1.ManagedFieldsEntry, fldPath *fiel allErrs = append(allErrs, ValidateFieldManager(fields.Manager, fldPath.Child("manager"))...) if len(fields.Subresource) > MaxSubresourceNameLength { - allErrs = append(allErrs, field.TooLong(fldPath.Child("subresource"), fields.Subresource, MaxSubresourceNameLength)) + allErrs = append(allErrs, field.TooLong(fldPath.Child("subresource"), "" /*unused*/, MaxSubresourceNameLength)) } } return allErrs @@ -334,12 +338,12 @@ func ValidateCondition(condition metav1.Condition, fldPath *field.Path) field.Er allErrs = append(allErrs, field.Invalid(fldPath.Child("reason"), condition.Reason, currErr)) } if len(condition.Reason) > maxReasonLen { - allErrs = append(allErrs, field.TooLong(fldPath.Child("reason"), condition.Reason, maxReasonLen)) + allErrs = append(allErrs, field.TooLong(fldPath.Child("reason"), "" /*unused*/, maxReasonLen)) } } if len(condition.Message) > maxMessageLen { - allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), condition.Message, maxMessageLen)) + allErrs = append(allErrs, field.TooLong(fldPath.Child("message"), "" /*unused*/, maxMessageLen)) } return allErrs @@ -357,3 +361,31 @@ func isValidConditionReason(value string) []string { } return nil } + +// ValidateIgnoreStoreReadError validates that delete options are valid when +// ignoreStoreReadErrorWithClusterBreakingPotential is enabled +func ValidateIgnoreStoreReadError(fldPath *field.Path, options *metav1.DeleteOptions) field.ErrorList { + allErrs := field.ErrorList{} + if enabled := ptr.Deref[bool](options.IgnoreStoreReadErrorWithClusterBreakingPotential, false); !enabled { + return allErrs + } + + if len(options.DryRun) > 0 { + allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .dryRun")) + } + if options.PropagationPolicy != nil { + allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .propagationPolicy")) + } + //nolint:staticcheck // Keep validation for deprecated OrphanDependents option until it's being removed + if options.OrphanDependents != nil { + allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .orphanDependents")) + } + if options.GracePeriodSeconds != nil { + allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .gracePeriodSeconds")) + } + if options.Preconditions != nil { + allErrs = append(allErrs, field.Invalid(fldPath, true, "cannot be set together with .preconditions")) + } + + return allErrs +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go index afe01ed5a4..82e2722404 100644 --- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go @@ -339,6 +339,13 @@ func autoConvert_url_Values_To_v1_DeleteOptions(in *url.Values, out *DeleteOptio } else { out.DryRun = nil } + if values, ok := map[string][]string(*in)["ignoreStoreReadErrorWithClusterBreakingPotential"]; ok && len(values) > 0 { + if err := runtime.Convert_Slice_string_To_Pointer_bool(&values, &out.IgnoreStoreReadErrorWithClusterBreakingPotential, s); err != nil { + return err + } + } else { + out.IgnoreStoreReadErrorWithClusterBreakingPotential = nil + } return nil } 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 index 90cc54a7e7..6b0d0dfee9 100644 --- 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 @@ -290,6 +290,11 @@ func (in *DeleteOptions) DeepCopyInto(out *DeleteOptions) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.IgnoreStoreReadErrorWithClusterBreakingPotential != nil { + in, out := &in.IgnoreStoreReadErrorWithClusterBreakingPotential, &out.IgnoreStoreReadErrorWithClusterBreakingPotential + *out = new(bool) + **out = **in + } return } diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go index 9e22a00564..fafa81a3d2 100644 --- a/vendor/k8s.io/apimachinery/pkg/labels/selector.go +++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -18,6 +18,7 @@ package labels import ( "fmt" + "slices" "sort" "strconv" "strings" @@ -27,7 +28,6 @@ import ( "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/klog/v2" - stringslices "k8s.io/utils/strings/slices" ) var ( @@ -313,7 +313,7 @@ func (r Requirement) Equal(x Requirement) bool { if r.operator != x.operator { return false } - return stringslices.Equal(r.strValues, x.strValues) + return slices.Equal(r.strValues, x.strValues) } // Empty returns true if the internalSelector doesn't restrict selection space diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go index cc0a77bba6..395dfdbd02 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go @@ -284,3 +284,21 @@ func (e *encoderWithAllocator) Encode(obj Object, w io.Writer) error { func (e *encoderWithAllocator) Identifier() Identifier { return e.encoder.Identifier() } + +type nondeterministicEncoderToEncoderAdapter struct { + NondeterministicEncoder +} + +func (e nondeterministicEncoderToEncoderAdapter) Encode(obj Object, w io.Writer) error { + return e.EncodeNondeterministic(obj, w) +} + +// UseNondeterministicEncoding returns an Encoder that encodes objects using the provided Encoder's +// EncodeNondeterministic method if it implements NondeterministicEncoder, otherwise it returns the +// provided Encoder as-is. +func UseNondeterministicEncoding(encoder Encoder) Encoder { + if nondeterministic, ok := encoder.(NondeterministicEncoder); ok { + return nondeterministicEncoderToEncoderAdapter{nondeterministic} + } + return encoder +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go index e89ea89391..2703300cd5 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -69,6 +69,19 @@ type Encoder interface { Identifier() Identifier } +// NondeterministicEncoder is implemented by Encoders that can serialize objects more efficiently in +// cases where the output does not need to be deterministic. +type NondeterministicEncoder interface { + Encoder + + // EncodeNondeterministic writes an object to the stream. Unlike the Encode method of + // Encoder, EncodeNondeterministic does not guarantee that any two invocations will write + // the same sequence of bytes to the io.Writer. Any differences will not be significant to a + // generic decoder. For example, map entries and struct fields might be encoded in any + // order. + EncodeNondeterministic(Object, io.Writer) error +} + // MemoryAllocator is responsible for allocating memory. // By encapsulating memory allocation into its own interface, we can reuse the memory // across many operations in places we know it can significantly improve the performance. diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go new file mode 100644 index 0000000000..4d069a903a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor.go @@ -0,0 +1,389 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cbor + +import ( + "bytes" + "encoding/hex" + "errors" + "fmt" + "io" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes" + "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" + util "k8s.io/apimachinery/pkg/util/runtime" + + "github.com/fxamacker/cbor/v2" +) + +type metaFactory interface { + // Interpret should return the version and kind of the wire-format of the object. + Interpret(data []byte) (*schema.GroupVersionKind, error) +} + +type defaultMetaFactory struct{} + +func (mf *defaultMetaFactory) Interpret(data []byte) (*schema.GroupVersionKind, error) { + var tm metav1.TypeMeta + // The input is expected to include additional map keys besides apiVersion and kind, so use + // lax mode for decoding into TypeMeta. + if err := modes.DecodeLax.Unmarshal(data, &tm); err != nil { + return nil, fmt.Errorf("unable to determine group/version/kind: %w", err) + } + actual := tm.GetObjectKind().GroupVersionKind() + return &actual, nil +} + +type Serializer interface { + runtime.Serializer + runtime.NondeterministicEncoder + recognizer.RecognizingDecoder + + // NewSerializer returns a value of this interface type rather than exporting the serializer + // type and returning one of those because the zero value of serializer isn't ready to + // use. Users aren't intended to implement cbor.Serializer themselves, and this unexported + // interface method is here to prevent that (https://go.dev/blog/module-compatibility). + private() +} + +var _ Serializer = &serializer{} + +type options struct { + strict bool + transcode bool +} + +type Option func(*options) + +// Strict configures a serializer to return a strict decoding error when it encounters map keys that +// do not correspond to a field in the target object of a decode operation. This option is disabled +// by default. +func Strict(s bool) Option { + return func(opts *options) { + opts.strict = s + } +} + +// Transcode configures a serializer to transcode the "raw" bytes of a decoded runtime.RawExtension +// or metav1.FieldsV1 object to JSON. This is enabled by default to support existing programs that +// depend on the assumption that objects of either type contain valid JSON. +func Transcode(s bool) Option { + return func(opts *options) { + opts.transcode = s + } +} + +type serializer struct { + metaFactory metaFactory + creater runtime.ObjectCreater + typer runtime.ObjectTyper + options options +} + +func (serializer) private() {} + +// NewSerializer creates and returns a serializer configured with the provided options. The default +// options are equivalent to explicitly passing Strict(false) and Transcode(true). +func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) Serializer { + return newSerializer(&defaultMetaFactory{}, creater, typer, options...) +} + +func newSerializer(metaFactory metaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, options ...Option) *serializer { + s := &serializer{ + metaFactory: metaFactory, + creater: creater, + typer: typer, + } + s.options.transcode = true + for _, o := range options { + o(&s.options) + } + return s +} + +func (s *serializer) Identifier() runtime.Identifier { + return "cbor" +} + +// Encode writes a CBOR representation of the given object. +// +// Because the CBOR data item written by a call to Encode is always enclosed in the "self-described +// CBOR" tag, its encoded form always has the prefix 0xd9d9f7. This prefix is suitable for use as a +// "magic number" for distinguishing encoded CBOR from other protocols. +// +// The default serialization behavior for any given object replicates the behavior of the JSON +// serializer as far as it is necessary to allow the CBOR serializer to be used as a drop-in +// replacement for the JSON serializer, with limited exceptions. For example, the distinction +// between integers and floating-point numbers is preserved in CBOR due to its distinct +// representations for each type. +// +// Objects implementing runtime.Unstructured will have their unstructured content encoded rather +// than following the default behavior for their dynamic type. +func (s *serializer) Encode(obj runtime.Object, w io.Writer) error { + return s.encode(modes.Encode, obj, w) +} + +func (s *serializer) EncodeNondeterministic(obj runtime.Object, w io.Writer) error { + return s.encode(modes.EncodeNondeterministic, obj, w) +} + +func (s *serializer) encode(mode modes.EncMode, obj runtime.Object, w io.Writer) error { + var v interface{} = obj + if u, ok := obj.(runtime.Unstructured); ok { + v = u.UnstructuredContent() + } + + if err := modes.RejectCustomMarshalers(v); err != nil { + return err + } + + if _, err := w.Write(selfDescribedCBOR); err != nil { + return err + } + + return mode.MarshalTo(v, w) +} + +// gvkWithDefaults returns group kind and version defaulting from provided default +func gvkWithDefaults(actual, defaultGVK schema.GroupVersionKind) schema.GroupVersionKind { + if len(actual.Kind) == 0 { + actual.Kind = defaultGVK.Kind + } + if len(actual.Version) == 0 && len(actual.Group) == 0 { + actual.Group = defaultGVK.Group + actual.Version = defaultGVK.Version + } + if len(actual.Version) == 0 && actual.Group == defaultGVK.Group { + actual.Version = defaultGVK.Version + } + return actual +} + +// diagnose returns the diagnostic encoding of a well-formed CBOR data item. +func diagnose(data []byte) string { + diag, err := modes.Diagnostic.Diagnose(data) + if err != nil { + // Since the input must already be well-formed CBOR, converting it to diagnostic + // notation should not fail. + util.HandleError(err) + + return hex.EncodeToString(data) + } + return diag +} + +// unmarshal unmarshals CBOR data from the provided byte slice into a Go object. If the decoder is +// configured to report strict errors, the first error return value may be a non-nil strict decoding +// error. If the last error return value is non-nil, then the unmarshal failed entirely and the +// state of the destination object should not be relied on. +func (s *serializer) unmarshal(data []byte, into interface{}) (strict, lax error) { + if u, ok := into.(runtime.Unstructured); ok { + var content map[string]interface{} + defer func() { + switch u := u.(type) { + case *unstructured.UnstructuredList: + // UnstructuredList's implementation of SetUnstructuredContent + // produces different objects than those produced by a decode using + // UnstructuredJSONScheme: + // + // 1. SetUnstructuredContent retains the "items" key in the list's + // Object field. It is omitted from Object when decoding with + // UnstructuredJSONScheme. + // 2. SetUnstructuredContent does not populate "apiVersion" and + // "kind" on each entry of its Items + // field. UnstructuredJSONScheme does, inferring the singular + // Kind from the list Kind. + // 3. SetUnstructuredContent ignores entries of "items" that are + // not JSON objects or are objects without + // "kind". UnstructuredJSONScheme returns an error in either + // case. + // + // UnstructuredJSONScheme's behavior is replicated here. + var items []interface{} + if uncast, present := content["items"]; present { + var cast bool + items, cast = uncast.([]interface{}) + if !cast { + strict, lax = nil, fmt.Errorf("items field of UnstructuredList must be encoded as an array or null if present") + return + } + } + apiVersion, _ := content["apiVersion"].(string) + kind, _ := content["kind"].(string) + kind = strings.TrimSuffix(kind, "List") + var unstructureds []unstructured.Unstructured + if len(items) > 0 { + unstructureds = make([]unstructured.Unstructured, len(items)) + } + for i := range items { + object, cast := items[i].(map[string]interface{}) + if !cast { + strict, lax = nil, fmt.Errorf("elements of the items field of UnstructuredList must be encoded as a map") + return + } + + // As in UnstructuredJSONScheme, only set the heuristic + // singular GVK when both "apiVersion" and "kind" are either + // missing, non-string, or empty. + object["apiVersion"], _ = object["apiVersion"].(string) + object["kind"], _ = object["kind"].(string) + if object["apiVersion"] == "" && object["kind"] == "" { + object["apiVersion"] = apiVersion + object["kind"] = kind + } + + if object["kind"] == "" { + strict, lax = nil, runtime.NewMissingKindErr(diagnose(data)) + return + } + if object["apiVersion"] == "" { + strict, lax = nil, runtime.NewMissingVersionErr(diagnose(data)) + return + } + + unstructureds[i].Object = object + } + delete(content, "items") + u.Object = content + u.Items = unstructureds + default: + u.SetUnstructuredContent(content) + } + }() + into = &content + } else if err := modes.RejectCustomMarshalers(into); err != nil { + return nil, err + } + + if !s.options.strict { + return nil, modes.DecodeLax.Unmarshal(data, into) + } + + err := modes.Decode.Unmarshal(data, into) + // TODO: UnknownFieldError is ambiguous. It only provides the index of the first problematic + // map entry encountered and does not indicate which map the index refers to. + var unknownField *cbor.UnknownFieldError + if errors.As(err, &unknownField) { + // Unlike JSON, there are no strict errors in CBOR for duplicate map keys. CBOR maps + // with duplicate keys are considered invalid according to the spec and are rejected + // entirely. + return runtime.NewStrictDecodingError([]error{unknownField}), modes.DecodeLax.Unmarshal(data, into) + } + return nil, err +} + +func (s *serializer) Decode(data []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + // A preliminary pass over the input to obtain the actual GVK is redundant on a successful + // decode into Unstructured. + if _, ok := into.(runtime.Unstructured); ok { + if _, unmarshalErr := s.unmarshal(data, into); unmarshalErr != nil { + actual, interpretErr := s.metaFactory.Interpret(data) + if interpretErr != nil { + return nil, nil, interpretErr + } + + if gvk != nil { + *actual = gvkWithDefaults(*actual, *gvk) + } + + return nil, actual, unmarshalErr + } + + actual := into.GetObjectKind().GroupVersionKind() + if len(actual.Kind) == 0 { + return nil, &actual, runtime.NewMissingKindErr(diagnose(data)) + } + if len(actual.Version) == 0 { + return nil, &actual, runtime.NewMissingVersionErr(diagnose(data)) + } + + return into, &actual, nil + } + + actual, err := s.metaFactory.Interpret(data) + if err != nil { + return nil, nil, err + } + + if gvk != nil { + *actual = gvkWithDefaults(*actual, *gvk) + } + + if into != nil { + types, _, err := s.typer.ObjectKinds(into) + if err != nil { + return nil, actual, err + } + *actual = gvkWithDefaults(*actual, types[0]) + } + + if len(actual.Kind) == 0 { + return nil, actual, runtime.NewMissingKindErr(diagnose(data)) + } + if len(actual.Version) == 0 { + return nil, actual, runtime.NewMissingVersionErr(diagnose(data)) + } + + obj, err := runtime.UseOrCreateObject(s.typer, s.creater, *actual, into) + if err != nil { + return nil, actual, err + } + + strict, err := s.unmarshal(data, obj) + if err != nil { + return nil, actual, err + } + + if s.options.transcode { + if err := transcodeRawTypes(obj); err != nil { + return nil, actual, err + } + } + + return obj, actual, strict +} + +// selfDescribedCBOR is the CBOR encoding of the head of tag number 55799. This tag, specified in +// RFC 8949 Section 3.4.6 "Self-Described CBOR", encloses all output from the encoder, has no +// special semantics, and is used as a magic number to recognize CBOR-encoded data items. +// +// See https://www.rfc-editor.org/rfc/rfc8949.html#name-self-described-cbor. +var selfDescribedCBOR = []byte{0xd9, 0xd9, 0xf7} + +func (s *serializer) RecognizesData(data []byte) (ok, unknown bool, err error) { + return bytes.HasPrefix(data, selfDescribedCBOR), false, nil +} + +// NewSerializerInfo returns a default SerializerInfo for CBOR using the given creater and typer. +func NewSerializerInfo(creater runtime.ObjectCreater, typer runtime.ObjectTyper) runtime.SerializerInfo { + return runtime.SerializerInfo{ + MediaType: "application/cbor", + MediaTypeType: "application", + MediaTypeSubType: "cbor", + Serializer: NewSerializer(creater, typer), + StrictSerializer: NewSerializer(creater, typer, Strict(true)), + StreamSerializer: &runtime.StreamSerializerInfo{ + Framer: NewFramer(), + Serializer: NewSerializer(creater, typer, Transcode(false)), + }, + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go index cd78b1df26..a71a487f9e 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct/direct.go @@ -23,14 +23,39 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes" ) +// Marshal serializes a value to CBOR. If there is more than one way to encode the value, it will +// make the same choice as the CBOR implementation of runtime.Serializer. +// +// Note: Support for CBOR is at an alpha stage. If the value (or, for composite types, any of its +// nested values) implement any of the interfaces encoding.TextMarshaler, encoding.TextUnmarshaler, +// encoding/json.Marshaler, or encoding/json.Unmarshaler, a non-nil error will be returned unless +// the value also implements the corresponding CBOR interfaces. This limitation will ultimately be +// removed in favor of automatic transcoding to CBOR. func Marshal(src interface{}) ([]byte, error) { + if err := modes.RejectCustomMarshalers(src); err != nil { + return nil, err + } return modes.Encode.Marshal(src) } +// Unmarshal deserializes from CBOR into an addressable value. If there is more than one way to +// unmarshal a value, it will make the same choice as the CBOR implementation of runtime.Serializer. +// +// Note: Support for CBOR is at an alpha stage. If the value (or, for composite types, any of its +// nested values) implement any of the interfaces encoding.TextMarshaler, encoding.TextUnmarshaler, +// encoding/json.Marshaler, or encoding/json.Unmarshaler, a non-nil error will be returned unless +// the value also implements the corresponding CBOR interfaces. This limitation will ultimately be +// removed in favor of automatic transcoding to CBOR. func Unmarshal(src []byte, dst interface{}) error { + if err := modes.RejectCustomMarshalers(dst); err != nil { + return err + } return modes.Decode.Unmarshal(src, dst) } +// Diagnose accepts well-formed CBOR bytes and returns a string representing the same data item in +// human-readable diagnostic notation (RFC 8949 Section 8). The diagnostic notation is not meant to +// be parsed. func Diagnose(src []byte) (string, error) { return modes.Diagnostic.Diagnose(src) } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/framer.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/framer.go new file mode 100644 index 0000000000..28a733c673 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/framer.go @@ -0,0 +1,90 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cbor + +import ( + "io" + + "k8s.io/apimachinery/pkg/runtime" + + "github.com/fxamacker/cbor/v2" +) + +// NewFramer returns a runtime.Framer based on RFC 8742 CBOR Sequences. Each frame contains exactly +// one encoded CBOR data item. +func NewFramer() runtime.Framer { + return framer{} +} + +var _ runtime.Framer = framer{} + +type framer struct{} + +func (framer) NewFrameReader(rc io.ReadCloser) io.ReadCloser { + return &frameReader{ + decoder: cbor.NewDecoder(rc), + closer: rc, + } +} + +func (framer) NewFrameWriter(w io.Writer) io.Writer { + // Each data item in a CBOR sequence is self-delimiting (like JSON objects). + return w +} + +type frameReader struct { + decoder *cbor.Decoder + closer io.Closer + + overflow []byte +} + +func (fr *frameReader) Read(dst []byte) (int, error) { + if len(fr.overflow) > 0 { + // We read a frame that was too large for the destination slice in a previous call + // to Read and have bytes left over. + n := copy(dst, fr.overflow) + if n < len(fr.overflow) { + fr.overflow = fr.overflow[n:] + return n, io.ErrShortBuffer + } + fr.overflow = nil + return n, nil + } + + // The Reader contract allows implementations to use all of dst[0:len(dst)] as scratch + // space, even if n < len(dst), but it does not allow implementations to use + // dst[len(dst):cap(dst)]. Slicing it up-front allows us to append to it without worrying + // about overwriting dst[len(dst):cap(dst)]. + m := cbor.RawMessage(dst[0:0:len(dst)]) + if err := fr.decoder.Decode(&m); err != nil { + return 0, err + } + + if len(m) > len(dst) { + // The frame was too big, m has a newly-allocated underlying array to accommodate + // it. + fr.overflow = m[len(dst):] + return copy(dst, m), io.ErrShortBuffer + } + + return len(m), nil +} + +func (fr *frameReader) Close() error { + return fr.closer.Close() +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go index c669313844..5fae141518 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go @@ -105,7 +105,7 @@ var Encode = EncMode{ var EncodeNondeterministic = EncMode{ delegate: func() cbor.UserBufferEncMode { opts := Encode.options() - opts.Sort = cbor.SortNone // TODO: Use cbor.SortFastShuffle after bump to v2.7.0. + opts.Sort = cbor.SortFastShuffle em, err := opts.UserBufferEncMode() if err != nil { panic(err) diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/raw.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/raw.go new file mode 100644 index 0000000000..09d1340f93 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/cbor/raw.go @@ -0,0 +1,236 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cbor + +import ( + "fmt" + "reflect" + "sync" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +var sharedTranscoders transcoders + +var rawTypeTranscodeFuncs = map[reflect.Type]func(reflect.Value) error{ + reflect.TypeFor[runtime.RawExtension](): func(rv reflect.Value) error { + if !rv.CanAddr() { + return nil + } + re := rv.Addr().Interface().(*runtime.RawExtension) + if re.Raw == nil { + // When Raw is nil it encodes to null. Don't change nil Raw values during + // transcoding, they would have unmarshalled from JSON as nil too. + return nil + } + j, err := re.MarshalJSON() + if err != nil { + return fmt.Errorf("failed to transcode RawExtension to JSON: %w", err) + } + re.Raw = j + return nil + }, + reflect.TypeFor[metav1.FieldsV1](): func(rv reflect.Value) error { + if !rv.CanAddr() { + return nil + } + fields := rv.Addr().Interface().(*metav1.FieldsV1) + if fields.Raw == nil { + // When Raw is nil it encodes to null. Don't change nil Raw values during + // transcoding, they would have unmarshalled from JSON as nil too. + return nil + } + j, err := fields.MarshalJSON() + if err != nil { + return fmt.Errorf("failed to transcode FieldsV1 to JSON: %w", err) + } + fields.Raw = j + return nil + }, +} + +func transcodeRawTypes(v interface{}) error { + if v == nil { + return nil + } + + rv := reflect.ValueOf(v) + return sharedTranscoders.getTranscoder(rv.Type()).fn(rv) +} + +type transcoder struct { + fn func(rv reflect.Value) error +} + +var noop = transcoder{ + fn: func(reflect.Value) error { + return nil + }, +} + +type transcoders struct { + lock sync.RWMutex + m map[reflect.Type]**transcoder +} + +func (ts *transcoders) getTranscoder(rt reflect.Type) transcoder { + ts.lock.RLock() + tpp, ok := ts.m[rt] + ts.lock.RUnlock() + if ok { + return **tpp + } + + ts.lock.Lock() + defer ts.lock.Unlock() + tp := ts.getTranscoderLocked(rt) + return *tp +} + +func (ts *transcoders) getTranscoderLocked(rt reflect.Type) *transcoder { + if tpp, ok := ts.m[rt]; ok { + // A transcoder for this type was cached while waiting to acquire the lock. + return *tpp + } + + // Cache the transcoder now, before populating fn, so that circular references between types + // don't overflow the call stack. + t := new(transcoder) + if ts.m == nil { + ts.m = make(map[reflect.Type]**transcoder) + } + ts.m[rt] = &t + + for rawType, fn := range rawTypeTranscodeFuncs { + if rt == rawType { + t = &transcoder{fn: fn} + return t + } + } + + switch rt.Kind() { + case reflect.Array: + te := ts.getTranscoderLocked(rt.Elem()) + rtlen := rt.Len() + if rtlen == 0 || te == &noop { + t = &noop + break + } + t.fn = func(rv reflect.Value) error { + for i := 0; i < rtlen; i++ { + if err := te.fn(rv.Index(i)); err != nil { + return err + } + } + return nil + } + case reflect.Interface: + // Any interface value might have a dynamic type involving RawExtension. It needs to + // be checked. + t.fn = func(rv reflect.Value) error { + if rv.IsNil() { + return nil + } + rv = rv.Elem() + // The interface element's type is dynamic so its transcoder can't be + // determined statically. + return ts.getTranscoder(rv.Type()).fn(rv) + } + case reflect.Map: + rtk := rt.Key() + tk := ts.getTranscoderLocked(rtk) + rte := rt.Elem() + te := ts.getTranscoderLocked(rte) + if tk == &noop && te == &noop { + t = &noop + break + } + t.fn = func(rv reflect.Value) error { + iter := rv.MapRange() + rvk := reflect.New(rtk).Elem() + rve := reflect.New(rte).Elem() + for iter.Next() { + rvk.SetIterKey(iter) + if err := tk.fn(rvk); err != nil { + return err + } + rve.SetIterValue(iter) + if err := te.fn(rve); err != nil { + return err + } + } + return nil + } + case reflect.Pointer: + te := ts.getTranscoderLocked(rt.Elem()) + if te == &noop { + t = &noop + break + } + t.fn = func(rv reflect.Value) error { + if rv.IsNil() { + return nil + } + return te.fn(rv.Elem()) + } + case reflect.Slice: + te := ts.getTranscoderLocked(rt.Elem()) + if te == &noop { + t = &noop + break + } + t.fn = func(rv reflect.Value) error { + for i := 0; i < rv.Len(); i++ { + if err := te.fn(rv.Index(i)); err != nil { + return err + } + } + return nil + } + case reflect.Struct: + type fieldTranscoder struct { + Index int + Transcoder *transcoder + } + var fieldTranscoders []fieldTranscoder + for i := 0; i < rt.NumField(); i++ { + f := rt.Field(i) + tf := ts.getTranscoderLocked(f.Type) + if tf == &noop { + continue + } + fieldTranscoders = append(fieldTranscoders, fieldTranscoder{Index: i, Transcoder: tf}) + } + if len(fieldTranscoders) == 0 { + t = &noop + break + } + t.fn = func(rv reflect.Value) error { + for _, ft := range fieldTranscoders { + if err := ft.Transcoder.fn(rv.Field(ft.Index)); err != nil { + return err + } + } + return nil + } + default: + t = &noop + } + + return t +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go index ff98208420..77bb307452 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go @@ -17,9 +17,6 @@ limitations under the License. package serializer import ( - "mime" - "strings" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/json" @@ -28,41 +25,26 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer/versioning" ) -// serializerExtensions are for serializers that are conditionally compiled in -var serializerExtensions = []func(*runtime.Scheme) (serializerType, bool){} - -type serializerType struct { - AcceptContentTypes []string - ContentType string - FileExtensions []string - // EncodesAsText should be true if this content type can be represented safely in UTF-8 - EncodesAsText bool - - Serializer runtime.Serializer - PrettySerializer runtime.Serializer - StrictSerializer runtime.Serializer - - AcceptStreamContentTypes []string - StreamContentType string - - Framer runtime.Framer - StreamSerializer runtime.Serializer -} - -func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, options CodecFactoryOptions) []serializerType { +func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, options CodecFactoryOptions) []runtime.SerializerInfo { jsonSerializer := json.NewSerializerWithOptions( mf, scheme, scheme, json.SerializerOptions{Yaml: false, Pretty: false, Strict: options.Strict}, ) - jsonSerializerType := serializerType{ - AcceptContentTypes: []string{runtime.ContentTypeJSON}, - ContentType: runtime.ContentTypeJSON, - FileExtensions: []string{"json"}, - EncodesAsText: true, - Serializer: jsonSerializer, - - Framer: json.Framer, - StreamSerializer: jsonSerializer, + jsonSerializerType := runtime.SerializerInfo{ + MediaType: runtime.ContentTypeJSON, + MediaTypeType: "application", + MediaTypeSubType: "json", + EncodesAsText: true, + Serializer: jsonSerializer, + StrictSerializer: json.NewSerializerWithOptions( + mf, scheme, scheme, + json.SerializerOptions{Yaml: false, Pretty: false, Strict: true}, + ), + StreamSerializer: &runtime.StreamSerializerInfo{ + EncodesAsText: true, + Serializer: jsonSerializer, + Framer: json.Framer, + }, } if options.Pretty { jsonSerializerType.PrettySerializer = json.NewSerializerWithOptions( @@ -71,12 +53,6 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, option ) } - strictJSONSerializer := json.NewSerializerWithOptions( - mf, scheme, scheme, - json.SerializerOptions{Yaml: false, Pretty: false, Strict: true}, - ) - jsonSerializerType.StrictSerializer = strictJSONSerializer - yamlSerializer := json.NewSerializerWithOptions( mf, scheme, scheme, json.SerializerOptions{Yaml: true, Pretty: false, Strict: options.Strict}, @@ -88,35 +64,35 @@ func newSerializersForScheme(scheme *runtime.Scheme, mf json.MetaFactory, option protoSerializer := protobuf.NewSerializer(scheme, scheme) protoRawSerializer := protobuf.NewRawSerializer(scheme, scheme) - serializers := []serializerType{ + serializers := []runtime.SerializerInfo{ jsonSerializerType, { - AcceptContentTypes: []string{runtime.ContentTypeYAML}, - ContentType: runtime.ContentTypeYAML, - FileExtensions: []string{"yaml"}, - EncodesAsText: true, - Serializer: yamlSerializer, - StrictSerializer: strictYAMLSerializer, + MediaType: runtime.ContentTypeYAML, + MediaTypeType: "application", + MediaTypeSubType: "yaml", + EncodesAsText: true, + Serializer: yamlSerializer, + StrictSerializer: strictYAMLSerializer, }, { - AcceptContentTypes: []string{runtime.ContentTypeProtobuf}, - ContentType: runtime.ContentTypeProtobuf, - FileExtensions: []string{"pb"}, - Serializer: protoSerializer, + MediaType: runtime.ContentTypeProtobuf, + MediaTypeType: "application", + MediaTypeSubType: "vnd.kubernetes.protobuf", + Serializer: protoSerializer, // note, strict decoding is unsupported for protobuf, // fall back to regular serializing StrictSerializer: protoSerializer, - - Framer: protobuf.LengthDelimitedFramer, - StreamSerializer: protoRawSerializer, + StreamSerializer: &runtime.StreamSerializerInfo{ + Serializer: protoRawSerializer, + Framer: protobuf.LengthDelimitedFramer, + }, }, } - for _, fn := range serializerExtensions { - if serializer, ok := fn(scheme); ok { - serializers = append(serializers, serializer) - } + for _, f := range options.serializers { + serializers = append(serializers, f(scheme, scheme)) } + return serializers } @@ -136,6 +112,8 @@ type CodecFactoryOptions struct { Strict bool // Pretty includes a pretty serializer along with the non-pretty one Pretty bool + + serializers []func(runtime.ObjectCreater, runtime.ObjectTyper) runtime.SerializerInfo } // CodecFactoryOptionsMutator takes a pointer to an options struct and then modifies it. @@ -162,6 +140,13 @@ func DisableStrict(options *CodecFactoryOptions) { options.Strict = false } +// WithSerializer configures a serializer to be supported in addition to the default serializers. +func WithSerializer(f func(runtime.ObjectCreater, runtime.ObjectTyper) runtime.SerializerInfo) CodecFactoryOptionsMutator { + return func(options *CodecFactoryOptions) { + options.serializers = append(options.serializers, f) + } +} + // NewCodecFactory provides methods for retrieving serializers for the supported wire formats // and conversion wrappers to define preferred internal and external versions. In the future, // as the internal version is used less, callers may instead use a defaulting serializer and @@ -184,7 +169,7 @@ func NewCodecFactory(scheme *runtime.Scheme, mutators ...CodecFactoryOptionsMuta } // newCodecFactory is a helper for testing that allows a different metafactory to be specified. -func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) CodecFactory { +func newCodecFactory(scheme *runtime.Scheme, serializers []runtime.SerializerInfo) CodecFactory { decoders := make([]runtime.Decoder, 0, len(serializers)) var accepts []runtime.SerializerInfo alreadyAccepted := make(map[string]struct{}) @@ -192,38 +177,20 @@ func newCodecFactory(scheme *runtime.Scheme, serializers []serializerType) Codec var legacySerializer runtime.Serializer for _, d := range serializers { decoders = append(decoders, d.Serializer) - for _, mediaType := range d.AcceptContentTypes { - if _, ok := alreadyAccepted[mediaType]; ok { - continue - } - alreadyAccepted[mediaType] = struct{}{} - info := runtime.SerializerInfo{ - MediaType: d.ContentType, - EncodesAsText: d.EncodesAsText, - Serializer: d.Serializer, - PrettySerializer: d.PrettySerializer, - StrictSerializer: d.StrictSerializer, - } - - mediaType, _, err := mime.ParseMediaType(info.MediaType) - if err != nil { - panic(err) - } - parts := strings.SplitN(mediaType, "/", 2) - info.MediaTypeType = parts[0] - info.MediaTypeSubType = parts[1] - - if d.StreamSerializer != nil { - info.StreamSerializer = &runtime.StreamSerializerInfo{ - Serializer: d.StreamSerializer, - EncodesAsText: d.EncodesAsText, - Framer: d.Framer, - } - } - accepts = append(accepts, info) - if mediaType == runtime.ContentTypeJSON { - legacySerializer = d.Serializer - } + if _, ok := alreadyAccepted[d.MediaType]; ok { + continue + } + alreadyAccepted[d.MediaType] = struct{}{} + + acceptedSerializerShallowCopy := d + if d.StreamSerializer != nil { + cloned := *d.StreamSerializer + acceptedSerializerShallowCopy.StreamSerializer = &cloned + } + accepts = append(accepts, acceptedSerializerShallowCopy) + + if d.MediaType == runtime.ContentTypeJSON { + legacySerializer = d.Serializer } } if legacySerializer == nil { diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go index 1680c149f9..ca7b7cc2d4 100644 --- a/vendor/k8s.io/apimachinery/pkg/runtime/types.go +++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go @@ -43,10 +43,11 @@ type TypeMeta struct { } const ( - ContentTypeJSON string = "application/json" - ContentTypeYAML string = "application/yaml" - ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" - ContentTypeCBOR string = "application/cbor" + ContentTypeJSON string = "application/json" + ContentTypeYAML string = "application/yaml" + ContentTypeProtobuf string = "application/vnd.kubernetes.protobuf" + ContentTypeCBOR string = "application/cbor" // RFC 8949 + ContentTypeCBORSequence string = "application/cbor-seq" // RFC 8742 ) // RawExtension is used to hold extensions in external versions. diff --git a/vendor/k8s.io/apimachinery/pkg/types/patch.go b/vendor/k8s.io/apimachinery/pkg/types/patch.go index fe8ecaaffa..d338cf213d 100644 --- a/vendor/k8s.io/apimachinery/pkg/types/patch.go +++ b/vendor/k8s.io/apimachinery/pkg/types/patch.go @@ -25,5 +25,7 @@ const ( JSONPatchType PatchType = "application/json-patch+json" MergePatchType PatchType = "application/merge-patch+json" StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" - ApplyPatchType PatchType = "application/apply-patch+yaml" + ApplyPatchType PatchType = ApplyYAMLPatchType + ApplyYAMLPatchType PatchType = "application/apply-patch+yaml" + ApplyCBORPatchType PatchType = "application/apply-patch+cbor" ) diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go index 978ffb3c3e..de540c82ff 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go +++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go @@ -19,11 +19,12 @@ package managedfields import ( "fmt" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/managedfields/internal" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" ) // FieldManager updates the managed fields and merges applied @@ -32,7 +33,7 @@ type FieldManager = internal.FieldManager // NewDefaultFieldManager creates a new FieldManager that merges apply requests // and update managed fields for other types of requests. -func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (*FieldManager, error) { +func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (*FieldManager, error) { f, err := internal.NewStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, resetFields) if err != nil { return nil, fmt.Errorf("failed to create field manager: %v", err) @@ -43,7 +44,7 @@ func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime // NewDefaultCRDFieldManager creates a new FieldManager specifically for // CRDs. This allows for the possibility of fields which are not defined // in models, as well as having no models defined at all. -func NewDefaultCRDFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (_ *FieldManager, err error) { +func NewDefaultCRDFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (_ *FieldManager, err error) { f, err := internal.NewCRDStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, resetFields) if err != nil { return nil, fmt.Errorf("failed to create field manager: %v", err) diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go index 786ad991c2..3fe36edc9d 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go +++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go @@ -19,13 +19,14 @@ package internal import ( "fmt" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v4/merge" + "sigs.k8s.io/structured-merge-diff/v4/typed" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" - "sigs.k8s.io/structured-merge-diff/v4/merge" - "sigs.k8s.io/structured-merge-diff/v4/typed" ) type structuredMergeManager struct { @@ -41,7 +42,7 @@ var _ Manager = &structuredMergeManager{} // NewStructuredMergeManager creates a new Manager that merges apply requests // and update managed fields for other types of requests. -func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (Manager, error) { +func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (Manager, error) { if typeConverter == nil { return nil, fmt.Errorf("typeconverter must not be nil") } @@ -52,8 +53,8 @@ func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runt groupVersion: gv, hubVersion: hub, updater: merge.Updater{ - Converter: newVersionConverter(typeConverter, objectConverter, hub), // This is the converter provided to SMD from k8s - IgnoredFields: resetFields, + Converter: newVersionConverter(typeConverter, objectConverter, hub), // This is the converter provided to SMD from k8s + IgnoreFilter: resetFields, }, }, nil } @@ -61,7 +62,7 @@ func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runt // NewCRDStructuredMergeManager creates a new Manager specifically for // CRDs. This allows for the possibility of fields which are not defined // in models, as well as having no models defined at all. -func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (_ Manager, err error) { +func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]fieldpath.Filter) (_ Manager, err error) { return &structuredMergeManager{ typeConverter: typeConverter, objectConverter: objectConverter, @@ -69,8 +70,8 @@ func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter r groupVersion: gv, hubVersion: hub, updater: merge.Updater{ - Converter: newCRDVersionConverter(typeConverter, objectConverter, hub), - IgnoredFields: resetFields, + Converter: newCRDVersionConverter(typeConverter, objectConverter, hub), + IgnoreFilter: resetFields, }, }, nil } diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go index 4fe0c5eb25..df374949dd 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -45,7 +45,7 @@ var PanicHandlers = []func(context.Context, interface{}){logPanic} // // E.g., you can provide one or more additional handlers for something like shutting down go routines gracefully. // -// TODO(pohly): logcheck:context // HandleCrashWithContext should be used instead of HandleCrash in code which supports contextual logging. +// Contextual logging: HandleCrashWithContext should be used instead of HandleCrash in code which supports contextual logging. func HandleCrash(additionalHandlers ...func(interface{})) { if r := recover(); r != nil { additionalHandlersWithContext := make([]func(context.Context, interface{}), len(additionalHandlers)) @@ -146,7 +146,7 @@ type ErrorHandler func(ctx context.Context, err error, msg string, keysAndValues // is preferable to logging the error - the default behavior is to log but the // errors may be sent to a remote server for analysis. // -// TODO(pohly): logcheck:context // HandleErrorWithContext should be used instead of HandleError in code which supports contextual logging. +// Contextual logging: HandleErrorWithContext should be used instead of HandleError in code which supports contextual logging. func HandleError(err error) { // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead if err == nil { diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go index bc387d0116..f1634bc0df 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -220,26 +220,24 @@ func Forbidden(field *Path, detail string) *Error { return &Error{ErrorTypeForbidden, field.String(), "", detail} } -// TooLong returns a *Error indicating "too long". This is used to -// report that the given value is too long. This is similar to -// Invalid, but the returned error will not include the too-long -// value. +// TooLong returns a *Error indicating "too long". This is used to report that +// the given value is too long. This is similar to Invalid, but the returned +// error will not include the too-long value. If maxLength is negative, it will +// be included in the message. The value argument is not used. func TooLong(field *Path, value interface{}, maxLength int) *Error { - return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d bytes", maxLength)} -} - -// TooLongMaxLength returns a *Error indicating "too long". This is used to -// report that the given value is too long. This is similar to -// Invalid, but the returned error will not include the too-long -// value. If maxLength is negative, no max length will be included in the message. -func TooLongMaxLength(field *Path, value interface{}, maxLength int) *Error { var msg string if maxLength >= 0 { - msg = fmt.Sprintf("may not be longer than %d", maxLength) + msg = fmt.Sprintf("may not be more than %d bytes", maxLength) } else { msg = "value is too long" } - return &Error{ErrorTypeTooLong, field.String(), value, msg} + return &Error{ErrorTypeTooLong, field.String(), "", msg} +} + +// TooLongMaxLength returns a *Error indicating "too long". +// Deprecated: Use TooLong instead. +func TooLongMaxLength(field *Path, value interface{}, maxLength int) *Error { + return TooLong(field, "", maxLength) } // TooMany returns a *Error indicating "too many". This is used to diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go index b32644902b..9bc393cf58 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -175,6 +175,8 @@ func IsValidLabelValue(value string) []string { } const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" +const dns1123LabelFmtWithUnderscore string = "_?[a-z0-9]([-_a-z0-9]*[a-z0-9])?" + const dns1123LabelErrMsg string = "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" // DNS1123LabelMaxLength is a label's max length in DNS (RFC 1123) @@ -204,10 +206,14 @@ func IsDNS1123Label(value string) []string { const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" const dns1123SubdomainErrorMsg string = "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" +const dns1123SubdomainFmtWithUnderscore string = dns1123LabelFmtWithUnderscore + "(\\." + dns1123LabelFmtWithUnderscore + ")*" +const dns1123SubdomainErrorMsgFG string = "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '_', '-' or '.', and must start and end with an alphanumeric character" + // DNS1123SubdomainMaxLength is a subdomain's max length in DNS (RFC 1123) const DNS1123SubdomainMaxLength int = 253 var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$") +var dns1123SubdomainRegexpWithUnderscore = regexp.MustCompile("^" + dns1123SubdomainFmtWithUnderscore + "$") // IsDNS1123Subdomain tests for a string that conforms to the definition of a // subdomain in DNS (RFC 1123). @@ -222,6 +228,19 @@ func IsDNS1123Subdomain(value string) []string { return errs } +// IsDNS1123SubdomainWithUnderscore tests for a string that conforms to the definition of a +// subdomain in DNS (RFC 1123), but allows the use of an underscore in the string +func IsDNS1123SubdomainWithUnderscore(value string) []string { + var errs []string + if len(value) > DNS1123SubdomainMaxLength { + errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) + } + if !dns1123SubdomainRegexpWithUnderscore.MatchString(value) { + errs = append(errs, RegexError(dns1123SubdomainErrorMsgFG, 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 '-', start with an alphabetic character, and end with an alphanumeric character" diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go index 1d698fd610..3f7de21b39 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/apparmorprofile.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // AppArmorProfileApplyConfiguration represents a declarative configuration of the AppArmorProfile type for use // with apply. type AppArmorProfileApplyConfiguration struct { - Type *v1.AppArmorProfileType `json:"type,omitempty"` - LocalhostProfile *string `json:"localhostProfile,omitempty"` + Type *corev1.AppArmorProfileType `json:"type,omitempty"` + LocalhostProfile *string `json:"localhostProfile,omitempty"` } // AppArmorProfileApplyConfiguration constructs a declarative configuration of the AppArmorProfile type for use with @@ -38,7 +38,7 @@ func AppArmorProfile() *AppArmorProfileApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *AppArmorProfileApplyConfiguration) WithType(value v1.AppArmorProfileType) *AppArmorProfileApplyConfiguration { +func (b *AppArmorProfileApplyConfiguration) WithType(value corev1.AppArmorProfileType) *AppArmorProfileApplyConfiguration { b.Type = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go index e4c2fff3f6..2c76161a10 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/attachedvolume.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // AttachedVolumeApplyConfiguration represents a declarative configuration of the AttachedVolume type for use // with apply. type AttachedVolumeApplyConfiguration struct { - Name *v1.UniqueVolumeName `json:"name,omitempty"` - DevicePath *string `json:"devicePath,omitempty"` + Name *corev1.UniqueVolumeName `json:"name,omitempty"` + DevicePath *string `json:"devicePath,omitempty"` } // AttachedVolumeApplyConfiguration constructs a declarative configuration of the AttachedVolume type for use with @@ -38,7 +38,7 @@ func AttachedVolume() *AttachedVolumeApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *AttachedVolumeApplyConfiguration) WithName(value v1.UniqueVolumeName) *AttachedVolumeApplyConfiguration { +func (b *AttachedVolumeApplyConfiguration) WithName(value corev1.UniqueVolumeName) *AttachedVolumeApplyConfiguration { b.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go index 40ad5ac78f..d4d20dfa91 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/azurediskvolumesource.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // AzureDiskVolumeSourceApplyConfiguration represents a declarative configuration of the AzureDiskVolumeSource type for use // with apply. type AzureDiskVolumeSourceApplyConfiguration struct { - DiskName *string `json:"diskName,omitempty"` - DataDiskURI *string `json:"diskURI,omitempty"` - CachingMode *v1.AzureDataDiskCachingMode `json:"cachingMode,omitempty"` - FSType *string `json:"fsType,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - Kind *v1.AzureDataDiskKind `json:"kind,omitempty"` + DiskName *string `json:"diskName,omitempty"` + DataDiskURI *string `json:"diskURI,omitempty"` + CachingMode *corev1.AzureDataDiskCachingMode `json:"cachingMode,omitempty"` + FSType *string `json:"fsType,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + Kind *corev1.AzureDataDiskKind `json:"kind,omitempty"` } // AzureDiskVolumeSourceApplyConfiguration constructs a declarative configuration of the AzureDiskVolumeSource type for use with @@ -58,7 +58,7 @@ func (b *AzureDiskVolumeSourceApplyConfiguration) WithDataDiskURI(value string) // WithCachingMode sets the CachingMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CachingMode field is set to the value of the last call. -func (b *AzureDiskVolumeSourceApplyConfiguration) WithCachingMode(value v1.AzureDataDiskCachingMode) *AzureDiskVolumeSourceApplyConfiguration { +func (b *AzureDiskVolumeSourceApplyConfiguration) WithCachingMode(value corev1.AzureDataDiskCachingMode) *AzureDiskVolumeSourceApplyConfiguration { b.CachingMode = &value return b } @@ -82,7 +82,7 @@ func (b *AzureDiskVolumeSourceApplyConfiguration) WithReadOnly(value bool) *Azur // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. -func (b *AzureDiskVolumeSourceApplyConfiguration) WithKind(value v1.AzureDataDiskKind) *AzureDiskVolumeSourceApplyConfiguration { +func (b *AzureDiskVolumeSourceApplyConfiguration) WithKind(value corev1.AzureDataDiskKind) *AzureDiskVolumeSourceApplyConfiguration { b.Kind = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go index 1c463aef50..e5c52b3c13 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/capabilities.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // CapabilitiesApplyConfiguration represents a declarative configuration of the Capabilities type for use // with apply. type CapabilitiesApplyConfiguration struct { - Add []v1.Capability `json:"add,omitempty"` - Drop []v1.Capability `json:"drop,omitempty"` + Add []corev1.Capability `json:"add,omitempty"` + Drop []corev1.Capability `json:"drop,omitempty"` } // CapabilitiesApplyConfiguration constructs a declarative configuration of the Capabilities type for use with @@ -38,7 +38,7 @@ func Capabilities() *CapabilitiesApplyConfiguration { // WithAdd adds the given value to the Add field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Add field. -func (b *CapabilitiesApplyConfiguration) WithAdd(values ...v1.Capability) *CapabilitiesApplyConfiguration { +func (b *CapabilitiesApplyConfiguration) WithAdd(values ...corev1.Capability) *CapabilitiesApplyConfiguration { for i := range values { b.Add = append(b.Add, values[i]) } @@ -48,7 +48,7 @@ func (b *CapabilitiesApplyConfiguration) WithAdd(values ...v1.Capability) *Capab // WithDrop adds the given value to the Drop field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Drop field. -func (b *CapabilitiesApplyConfiguration) WithDrop(values ...v1.Capability) *CapabilitiesApplyConfiguration { +func (b *CapabilitiesApplyConfiguration) WithDrop(values ...corev1.Capability) *CapabilitiesApplyConfiguration { for i := range values { b.Drop = append(b.Drop, values[i]) } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go index bcfbac63e7..ab1c578c85 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/clustertrustbundleprojection.go @@ -19,17 +19,17 @@ limitations under the License. package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ClusterTrustBundleProjectionApplyConfiguration represents a declarative configuration of the ClusterTrustBundleProjection type for use // with apply. type ClusterTrustBundleProjectionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - SignerName *string `json:"signerName,omitempty"` - LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - Optional *bool `json:"optional,omitempty"` - Path *string `json:"path,omitempty"` + Name *string `json:"name,omitempty"` + SignerName *string `json:"signerName,omitempty"` + LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` + Optional *bool `json:"optional,omitempty"` + Path *string `json:"path,omitempty"` } // ClusterTrustBundleProjectionApplyConfiguration constructs a declarative configuration of the ClusterTrustBundleProjection type for use with @@ -57,7 +57,7 @@ func (b *ClusterTrustBundleProjectionApplyConfiguration) WithSignerName(value st // WithLabelSelector sets the LabelSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LabelSelector field is set to the value of the last call. -func (b *ClusterTrustBundleProjectionApplyConfiguration) WithLabelSelector(value *v1.LabelSelectorApplyConfiguration) *ClusterTrustBundleProjectionApplyConfiguration { +func (b *ClusterTrustBundleProjectionApplyConfiguration) WithLabelSelector(value *metav1.LabelSelectorApplyConfiguration) *ClusterTrustBundleProjectionApplyConfiguration { b.LabelSelector = value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go index 0044c7c0bb..60be6fe801 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentcondition.go @@ -19,16 +19,16 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ComponentConditionApplyConfiguration represents a declarative configuration of the ComponentCondition type for use // with apply. type ComponentConditionApplyConfiguration struct { - Type *v1.ComponentConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - Message *string `json:"message,omitempty"` - Error *string `json:"error,omitempty"` + Type *corev1.ComponentConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + Message *string `json:"message,omitempty"` + Error *string `json:"error,omitempty"` } // ComponentConditionApplyConfiguration constructs a declarative configuration of the ComponentCondition type for use with @@ -40,7 +40,7 @@ func ComponentCondition() *ComponentConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ComponentConditionApplyConfiguration) WithType(value v1.ComponentConditionType) *ComponentConditionApplyConfiguration { +func (b *ComponentConditionApplyConfiguration) WithType(value corev1.ComponentConditionType) *ComponentConditionApplyConfiguration { b.Type = &value return b } @@ -48,7 +48,7 @@ func (b *ComponentConditionApplyConfiguration) WithType(value v1.ComponentCondit // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ComponentConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ComponentConditionApplyConfiguration { +func (b *ComponentConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *ComponentConditionApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go index 195bde7219..340a55e2d2 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go @@ -19,20 +19,20 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ComponentStatusApplyConfiguration represents a declarative configuration of the ComponentStatus type for use // with apply. type ComponentStatusApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Conditions []ComponentConditionApplyConfiguration `json:"conditions,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Conditions []ComponentConditionApplyConfiguration `json:"conditions,omitempty"` } // ComponentStatus constructs a declarative configuration of the ComponentStatus type for use with @@ -56,18 +56,18 @@ func ComponentStatus(name string) *ComponentStatusApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractComponentStatus(componentStatus *apicorev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { +func ExtractComponentStatus(componentStatus *corev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { return extractComponentStatus(componentStatus, fieldManager, "") } // ExtractComponentStatusStatus is the same as ExtractComponentStatus except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractComponentStatusStatus(componentStatus *apicorev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { +func ExtractComponentStatusStatus(componentStatus *corev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) { return extractComponentStatus(componentStatus, fieldManager, "status") } -func extractComponentStatus(componentStatus *apicorev1.ComponentStatus, fieldManager string, subresource string) (*ComponentStatusApplyConfiguration, error) { +func extractComponentStatus(componentStatus *corev1.ComponentStatus, fieldManager string, subresource string) (*ComponentStatusApplyConfiguration, error) { b := &ComponentStatusApplyConfiguration{} err := managedfields.ExtractInto(componentStatus, internal.Parser().Type("io.k8s.api.core.v1.ComponentStatus"), fieldManager, b, subresource) if err != nil { @@ -84,7 +84,7 @@ func extractComponentStatus(componentStatus *apicorev1.ComponentStatus, fieldMan // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithKind(value string) *ComponentStatusApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -92,7 +92,7 @@ func (b *ComponentStatusApplyConfiguration) WithKind(value string) *ComponentSta // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithAPIVersion(value string) *ComponentStatusApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -101,7 +101,7 @@ func (b *ComponentStatusApplyConfiguration) WithAPIVersion(value string) *Compon // If called multiple times, the Name field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithName(value string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -110,7 +110,7 @@ func (b *ComponentStatusApplyConfiguration) WithName(value string) *ComponentSta // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithGenerateName(value string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -119,7 +119,7 @@ func (b *ComponentStatusApplyConfiguration) WithGenerateName(value string) *Comp // If called multiple times, the Namespace field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithNamespace(value string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -128,7 +128,7 @@ func (b *ComponentStatusApplyConfiguration) WithNamespace(value string) *Compone // If called multiple times, the UID field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithUID(value types.UID) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -137,7 +137,7 @@ func (b *ComponentStatusApplyConfiguration) WithUID(value types.UID) *ComponentS // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithResourceVersion(value string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -146,25 +146,25 @@ func (b *ComponentStatusApplyConfiguration) WithResourceVersion(value string) *C // If called multiple times, the Generation field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithGeneration(value int64) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ComponentStatusApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ComponentStatusApplyConfiguration { +func (b *ComponentStatusApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ComponentStatusApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ComponentStatusApplyConfiguration { +func (b *ComponentStatusApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -173,7 +173,7 @@ func (b *ComponentStatusApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ComponentStatusApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -183,11 +183,11 @@ func (b *ComponentStatusApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ComponentStatusApplyConfiguration) WithLabels(entries map[string]string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -198,11 +198,11 @@ func (b *ComponentStatusApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *ComponentStatusApplyConfiguration) WithAnnotations(entries map[string]string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -210,13 +210,13 @@ func (b *ComponentStatusApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ComponentStatusApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ComponentStatusApplyConfiguration { +func (b *ComponentStatusApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -227,14 +227,14 @@ func (b *ComponentStatusApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *ComponentStatusApplyConfiguration) WithFinalizers(values ...string) *ComponentStatusApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ComponentStatusApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -254,5 +254,5 @@ func (b *ComponentStatusApplyConfiguration) WithConditions(values ...*ComponentC // GetName retrieves the value of the Name field in the declarative configuration. func (b *ComponentStatusApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go index 576b7a3d68..2ff2c4d20c 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go @@ -20,21 +20,21 @@ package v1 import ( corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ConfigMapApplyConfiguration represents a declarative configuration of the ConfigMap type for use // with apply. type ConfigMapApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Immutable *bool `json:"immutable,omitempty"` - Data map[string]string `json:"data,omitempty"` - BinaryData map[string][]byte `json:"binaryData,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Immutable *bool `json:"immutable,omitempty"` + Data map[string]string `json:"data,omitempty"` + BinaryData map[string][]byte `json:"binaryData,omitempty"` } // ConfigMap constructs a declarative configuration of the ConfigMap type for use with @@ -88,7 +88,7 @@ func extractConfigMap(configMap *corev1.ConfigMap, fieldManager string, subresou // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithKind(value string) *ConfigMapApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -96,7 +96,7 @@ func (b *ConfigMapApplyConfiguration) WithKind(value string) *ConfigMapApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithAPIVersion(value string) *ConfigMapApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -105,7 +105,7 @@ func (b *ConfigMapApplyConfiguration) WithAPIVersion(value string) *ConfigMapApp // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithName(value string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -114,7 +114,7 @@ func (b *ConfigMapApplyConfiguration) WithName(value string) *ConfigMapApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithGenerateName(value string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -123,7 +123,7 @@ func (b *ConfigMapApplyConfiguration) WithGenerateName(value string) *ConfigMapA // If called multiple times, the Namespace field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithNamespace(value string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -132,7 +132,7 @@ func (b *ConfigMapApplyConfiguration) WithNamespace(value string) *ConfigMapAppl // If called multiple times, the UID field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithUID(value types.UID) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -141,7 +141,7 @@ func (b *ConfigMapApplyConfiguration) WithUID(value types.UID) *ConfigMapApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithResourceVersion(value string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -150,25 +150,25 @@ func (b *ConfigMapApplyConfiguration) WithResourceVersion(value string) *ConfigM // If called multiple times, the Generation field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithGeneration(value int64) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConfigMapApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigMapApplyConfiguration { +func (b *ConfigMapApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConfigMapApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigMapApplyConfiguration { +func (b *ConfigMapApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -177,7 +177,7 @@ func (b *ConfigMapApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ConfigMapApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -187,11 +187,11 @@ func (b *ConfigMapApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *ConfigMapApplyConfiguration) WithLabels(entries map[string]string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -202,11 +202,11 @@ func (b *ConfigMapApplyConfiguration) WithLabels(entries map[string]string) *Con // overwriting an existing map entries in Annotations field with the same key. func (b *ConfigMapApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -214,13 +214,13 @@ func (b *ConfigMapApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConfigMapApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigMapApplyConfiguration { +func (b *ConfigMapApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -231,14 +231,14 @@ func (b *ConfigMapApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *ConfigMapApplyConfiguration) WithFinalizers(values ...string) *ConfigMapApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ConfigMapApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -281,5 +281,5 @@ func (b *ConfigMapApplyConfiguration) WithBinaryData(entries map[string][]byte) // GetName retrieves the value of the Name field in the declarative configuration. func (b *ConfigMapApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go index b1fccd7000..4c0d2cbdd9 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapenvsource.go @@ -35,7 +35,7 @@ func ConfigMapEnvSource() *ConfigMapEnvSourceApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigMapEnvSourceApplyConfiguration) WithName(value string) *ConfigMapEnvSourceApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go index 26c2a75b5a..97c0e7210a 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapkeyselector.go @@ -36,7 +36,7 @@ func ConfigMapKeySelector() *ConfigMapKeySelectorApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigMapKeySelectorApplyConfiguration) WithName(value string) *ConfigMapKeySelectorApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go index 308b28f57d..d8c5e21d3a 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapprojection.go @@ -36,7 +36,7 @@ func ConfigMapProjection() *ConfigMapProjectionApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigMapProjectionApplyConfiguration) WithName(value string) *ConfigMapProjectionApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go index 8e0e8dc0f4..b5f4103977 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmapvolumesource.go @@ -37,7 +37,7 @@ func ConfigMapVolumeSource() *ConfigMapVolumeSourceApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ConfigMapVolumeSourceApplyConfiguration) WithName(value string) *ConfigMapVolumeSourceApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerport.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerport.go index 7acc0638f2..2ad47b3a96 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerport.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerport.go @@ -19,17 +19,17 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ContainerPortApplyConfiguration represents a declarative configuration of the ContainerPort type for use // with apply. type ContainerPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - HostPort *int32 `json:"hostPort,omitempty"` - ContainerPort *int32 `json:"containerPort,omitempty"` - Protocol *v1.Protocol `json:"protocol,omitempty"` - HostIP *string `json:"hostIP,omitempty"` + Name *string `json:"name,omitempty"` + HostPort *int32 `json:"hostPort,omitempty"` + ContainerPort *int32 `json:"containerPort,omitempty"` + Protocol *corev1.Protocol `json:"protocol,omitempty"` + HostIP *string `json:"hostIP,omitempty"` } // ContainerPortApplyConfiguration constructs a declarative configuration of the ContainerPort type for use with @@ -65,7 +65,7 @@ func (b *ContainerPortApplyConfiguration) WithContainerPort(value int32) *Contai // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *ContainerPortApplyConfiguration) WithProtocol(value v1.Protocol) *ContainerPortApplyConfiguration { +func (b *ContainerPortApplyConfiguration) WithProtocol(value corev1.Protocol) *ContainerPortApplyConfiguration { b.Protocol = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go index ea60e3d987..d45dbceaf9 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerresizepolicy.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ContainerResizePolicyApplyConfiguration represents a declarative configuration of the ContainerResizePolicy type for use // with apply. type ContainerResizePolicyApplyConfiguration struct { - ResourceName *v1.ResourceName `json:"resourceName,omitempty"` - RestartPolicy *v1.ResourceResizeRestartPolicy `json:"restartPolicy,omitempty"` + ResourceName *corev1.ResourceName `json:"resourceName,omitempty"` + RestartPolicy *corev1.ResourceResizeRestartPolicy `json:"restartPolicy,omitempty"` } // ContainerResizePolicyApplyConfiguration constructs a declarative configuration of the ContainerResizePolicy type for use with @@ -38,7 +38,7 @@ func ContainerResizePolicy() *ContainerResizePolicyApplyConfiguration { // WithResourceName sets the ResourceName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ResourceName field is set to the value of the last call. -func (b *ContainerResizePolicyApplyConfiguration) WithResourceName(value v1.ResourceName) *ContainerResizePolicyApplyConfiguration { +func (b *ContainerResizePolicyApplyConfiguration) WithResourceName(value corev1.ResourceName) *ContainerResizePolicyApplyConfiguration { b.ResourceName = &value return b } @@ -46,7 +46,7 @@ func (b *ContainerResizePolicyApplyConfiguration) WithResourceName(value v1.Reso // WithRestartPolicy sets the RestartPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RestartPolicy field is set to the value of the last call. -func (b *ContainerResizePolicyApplyConfiguration) WithRestartPolicy(value v1.ResourceResizeRestartPolicy) *ContainerResizePolicyApplyConfiguration { +func (b *ContainerResizePolicyApplyConfiguration) WithRestartPolicy(value corev1.ResourceResizeRestartPolicy) *ContainerResizePolicyApplyConfiguration { b.RestartPolicy = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go index 6eec9f7f2c..0ed59c1774 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstaterunning.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ContainerStateRunningApplyConfiguration represents a declarative configuration of the ContainerStateRunning type for use // with apply. type ContainerStateRunningApplyConfiguration struct { - StartedAt *v1.Time `json:"startedAt,omitempty"` + StartedAt *metav1.Time `json:"startedAt,omitempty"` } // ContainerStateRunningApplyConfiguration constructs a declarative configuration of the ContainerStateRunning type for use with @@ -37,7 +37,7 @@ func ContainerStateRunning() *ContainerStateRunningApplyConfiguration { // WithStartedAt sets the StartedAt field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartedAt field is set to the value of the last call. -func (b *ContainerStateRunningApplyConfiguration) WithStartedAt(value v1.Time) *ContainerStateRunningApplyConfiguration { +func (b *ContainerStateRunningApplyConfiguration) WithStartedAt(value metav1.Time) *ContainerStateRunningApplyConfiguration { b.StartedAt = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go index b067aa211e..cfadd93c99 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/containerstateterminated.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ContainerStateTerminatedApplyConfiguration represents a declarative configuration of the ContainerStateTerminated type for use // with apply. type ContainerStateTerminatedApplyConfiguration struct { - ExitCode *int32 `json:"exitCode,omitempty"` - Signal *int32 `json:"signal,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - StartedAt *v1.Time `json:"startedAt,omitempty"` - FinishedAt *v1.Time `json:"finishedAt,omitempty"` - ContainerID *string `json:"containerID,omitempty"` + ExitCode *int32 `json:"exitCode,omitempty"` + Signal *int32 `json:"signal,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + StartedAt *metav1.Time `json:"startedAt,omitempty"` + FinishedAt *metav1.Time `json:"finishedAt,omitempty"` + ContainerID *string `json:"containerID,omitempty"` } // ContainerStateTerminatedApplyConfiguration constructs a declarative configuration of the ContainerStateTerminated type for use with @@ -75,7 +75,7 @@ func (b *ContainerStateTerminatedApplyConfiguration) WithMessage(value string) * // WithStartedAt sets the StartedAt field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartedAt field is set to the value of the last call. -func (b *ContainerStateTerminatedApplyConfiguration) WithStartedAt(value v1.Time) *ContainerStateTerminatedApplyConfiguration { +func (b *ContainerStateTerminatedApplyConfiguration) WithStartedAt(value metav1.Time) *ContainerStateTerminatedApplyConfiguration { b.StartedAt = &value return b } @@ -83,7 +83,7 @@ func (b *ContainerStateTerminatedApplyConfiguration) WithStartedAt(value v1.Time // WithFinishedAt sets the FinishedAt field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FinishedAt field is set to the value of the last call. -func (b *ContainerStateTerminatedApplyConfiguration) WithFinishedAt(value v1.Time) *ContainerStateTerminatedApplyConfiguration { +func (b *ContainerStateTerminatedApplyConfiguration) WithFinishedAt(value metav1.Time) *ContainerStateTerminatedApplyConfiguration { b.FinishedAt = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go index a619fdb074..63e9f56ab7 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/emptydirvolumesource.go @@ -19,15 +19,15 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" ) // EmptyDirVolumeSourceApplyConfiguration represents a declarative configuration of the EmptyDirVolumeSource type for use // with apply. type EmptyDirVolumeSourceApplyConfiguration struct { - Medium *v1.StorageMedium `json:"medium,omitempty"` - SizeLimit *resource.Quantity `json:"sizeLimit,omitempty"` + Medium *corev1.StorageMedium `json:"medium,omitempty"` + SizeLimit *resource.Quantity `json:"sizeLimit,omitempty"` } // EmptyDirVolumeSourceApplyConfiguration constructs a declarative configuration of the EmptyDirVolumeSource type for use with @@ -39,7 +39,7 @@ func EmptyDirVolumeSource() *EmptyDirVolumeSourceApplyConfiguration { // WithMedium sets the Medium field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Medium field is set to the value of the last call. -func (b *EmptyDirVolumeSourceApplyConfiguration) WithMedium(value v1.StorageMedium) *EmptyDirVolumeSourceApplyConfiguration { +func (b *EmptyDirVolumeSourceApplyConfiguration) WithMedium(value corev1.StorageMedium) *EmptyDirVolumeSourceApplyConfiguration { b.Medium = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go index d0d96230ce..05ee64ddca 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpointport.go @@ -19,16 +19,16 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // EndpointPortApplyConfiguration represents a declarative configuration of the EndpointPort type for use // with apply. type EndpointPortApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Port *int32 `json:"port,omitempty"` - Protocol *v1.Protocol `json:"protocol,omitempty"` - AppProtocol *string `json:"appProtocol,omitempty"` + Name *string `json:"name,omitempty"` + Port *int32 `json:"port,omitempty"` + Protocol *corev1.Protocol `json:"protocol,omitempty"` + AppProtocol *string `json:"appProtocol,omitempty"` } // EndpointPortApplyConfiguration constructs a declarative configuration of the EndpointPort type for use with @@ -56,7 +56,7 @@ func (b *EndpointPortApplyConfiguration) WithPort(value int32) *EndpointPortAppl // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *EndpointPortApplyConfiguration) WithProtocol(value v1.Protocol) *EndpointPortApplyConfiguration { +func (b *EndpointPortApplyConfiguration) WithProtocol(value corev1.Protocol) *EndpointPortApplyConfiguration { b.Protocol = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go index 98dc69aaab..d2f910196d 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go @@ -19,20 +19,20 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // EndpointsApplyConfiguration represents a declarative configuration of the Endpoints type for use // with apply. type EndpointsApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Subsets []EndpointSubsetApplyConfiguration `json:"subsets,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Subsets []EndpointSubsetApplyConfiguration `json:"subsets,omitempty"` } // Endpoints constructs a declarative configuration of the Endpoints type for use with @@ -57,18 +57,18 @@ func Endpoints(name, namespace string) *EndpointsApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractEndpoints(endpoints *apicorev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { +func ExtractEndpoints(endpoints *corev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { return extractEndpoints(endpoints, fieldManager, "") } // ExtractEndpointsStatus is the same as ExtractEndpoints except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractEndpointsStatus(endpoints *apicorev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { +func ExtractEndpointsStatus(endpoints *corev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) { return extractEndpoints(endpoints, fieldManager, "status") } -func extractEndpoints(endpoints *apicorev1.Endpoints, fieldManager string, subresource string) (*EndpointsApplyConfiguration, error) { +func extractEndpoints(endpoints *corev1.Endpoints, fieldManager string, subresource string) (*EndpointsApplyConfiguration, error) { b := &EndpointsApplyConfiguration{} err := managedfields.ExtractInto(endpoints, internal.Parser().Type("io.k8s.api.core.v1.Endpoints"), fieldManager, b, subresource) if err != nil { @@ -86,7 +86,7 @@ func extractEndpoints(endpoints *apicorev1.Endpoints, fieldManager string, subre // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithKind(value string) *EndpointsApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -94,7 +94,7 @@ func (b *EndpointsApplyConfiguration) WithKind(value string) *EndpointsApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithAPIVersion(value string) *EndpointsApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -103,7 +103,7 @@ func (b *EndpointsApplyConfiguration) WithAPIVersion(value string) *EndpointsApp // If called multiple times, the Name field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithName(value string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -112,7 +112,7 @@ func (b *EndpointsApplyConfiguration) WithName(value string) *EndpointsApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithGenerateName(value string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -121,7 +121,7 @@ func (b *EndpointsApplyConfiguration) WithGenerateName(value string) *EndpointsA // If called multiple times, the Namespace field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithNamespace(value string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -130,7 +130,7 @@ func (b *EndpointsApplyConfiguration) WithNamespace(value string) *EndpointsAppl // If called multiple times, the UID field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithUID(value types.UID) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -139,7 +139,7 @@ func (b *EndpointsApplyConfiguration) WithUID(value types.UID) *EndpointsApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithResourceVersion(value string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -148,25 +148,25 @@ func (b *EndpointsApplyConfiguration) WithResourceVersion(value string) *Endpoin // If called multiple times, the Generation field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithGeneration(value int64) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *EndpointsApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EndpointsApplyConfiguration { +func (b *EndpointsApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *EndpointsApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EndpointsApplyConfiguration { +func (b *EndpointsApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -175,7 +175,7 @@ func (b *EndpointsApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EndpointsApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -185,11 +185,11 @@ func (b *EndpointsApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *EndpointsApplyConfiguration) WithLabels(entries map[string]string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -200,11 +200,11 @@ func (b *EndpointsApplyConfiguration) WithLabels(entries map[string]string) *End // overwriting an existing map entries in Annotations field with the same key. func (b *EndpointsApplyConfiguration) WithAnnotations(entries map[string]string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -212,13 +212,13 @@ func (b *EndpointsApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *EndpointsApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EndpointsApplyConfiguration { +func (b *EndpointsApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -229,14 +229,14 @@ func (b *EndpointsApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *EndpointsApplyConfiguration) WithFinalizers(values ...string) *EndpointsApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *EndpointsApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -256,5 +256,5 @@ func (b *EndpointsApplyConfiguration) WithSubsets(values ...*EndpointSubsetApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *EndpointsApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go index a15ac6ec34..4b74439fc1 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/ephemeralcontainer.go @@ -39,7 +39,7 @@ func EphemeralContainer() *EphemeralContainerApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithName(value string) *EphemeralContainerApplyConfiguration { - b.Name = &value + b.EphemeralContainerCommonApplyConfiguration.Name = &value return b } @@ -47,7 +47,7 @@ func (b *EphemeralContainerApplyConfiguration) WithName(value string) *Ephemeral // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Image field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithImage(value string) *EphemeralContainerApplyConfiguration { - b.Image = &value + b.EphemeralContainerCommonApplyConfiguration.Image = &value return b } @@ -56,7 +56,7 @@ func (b *EphemeralContainerApplyConfiguration) WithImage(value string) *Ephemera // If called multiple times, values provided by each call will be appended to the Command field. func (b *EphemeralContainerApplyConfiguration) WithCommand(values ...string) *EphemeralContainerApplyConfiguration { for i := range values { - b.Command = append(b.Command, values[i]) + b.EphemeralContainerCommonApplyConfiguration.Command = append(b.EphemeralContainerCommonApplyConfiguration.Command, values[i]) } return b } @@ -66,7 +66,7 @@ func (b *EphemeralContainerApplyConfiguration) WithCommand(values ...string) *Ep // If called multiple times, values provided by each call will be appended to the Args field. func (b *EphemeralContainerApplyConfiguration) WithArgs(values ...string) *EphemeralContainerApplyConfiguration { for i := range values { - b.Args = append(b.Args, values[i]) + b.EphemeralContainerCommonApplyConfiguration.Args = append(b.EphemeralContainerCommonApplyConfiguration.Args, values[i]) } return b } @@ -75,7 +75,7 @@ func (b *EphemeralContainerApplyConfiguration) WithArgs(values ...string) *Ephem // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the WorkingDir field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithWorkingDir(value string) *EphemeralContainerApplyConfiguration { - b.WorkingDir = &value + b.EphemeralContainerCommonApplyConfiguration.WorkingDir = &value return b } @@ -87,7 +87,7 @@ func (b *EphemeralContainerApplyConfiguration) WithPorts(values ...*ContainerPor if values[i] == nil { panic("nil value passed to WithPorts") } - b.Ports = append(b.Ports, *values[i]) + b.EphemeralContainerCommonApplyConfiguration.Ports = append(b.EphemeralContainerCommonApplyConfiguration.Ports, *values[i]) } return b } @@ -100,7 +100,7 @@ func (b *EphemeralContainerApplyConfiguration) WithEnvFrom(values ...*EnvFromSou if values[i] == nil { panic("nil value passed to WithEnvFrom") } - b.EnvFrom = append(b.EnvFrom, *values[i]) + b.EphemeralContainerCommonApplyConfiguration.EnvFrom = append(b.EphemeralContainerCommonApplyConfiguration.EnvFrom, *values[i]) } return b } @@ -113,7 +113,7 @@ func (b *EphemeralContainerApplyConfiguration) WithEnv(values ...*EnvVarApplyCon if values[i] == nil { panic("nil value passed to WithEnv") } - b.Env = append(b.Env, *values[i]) + b.EphemeralContainerCommonApplyConfiguration.Env = append(b.EphemeralContainerCommonApplyConfiguration.Env, *values[i]) } return b } @@ -122,7 +122,7 @@ func (b *EphemeralContainerApplyConfiguration) WithEnv(values ...*EnvVarApplyCon // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resources field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *EphemeralContainerApplyConfiguration { - b.Resources = value + b.EphemeralContainerCommonApplyConfiguration.Resources = value return b } @@ -134,7 +134,7 @@ func (b *EphemeralContainerApplyConfiguration) WithResizePolicy(values ...*Conta if values[i] == nil { panic("nil value passed to WithResizePolicy") } - b.ResizePolicy = append(b.ResizePolicy, *values[i]) + b.EphemeralContainerCommonApplyConfiguration.ResizePolicy = append(b.EphemeralContainerCommonApplyConfiguration.ResizePolicy, *values[i]) } return b } @@ -143,7 +143,7 @@ func (b *EphemeralContainerApplyConfiguration) WithResizePolicy(values ...*Conta // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RestartPolicy field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithRestartPolicy(value corev1.ContainerRestartPolicy) *EphemeralContainerApplyConfiguration { - b.RestartPolicy = &value + b.EphemeralContainerCommonApplyConfiguration.RestartPolicy = &value return b } @@ -155,7 +155,7 @@ func (b *EphemeralContainerApplyConfiguration) WithVolumeMounts(values ...*Volum if values[i] == nil { panic("nil value passed to WithVolumeMounts") } - b.VolumeMounts = append(b.VolumeMounts, *values[i]) + b.EphemeralContainerCommonApplyConfiguration.VolumeMounts = append(b.EphemeralContainerCommonApplyConfiguration.VolumeMounts, *values[i]) } return b } @@ -168,7 +168,7 @@ func (b *EphemeralContainerApplyConfiguration) WithVolumeDevices(values ...*Volu if values[i] == nil { panic("nil value passed to WithVolumeDevices") } - b.VolumeDevices = append(b.VolumeDevices, *values[i]) + b.EphemeralContainerCommonApplyConfiguration.VolumeDevices = append(b.EphemeralContainerCommonApplyConfiguration.VolumeDevices, *values[i]) } return b } @@ -177,7 +177,7 @@ func (b *EphemeralContainerApplyConfiguration) WithVolumeDevices(values ...*Volu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LivenessProbe field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithLivenessProbe(value *ProbeApplyConfiguration) *EphemeralContainerApplyConfiguration { - b.LivenessProbe = value + b.EphemeralContainerCommonApplyConfiguration.LivenessProbe = value return b } @@ -185,7 +185,7 @@ func (b *EphemeralContainerApplyConfiguration) WithLivenessProbe(value *ProbeApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ReadinessProbe field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithReadinessProbe(value *ProbeApplyConfiguration) *EphemeralContainerApplyConfiguration { - b.ReadinessProbe = value + b.EphemeralContainerCommonApplyConfiguration.ReadinessProbe = value return b } @@ -193,7 +193,7 @@ func (b *EphemeralContainerApplyConfiguration) WithReadinessProbe(value *ProbeAp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartupProbe field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithStartupProbe(value *ProbeApplyConfiguration) *EphemeralContainerApplyConfiguration { - b.StartupProbe = value + b.EphemeralContainerCommonApplyConfiguration.StartupProbe = value return b } @@ -201,7 +201,7 @@ func (b *EphemeralContainerApplyConfiguration) WithStartupProbe(value *ProbeAppl // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Lifecycle field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithLifecycle(value *LifecycleApplyConfiguration) *EphemeralContainerApplyConfiguration { - b.Lifecycle = value + b.EphemeralContainerCommonApplyConfiguration.Lifecycle = value return b } @@ -209,7 +209,7 @@ func (b *EphemeralContainerApplyConfiguration) WithLifecycle(value *LifecycleApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TerminationMessagePath field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithTerminationMessagePath(value string) *EphemeralContainerApplyConfiguration { - b.TerminationMessagePath = &value + b.EphemeralContainerCommonApplyConfiguration.TerminationMessagePath = &value return b } @@ -217,7 +217,7 @@ func (b *EphemeralContainerApplyConfiguration) WithTerminationMessagePath(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TerminationMessagePolicy field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithTerminationMessagePolicy(value corev1.TerminationMessagePolicy) *EphemeralContainerApplyConfiguration { - b.TerminationMessagePolicy = &value + b.EphemeralContainerCommonApplyConfiguration.TerminationMessagePolicy = &value return b } @@ -225,7 +225,7 @@ func (b *EphemeralContainerApplyConfiguration) WithTerminationMessagePolicy(valu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ImagePullPolicy field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithImagePullPolicy(value corev1.PullPolicy) *EphemeralContainerApplyConfiguration { - b.ImagePullPolicy = &value + b.EphemeralContainerCommonApplyConfiguration.ImagePullPolicy = &value return b } @@ -233,7 +233,7 @@ func (b *EphemeralContainerApplyConfiguration) WithImagePullPolicy(value corev1. // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the SecurityContext field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithSecurityContext(value *SecurityContextApplyConfiguration) *EphemeralContainerApplyConfiguration { - b.SecurityContext = value + b.EphemeralContainerCommonApplyConfiguration.SecurityContext = value return b } @@ -241,7 +241,7 @@ func (b *EphemeralContainerApplyConfiguration) WithSecurityContext(value *Securi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Stdin field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithStdin(value bool) *EphemeralContainerApplyConfiguration { - b.Stdin = &value + b.EphemeralContainerCommonApplyConfiguration.Stdin = &value return b } @@ -249,7 +249,7 @@ func (b *EphemeralContainerApplyConfiguration) WithStdin(value bool) *EphemeralC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StdinOnce field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithStdinOnce(value bool) *EphemeralContainerApplyConfiguration { - b.StdinOnce = &value + b.EphemeralContainerCommonApplyConfiguration.StdinOnce = &value return b } @@ -257,7 +257,7 @@ func (b *EphemeralContainerApplyConfiguration) WithStdinOnce(value bool) *Epheme // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TTY field is set to the value of the last call. func (b *EphemeralContainerApplyConfiguration) WithTTY(value bool) *EphemeralContainerApplyConfiguration { - b.TTY = &value + b.EphemeralContainerCommonApplyConfiguration.TTY = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go index 65d6577ab6..9496ea7733 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go @@ -19,33 +19,33 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // EventApplyConfiguration represents a declarative configuration of the Event type for use // with apply. type EventApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - InvolvedObject *ObjectReferenceApplyConfiguration `json:"involvedObject,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - Source *EventSourceApplyConfiguration `json:"source,omitempty"` - FirstTimestamp *metav1.Time `json:"firstTimestamp,omitempty"` - LastTimestamp *metav1.Time `json:"lastTimestamp,omitempty"` - Count *int32 `json:"count,omitempty"` - Type *string `json:"type,omitempty"` - EventTime *metav1.MicroTime `json:"eventTime,omitempty"` - Series *EventSeriesApplyConfiguration `json:"series,omitempty"` - Action *string `json:"action,omitempty"` - Related *ObjectReferenceApplyConfiguration `json:"related,omitempty"` - ReportingController *string `json:"reportingComponent,omitempty"` - ReportingInstance *string `json:"reportingInstance,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + InvolvedObject *ObjectReferenceApplyConfiguration `json:"involvedObject,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + Source *EventSourceApplyConfiguration `json:"source,omitempty"` + FirstTimestamp *apismetav1.Time `json:"firstTimestamp,omitempty"` + LastTimestamp *apismetav1.Time `json:"lastTimestamp,omitempty"` + Count *int32 `json:"count,omitempty"` + Type *string `json:"type,omitempty"` + EventTime *apismetav1.MicroTime `json:"eventTime,omitempty"` + Series *EventSeriesApplyConfiguration `json:"series,omitempty"` + Action *string `json:"action,omitempty"` + Related *ObjectReferenceApplyConfiguration `json:"related,omitempty"` + ReportingController *string `json:"reportingComponent,omitempty"` + ReportingInstance *string `json:"reportingInstance,omitempty"` } // Event constructs a declarative configuration of the Event type for use with @@ -70,18 +70,18 @@ func Event(name, namespace string) *EventApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractEvent(event *apicorev1.Event, fieldManager string) (*EventApplyConfiguration, error) { +func ExtractEvent(event *corev1.Event, fieldManager string) (*EventApplyConfiguration, error) { return extractEvent(event, fieldManager, "") } // ExtractEventStatus is the same as ExtractEvent except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractEventStatus(event *apicorev1.Event, fieldManager string) (*EventApplyConfiguration, error) { +func ExtractEventStatus(event *corev1.Event, fieldManager string) (*EventApplyConfiguration, error) { return extractEvent(event, fieldManager, "status") } -func extractEvent(event *apicorev1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { +func extractEvent(event *corev1.Event, fieldManager string, subresource string) (*EventApplyConfiguration, error) { b := &EventApplyConfiguration{} err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.core.v1.Event"), fieldManager, b, subresource) if err != nil { @@ -99,7 +99,7 @@ func extractEvent(event *apicorev1.Event, fieldManager string, subresource strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *EventApplyConfiguration) WithKind(value string) *EventApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -107,7 +107,7 @@ func (b *EventApplyConfiguration) WithKind(value string) *EventApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *EventApplyConfiguration) WithAPIVersion(value string) *EventApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -116,7 +116,7 @@ func (b *EventApplyConfiguration) WithAPIVersion(value string) *EventApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *EventApplyConfiguration) WithName(value string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -125,7 +125,7 @@ func (b *EventApplyConfiguration) WithName(value string) *EventApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *EventApplyConfiguration) WithGenerateName(value string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -134,7 +134,7 @@ func (b *EventApplyConfiguration) WithGenerateName(value string) *EventApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -143,7 +143,7 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *EventApplyConfiguration) WithUID(value types.UID) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -152,7 +152,7 @@ func (b *EventApplyConfiguration) WithUID(value types.UID) *EventApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *EventApplyConfiguration) WithResourceVersion(value string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -161,25 +161,25 @@ func (b *EventApplyConfiguration) WithResourceVersion(value string) *EventApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *EventApplyConfiguration) WithGeneration(value int64) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *EventApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EventApplyConfiguration { +func (b *EventApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *EventApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EventApplyConfiguration { +func (b *EventApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -188,7 +188,7 @@ func (b *EventApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Even // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *EventApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -198,11 +198,11 @@ func (b *EventApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *E // overwriting an existing map entries in Labels field with the same key. func (b *EventApplyConfiguration) WithLabels(entries map[string]string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -213,11 +213,11 @@ func (b *EventApplyConfiguration) WithLabels(entries map[string]string) *EventAp // overwriting an existing map entries in Annotations field with the same key. func (b *EventApplyConfiguration) WithAnnotations(entries map[string]string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -225,13 +225,13 @@ func (b *EventApplyConfiguration) WithAnnotations(entries map[string]string) *Ev // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *EventApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EventApplyConfiguration { +func (b *EventApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -242,14 +242,14 @@ func (b *EventApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -288,7 +288,7 @@ func (b *EventApplyConfiguration) WithSource(value *EventSourceApplyConfiguratio // WithFirstTimestamp sets the FirstTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FirstTimestamp field is set to the value of the last call. -func (b *EventApplyConfiguration) WithFirstTimestamp(value metav1.Time) *EventApplyConfiguration { +func (b *EventApplyConfiguration) WithFirstTimestamp(value apismetav1.Time) *EventApplyConfiguration { b.FirstTimestamp = &value return b } @@ -296,7 +296,7 @@ func (b *EventApplyConfiguration) WithFirstTimestamp(value metav1.Time) *EventAp // WithLastTimestamp sets the LastTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastTimestamp field is set to the value of the last call. -func (b *EventApplyConfiguration) WithLastTimestamp(value metav1.Time) *EventApplyConfiguration { +func (b *EventApplyConfiguration) WithLastTimestamp(value apismetav1.Time) *EventApplyConfiguration { b.LastTimestamp = &value return b } @@ -320,7 +320,7 @@ func (b *EventApplyConfiguration) WithType(value string) *EventApplyConfiguratio // WithEventTime sets the EventTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EventTime field is set to the value of the last call. -func (b *EventApplyConfiguration) WithEventTime(value metav1.MicroTime) *EventApplyConfiguration { +func (b *EventApplyConfiguration) WithEventTime(value apismetav1.MicroTime) *EventApplyConfiguration { b.EventTime = &value return b } @@ -368,5 +368,5 @@ func (b *EventApplyConfiguration) WithReportingInstance(value string) *EventAppl // GetName retrieves the value of the Name field in the declarative configuration. func (b *EventApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go index 18069c0d1b..c90954bccb 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/eventseries.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // EventSeriesApplyConfiguration represents a declarative configuration of the EventSeries type for use // with apply. type EventSeriesApplyConfiguration struct { - Count *int32 `json:"count,omitempty"` - LastObservedTime *v1.MicroTime `json:"lastObservedTime,omitempty"` + Count *int32 `json:"count,omitempty"` + LastObservedTime *metav1.MicroTime `json:"lastObservedTime,omitempty"` } // EventSeriesApplyConfiguration constructs a declarative configuration of the EventSeries type for use with @@ -46,7 +46,7 @@ func (b *EventSeriesApplyConfiguration) WithCount(value int32) *EventSeriesApply // WithLastObservedTime sets the LastObservedTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastObservedTime field is set to the value of the last call. -func (b *EventSeriesApplyConfiguration) WithLastObservedTime(value v1.MicroTime) *EventSeriesApplyConfiguration { +func (b *EventSeriesApplyConfiguration) WithLastObservedTime(value metav1.MicroTime) *EventSeriesApplyConfiguration { b.LastObservedTime = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go index 10dfedfdef..6a41d67cd0 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/hostpathvolumesource.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // HostPathVolumeSourceApplyConfiguration represents a declarative configuration of the HostPathVolumeSource type for use // with apply. type HostPathVolumeSourceApplyConfiguration struct { - Path *string `json:"path,omitempty"` - Type *v1.HostPathType `json:"type,omitempty"` + Path *string `json:"path,omitempty"` + Type *corev1.HostPathType `json:"type,omitempty"` } // HostPathVolumeSourceApplyConfiguration constructs a declarative configuration of the HostPathVolumeSource type for use with @@ -46,7 +46,7 @@ func (b *HostPathVolumeSourceApplyConfiguration) WithPath(value string) *HostPat // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *HostPathVolumeSourceApplyConfiguration) WithType(value v1.HostPathType) *HostPathVolumeSourceApplyConfiguration { +func (b *HostPathVolumeSourceApplyConfiguration) WithType(value corev1.HostPathType) *HostPathVolumeSourceApplyConfiguration { b.Type = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go index 5ecbc27fea..ca61c5ae24 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/httpgetaction.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" intstr "k8s.io/apimachinery/pkg/util/intstr" ) @@ -29,7 +29,7 @@ type HTTPGetActionApplyConfiguration struct { Path *string `json:"path,omitempty"` Port *intstr.IntOrString `json:"port,omitempty"` Host *string `json:"host,omitempty"` - Scheme *v1.URIScheme `json:"scheme,omitempty"` + Scheme *corev1.URIScheme `json:"scheme,omitempty"` HTTPHeaders []HTTPHeaderApplyConfiguration `json:"httpHeaders,omitempty"` } @@ -66,7 +66,7 @@ func (b *HTTPGetActionApplyConfiguration) WithHost(value string) *HTTPGetActionA // WithScheme sets the Scheme field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scheme field is set to the value of the last call. -func (b *HTTPGetActionApplyConfiguration) WithScheme(value v1.URIScheme) *HTTPGetActionApplyConfiguration { +func (b *HTTPGetActionApplyConfiguration) WithScheme(value corev1.URIScheme) *HTTPGetActionApplyConfiguration { b.Scheme = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go index 340f150400..9a146e6852 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/imagevolumesource.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ImageVolumeSourceApplyConfiguration represents a declarative configuration of the ImageVolumeSource type for use // with apply. type ImageVolumeSourceApplyConfiguration struct { - Reference *string `json:"reference,omitempty"` - PullPolicy *v1.PullPolicy `json:"pullPolicy,omitempty"` + Reference *string `json:"reference,omitempty"` + PullPolicy *corev1.PullPolicy `json:"pullPolicy,omitempty"` } // ImageVolumeSourceApplyConfiguration constructs a declarative configuration of the ImageVolumeSource type for use with @@ -46,7 +46,7 @@ func (b *ImageVolumeSourceApplyConfiguration) WithReference(value string) *Image // WithPullPolicy sets the PullPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PullPolicy field is set to the value of the last call. -func (b *ImageVolumeSourceApplyConfiguration) WithPullPolicy(value v1.PullPolicy) *ImageVolumeSourceApplyConfiguration { +func (b *ImageVolumeSourceApplyConfiguration) WithPullPolicy(value corev1.PullPolicy) *ImageVolumeSourceApplyConfiguration { b.PullPolicy = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go index 7770200a0a..517cc4cd3c 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go @@ -19,20 +19,20 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // LimitRangeApplyConfiguration represents a declarative configuration of the LimitRange type for use // with apply. type LimitRangeApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *LimitRangeSpecApplyConfiguration `json:"spec,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *LimitRangeSpecApplyConfiguration `json:"spec,omitempty"` } // LimitRange constructs a declarative configuration of the LimitRange type for use with @@ -57,18 +57,18 @@ func LimitRange(name, namespace string) *LimitRangeApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractLimitRange(limitRange *apicorev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { +func ExtractLimitRange(limitRange *corev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { return extractLimitRange(limitRange, fieldManager, "") } // ExtractLimitRangeStatus is the same as ExtractLimitRange except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractLimitRangeStatus(limitRange *apicorev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { +func ExtractLimitRangeStatus(limitRange *corev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) { return extractLimitRange(limitRange, fieldManager, "status") } -func extractLimitRange(limitRange *apicorev1.LimitRange, fieldManager string, subresource string) (*LimitRangeApplyConfiguration, error) { +func extractLimitRange(limitRange *corev1.LimitRange, fieldManager string, subresource string) (*LimitRangeApplyConfiguration, error) { b := &LimitRangeApplyConfiguration{} err := managedfields.ExtractInto(limitRange, internal.Parser().Type("io.k8s.api.core.v1.LimitRange"), fieldManager, b, subresource) if err != nil { @@ -86,7 +86,7 @@ func extractLimitRange(limitRange *apicorev1.LimitRange, fieldManager string, su // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithKind(value string) *LimitRangeApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -94,7 +94,7 @@ func (b *LimitRangeApplyConfiguration) WithKind(value string) *LimitRangeApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithAPIVersion(value string) *LimitRangeApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -103,7 +103,7 @@ func (b *LimitRangeApplyConfiguration) WithAPIVersion(value string) *LimitRangeA // If called multiple times, the Name field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithName(value string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -112,7 +112,7 @@ func (b *LimitRangeApplyConfiguration) WithName(value string) *LimitRangeApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithGenerateName(value string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -121,7 +121,7 @@ func (b *LimitRangeApplyConfiguration) WithGenerateName(value string) *LimitRang // If called multiple times, the Namespace field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithNamespace(value string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -130,7 +130,7 @@ func (b *LimitRangeApplyConfiguration) WithNamespace(value string) *LimitRangeAp // If called multiple times, the UID field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithUID(value types.UID) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -139,7 +139,7 @@ func (b *LimitRangeApplyConfiguration) WithUID(value types.UID) *LimitRangeApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithResourceVersion(value string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -148,25 +148,25 @@ func (b *LimitRangeApplyConfiguration) WithResourceVersion(value string) *LimitR // If called multiple times, the Generation field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithGeneration(value int64) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *LimitRangeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LimitRangeApplyConfiguration { +func (b *LimitRangeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *LimitRangeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LimitRangeApplyConfiguration { +func (b *LimitRangeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -175,7 +175,7 @@ func (b *LimitRangeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *LimitRangeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -185,11 +185,11 @@ func (b *LimitRangeApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *LimitRangeApplyConfiguration) WithLabels(entries map[string]string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -200,11 +200,11 @@ func (b *LimitRangeApplyConfiguration) WithLabels(entries map[string]string) *Li // overwriting an existing map entries in Annotations field with the same key. func (b *LimitRangeApplyConfiguration) WithAnnotations(entries map[string]string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -212,13 +212,13 @@ func (b *LimitRangeApplyConfiguration) WithAnnotations(entries map[string]string // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *LimitRangeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *LimitRangeApplyConfiguration { +func (b *LimitRangeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -229,14 +229,14 @@ func (b *LimitRangeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *LimitRangeApplyConfiguration) WithFinalizers(values ...string) *LimitRangeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *LimitRangeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -251,5 +251,5 @@ func (b *LimitRangeApplyConfiguration) WithSpec(value *LimitRangeSpecApplyConfig // GetName retrieves the value of the Name field in the declarative configuration. func (b *LimitRangeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go index 61d8344e80..5ad8ac0e6e 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrangeitem.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // LimitRangeItemApplyConfiguration represents a declarative configuration of the LimitRangeItem type for use // with apply. type LimitRangeItemApplyConfiguration struct { - Type *v1.LimitType `json:"type,omitempty"` - Max *v1.ResourceList `json:"max,omitempty"` - Min *v1.ResourceList `json:"min,omitempty"` - Default *v1.ResourceList `json:"default,omitempty"` - DefaultRequest *v1.ResourceList `json:"defaultRequest,omitempty"` - MaxLimitRequestRatio *v1.ResourceList `json:"maxLimitRequestRatio,omitempty"` + Type *corev1.LimitType `json:"type,omitempty"` + Max *corev1.ResourceList `json:"max,omitempty"` + Min *corev1.ResourceList `json:"min,omitempty"` + Default *corev1.ResourceList `json:"default,omitempty"` + DefaultRequest *corev1.ResourceList `json:"defaultRequest,omitempty"` + MaxLimitRequestRatio *corev1.ResourceList `json:"maxLimitRequestRatio,omitempty"` } // LimitRangeItemApplyConfiguration constructs a declarative configuration of the LimitRangeItem type for use with @@ -42,7 +42,7 @@ func LimitRangeItem() *LimitRangeItemApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *LimitRangeItemApplyConfiguration) WithType(value v1.LimitType) *LimitRangeItemApplyConfiguration { +func (b *LimitRangeItemApplyConfiguration) WithType(value corev1.LimitType) *LimitRangeItemApplyConfiguration { b.Type = &value return b } @@ -50,7 +50,7 @@ func (b *LimitRangeItemApplyConfiguration) WithType(value v1.LimitType) *LimitRa // WithMax sets the Max field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Max field is set to the value of the last call. -func (b *LimitRangeItemApplyConfiguration) WithMax(value v1.ResourceList) *LimitRangeItemApplyConfiguration { +func (b *LimitRangeItemApplyConfiguration) WithMax(value corev1.ResourceList) *LimitRangeItemApplyConfiguration { b.Max = &value return b } @@ -58,7 +58,7 @@ func (b *LimitRangeItemApplyConfiguration) WithMax(value v1.ResourceList) *Limit // WithMin sets the Min field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Min field is set to the value of the last call. -func (b *LimitRangeItemApplyConfiguration) WithMin(value v1.ResourceList) *LimitRangeItemApplyConfiguration { +func (b *LimitRangeItemApplyConfiguration) WithMin(value corev1.ResourceList) *LimitRangeItemApplyConfiguration { b.Min = &value return b } @@ -66,7 +66,7 @@ func (b *LimitRangeItemApplyConfiguration) WithMin(value v1.ResourceList) *Limit // WithDefault sets the Default field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Default field is set to the value of the last call. -func (b *LimitRangeItemApplyConfiguration) WithDefault(value v1.ResourceList) *LimitRangeItemApplyConfiguration { +func (b *LimitRangeItemApplyConfiguration) WithDefault(value corev1.ResourceList) *LimitRangeItemApplyConfiguration { b.Default = &value return b } @@ -74,7 +74,7 @@ func (b *LimitRangeItemApplyConfiguration) WithDefault(value v1.ResourceList) *L // WithDefaultRequest sets the DefaultRequest field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DefaultRequest field is set to the value of the last call. -func (b *LimitRangeItemApplyConfiguration) WithDefaultRequest(value v1.ResourceList) *LimitRangeItemApplyConfiguration { +func (b *LimitRangeItemApplyConfiguration) WithDefaultRequest(value corev1.ResourceList) *LimitRangeItemApplyConfiguration { b.DefaultRequest = &value return b } @@ -82,7 +82,7 @@ func (b *LimitRangeItemApplyConfiguration) WithDefaultRequest(value v1.ResourceL // WithMaxLimitRequestRatio sets the MaxLimitRequestRatio field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MaxLimitRequestRatio field is set to the value of the last call. -func (b *LimitRangeItemApplyConfiguration) WithMaxLimitRequestRatio(value v1.ResourceList) *LimitRangeItemApplyConfiguration { +func (b *LimitRangeItemApplyConfiguration) WithMaxLimitRequestRatio(value corev1.ResourceList) *LimitRangeItemApplyConfiguration { b.MaxLimitRequestRatio = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go index 1a7d998152..ae5c410a24 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/loadbalanceringress.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // LoadBalancerIngressApplyConfiguration represents a declarative configuration of the LoadBalancerIngress type for use @@ -27,7 +27,7 @@ import ( type LoadBalancerIngressApplyConfiguration struct { IP *string `json:"ip,omitempty"` Hostname *string `json:"hostname,omitempty"` - IPMode *v1.LoadBalancerIPMode `json:"ipMode,omitempty"` + IPMode *corev1.LoadBalancerIPMode `json:"ipMode,omitempty"` Ports []PortStatusApplyConfiguration `json:"ports,omitempty"` } @@ -56,7 +56,7 @@ func (b *LoadBalancerIngressApplyConfiguration) WithHostname(value string) *Load // WithIPMode sets the IPMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the IPMode field is set to the value of the last call. -func (b *LoadBalancerIngressApplyConfiguration) WithIPMode(value v1.LoadBalancerIPMode) *LoadBalancerIngressApplyConfiguration { +func (b *LoadBalancerIngressApplyConfiguration) WithIPMode(value corev1.LoadBalancerIPMode) *LoadBalancerIngressApplyConfiguration { b.IPMode = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go index 704c321652..9a1a6af2a6 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/modifyvolumestatus.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ModifyVolumeStatusApplyConfiguration represents a declarative configuration of the ModifyVolumeStatus type for use // with apply. type ModifyVolumeStatusApplyConfiguration struct { - TargetVolumeAttributesClassName *string `json:"targetVolumeAttributesClassName,omitempty"` - Status *v1.PersistentVolumeClaimModifyVolumeStatus `json:"status,omitempty"` + TargetVolumeAttributesClassName *string `json:"targetVolumeAttributesClassName,omitempty"` + Status *corev1.PersistentVolumeClaimModifyVolumeStatus `json:"status,omitempty"` } // ModifyVolumeStatusApplyConfiguration constructs a declarative configuration of the ModifyVolumeStatus type for use with @@ -46,7 +46,7 @@ func (b *ModifyVolumeStatusApplyConfiguration) WithTargetVolumeAttributesClassNa // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ModifyVolumeStatusApplyConfiguration) WithStatus(value v1.PersistentVolumeClaimModifyVolumeStatus) *ModifyVolumeStatusApplyConfiguration { +func (b *ModifyVolumeStatusApplyConfiguration) WithStatus(value corev1.PersistentVolumeClaimModifyVolumeStatus) *ModifyVolumeStatusApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go index 0b77af183d..0aba283ce5 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NamespaceApplyConfiguration represents a declarative configuration of the Namespace type for use // with apply. type NamespaceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NamespaceSpecApplyConfiguration `json:"spec,omitempty"` - Status *NamespaceStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *NamespaceSpecApplyConfiguration `json:"spec,omitempty"` + Status *NamespaceStatusApplyConfiguration `json:"status,omitempty"` } // Namespace constructs a declarative configuration of the Namespace type for use with @@ -57,18 +57,18 @@ func Namespace(name string) *NamespaceApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractNamespace(namespace *apicorev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) { +func ExtractNamespace(namespace *corev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) { return extractNamespace(namespace, fieldManager, "") } // ExtractNamespaceStatus is the same as ExtractNamespace except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractNamespaceStatus(namespace *apicorev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) { +func ExtractNamespaceStatus(namespace *corev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) { return extractNamespace(namespace, fieldManager, "status") } -func extractNamespace(namespace *apicorev1.Namespace, fieldManager string, subresource string) (*NamespaceApplyConfiguration, error) { +func extractNamespace(namespace *corev1.Namespace, fieldManager string, subresource string) (*NamespaceApplyConfiguration, error) { b := &NamespaceApplyConfiguration{} err := managedfields.ExtractInto(namespace, internal.Parser().Type("io.k8s.api.core.v1.Namespace"), fieldManager, b, subresource) if err != nil { @@ -85,7 +85,7 @@ func extractNamespace(namespace *apicorev1.Namespace, fieldManager string, subre // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithKind(value string) *NamespaceApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -93,7 +93,7 @@ func (b *NamespaceApplyConfiguration) WithKind(value string) *NamespaceApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithAPIVersion(value string) *NamespaceApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -102,7 +102,7 @@ func (b *NamespaceApplyConfiguration) WithAPIVersion(value string) *NamespaceApp // If called multiple times, the Name field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithName(value string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -111,7 +111,7 @@ func (b *NamespaceApplyConfiguration) WithName(value string) *NamespaceApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithGenerateName(value string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -120,7 +120,7 @@ func (b *NamespaceApplyConfiguration) WithGenerateName(value string) *NamespaceA // If called multiple times, the Namespace field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithNamespace(value string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -129,7 +129,7 @@ func (b *NamespaceApplyConfiguration) WithNamespace(value string) *NamespaceAppl // If called multiple times, the UID field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithUID(value types.UID) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -138,7 +138,7 @@ func (b *NamespaceApplyConfiguration) WithUID(value types.UID) *NamespaceApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithResourceVersion(value string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -147,25 +147,25 @@ func (b *NamespaceApplyConfiguration) WithResourceVersion(value string) *Namespa // If called multiple times, the Generation field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithGeneration(value int64) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NamespaceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NamespaceApplyConfiguration { +func (b *NamespaceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NamespaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NamespaceApplyConfiguration { +func (b *NamespaceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -174,7 +174,7 @@ func (b *NamespaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -184,11 +184,11 @@ func (b *NamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *NamespaceApplyConfiguration) WithLabels(entries map[string]string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -199,11 +199,11 @@ func (b *NamespaceApplyConfiguration) WithLabels(entries map[string]string) *Nam // overwriting an existing map entries in Annotations field with the same key. func (b *NamespaceApplyConfiguration) WithAnnotations(entries map[string]string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -211,13 +211,13 @@ func (b *NamespaceApplyConfiguration) WithAnnotations(entries map[string]string) // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NamespaceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NamespaceApplyConfiguration { +func (b *NamespaceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -228,14 +228,14 @@ func (b *NamespaceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *NamespaceApplyConfiguration) WithFinalizers(values ...string) *NamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *NamespaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -258,5 +258,5 @@ func (b *NamespaceApplyConfiguration) WithStatus(value *NamespaceStatusApplyConf // GetName retrieves the value of the Name field in the declarative configuration. func (b *NamespaceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go index 9784c3e6f4..82b4cc1ca3 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacecondition.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // NamespaceConditionApplyConfiguration represents a declarative configuration of the NamespaceCondition type for use // with apply. type NamespaceConditionApplyConfiguration struct { - Type *v1.NamespaceConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *corev1.NamespaceConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // NamespaceConditionApplyConfiguration constructs a declarative configuration of the NamespaceCondition type for use with @@ -42,7 +42,7 @@ func NamespaceCondition() *NamespaceConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NamespaceConditionApplyConfiguration) WithType(value v1.NamespaceConditionType) *NamespaceConditionApplyConfiguration { +func (b *NamespaceConditionApplyConfiguration) WithType(value corev1.NamespaceConditionType) *NamespaceConditionApplyConfiguration { b.Type = &value return b } @@ -50,7 +50,7 @@ func (b *NamespaceConditionApplyConfiguration) WithType(value v1.NamespaceCondit // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *NamespaceConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *NamespaceConditionApplyConfiguration { +func (b *NamespaceConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *NamespaceConditionApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go index 6d7b7f1f95..1f8fcaf9a1 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacespec.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NamespaceSpecApplyConfiguration represents a declarative configuration of the NamespaceSpec type for use // with apply. type NamespaceSpecApplyConfiguration struct { - Finalizers []v1.FinalizerName `json:"finalizers,omitempty"` + Finalizers []corev1.FinalizerName `json:"finalizers,omitempty"` } // NamespaceSpecApplyConfiguration constructs a declarative configuration of the NamespaceSpec type for use with @@ -37,7 +37,7 @@ func NamespaceSpec() *NamespaceSpecApplyConfiguration { // WithFinalizers adds the given value to the Finalizers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *NamespaceSpecApplyConfiguration) WithFinalizers(values ...v1.FinalizerName) *NamespaceSpecApplyConfiguration { +func (b *NamespaceSpecApplyConfiguration) WithFinalizers(values ...corev1.FinalizerName) *NamespaceSpecApplyConfiguration { for i := range values { b.Finalizers = append(b.Finalizers, values[i]) } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go index 314908109f..1484be6842 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespacestatus.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NamespaceStatusApplyConfiguration represents a declarative configuration of the NamespaceStatus type for use // with apply. type NamespaceStatusApplyConfiguration struct { - Phase *v1.NamespacePhase `json:"phase,omitempty"` + Phase *corev1.NamespacePhase `json:"phase,omitempty"` Conditions []NamespaceConditionApplyConfiguration `json:"conditions,omitempty"` } @@ -38,7 +38,7 @@ func NamespaceStatus() *NamespaceStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *NamespaceStatusApplyConfiguration) WithPhase(value v1.NamespacePhase) *NamespaceStatusApplyConfiguration { +func (b *NamespaceStatusApplyConfiguration) WithPhase(value corev1.NamespacePhase) *NamespaceStatusApplyConfiguration { b.Phase = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go index ef13392591..d365047b7f 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NodeApplyConfiguration represents a declarative configuration of the Node type for use // with apply. type NodeApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` - Status *NodeStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` + Status *NodeStatusApplyConfiguration `json:"status,omitempty"` } // Node constructs a declarative configuration of the Node type for use with @@ -57,18 +57,18 @@ func Node(name string) *NodeApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractNode(node *apicorev1.Node, fieldManager string) (*NodeApplyConfiguration, error) { +func ExtractNode(node *corev1.Node, fieldManager string) (*NodeApplyConfiguration, error) { return extractNode(node, fieldManager, "") } // ExtractNodeStatus is the same as ExtractNode except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractNodeStatus(node *apicorev1.Node, fieldManager string) (*NodeApplyConfiguration, error) { +func ExtractNodeStatus(node *corev1.Node, fieldManager string) (*NodeApplyConfiguration, error) { return extractNode(node, fieldManager, "status") } -func extractNode(node *apicorev1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { +func extractNode(node *corev1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { b := &NodeApplyConfiguration{} err := managedfields.ExtractInto(node, internal.Parser().Type("io.k8s.api.core.v1.Node"), fieldManager, b, subresource) if err != nil { @@ -85,7 +85,7 @@ func extractNode(node *apicorev1.Node, fieldManager string, subresource string) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *NodeApplyConfiguration) WithKind(value string) *NodeApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -93,7 +93,7 @@ func (b *NodeApplyConfiguration) WithKind(value string) *NodeApplyConfiguration // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *NodeApplyConfiguration) WithAPIVersion(value string) *NodeApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -102,7 +102,7 @@ func (b *NodeApplyConfiguration) WithAPIVersion(value string) *NodeApplyConfigur // If called multiple times, the Name field is set to the value of the last call. func (b *NodeApplyConfiguration) WithName(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -111,7 +111,7 @@ func (b *NodeApplyConfiguration) WithName(value string) *NodeApplyConfiguration // If called multiple times, the GenerateName field is set to the value of the last call. func (b *NodeApplyConfiguration) WithGenerateName(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -120,7 +120,7 @@ func (b *NodeApplyConfiguration) WithGenerateName(value string) *NodeApplyConfig // If called multiple times, the Namespace field is set to the value of the last call. func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -129,7 +129,7 @@ func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfigura // If called multiple times, the UID field is set to the value of the last call. func (b *NodeApplyConfiguration) WithUID(value types.UID) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -138,7 +138,7 @@ func (b *NodeApplyConfiguration) WithUID(value types.UID) *NodeApplyConfiguratio // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *NodeApplyConfiguration) WithResourceVersion(value string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -147,25 +147,25 @@ func (b *NodeApplyConfiguration) WithResourceVersion(value string) *NodeApplyCon // If called multiple times, the Generation field is set to the value of the last call. func (b *NodeApplyConfiguration) WithGeneration(value int64) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *NodeApplyConfiguration { +func (b *NodeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NodeApplyConfiguration { +func (b *NodeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -174,7 +174,7 @@ func (b *NodeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *NodeA // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *NodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -184,11 +184,11 @@ func (b *NodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *No // overwriting an existing map entries in Labels field with the same key. func (b *NodeApplyConfiguration) WithLabels(entries map[string]string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -199,11 +199,11 @@ func (b *NodeApplyConfiguration) WithLabels(entries map[string]string) *NodeAppl // overwriting an existing map entries in Annotations field with the same key. func (b *NodeApplyConfiguration) WithAnnotations(entries map[string]string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -211,13 +211,13 @@ func (b *NodeApplyConfiguration) WithAnnotations(entries map[string]string) *Nod // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *NodeApplyConfiguration { +func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -228,14 +228,14 @@ func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenc func (b *NodeApplyConfiguration) WithFinalizers(values ...string) *NodeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *NodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -258,5 +258,5 @@ func (b *NodeApplyConfiguration) WithStatus(value *NodeStatusApplyConfiguration) // GetName retrieves the value of the Name field in the declarative configuration. func (b *NodeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go index a9cb036c54..779fe0e2fd 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeaddress.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NodeAddressApplyConfiguration represents a declarative configuration of the NodeAddress type for use // with apply. type NodeAddressApplyConfiguration struct { - Type *v1.NodeAddressType `json:"type,omitempty"` - Address *string `json:"address,omitempty"` + Type *corev1.NodeAddressType `json:"type,omitempty"` + Address *string `json:"address,omitempty"` } // NodeAddressApplyConfiguration constructs a declarative configuration of the NodeAddress type for use with @@ -38,7 +38,7 @@ func NodeAddress() *NodeAddressApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NodeAddressApplyConfiguration) WithType(value v1.NodeAddressType) *NodeAddressApplyConfiguration { +func (b *NodeAddressApplyConfiguration) WithType(value corev1.NodeAddressType) *NodeAddressApplyConfiguration { b.Type = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go index a1b8ed0f38..e3a2d3bb06 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodecondition.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // NodeConditionApplyConfiguration represents a declarative configuration of the NodeCondition type for use // with apply. type NodeConditionApplyConfiguration struct { - Type *v1.NodeConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *corev1.NodeConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // NodeConditionApplyConfiguration constructs a declarative configuration of the NodeCondition type for use with @@ -43,7 +43,7 @@ func NodeCondition() *NodeConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *NodeConditionApplyConfiguration) WithType(value v1.NodeConditionType) *NodeConditionApplyConfiguration { +func (b *NodeConditionApplyConfiguration) WithType(value corev1.NodeConditionType) *NodeConditionApplyConfiguration { b.Type = &value return b } @@ -51,7 +51,7 @@ func (b *NodeConditionApplyConfiguration) WithType(value v1.NodeConditionType) * // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *NodeConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *NodeConditionApplyConfiguration { +func (b *NodeConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *NodeConditionApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go index 7c383e06c2..4dcbc9a2e7 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodeselectorrequirement.go @@ -19,15 +19,15 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NodeSelectorRequirementApplyConfiguration represents a declarative configuration of the NodeSelectorRequirement type for use // with apply. type NodeSelectorRequirementApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Operator *v1.NodeSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` + Key *string `json:"key,omitempty"` + Operator *corev1.NodeSelectorOperator `json:"operator,omitempty"` + Values []string `json:"values,omitempty"` } // NodeSelectorRequirementApplyConfiguration constructs a declarative configuration of the NodeSelectorRequirement type for use with @@ -47,7 +47,7 @@ func (b *NodeSelectorRequirementApplyConfiguration) WithKey(value string) *NodeS // WithOperator sets the Operator field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Operator field is set to the value of the last call. -func (b *NodeSelectorRequirementApplyConfiguration) WithOperator(value v1.NodeSelectorOperator) *NodeSelectorRequirementApplyConfiguration { +func (b *NodeSelectorRequirementApplyConfiguration) WithOperator(value corev1.NodeSelectorOperator) *NodeSelectorRequirementApplyConfiguration { b.Operator = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go index 8411c57ac0..3859ccd503 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/nodestatus.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use // with apply. type NodeStatusApplyConfiguration struct { - Capacity *v1.ResourceList `json:"capacity,omitempty"` - Allocatable *v1.ResourceList `json:"allocatable,omitempty"` - Phase *v1.NodePhase `json:"phase,omitempty"` + Capacity *corev1.ResourceList `json:"capacity,omitempty"` + Allocatable *corev1.ResourceList `json:"allocatable,omitempty"` + Phase *corev1.NodePhase `json:"phase,omitempty"` Conditions []NodeConditionApplyConfiguration `json:"conditions,omitempty"` Addresses []NodeAddressApplyConfiguration `json:"addresses,omitempty"` DaemonEndpoints *NodeDaemonEndpointsApplyConfiguration `json:"daemonEndpoints,omitempty"` NodeInfo *NodeSystemInfoApplyConfiguration `json:"nodeInfo,omitempty"` Images []ContainerImageApplyConfiguration `json:"images,omitempty"` - VolumesInUse []v1.UniqueVolumeName `json:"volumesInUse,omitempty"` + VolumesInUse []corev1.UniqueVolumeName `json:"volumesInUse,omitempty"` VolumesAttached []AttachedVolumeApplyConfiguration `json:"volumesAttached,omitempty"` Config *NodeConfigStatusApplyConfiguration `json:"config,omitempty"` RuntimeHandlers []NodeRuntimeHandlerApplyConfiguration `json:"runtimeHandlers,omitempty"` @@ -49,7 +49,7 @@ func NodeStatus() *NodeStatusApplyConfiguration { // WithCapacity sets the Capacity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Capacity field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithCapacity(value corev1.ResourceList) *NodeStatusApplyConfiguration { b.Capacity = &value return b } @@ -57,7 +57,7 @@ func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *Node // WithAllocatable sets the Allocatable field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Allocatable field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithAllocatable(value corev1.ResourceList) *NodeStatusApplyConfiguration { b.Allocatable = &value return b } @@ -65,7 +65,7 @@ func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *N // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithPhase(value v1.NodePhase) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithPhase(value corev1.NodePhase) *NodeStatusApplyConfiguration { b.Phase = &value return b } @@ -128,7 +128,7 @@ func (b *NodeStatusApplyConfiguration) WithImages(values ...*ContainerImageApply // WithVolumesInUse adds the given value to the VolumesInUse field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the VolumesInUse field. -func (b *NodeStatusApplyConfiguration) WithVolumesInUse(values ...v1.UniqueVolumeName) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithVolumesInUse(values ...corev1.UniqueVolumeName) *NodeStatusApplyConfiguration { for i := range values { b.VolumesInUse = append(b.VolumesInUse, values[i]) } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go index 020f87411e..6840c1c886 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PersistentVolumeApplyConfiguration represents a declarative configuration of the PersistentVolume type for use // with apply. type PersistentVolumeApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PersistentVolumeSpecApplyConfiguration `json:"spec,omitempty"` - Status *PersistentVolumeStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *PersistentVolumeSpecApplyConfiguration `json:"spec,omitempty"` + Status *PersistentVolumeStatusApplyConfiguration `json:"status,omitempty"` } // PersistentVolume constructs a declarative configuration of the PersistentVolume type for use with @@ -57,18 +57,18 @@ func PersistentVolume(name string) *PersistentVolumeApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractPersistentVolume(persistentVolume *apicorev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) { +func ExtractPersistentVolume(persistentVolume *corev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) { return extractPersistentVolume(persistentVolume, fieldManager, "") } // ExtractPersistentVolumeStatus is the same as ExtractPersistentVolume except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractPersistentVolumeStatus(persistentVolume *apicorev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) { +func ExtractPersistentVolumeStatus(persistentVolume *corev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) { return extractPersistentVolume(persistentVolume, fieldManager, "status") } -func extractPersistentVolume(persistentVolume *apicorev1.PersistentVolume, fieldManager string, subresource string) (*PersistentVolumeApplyConfiguration, error) { +func extractPersistentVolume(persistentVolume *corev1.PersistentVolume, fieldManager string, subresource string) (*PersistentVolumeApplyConfiguration, error) { b := &PersistentVolumeApplyConfiguration{} err := managedfields.ExtractInto(persistentVolume, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolume"), fieldManager, b, subresource) if err != nil { @@ -85,7 +85,7 @@ func extractPersistentVolume(persistentVolume *apicorev1.PersistentVolume, field // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithKind(value string) *PersistentVolumeApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -93,7 +93,7 @@ func (b *PersistentVolumeApplyConfiguration) WithKind(value string) *PersistentV // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithAPIVersion(value string) *PersistentVolumeApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -102,7 +102,7 @@ func (b *PersistentVolumeApplyConfiguration) WithAPIVersion(value string) *Persi // If called multiple times, the Name field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithName(value string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -111,7 +111,7 @@ func (b *PersistentVolumeApplyConfiguration) WithName(value string) *PersistentV // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithGenerateName(value string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -120,7 +120,7 @@ func (b *PersistentVolumeApplyConfiguration) WithGenerateName(value string) *Per // If called multiple times, the Namespace field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithNamespace(value string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -129,7 +129,7 @@ func (b *PersistentVolumeApplyConfiguration) WithNamespace(value string) *Persis // If called multiple times, the UID field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithUID(value types.UID) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -138,7 +138,7 @@ func (b *PersistentVolumeApplyConfiguration) WithUID(value types.UID) *Persisten // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithResourceVersion(value string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -147,25 +147,25 @@ func (b *PersistentVolumeApplyConfiguration) WithResourceVersion(value string) * // If called multiple times, the Generation field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithGeneration(value int64) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PersistentVolumeApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PersistentVolumeApplyConfiguration { +func (b *PersistentVolumeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PersistentVolumeApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PersistentVolumeApplyConfiguration { +func (b *PersistentVolumeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -174,7 +174,7 @@ func (b *PersistentVolumeApplyConfiguration) WithDeletionTimestamp(value metav1. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PersistentVolumeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -184,11 +184,11 @@ func (b *PersistentVolumeApplyConfiguration) WithDeletionGracePeriodSeconds(valu // overwriting an existing map entries in Labels field with the same key. func (b *PersistentVolumeApplyConfiguration) WithLabels(entries map[string]string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -199,11 +199,11 @@ func (b *PersistentVolumeApplyConfiguration) WithLabels(entries map[string]strin // overwriting an existing map entries in Annotations field with the same key. func (b *PersistentVolumeApplyConfiguration) WithAnnotations(entries map[string]string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -211,13 +211,13 @@ func (b *PersistentVolumeApplyConfiguration) WithAnnotations(entries map[string] // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PersistentVolumeApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PersistentVolumeApplyConfiguration { +func (b *PersistentVolumeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -228,14 +228,14 @@ func (b *PersistentVolumeApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *PersistentVolumeApplyConfiguration) WithFinalizers(values ...string) *PersistentVolumeApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *PersistentVolumeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -258,5 +258,5 @@ func (b *PersistentVolumeApplyConfiguration) WithStatus(value *PersistentVolumeS // GetName retrieves the value of the Name field in the declarative configuration. func (b *PersistentVolumeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go index 81cf791443..93b8b69d4d 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PersistentVolumeClaimApplyConfiguration represents a declarative configuration of the PersistentVolumeClaim type for use // with apply. type PersistentVolumeClaimApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` - Status *PersistentVolumeClaimStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` + Status *PersistentVolumeClaimStatusApplyConfiguration `json:"status,omitempty"` } // PersistentVolumeClaim constructs a declarative configuration of the PersistentVolumeClaim type for use with @@ -58,18 +58,18 @@ func PersistentVolumeClaim(name, namespace string) *PersistentVolumeClaimApplyCo // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractPersistentVolumeClaim(persistentVolumeClaim *apicorev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) { +func ExtractPersistentVolumeClaim(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) { return extractPersistentVolumeClaim(persistentVolumeClaim, fieldManager, "") } // ExtractPersistentVolumeClaimStatus is the same as ExtractPersistentVolumeClaim except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractPersistentVolumeClaimStatus(persistentVolumeClaim *apicorev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) { +func ExtractPersistentVolumeClaimStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) { return extractPersistentVolumeClaim(persistentVolumeClaim, fieldManager, "status") } -func extractPersistentVolumeClaim(persistentVolumeClaim *apicorev1.PersistentVolumeClaim, fieldManager string, subresource string) (*PersistentVolumeClaimApplyConfiguration, error) { +func extractPersistentVolumeClaim(persistentVolumeClaim *corev1.PersistentVolumeClaim, fieldManager string, subresource string) (*PersistentVolumeClaimApplyConfiguration, error) { b := &PersistentVolumeClaimApplyConfiguration{} err := managedfields.ExtractInto(persistentVolumeClaim, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolumeClaim"), fieldManager, b, subresource) if err != nil { @@ -87,7 +87,7 @@ func extractPersistentVolumeClaim(persistentVolumeClaim *apicorev1.PersistentVol // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithKind(value string) *PersistentVolumeClaimApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -95,7 +95,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithKind(value string) *Persis // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithAPIVersion(value string) *PersistentVolumeClaimApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -104,7 +104,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithAPIVersion(value string) * // If called multiple times, the Name field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithName(value string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -113,7 +113,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithName(value string) *Persis // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithGenerateName(value string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -122,7 +122,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithNamespace(value string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -131,7 +131,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithNamespace(value string) *P // If called multiple times, the UID field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithUID(value types.UID) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -140,7 +140,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithUID(value types.UID) *Pers // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithResourceVersion(value string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -149,25 +149,25 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithResourceVersion(value stri // If called multiple times, the Generation field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithGeneration(value int64) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PersistentVolumeClaimApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PersistentVolumeClaimApplyConfiguration { +func (b *PersistentVolumeClaimApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PersistentVolumeClaimApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PersistentVolumeClaimApplyConfiguration { +func (b *PersistentVolumeClaimApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -176,7 +176,7 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithDeletionTimestamp(value me // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PersistentVolumeClaimApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -186,11 +186,11 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithDeletionGracePeriodSeconds // overwriting an existing map entries in Labels field with the same key. func (b *PersistentVolumeClaimApplyConfiguration) WithLabels(entries map[string]string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -201,11 +201,11 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithLabels(entries map[string] // overwriting an existing map entries in Annotations field with the same key. func (b *PersistentVolumeClaimApplyConfiguration) WithAnnotations(entries map[string]string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -213,13 +213,13 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithAnnotations(entries map[st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PersistentVolumeClaimApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PersistentVolumeClaimApplyConfiguration { +func (b *PersistentVolumeClaimApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -230,14 +230,14 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithOwnerReferences(values ... func (b *PersistentVolumeClaimApplyConfiguration) WithFinalizers(values ...string) *PersistentVolumeClaimApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *PersistentVolumeClaimApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -260,5 +260,5 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithStatus(value *PersistentVo // GetName retrieves the value of the Name field in the declarative configuration. func (b *PersistentVolumeClaimApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go index 80038c0677..40025d533b 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimcondition.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // PersistentVolumeClaimConditionApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimCondition type for use // with apply. type PersistentVolumeClaimConditionApplyConfiguration struct { - Type *v1.PersistentVolumeClaimConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *corev1.PersistentVolumeClaimConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // PersistentVolumeClaimConditionApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimCondition type for use with @@ -43,7 +43,7 @@ func PersistentVolumeClaimCondition() *PersistentVolumeClaimConditionApplyConfig // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *PersistentVolumeClaimConditionApplyConfiguration) WithType(value v1.PersistentVolumeClaimConditionType) *PersistentVolumeClaimConditionApplyConfiguration { +func (b *PersistentVolumeClaimConditionApplyConfiguration) WithType(value corev1.PersistentVolumeClaimConditionType) *PersistentVolumeClaimConditionApplyConfiguration { b.Type = &value return b } @@ -51,7 +51,7 @@ func (b *PersistentVolumeClaimConditionApplyConfiguration) WithType(value v1.Per // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *PersistentVolumeClaimConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *PersistentVolumeClaimConditionApplyConfiguration { +func (b *PersistentVolumeClaimConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *PersistentVolumeClaimConditionApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go index 5ce671cd99..2c2be16b37 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimspec.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PersistentVolumeClaimSpecApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimSpec type for use // with apply. type PersistentVolumeClaimSpecApplyConfiguration struct { - AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` Resources *VolumeResourceRequirementsApplyConfiguration `json:"resources,omitempty"` VolumeName *string `json:"volumeName,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` - VolumeMode *v1.PersistentVolumeMode `json:"volumeMode,omitempty"` + VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` DataSource *TypedLocalObjectReferenceApplyConfiguration `json:"dataSource,omitempty"` DataSourceRef *TypedObjectReferenceApplyConfiguration `json:"dataSourceRef,omitempty"` VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` @@ -46,7 +46,7 @@ func PersistentVolumeClaimSpec() *PersistentVolumeClaimSpecApplyConfiguration { // WithAccessModes adds the given value to the AccessModes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AccessModes field. -func (b *PersistentVolumeClaimSpecApplyConfiguration) WithAccessModes(values ...v1.PersistentVolumeAccessMode) *PersistentVolumeClaimSpecApplyConfiguration { +func (b *PersistentVolumeClaimSpecApplyConfiguration) WithAccessModes(values ...corev1.PersistentVolumeAccessMode) *PersistentVolumeClaimSpecApplyConfiguration { for i := range values { b.AccessModes = append(b.AccessModes, values[i]) } @@ -88,7 +88,7 @@ func (b *PersistentVolumeClaimSpecApplyConfiguration) WithStorageClassName(value // WithVolumeMode sets the VolumeMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the VolumeMode field is set to the value of the last call. -func (b *PersistentVolumeClaimSpecApplyConfiguration) WithVolumeMode(value v1.PersistentVolumeMode) *PersistentVolumeClaimSpecApplyConfiguration { +func (b *PersistentVolumeClaimSpecApplyConfiguration) WithVolumeMode(value corev1.PersistentVolumeMode) *PersistentVolumeClaimSpecApplyConfiguration { b.VolumeMode = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go index 3eebf95ad5..6cea23a2ce 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimstatus.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // PersistentVolumeClaimStatusApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimStatus type for use // with apply. type PersistentVolumeClaimStatusApplyConfiguration struct { - Phase *v1.PersistentVolumeClaimPhase `json:"phase,omitempty"` - AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` - Capacity *v1.ResourceList `json:"capacity,omitempty"` + Phase *corev1.PersistentVolumeClaimPhase `json:"phase,omitempty"` + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + Capacity *corev1.ResourceList `json:"capacity,omitempty"` Conditions []PersistentVolumeClaimConditionApplyConfiguration `json:"conditions,omitempty"` - AllocatedResources *v1.ResourceList `json:"allocatedResources,omitempty"` - AllocatedResourceStatuses map[v1.ResourceName]v1.ClaimResourceStatus `json:"allocatedResourceStatuses,omitempty"` + AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"` + AllocatedResourceStatuses map[corev1.ResourceName]corev1.ClaimResourceStatus `json:"allocatedResourceStatuses,omitempty"` CurrentVolumeAttributesClassName *string `json:"currentVolumeAttributesClassName,omitempty"` ModifyVolumeStatus *ModifyVolumeStatusApplyConfiguration `json:"modifyVolumeStatus,omitempty"` } @@ -44,7 +44,7 @@ func PersistentVolumeClaimStatus() *PersistentVolumeClaimStatusApplyConfiguratio // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *PersistentVolumeClaimStatusApplyConfiguration) WithPhase(value v1.PersistentVolumeClaimPhase) *PersistentVolumeClaimStatusApplyConfiguration { +func (b *PersistentVolumeClaimStatusApplyConfiguration) WithPhase(value corev1.PersistentVolumeClaimPhase) *PersistentVolumeClaimStatusApplyConfiguration { b.Phase = &value return b } @@ -52,7 +52,7 @@ func (b *PersistentVolumeClaimStatusApplyConfiguration) WithPhase(value v1.Persi // WithAccessModes adds the given value to the AccessModes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AccessModes field. -func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAccessModes(values ...v1.PersistentVolumeAccessMode) *PersistentVolumeClaimStatusApplyConfiguration { +func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAccessModes(values ...corev1.PersistentVolumeAccessMode) *PersistentVolumeClaimStatusApplyConfiguration { for i := range values { b.AccessModes = append(b.AccessModes, values[i]) } @@ -62,7 +62,7 @@ func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAccessModes(values . // WithCapacity sets the Capacity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Capacity field is set to the value of the last call. -func (b *PersistentVolumeClaimStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *PersistentVolumeClaimStatusApplyConfiguration { +func (b *PersistentVolumeClaimStatusApplyConfiguration) WithCapacity(value corev1.ResourceList) *PersistentVolumeClaimStatusApplyConfiguration { b.Capacity = &value return b } @@ -83,7 +83,7 @@ func (b *PersistentVolumeClaimStatusApplyConfiguration) WithConditions(values .. // WithAllocatedResources sets the AllocatedResources field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AllocatedResources field is set to the value of the last call. -func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAllocatedResources(value v1.ResourceList) *PersistentVolumeClaimStatusApplyConfiguration { +func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAllocatedResources(value corev1.ResourceList) *PersistentVolumeClaimStatusApplyConfiguration { b.AllocatedResources = &value return b } @@ -92,9 +92,9 @@ func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAllocatedResources(v // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the AllocatedResourceStatuses field, // overwriting an existing map entries in AllocatedResourceStatuses field with the same key. -func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAllocatedResourceStatuses(entries map[v1.ResourceName]v1.ClaimResourceStatus) *PersistentVolumeClaimStatusApplyConfiguration { +func (b *PersistentVolumeClaimStatusApplyConfiguration) WithAllocatedResourceStatuses(entries map[corev1.ResourceName]corev1.ClaimResourceStatus) *PersistentVolumeClaimStatusApplyConfiguration { if b.AllocatedResourceStatuses == nil && len(entries) > 0 { - b.AllocatedResourceStatuses = make(map[v1.ResourceName]v1.ClaimResourceStatus, len(entries)) + b.AllocatedResourceStatuses = make(map[corev1.ResourceName]corev1.ClaimResourceStatus, len(entries)) } for k, v := range entries { b.AllocatedResourceStatuses[k] = v diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go index ed49702913..4db3cbf12c 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go @@ -19,16 +19,16 @@ limitations under the License. package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PersistentVolumeClaimTemplateApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimTemplate type for use // with apply. type PersistentVolumeClaimTemplateApplyConfiguration struct { - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *PersistentVolumeClaimSpecApplyConfiguration `json:"spec,omitempty"` } // PersistentVolumeClaimTemplateApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimTemplate type for use with @@ -42,7 +42,7 @@ func PersistentVolumeClaimTemplate() *PersistentVolumeClaimTemplateApplyConfigur // If called multiple times, the Name field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithName(value string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -51,7 +51,7 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithName(value string) // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithGenerateName(value string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -60,7 +60,7 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithGenerateName(value // If called multiple times, the Namespace field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithNamespace(value string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -69,7 +69,7 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithNamespace(value st // If called multiple times, the UID field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithUID(value types.UID) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -78,7 +78,7 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithUID(value types.UI // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithResourceVersion(value string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -87,25 +87,25 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithResourceVersion(va // If called multiple times, the Generation field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithGeneration(value int64) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PersistentVolumeClaimTemplateApplyConfiguration { +func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PersistentVolumeClaimTemplateApplyConfiguration { +func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -114,7 +114,7 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithDeletionTimestamp( // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -124,11 +124,11 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithDeletionGracePerio // overwriting an existing map entries in Labels field with the same key. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithLabels(entries map[string]string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -139,11 +139,11 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithLabels(entries map // overwriting an existing map entries in Annotations field with the same key. func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -151,13 +151,13 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithAnnotations(entrie // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PersistentVolumeClaimTemplateApplyConfiguration { +func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -168,14 +168,14 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithOwnerReferences(va func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithFinalizers(values ...string) *PersistentVolumeClaimTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *PersistentVolumeClaimTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -190,5 +190,5 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithSpec(value *Persis // GetName retrieves the value of the Name field in the declarative configuration. func (b *PersistentVolumeClaimTemplateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go index 074fa55d1f..792e3b9440 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumespec.go @@ -19,20 +19,20 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // PersistentVolumeSpecApplyConfiguration represents a declarative configuration of the PersistentVolumeSpec type for use // with apply. type PersistentVolumeSpecApplyConfiguration struct { - Capacity *v1.ResourceList `json:"capacity,omitempty"` + Capacity *corev1.ResourceList `json:"capacity,omitempty"` PersistentVolumeSourceApplyConfiguration `json:",inline"` - AccessModes []v1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` + AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"` ClaimRef *ObjectReferenceApplyConfiguration `json:"claimRef,omitempty"` - PersistentVolumeReclaimPolicy *v1.PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"` + PersistentVolumeReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"` StorageClassName *string `json:"storageClassName,omitempty"` MountOptions []string `json:"mountOptions,omitempty"` - VolumeMode *v1.PersistentVolumeMode `json:"volumeMode,omitempty"` + VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty"` NodeAffinity *VolumeNodeAffinityApplyConfiguration `json:"nodeAffinity,omitempty"` VolumeAttributesClassName *string `json:"volumeAttributesClassName,omitempty"` } @@ -46,7 +46,7 @@ func PersistentVolumeSpec() *PersistentVolumeSpecApplyConfiguration { // WithCapacity sets the Capacity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Capacity field is set to the value of the last call. -func (b *PersistentVolumeSpecApplyConfiguration) WithCapacity(value v1.ResourceList) *PersistentVolumeSpecApplyConfiguration { +func (b *PersistentVolumeSpecApplyConfiguration) WithCapacity(value corev1.ResourceList) *PersistentVolumeSpecApplyConfiguration { b.Capacity = &value return b } @@ -55,7 +55,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithCapacity(value v1.ResourceL // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GCEPersistentDisk field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithGCEPersistentDisk(value *GCEPersistentDiskVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.GCEPersistentDisk = value + b.PersistentVolumeSourceApplyConfiguration.GCEPersistentDisk = value return b } @@ -63,7 +63,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithGCEPersistentDisk(value *GC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AWSElasticBlockStore field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithAWSElasticBlockStore(value *AWSElasticBlockStoreVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.AWSElasticBlockStore = value + b.PersistentVolumeSourceApplyConfiguration.AWSElasticBlockStore = value return b } @@ -71,7 +71,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithAWSElasticBlockStore(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HostPath field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithHostPath(value *HostPathVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.HostPath = value + b.PersistentVolumeSourceApplyConfiguration.HostPath = value return b } @@ -79,7 +79,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithHostPath(value *HostPathVol // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Glusterfs field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithGlusterfs(value *GlusterfsPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.Glusterfs = value + b.PersistentVolumeSourceApplyConfiguration.Glusterfs = value return b } @@ -87,7 +87,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithGlusterfs(value *GlusterfsP // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NFS field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithNFS(value *NFSVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.NFS = value + b.PersistentVolumeSourceApplyConfiguration.NFS = value return b } @@ -95,7 +95,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithNFS(value *NFSVolumeSourceA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RBD field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithRBD(value *RBDPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.RBD = value + b.PersistentVolumeSourceApplyConfiguration.RBD = value return b } @@ -103,7 +103,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithRBD(value *RBDPersistentVol // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ISCSI field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithISCSI(value *ISCSIPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.ISCSI = value + b.PersistentVolumeSourceApplyConfiguration.ISCSI = value return b } @@ -111,7 +111,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithISCSI(value *ISCSIPersisten // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Cinder field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithCinder(value *CinderPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.Cinder = value + b.PersistentVolumeSourceApplyConfiguration.Cinder = value return b } @@ -119,7 +119,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithCinder(value *CinderPersist // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CephFS field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithCephFS(value *CephFSPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.CephFS = value + b.PersistentVolumeSourceApplyConfiguration.CephFS = value return b } @@ -127,7 +127,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithCephFS(value *CephFSPersist // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FC field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithFC(value *FCVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.FC = value + b.PersistentVolumeSourceApplyConfiguration.FC = value return b } @@ -135,7 +135,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithFC(value *FCVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Flocker field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithFlocker(value *FlockerVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.Flocker = value + b.PersistentVolumeSourceApplyConfiguration.Flocker = value return b } @@ -143,7 +143,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithFlocker(value *FlockerVolum // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FlexVolume field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithFlexVolume(value *FlexPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.FlexVolume = value + b.PersistentVolumeSourceApplyConfiguration.FlexVolume = value return b } @@ -151,7 +151,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithFlexVolume(value *FlexPersi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AzureFile field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithAzureFile(value *AzureFilePersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.AzureFile = value + b.PersistentVolumeSourceApplyConfiguration.AzureFile = value return b } @@ -159,7 +159,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithAzureFile(value *AzureFileP // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the VsphereVolume field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithVsphereVolume(value *VsphereVirtualDiskVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.VsphereVolume = value + b.PersistentVolumeSourceApplyConfiguration.VsphereVolume = value return b } @@ -167,7 +167,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithVsphereVolume(value *Vspher // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Quobyte field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithQuobyte(value *QuobyteVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.Quobyte = value + b.PersistentVolumeSourceApplyConfiguration.Quobyte = value return b } @@ -175,7 +175,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithQuobyte(value *QuobyteVolum // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AzureDisk field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithAzureDisk(value *AzureDiskVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.AzureDisk = value + b.PersistentVolumeSourceApplyConfiguration.AzureDisk = value return b } @@ -183,7 +183,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithAzureDisk(value *AzureDiskV // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PhotonPersistentDisk field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithPhotonPersistentDisk(value *PhotonPersistentDiskVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.PhotonPersistentDisk = value + b.PersistentVolumeSourceApplyConfiguration.PhotonPersistentDisk = value return b } @@ -191,7 +191,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithPhotonPersistentDisk(value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PortworxVolume field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithPortworxVolume(value *PortworxVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.PortworxVolume = value + b.PersistentVolumeSourceApplyConfiguration.PortworxVolume = value return b } @@ -199,7 +199,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithPortworxVolume(value *Portw // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ScaleIO field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithScaleIO(value *ScaleIOPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.ScaleIO = value + b.PersistentVolumeSourceApplyConfiguration.ScaleIO = value return b } @@ -207,7 +207,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithScaleIO(value *ScaleIOPersi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Local field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithLocal(value *LocalVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.Local = value + b.PersistentVolumeSourceApplyConfiguration.Local = value return b } @@ -215,7 +215,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithLocal(value *LocalVolumeSou // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StorageOS field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithStorageOS(value *StorageOSPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.StorageOS = value + b.PersistentVolumeSourceApplyConfiguration.StorageOS = value return b } @@ -223,14 +223,14 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithStorageOS(value *StorageOSP // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CSI field is set to the value of the last call. func (b *PersistentVolumeSpecApplyConfiguration) WithCSI(value *CSIPersistentVolumeSourceApplyConfiguration) *PersistentVolumeSpecApplyConfiguration { - b.CSI = value + b.PersistentVolumeSourceApplyConfiguration.CSI = value return b } // WithAccessModes adds the given value to the AccessModes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AccessModes field. -func (b *PersistentVolumeSpecApplyConfiguration) WithAccessModes(values ...v1.PersistentVolumeAccessMode) *PersistentVolumeSpecApplyConfiguration { +func (b *PersistentVolumeSpecApplyConfiguration) WithAccessModes(values ...corev1.PersistentVolumeAccessMode) *PersistentVolumeSpecApplyConfiguration { for i := range values { b.AccessModes = append(b.AccessModes, values[i]) } @@ -248,7 +248,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithClaimRef(value *ObjectRefer // WithPersistentVolumeReclaimPolicy sets the PersistentVolumeReclaimPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PersistentVolumeReclaimPolicy field is set to the value of the last call. -func (b *PersistentVolumeSpecApplyConfiguration) WithPersistentVolumeReclaimPolicy(value v1.PersistentVolumeReclaimPolicy) *PersistentVolumeSpecApplyConfiguration { +func (b *PersistentVolumeSpecApplyConfiguration) WithPersistentVolumeReclaimPolicy(value corev1.PersistentVolumeReclaimPolicy) *PersistentVolumeSpecApplyConfiguration { b.PersistentVolumeReclaimPolicy = &value return b } @@ -274,7 +274,7 @@ func (b *PersistentVolumeSpecApplyConfiguration) WithMountOptions(values ...stri // WithVolumeMode sets the VolumeMode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the VolumeMode field is set to the value of the last call. -func (b *PersistentVolumeSpecApplyConfiguration) WithVolumeMode(value v1.PersistentVolumeMode) *PersistentVolumeSpecApplyConfiguration { +func (b *PersistentVolumeSpecApplyConfiguration) WithVolumeMode(value corev1.PersistentVolumeMode) *PersistentVolumeSpecApplyConfiguration { b.VolumeMode = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go index 95ba90f48b..0bb077ae09 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumestatus.go @@ -19,17 +19,17 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // PersistentVolumeStatusApplyConfiguration represents a declarative configuration of the PersistentVolumeStatus type for use // with apply. type PersistentVolumeStatusApplyConfiguration struct { - Phase *v1.PersistentVolumePhase `json:"phase,omitempty"` - Message *string `json:"message,omitempty"` - Reason *string `json:"reason,omitempty"` - LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty"` + Phase *corev1.PersistentVolumePhase `json:"phase,omitempty"` + Message *string `json:"message,omitempty"` + Reason *string `json:"reason,omitempty"` + LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty"` } // PersistentVolumeStatusApplyConfiguration constructs a declarative configuration of the PersistentVolumeStatus type for use with @@ -41,7 +41,7 @@ func PersistentVolumeStatus() *PersistentVolumeStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *PersistentVolumeStatusApplyConfiguration) WithPhase(value v1.PersistentVolumePhase) *PersistentVolumeStatusApplyConfiguration { +func (b *PersistentVolumeStatusApplyConfiguration) WithPhase(value corev1.PersistentVolumePhase) *PersistentVolumeStatusApplyConfiguration { b.Phase = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go index 507d57d6f3..29526709f3 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PodApplyConfiguration represents a declarative configuration of the Pod type for use // with apply. type PodApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` - Status *PodStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` + Status *PodStatusApplyConfiguration `json:"status,omitempty"` } // Pod constructs a declarative configuration of the Pod type for use with @@ -58,18 +58,18 @@ func Pod(name, namespace string) *PodApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractPod(pod *apicorev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { +func ExtractPod(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { return extractPod(pod, fieldManager, "") } // ExtractPodStatus is the same as ExtractPod except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractPodStatus(pod *apicorev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { +func ExtractPodStatus(pod *corev1.Pod, fieldManager string) (*PodApplyConfiguration, error) { return extractPod(pod, fieldManager, "status") } -func extractPod(pod *apicorev1.Pod, fieldManager string, subresource string) (*PodApplyConfiguration, error) { +func extractPod(pod *corev1.Pod, fieldManager string, subresource string) (*PodApplyConfiguration, error) { b := &PodApplyConfiguration{} err := managedfields.ExtractInto(pod, internal.Parser().Type("io.k8s.api.core.v1.Pod"), fieldManager, b, subresource) if err != nil { @@ -87,7 +87,7 @@ func extractPod(pod *apicorev1.Pod, fieldManager string, subresource string) (*P // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PodApplyConfiguration) WithKind(value string) *PodApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -95,7 +95,7 @@ func (b *PodApplyConfiguration) WithKind(value string) *PodApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PodApplyConfiguration) WithAPIVersion(value string) *PodApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -104,7 +104,7 @@ func (b *PodApplyConfiguration) WithAPIVersion(value string) *PodApplyConfigurat // If called multiple times, the Name field is set to the value of the last call. func (b *PodApplyConfiguration) WithName(value string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -113,7 +113,7 @@ func (b *PodApplyConfiguration) WithName(value string) *PodApplyConfiguration { // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PodApplyConfiguration) WithGenerateName(value string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -122,7 +122,7 @@ func (b *PodApplyConfiguration) WithGenerateName(value string) *PodApplyConfigur // If called multiple times, the Namespace field is set to the value of the last call. func (b *PodApplyConfiguration) WithNamespace(value string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -131,7 +131,7 @@ func (b *PodApplyConfiguration) WithNamespace(value string) *PodApplyConfigurati // If called multiple times, the UID field is set to the value of the last call. func (b *PodApplyConfiguration) WithUID(value types.UID) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -140,7 +140,7 @@ func (b *PodApplyConfiguration) WithUID(value types.UID) *PodApplyConfiguration // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PodApplyConfiguration) WithResourceVersion(value string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -149,25 +149,25 @@ func (b *PodApplyConfiguration) WithResourceVersion(value string) *PodApplyConfi // If called multiple times, the Generation field is set to the value of the last call. func (b *PodApplyConfiguration) WithGeneration(value int64) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PodApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodApplyConfiguration { +func (b *PodApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PodApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodApplyConfiguration { +func (b *PodApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -176,7 +176,7 @@ func (b *PodApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodApp // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PodApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -186,11 +186,11 @@ func (b *PodApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *Pod // overwriting an existing map entries in Labels field with the same key. func (b *PodApplyConfiguration) WithLabels(entries map[string]string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -201,11 +201,11 @@ func (b *PodApplyConfiguration) WithLabels(entries map[string]string) *PodApplyC // overwriting an existing map entries in Annotations field with the same key. func (b *PodApplyConfiguration) WithAnnotations(entries map[string]string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -213,13 +213,13 @@ func (b *PodApplyConfiguration) WithAnnotations(entries map[string]string) *PodA // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PodApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodApplyConfiguration { +func (b *PodApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -230,14 +230,14 @@ func (b *PodApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReference func (b *PodApplyConfiguration) WithFinalizers(values ...string) *PodApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *PodApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -260,5 +260,5 @@ func (b *PodApplyConfiguration) WithStatus(value *PodStatusApplyConfiguration) * // GetName retrieves the value of the Name field in the declarative configuration. func (b *PodApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go index 3afce026d4..1cc1ca0d06 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podaffinityterm.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PodAffinityTermApplyConfiguration represents a declarative configuration of the PodAffinityTerm type for use // with apply. type PodAffinityTermApplyConfiguration struct { - LabelSelector *v1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - Namespaces []string `json:"namespaces,omitempty"` - TopologyKey *string `json:"topologyKey,omitempty"` - NamespaceSelector *v1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` - MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"` + LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` + Namespaces []string `json:"namespaces,omitempty"` + TopologyKey *string `json:"topologyKey,omitempty"` + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty"` } // PodAffinityTermApplyConfiguration constructs a declarative configuration of the PodAffinityTerm type for use with @@ -42,7 +42,7 @@ func PodAffinityTerm() *PodAffinityTermApplyConfiguration { // WithLabelSelector sets the LabelSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LabelSelector field is set to the value of the last call. -func (b *PodAffinityTermApplyConfiguration) WithLabelSelector(value *v1.LabelSelectorApplyConfiguration) *PodAffinityTermApplyConfiguration { +func (b *PodAffinityTermApplyConfiguration) WithLabelSelector(value *metav1.LabelSelectorApplyConfiguration) *PodAffinityTermApplyConfiguration { b.LabelSelector = value return b } @@ -68,7 +68,7 @@ func (b *PodAffinityTermApplyConfiguration) WithTopologyKey(value string) *PodAf // WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NamespaceSelector field is set to the value of the last call. -func (b *PodAffinityTermApplyConfiguration) WithNamespaceSelector(value *v1.LabelSelectorApplyConfiguration) *PodAffinityTermApplyConfiguration { +func (b *PodAffinityTermApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *PodAffinityTermApplyConfiguration { b.NamespaceSelector = value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go index 98968d26d0..67cd1bd09b 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podcondition.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // PodConditionApplyConfiguration represents a declarative configuration of the PodCondition type for use // with apply. type PodConditionApplyConfiguration struct { - Type *v1.PodConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *corev1.PodConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // PodConditionApplyConfiguration constructs a declarative configuration of the PodCondition type for use with @@ -43,7 +43,7 @@ func PodCondition() *PodConditionApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *PodConditionApplyConfiguration) WithType(value v1.PodConditionType) *PodConditionApplyConfiguration { +func (b *PodConditionApplyConfiguration) WithType(value corev1.PodConditionType) *PodConditionApplyConfiguration { b.Type = &value return b } @@ -51,7 +51,7 @@ func (b *PodConditionApplyConfiguration) WithType(value v1.PodConditionType) *Po // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *PodConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *PodConditionApplyConfiguration { +func (b *PodConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *PodConditionApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podos.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podos.go index 7f156f817d..22a7456011 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podos.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podos.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // PodOSApplyConfiguration represents a declarative configuration of the PodOS type for use // with apply. type PodOSApplyConfiguration struct { - Name *v1.OSName `json:"name,omitempty"` + Name *corev1.OSName `json:"name,omitempty"` } // PodOSApplyConfiguration constructs a declarative configuration of the PodOS type for use with @@ -37,7 +37,7 @@ func PodOS() *PodOSApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *PodOSApplyConfiguration) WithName(value v1.OSName) *PodOSApplyConfiguration { +func (b *PodOSApplyConfiguration) WithName(value corev1.OSName) *PodOSApplyConfiguration { b.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go index 09746df1bd..4298b1ca62 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podreadinessgate.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // PodReadinessGateApplyConfiguration represents a declarative configuration of the PodReadinessGate type for use // with apply. type PodReadinessGateApplyConfiguration struct { - ConditionType *v1.PodConditionType `json:"conditionType,omitempty"` + ConditionType *corev1.PodConditionType `json:"conditionType,omitempty"` } // PodReadinessGateApplyConfiguration constructs a declarative configuration of the PodReadinessGate type for use with @@ -37,7 +37,7 @@ func PodReadinessGate() *PodReadinessGateApplyConfiguration { // WithConditionType sets the ConditionType field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ConditionType field is set to the value of the last call. -func (b *PodReadinessGateApplyConfiguration) WithConditionType(value v1.PodConditionType) *PodReadinessGateApplyConfiguration { +func (b *PodReadinessGateApplyConfiguration) WithConditionType(value corev1.PodConditionType) *PodReadinessGateApplyConfiguration { b.ConditionType = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go index 55085e6307..f0a3e662c8 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podsecuritycontext.go @@ -37,6 +37,7 @@ type PodSecurityContextApplyConfiguration struct { FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"` SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"` AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"` + SELinuxChangePolicy *corev1.PodSELinuxChangePolicy `json:"seLinuxChangePolicy,omitempty"` } // PodSecurityContextApplyConfiguration constructs a declarative configuration of the PodSecurityContext type for use with @@ -147,3 +148,11 @@ func (b *PodSecurityContextApplyConfiguration) WithAppArmorProfile(value *AppArm b.AppArmorProfile = value return b } + +// WithSELinuxChangePolicy sets the SELinuxChangePolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SELinuxChangePolicy field is set to the value of the last call. +func (b *PodSecurityContextApplyConfiguration) WithSELinuxChangePolicy(value corev1.PodSELinuxChangePolicy) *PodSecurityContextApplyConfiguration { + b.SELinuxChangePolicy = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podspec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podspec.go index 8134e044f1..96f6eb94b1 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podspec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podspec.go @@ -64,6 +64,7 @@ type PodSpecApplyConfiguration struct { HostUsers *bool `json:"hostUsers,omitempty"` SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"` ResourceClaims []PodResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"` + Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"` } // PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with @@ -444,3 +445,11 @@ func (b *PodSpecApplyConfiguration) WithResourceClaims(values ...*PodResourceCla } return b } + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *PodSpecApplyConfiguration) WithResources(value *ResourceRequirementsApplyConfiguration) *PodSpecApplyConfiguration { + b.Resources = value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go index 0b68996cd1..b79e1210a9 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podstatus.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // PodStatusApplyConfiguration represents a declarative configuration of the PodStatus type for use // with apply. type PodStatusApplyConfiguration struct { - Phase *v1.PodPhase `json:"phase,omitempty"` + Phase *corev1.PodPhase `json:"phase,omitempty"` Conditions []PodConditionApplyConfiguration `json:"conditions,omitempty"` Message *string `json:"message,omitempty"` Reason *string `json:"reason,omitempty"` @@ -38,9 +38,9 @@ type PodStatusApplyConfiguration struct { StartTime *metav1.Time `json:"startTime,omitempty"` InitContainerStatuses []ContainerStatusApplyConfiguration `json:"initContainerStatuses,omitempty"` ContainerStatuses []ContainerStatusApplyConfiguration `json:"containerStatuses,omitempty"` - QOSClass *v1.PodQOSClass `json:"qosClass,omitempty"` + QOSClass *corev1.PodQOSClass `json:"qosClass,omitempty"` EphemeralContainerStatuses []ContainerStatusApplyConfiguration `json:"ephemeralContainerStatuses,omitempty"` - Resize *v1.PodResizeStatus `json:"resize,omitempty"` + Resize *corev1.PodResizeStatus `json:"resize,omitempty"` ResourceClaimStatuses []PodResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"` } @@ -53,7 +53,7 @@ func PodStatus() *PodStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *PodStatusApplyConfiguration) WithPhase(value v1.PodPhase) *PodStatusApplyConfiguration { +func (b *PodStatusApplyConfiguration) WithPhase(value corev1.PodPhase) *PodStatusApplyConfiguration { b.Phase = &value return b } @@ -174,7 +174,7 @@ func (b *PodStatusApplyConfiguration) WithContainerStatuses(values ...*Container // WithQOSClass sets the QOSClass field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the QOSClass field is set to the value of the last call. -func (b *PodStatusApplyConfiguration) WithQOSClass(value v1.PodQOSClass) *PodStatusApplyConfiguration { +func (b *PodStatusApplyConfiguration) WithQOSClass(value corev1.PodQOSClass) *PodStatusApplyConfiguration { b.QOSClass = &value return b } @@ -195,7 +195,7 @@ func (b *PodStatusApplyConfiguration) WithEphemeralContainerStatuses(values ...* // WithResize sets the Resize field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resize field is set to the value of the last call. -func (b *PodStatusApplyConfiguration) WithResize(value v1.PodResizeStatus) *PodStatusApplyConfiguration { +func (b *PodStatusApplyConfiguration) WithResize(value corev1.PodResizeStatus) *PodStatusApplyConfiguration { b.Resize = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go index b4c8a658a4..7886ea2d9b 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go @@ -19,20 +19,20 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PodTemplateApplyConfiguration represents a declarative configuration of the PodTemplate type for use // with apply. type PodTemplateApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Template *PodTemplateSpecApplyConfiguration `json:"template,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Template *PodTemplateSpecApplyConfiguration `json:"template,omitempty"` } // PodTemplate constructs a declarative configuration of the PodTemplate type for use with @@ -57,18 +57,18 @@ func PodTemplate(name, namespace string) *PodTemplateApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractPodTemplate(podTemplate *apicorev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { +func ExtractPodTemplate(podTemplate *corev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { return extractPodTemplate(podTemplate, fieldManager, "") } // ExtractPodTemplateStatus is the same as ExtractPodTemplate except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractPodTemplateStatus(podTemplate *apicorev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { +func ExtractPodTemplateStatus(podTemplate *corev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) { return extractPodTemplate(podTemplate, fieldManager, "status") } -func extractPodTemplate(podTemplate *apicorev1.PodTemplate, fieldManager string, subresource string) (*PodTemplateApplyConfiguration, error) { +func extractPodTemplate(podTemplate *corev1.PodTemplate, fieldManager string, subresource string) (*PodTemplateApplyConfiguration, error) { b := &PodTemplateApplyConfiguration{} err := managedfields.ExtractInto(podTemplate, internal.Parser().Type("io.k8s.api.core.v1.PodTemplate"), fieldManager, b, subresource) if err != nil { @@ -86,7 +86,7 @@ func extractPodTemplate(podTemplate *apicorev1.PodTemplate, fieldManager string, // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithKind(value string) *PodTemplateApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -94,7 +94,7 @@ func (b *PodTemplateApplyConfiguration) WithKind(value string) *PodTemplateApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithAPIVersion(value string) *PodTemplateApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -103,7 +103,7 @@ func (b *PodTemplateApplyConfiguration) WithAPIVersion(value string) *PodTemplat // If called multiple times, the Name field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithName(value string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -112,7 +112,7 @@ func (b *PodTemplateApplyConfiguration) WithName(value string) *PodTemplateApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithGenerateName(value string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -121,7 +121,7 @@ func (b *PodTemplateApplyConfiguration) WithGenerateName(value string) *PodTempl // If called multiple times, the Namespace field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithNamespace(value string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -130,7 +130,7 @@ func (b *PodTemplateApplyConfiguration) WithNamespace(value string) *PodTemplate // If called multiple times, the UID field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithUID(value types.UID) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -139,7 +139,7 @@ func (b *PodTemplateApplyConfiguration) WithUID(value types.UID) *PodTemplateApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithResourceVersion(value string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -148,25 +148,25 @@ func (b *PodTemplateApplyConfiguration) WithResourceVersion(value string) *PodTe // If called multiple times, the Generation field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithGeneration(value int64) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PodTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodTemplateApplyConfiguration { +func (b *PodTemplateApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PodTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodTemplateApplyConfiguration { +func (b *PodTemplateApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -175,7 +175,7 @@ func (b *PodTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PodTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -185,11 +185,11 @@ func (b *PodTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *PodTemplateApplyConfiguration) WithLabels(entries map[string]string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -200,11 +200,11 @@ func (b *PodTemplateApplyConfiguration) WithLabels(entries map[string]string) *P // overwriting an existing map entries in Annotations field with the same key. func (b *PodTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -212,13 +212,13 @@ func (b *PodTemplateApplyConfiguration) WithAnnotations(entries map[string]strin // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PodTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodTemplateApplyConfiguration { +func (b *PodTemplateApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -229,14 +229,14 @@ func (b *PodTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *PodTemplateApplyConfiguration) WithFinalizers(values ...string) *PodTemplateApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *PodTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -251,5 +251,5 @@ func (b *PodTemplateApplyConfiguration) WithTemplate(value *PodTemplateSpecApply // GetName retrieves the value of the Name field in the declarative configuration. func (b *PodTemplateApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go index 6146c01c7c..2e0904a242 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go @@ -19,16 +19,16 @@ limitations under the License. package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // PodTemplateSpecApplyConfiguration represents a declarative configuration of the PodTemplateSpec type for use // with apply. type PodTemplateSpecApplyConfiguration struct { - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *PodSpecApplyConfiguration `json:"spec,omitempty"` } // PodTemplateSpecApplyConfiguration constructs a declarative configuration of the PodTemplateSpec type for use with @@ -42,7 +42,7 @@ func PodTemplateSpec() *PodTemplateSpecApplyConfiguration { // If called multiple times, the Name field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithName(value string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -51,7 +51,7 @@ func (b *PodTemplateSpecApplyConfiguration) WithName(value string) *PodTemplateS // If called multiple times, the GenerateName field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithGenerateName(value string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -60,7 +60,7 @@ func (b *PodTemplateSpecApplyConfiguration) WithGenerateName(value string) *PodT // If called multiple times, the Namespace field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithNamespace(value string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -69,7 +69,7 @@ func (b *PodTemplateSpecApplyConfiguration) WithNamespace(value string) *PodTemp // If called multiple times, the UID field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithUID(value types.UID) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -78,7 +78,7 @@ func (b *PodTemplateSpecApplyConfiguration) WithUID(value types.UID) *PodTemplat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithResourceVersion(value string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -87,25 +87,25 @@ func (b *PodTemplateSpecApplyConfiguration) WithResourceVersion(value string) *P // If called multiple times, the Generation field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithGeneration(value int64) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PodTemplateSpecApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodTemplateSpecApplyConfiguration { +func (b *PodTemplateSpecApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PodTemplateSpecApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodTemplateSpecApplyConfiguration { +func (b *PodTemplateSpecApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -114,7 +114,7 @@ func (b *PodTemplateSpecApplyConfiguration) WithDeletionTimestamp(value metav1.T // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *PodTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -124,11 +124,11 @@ func (b *PodTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *PodTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -139,11 +139,11 @@ func (b *PodTemplateSpecApplyConfiguration) WithLabels(entries map[string]string // overwriting an existing map entries in Annotations field with the same key. func (b *PodTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -151,13 +151,13 @@ func (b *PodTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]s // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PodTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodTemplateSpecApplyConfiguration { +func (b *PodTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -168,14 +168,14 @@ func (b *PodTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v1.Ow func (b *PodTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *PodTemplateSpecApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *PodTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -190,5 +190,5 @@ func (b *PodTemplateSpecApplyConfiguration) WithSpec(value *PodSpecApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *PodTemplateSpecApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go index 5e738cabdb..eff8fc2acb 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/portstatus.go @@ -19,15 +19,15 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // PortStatusApplyConfiguration represents a declarative configuration of the PortStatus type for use // with apply. type PortStatusApplyConfiguration struct { - Port *int32 `json:"port,omitempty"` - Protocol *v1.Protocol `json:"protocol,omitempty"` - Error *string `json:"error,omitempty"` + Port *int32 `json:"port,omitempty"` + Protocol *corev1.Protocol `json:"protocol,omitempty"` + Error *string `json:"error,omitempty"` } // PortStatusApplyConfiguration constructs a declarative configuration of the PortStatus type for use with @@ -47,7 +47,7 @@ func (b *PortStatusApplyConfiguration) WithPort(value int32) *PortStatusApplyCon // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *PortStatusApplyConfiguration) WithProtocol(value v1.Protocol) *PortStatusApplyConfiguration { +func (b *PortStatusApplyConfiguration) WithProtocol(value corev1.Protocol) *PortStatusApplyConfiguration { b.Protocol = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/probe.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/probe.go index 3be1c9650b..d6c654689b 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/probe.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/probe.go @@ -40,7 +40,7 @@ func Probe() *ProbeApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Exec field is set to the value of the last call. func (b *ProbeApplyConfiguration) WithExec(value *ExecActionApplyConfiguration) *ProbeApplyConfiguration { - b.Exec = value + b.ProbeHandlerApplyConfiguration.Exec = value return b } @@ -48,7 +48,7 @@ func (b *ProbeApplyConfiguration) WithExec(value *ExecActionApplyConfiguration) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HTTPGet field is set to the value of the last call. func (b *ProbeApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfiguration) *ProbeApplyConfiguration { - b.HTTPGet = value + b.ProbeHandlerApplyConfiguration.HTTPGet = value return b } @@ -56,7 +56,7 @@ func (b *ProbeApplyConfiguration) WithHTTPGet(value *HTTPGetActionApplyConfigura // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the TCPSocket field is set to the value of the last call. func (b *ProbeApplyConfiguration) WithTCPSocket(value *TCPSocketActionApplyConfiguration) *ProbeApplyConfiguration { - b.TCPSocket = value + b.ProbeHandlerApplyConfiguration.TCPSocket = value return b } @@ -64,7 +64,7 @@ func (b *ProbeApplyConfiguration) WithTCPSocket(value *TCPSocketActionApplyConfi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GRPC field is set to the value of the last call. func (b *ProbeApplyConfiguration) WithGRPC(value *GRPCActionApplyConfiguration) *ProbeApplyConfiguration { - b.GRPC = value + b.ProbeHandlerApplyConfiguration.GRPC = value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go index b28f422dc7..4ef551914c 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ReplicationControllerApplyConfiguration represents a declarative configuration of the ReplicationController type for use // with apply. type ReplicationControllerApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ReplicationControllerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ReplicationControllerStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ReplicationControllerSpecApplyConfiguration `json:"spec,omitempty"` + Status *ReplicationControllerStatusApplyConfiguration `json:"status,omitempty"` } // ReplicationController constructs a declarative configuration of the ReplicationController type for use with @@ -58,18 +58,18 @@ func ReplicationController(name, namespace string) *ReplicationControllerApplyCo // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractReplicationController(replicationController *apicorev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { +func ExtractReplicationController(replicationController *corev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { return extractReplicationController(replicationController, fieldManager, "") } // ExtractReplicationControllerStatus is the same as ExtractReplicationController except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractReplicationControllerStatus(replicationController *apicorev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { +func ExtractReplicationControllerStatus(replicationController *corev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) { return extractReplicationController(replicationController, fieldManager, "status") } -func extractReplicationController(replicationController *apicorev1.ReplicationController, fieldManager string, subresource string) (*ReplicationControllerApplyConfiguration, error) { +func extractReplicationController(replicationController *corev1.ReplicationController, fieldManager string, subresource string) (*ReplicationControllerApplyConfiguration, error) { b := &ReplicationControllerApplyConfiguration{} err := managedfields.ExtractInto(replicationController, internal.Parser().Type("io.k8s.api.core.v1.ReplicationController"), fieldManager, b, subresource) if err != nil { @@ -87,7 +87,7 @@ func extractReplicationController(replicationController *apicorev1.ReplicationCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithKind(value string) *ReplicationControllerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -95,7 +95,7 @@ func (b *ReplicationControllerApplyConfiguration) WithKind(value string) *Replic // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithAPIVersion(value string) *ReplicationControllerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -104,7 +104,7 @@ func (b *ReplicationControllerApplyConfiguration) WithAPIVersion(value string) * // If called multiple times, the Name field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithName(value string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -113,7 +113,7 @@ func (b *ReplicationControllerApplyConfiguration) WithName(value string) *Replic // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithGenerateName(value string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -122,7 +122,7 @@ func (b *ReplicationControllerApplyConfiguration) WithGenerateName(value string) // If called multiple times, the Namespace field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithNamespace(value string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -131,7 +131,7 @@ func (b *ReplicationControllerApplyConfiguration) WithNamespace(value string) *R // If called multiple times, the UID field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithUID(value types.UID) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -140,7 +140,7 @@ func (b *ReplicationControllerApplyConfiguration) WithUID(value types.UID) *Repl // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithResourceVersion(value string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -149,25 +149,25 @@ func (b *ReplicationControllerApplyConfiguration) WithResourceVersion(value stri // If called multiple times, the Generation field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithGeneration(value int64) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ReplicationControllerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ReplicationControllerApplyConfiguration { +func (b *ReplicationControllerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ReplicationControllerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ReplicationControllerApplyConfiguration { +func (b *ReplicationControllerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -176,7 +176,7 @@ func (b *ReplicationControllerApplyConfiguration) WithDeletionTimestamp(value me // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ReplicationControllerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -186,11 +186,11 @@ func (b *ReplicationControllerApplyConfiguration) WithDeletionGracePeriodSeconds // overwriting an existing map entries in Labels field with the same key. func (b *ReplicationControllerApplyConfiguration) WithLabels(entries map[string]string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -201,11 +201,11 @@ func (b *ReplicationControllerApplyConfiguration) WithLabels(entries map[string] // overwriting an existing map entries in Annotations field with the same key. func (b *ReplicationControllerApplyConfiguration) WithAnnotations(entries map[string]string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -213,13 +213,13 @@ func (b *ReplicationControllerApplyConfiguration) WithAnnotations(entries map[st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ReplicationControllerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ReplicationControllerApplyConfiguration { +func (b *ReplicationControllerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -230,14 +230,14 @@ func (b *ReplicationControllerApplyConfiguration) WithOwnerReferences(values ... func (b *ReplicationControllerApplyConfiguration) WithFinalizers(values ...string) *ReplicationControllerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ReplicationControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -260,5 +260,5 @@ func (b *ReplicationControllerApplyConfiguration) WithStatus(value *ReplicationC // GetName retrieves the value of the Name field in the declarative configuration. func (b *ReplicationControllerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go index 0d74c1db9a..dfcecc0532 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontrollercondition.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ReplicationControllerConditionApplyConfiguration represents a declarative configuration of the ReplicationControllerCondition type for use // with apply. type ReplicationControllerConditionApplyConfiguration struct { - Type *v1.ReplicationControllerConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *corev1.ReplicationControllerConditionType `json:"type,omitempty"` + Status *corev1.ConditionStatus `json:"status,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ReplicationControllerConditionApplyConfiguration constructs a declarative configuration of the ReplicationControllerCondition type for use with @@ -42,7 +42,7 @@ func ReplicationControllerCondition() *ReplicationControllerConditionApplyConfig // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *ReplicationControllerConditionApplyConfiguration) WithType(value v1.ReplicationControllerConditionType) *ReplicationControllerConditionApplyConfiguration { +func (b *ReplicationControllerConditionApplyConfiguration) WithType(value corev1.ReplicationControllerConditionType) *ReplicationControllerConditionApplyConfiguration { b.Type = &value return b } @@ -50,7 +50,7 @@ func (b *ReplicationControllerConditionApplyConfiguration) WithType(value v1.Rep // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ReplicationControllerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ReplicationControllerConditionApplyConfiguration { +func (b *ReplicationControllerConditionApplyConfiguration) WithStatus(value corev1.ConditionStatus) *ReplicationControllerConditionApplyConfiguration { b.Status = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go index 5169cb4bc3..0338780b3e 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcehealth.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ResourceHealthApplyConfiguration represents a declarative configuration of the ResourceHealth type for use // with apply. type ResourceHealthApplyConfiguration struct { - ResourceID *v1.ResourceID `json:"resourceID,omitempty"` - Health *v1.ResourceHealthStatus `json:"health,omitempty"` + ResourceID *corev1.ResourceID `json:"resourceID,omitempty"` + Health *corev1.ResourceHealthStatus `json:"health,omitempty"` } // ResourceHealthApplyConfiguration constructs a declarative configuration of the ResourceHealth type for use with @@ -38,7 +38,7 @@ func ResourceHealth() *ResourceHealthApplyConfiguration { // WithResourceID sets the ResourceID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ResourceID field is set to the value of the last call. -func (b *ResourceHealthApplyConfiguration) WithResourceID(value v1.ResourceID) *ResourceHealthApplyConfiguration { +func (b *ResourceHealthApplyConfiguration) WithResourceID(value corev1.ResourceID) *ResourceHealthApplyConfiguration { b.ResourceID = &value return b } @@ -46,7 +46,7 @@ func (b *ResourceHealthApplyConfiguration) WithResourceID(value v1.ResourceID) * // WithHealth sets the Health field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Health field is set to the value of the last call. -func (b *ResourceHealthApplyConfiguration) WithHealth(value v1.ResourceHealthStatus) *ResourceHealthApplyConfiguration { +func (b *ResourceHealthApplyConfiguration) WithHealth(value corev1.ResourceHealthStatus) *ResourceHealthApplyConfiguration { b.Health = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go index 2b78ba7038..cd67f104c9 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ResourceQuotaApplyConfiguration represents a declarative configuration of the ResourceQuota type for use // with apply. type ResourceQuotaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ResourceQuotaSpecApplyConfiguration `json:"spec,omitempty"` - Status *ResourceQuotaStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ResourceQuotaSpecApplyConfiguration `json:"spec,omitempty"` + Status *ResourceQuotaStatusApplyConfiguration `json:"status,omitempty"` } // ResourceQuota constructs a declarative configuration of the ResourceQuota type for use with @@ -58,18 +58,18 @@ func ResourceQuota(name, namespace string) *ResourceQuotaApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceQuota(resourceQuota *apicorev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) { +func ExtractResourceQuota(resourceQuota *corev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) { return extractResourceQuota(resourceQuota, fieldManager, "") } // ExtractResourceQuotaStatus is the same as ExtractResourceQuota except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceQuotaStatus(resourceQuota *apicorev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) { +func ExtractResourceQuotaStatus(resourceQuota *corev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) { return extractResourceQuota(resourceQuota, fieldManager, "status") } -func extractResourceQuota(resourceQuota *apicorev1.ResourceQuota, fieldManager string, subresource string) (*ResourceQuotaApplyConfiguration, error) { +func extractResourceQuota(resourceQuota *corev1.ResourceQuota, fieldManager string, subresource string) (*ResourceQuotaApplyConfiguration, error) { b := &ResourceQuotaApplyConfiguration{} err := managedfields.ExtractInto(resourceQuota, internal.Parser().Type("io.k8s.api.core.v1.ResourceQuota"), fieldManager, b, subresource) if err != nil { @@ -87,7 +87,7 @@ func extractResourceQuota(resourceQuota *apicorev1.ResourceQuota, fieldManager s // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithKind(value string) *ResourceQuotaApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -95,7 +95,7 @@ func (b *ResourceQuotaApplyConfiguration) WithKind(value string) *ResourceQuotaA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithAPIVersion(value string) *ResourceQuotaApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -104,7 +104,7 @@ func (b *ResourceQuotaApplyConfiguration) WithAPIVersion(value string) *Resource // If called multiple times, the Name field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithName(value string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -113,7 +113,7 @@ func (b *ResourceQuotaApplyConfiguration) WithName(value string) *ResourceQuotaA // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithGenerateName(value string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -122,7 +122,7 @@ func (b *ResourceQuotaApplyConfiguration) WithGenerateName(value string) *Resour // If called multiple times, the Namespace field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithNamespace(value string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -131,7 +131,7 @@ func (b *ResourceQuotaApplyConfiguration) WithNamespace(value string) *ResourceQ // If called multiple times, the UID field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithUID(value types.UID) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -140,7 +140,7 @@ func (b *ResourceQuotaApplyConfiguration) WithUID(value types.UID) *ResourceQuot // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithResourceVersion(value string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -149,25 +149,25 @@ func (b *ResourceQuotaApplyConfiguration) WithResourceVersion(value string) *Res // If called multiple times, the Generation field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithGeneration(value int64) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ResourceQuotaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceQuotaApplyConfiguration { +func (b *ResourceQuotaApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ResourceQuotaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceQuotaApplyConfiguration { +func (b *ResourceQuotaApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -176,7 +176,7 @@ func (b *ResourceQuotaApplyConfiguration) WithDeletionTimestamp(value metav1.Tim // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ResourceQuotaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -186,11 +186,11 @@ func (b *ResourceQuotaApplyConfiguration) WithDeletionGracePeriodSeconds(value i // overwriting an existing map entries in Labels field with the same key. func (b *ResourceQuotaApplyConfiguration) WithLabels(entries map[string]string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -201,11 +201,11 @@ func (b *ResourceQuotaApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ResourceQuotaApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -213,13 +213,13 @@ func (b *ResourceQuotaApplyConfiguration) WithAnnotations(entries map[string]str // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ResourceQuotaApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceQuotaApplyConfiguration { +func (b *ResourceQuotaApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -230,14 +230,14 @@ func (b *ResourceQuotaApplyConfiguration) WithOwnerReferences(values ...*v1.Owne func (b *ResourceQuotaApplyConfiguration) WithFinalizers(values ...string) *ResourceQuotaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ResourceQuotaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -260,5 +260,5 @@ func (b *ResourceQuotaApplyConfiguration) WithStatus(value *ResourceQuotaStatusA // GetName retrieves the value of the Name field in the declarative configuration. func (b *ResourceQuotaApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go index 0012ace25f..36d342fcdd 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotaspec.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ResourceQuotaSpecApplyConfiguration represents a declarative configuration of the ResourceQuotaSpec type for use // with apply. type ResourceQuotaSpecApplyConfiguration struct { - Hard *v1.ResourceList `json:"hard,omitempty"` - Scopes []v1.ResourceQuotaScope `json:"scopes,omitempty"` + Hard *corev1.ResourceList `json:"hard,omitempty"` + Scopes []corev1.ResourceQuotaScope `json:"scopes,omitempty"` ScopeSelector *ScopeSelectorApplyConfiguration `json:"scopeSelector,omitempty"` } @@ -39,7 +39,7 @@ func ResourceQuotaSpec() *ResourceQuotaSpecApplyConfiguration { // WithHard sets the Hard field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Hard field is set to the value of the last call. -func (b *ResourceQuotaSpecApplyConfiguration) WithHard(value v1.ResourceList) *ResourceQuotaSpecApplyConfiguration { +func (b *ResourceQuotaSpecApplyConfiguration) WithHard(value corev1.ResourceList) *ResourceQuotaSpecApplyConfiguration { b.Hard = &value return b } @@ -47,7 +47,7 @@ func (b *ResourceQuotaSpecApplyConfiguration) WithHard(value v1.ResourceList) *R // WithScopes adds the given value to the Scopes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *ResourceQuotaSpecApplyConfiguration) WithScopes(values ...v1.ResourceQuotaScope) *ResourceQuotaSpecApplyConfiguration { +func (b *ResourceQuotaSpecApplyConfiguration) WithScopes(values ...corev1.ResourceQuotaScope) *ResourceQuotaSpecApplyConfiguration { for i := range values { b.Scopes = append(b.Scopes, values[i]) } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go index 364b96eecf..6338a13082 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequotastatus.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ResourceQuotaStatusApplyConfiguration represents a declarative configuration of the ResourceQuotaStatus type for use // with apply. type ResourceQuotaStatusApplyConfiguration struct { - Hard *v1.ResourceList `json:"hard,omitempty"` - Used *v1.ResourceList `json:"used,omitempty"` + Hard *corev1.ResourceList `json:"hard,omitempty"` + Used *corev1.ResourceList `json:"used,omitempty"` } // ResourceQuotaStatusApplyConfiguration constructs a declarative configuration of the ResourceQuotaStatus type for use with @@ -38,7 +38,7 @@ func ResourceQuotaStatus() *ResourceQuotaStatusApplyConfiguration { // WithHard sets the Hard field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Hard field is set to the value of the last call. -func (b *ResourceQuotaStatusApplyConfiguration) WithHard(value v1.ResourceList) *ResourceQuotaStatusApplyConfiguration { +func (b *ResourceQuotaStatusApplyConfiguration) WithHard(value corev1.ResourceList) *ResourceQuotaStatusApplyConfiguration { b.Hard = &value return b } @@ -46,7 +46,7 @@ func (b *ResourceQuotaStatusApplyConfiguration) WithHard(value v1.ResourceList) // WithUsed sets the Used field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Used field is set to the value of the last call. -func (b *ResourceQuotaStatusApplyConfiguration) WithUsed(value v1.ResourceList) *ResourceQuotaStatusApplyConfiguration { +func (b *ResourceQuotaStatusApplyConfiguration) WithUsed(value corev1.ResourceList) *ResourceQuotaStatusApplyConfiguration { b.Used = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go index 51197862c9..ea77647a91 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcerequirements.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ResourceRequirementsApplyConfiguration represents a declarative configuration of the ResourceRequirements type for use // with apply. type ResourceRequirementsApplyConfiguration struct { - Limits *v1.ResourceList `json:"limits,omitempty"` - Requests *v1.ResourceList `json:"requests,omitempty"` + Limits *corev1.ResourceList `json:"limits,omitempty"` + Requests *corev1.ResourceList `json:"requests,omitempty"` Claims []ResourceClaimApplyConfiguration `json:"claims,omitempty"` } @@ -39,7 +39,7 @@ func ResourceRequirements() *ResourceRequirementsApplyConfiguration { // WithLimits sets the Limits field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Limits field is set to the value of the last call. -func (b *ResourceRequirementsApplyConfiguration) WithLimits(value v1.ResourceList) *ResourceRequirementsApplyConfiguration { +func (b *ResourceRequirementsApplyConfiguration) WithLimits(value corev1.ResourceList) *ResourceRequirementsApplyConfiguration { b.Limits = &value return b } @@ -47,7 +47,7 @@ func (b *ResourceRequirementsApplyConfiguration) WithLimits(value v1.ResourceLis // WithRequests sets the Requests field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Requests field is set to the value of the last call. -func (b *ResourceRequirementsApplyConfiguration) WithRequests(value v1.ResourceList) *ResourceRequirementsApplyConfiguration { +func (b *ResourceRequirementsApplyConfiguration) WithRequests(value corev1.ResourceList) *ResourceRequirementsApplyConfiguration { b.Requests = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go index 1e63c87f8c..e995866598 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcestatus.go @@ -19,13 +19,13 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ResourceStatusApplyConfiguration represents a declarative configuration of the ResourceStatus type for use // with apply. type ResourceStatusApplyConfiguration struct { - Name *v1.ResourceName `json:"name,omitempty"` + Name *corev1.ResourceName `json:"name,omitempty"` Resources []ResourceHealthApplyConfiguration `json:"resources,omitempty"` } @@ -38,7 +38,7 @@ func ResourceStatus() *ResourceStatusApplyConfiguration { // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *ResourceStatusApplyConfiguration) WithName(value v1.ResourceName) *ResourceStatusApplyConfiguration { +func (b *ResourceStatusApplyConfiguration) WithName(value corev1.ResourceName) *ResourceStatusApplyConfiguration { b.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go index c6ec87827f..c2481f4906 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/scopedresourceselectorrequirement.go @@ -19,15 +19,15 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // ScopedResourceSelectorRequirementApplyConfiguration represents a declarative configuration of the ScopedResourceSelectorRequirement type for use // with apply. type ScopedResourceSelectorRequirementApplyConfiguration struct { - ScopeName *v1.ResourceQuotaScope `json:"scopeName,omitempty"` - Operator *v1.ScopeSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` + ScopeName *corev1.ResourceQuotaScope `json:"scopeName,omitempty"` + Operator *corev1.ScopeSelectorOperator `json:"operator,omitempty"` + Values []string `json:"values,omitempty"` } // ScopedResourceSelectorRequirementApplyConfiguration constructs a declarative configuration of the ScopedResourceSelectorRequirement type for use with @@ -39,7 +39,7 @@ func ScopedResourceSelectorRequirement() *ScopedResourceSelectorRequirementApply // WithScopeName sets the ScopeName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ScopeName field is set to the value of the last call. -func (b *ScopedResourceSelectorRequirementApplyConfiguration) WithScopeName(value v1.ResourceQuotaScope) *ScopedResourceSelectorRequirementApplyConfiguration { +func (b *ScopedResourceSelectorRequirementApplyConfiguration) WithScopeName(value corev1.ResourceQuotaScope) *ScopedResourceSelectorRequirementApplyConfiguration { b.ScopeName = &value return b } @@ -47,7 +47,7 @@ func (b *ScopedResourceSelectorRequirementApplyConfiguration) WithScopeName(valu // WithOperator sets the Operator field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Operator field is set to the value of the last call. -func (b *ScopedResourceSelectorRequirementApplyConfiguration) WithOperator(value v1.ScopeSelectorOperator) *ScopedResourceSelectorRequirementApplyConfiguration { +func (b *ScopedResourceSelectorRequirementApplyConfiguration) WithOperator(value corev1.ScopeSelectorOperator) *ScopedResourceSelectorRequirementApplyConfiguration { b.Operator = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go index eb3077a051..754bfd1b3e 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/seccompprofile.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // SeccompProfileApplyConfiguration represents a declarative configuration of the SeccompProfile type for use // with apply. type SeccompProfileApplyConfiguration struct { - Type *v1.SeccompProfileType `json:"type,omitempty"` - LocalhostProfile *string `json:"localhostProfile,omitempty"` + Type *corev1.SeccompProfileType `json:"type,omitempty"` + LocalhostProfile *string `json:"localhostProfile,omitempty"` } // SeccompProfileApplyConfiguration constructs a declarative configuration of the SeccompProfile type for use with @@ -38,7 +38,7 @@ func SeccompProfile() *SeccompProfileApplyConfiguration { // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. -func (b *SeccompProfileApplyConfiguration) WithType(value v1.SeccompProfileType) *SeccompProfileApplyConfiguration { +func (b *SeccompProfileApplyConfiguration) WithType(value corev1.SeccompProfileType) *SeccompProfileApplyConfiguration { b.Type = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go index 1d850b00bb..9c8532d20c 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go @@ -20,22 +20,22 @@ package v1 import ( corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // SecretApplyConfiguration represents a declarative configuration of the Secret type for use // with apply. type SecretApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Immutable *bool `json:"immutable,omitempty"` - Data map[string][]byte `json:"data,omitempty"` - StringData map[string]string `json:"stringData,omitempty"` - Type *corev1.SecretType `json:"type,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Immutable *bool `json:"immutable,omitempty"` + Data map[string][]byte `json:"data,omitempty"` + StringData map[string]string `json:"stringData,omitempty"` + Type *corev1.SecretType `json:"type,omitempty"` } // Secret constructs a declarative configuration of the Secret type for use with @@ -89,7 +89,7 @@ func extractSecret(secret *corev1.Secret, fieldManager string, subresource strin // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *SecretApplyConfiguration) WithKind(value string) *SecretApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -97,7 +97,7 @@ func (b *SecretApplyConfiguration) WithKind(value string) *SecretApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *SecretApplyConfiguration) WithAPIVersion(value string) *SecretApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -106,7 +106,7 @@ func (b *SecretApplyConfiguration) WithAPIVersion(value string) *SecretApplyConf // If called multiple times, the Name field is set to the value of the last call. func (b *SecretApplyConfiguration) WithName(value string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -115,7 +115,7 @@ func (b *SecretApplyConfiguration) WithName(value string) *SecretApplyConfigurat // If called multiple times, the GenerateName field is set to the value of the last call. func (b *SecretApplyConfiguration) WithGenerateName(value string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -124,7 +124,7 @@ func (b *SecretApplyConfiguration) WithGenerateName(value string) *SecretApplyCo // If called multiple times, the Namespace field is set to the value of the last call. func (b *SecretApplyConfiguration) WithNamespace(value string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -133,7 +133,7 @@ func (b *SecretApplyConfiguration) WithNamespace(value string) *SecretApplyConfi // If called multiple times, the UID field is set to the value of the last call. func (b *SecretApplyConfiguration) WithUID(value types.UID) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -142,7 +142,7 @@ func (b *SecretApplyConfiguration) WithUID(value types.UID) *SecretApplyConfigur // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *SecretApplyConfiguration) WithResourceVersion(value string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -151,25 +151,25 @@ func (b *SecretApplyConfiguration) WithResourceVersion(value string) *SecretAppl // If called multiple times, the Generation field is set to the value of the last call. func (b *SecretApplyConfiguration) WithGeneration(value int64) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *SecretApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SecretApplyConfiguration { +func (b *SecretApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *SecretApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SecretApplyConfiguration { +func (b *SecretApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -178,7 +178,7 @@ func (b *SecretApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Sec // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *SecretApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -188,11 +188,11 @@ func (b *SecretApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) * // overwriting an existing map entries in Labels field with the same key. func (b *SecretApplyConfiguration) WithLabels(entries map[string]string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -203,11 +203,11 @@ func (b *SecretApplyConfiguration) WithLabels(entries map[string]string) *Secret // overwriting an existing map entries in Annotations field with the same key. func (b *SecretApplyConfiguration) WithAnnotations(entries map[string]string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -215,13 +215,13 @@ func (b *SecretApplyConfiguration) WithAnnotations(entries map[string]string) *S // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *SecretApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SecretApplyConfiguration { +func (b *SecretApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -232,14 +232,14 @@ func (b *SecretApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefere func (b *SecretApplyConfiguration) WithFinalizers(values ...string) *SecretApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *SecretApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -290,5 +290,5 @@ func (b *SecretApplyConfiguration) WithType(value corev1.SecretType) *SecretAppl // GetName retrieves the value of the Name field in the declarative configuration. func (b *SecretApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go index ba99b7f5fd..d3cc9f6a62 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretenvsource.go @@ -35,7 +35,7 @@ func SecretEnvSource() *SecretEnvSourceApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *SecretEnvSourceApplyConfiguration) WithName(value string) *SecretEnvSourceApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go index 2d490b8108..f1cd8b2d31 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretkeyselector.go @@ -36,7 +36,7 @@ func SecretKeySelector() *SecretKeySelectorApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *SecretKeySelectorApplyConfiguration) WithName(value string) *SecretKeySelectorApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go index 65ce3c66da..99fa36ecc0 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/secretprojection.go @@ -36,7 +36,7 @@ func SecretProjection() *SecretProjectionApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *SecretProjectionApplyConfiguration) WithName(value string) *SecretProjectionApplyConfiguration { - b.Name = &value + b.LocalObjectReferenceApplyConfiguration.Name = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go index 2dac0589d2..85f6b25a91 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go @@ -19,21 +19,21 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ServiceApplyConfiguration represents a declarative configuration of the Service type for use // with apply. type ServiceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceStatusApplyConfiguration `json:"status,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ServiceSpecApplyConfiguration `json:"spec,omitempty"` + Status *ServiceStatusApplyConfiguration `json:"status,omitempty"` } // Service constructs a declarative configuration of the Service type for use with @@ -58,18 +58,18 @@ func Service(name, namespace string) *ServiceApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractService(service *apicorev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) { +func ExtractService(service *corev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) { return extractService(service, fieldManager, "") } // ExtractServiceStatus is the same as ExtractService except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractServiceStatus(service *apicorev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) { +func ExtractServiceStatus(service *corev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) { return extractService(service, fieldManager, "status") } -func extractService(service *apicorev1.Service, fieldManager string, subresource string) (*ServiceApplyConfiguration, error) { +func extractService(service *corev1.Service, fieldManager string, subresource string) (*ServiceApplyConfiguration, error) { b := &ServiceApplyConfiguration{} err := managedfields.ExtractInto(service, internal.Parser().Type("io.k8s.api.core.v1.Service"), fieldManager, b, subresource) if err != nil { @@ -87,7 +87,7 @@ func extractService(service *apicorev1.Service, fieldManager string, subresource // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithKind(value string) *ServiceApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -95,7 +95,7 @@ func (b *ServiceApplyConfiguration) WithKind(value string) *ServiceApplyConfigur // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithAPIVersion(value string) *ServiceApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -104,7 +104,7 @@ func (b *ServiceApplyConfiguration) WithAPIVersion(value string) *ServiceApplyCo // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithName(value string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -113,7 +113,7 @@ func (b *ServiceApplyConfiguration) WithName(value string) *ServiceApplyConfigur // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithGenerateName(value string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -122,7 +122,7 @@ func (b *ServiceApplyConfiguration) WithGenerateName(value string) *ServiceApply // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithNamespace(value string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -131,7 +131,7 @@ func (b *ServiceApplyConfiguration) WithNamespace(value string) *ServiceApplyCon // If called multiple times, the UID field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithUID(value types.UID) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -140,7 +140,7 @@ func (b *ServiceApplyConfiguration) WithUID(value types.UID) *ServiceApplyConfig // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithResourceVersion(value string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -149,25 +149,25 @@ func (b *ServiceApplyConfiguration) WithResourceVersion(value string) *ServiceAp // If called multiple times, the Generation field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithGeneration(value int64) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceApplyConfiguration { +func (b *ServiceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceApplyConfiguration { +func (b *ServiceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -176,7 +176,7 @@ func (b *ServiceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Se // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ServiceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -186,11 +186,11 @@ func (b *ServiceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) // overwriting an existing map entries in Labels field with the same key. func (b *ServiceApplyConfiguration) WithLabels(entries map[string]string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -201,11 +201,11 @@ func (b *ServiceApplyConfiguration) WithLabels(entries map[string]string) *Servi // overwriting an existing map entries in Annotations field with the same key. func (b *ServiceApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -213,13 +213,13 @@ func (b *ServiceApplyConfiguration) WithAnnotations(entries map[string]string) * // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceApplyConfiguration { +func (b *ServiceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -230,14 +230,14 @@ func (b *ServiceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRefer func (b *ServiceApplyConfiguration) WithFinalizers(values ...string) *ServiceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ServiceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -260,5 +260,5 @@ func (b *ServiceApplyConfiguration) WithStatus(value *ServiceStatusApplyConfigur // GetName retrieves the value of the Name field in the declarative configuration. func (b *ServiceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go index 26d33deb95..0d80ded9e7 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go @@ -19,22 +19,22 @@ limitations under the License. package v1 import ( - apicorev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // ServiceAccountApplyConfiguration represents a declarative configuration of the ServiceAccount type for use // with apply. type ServiceAccountApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Secrets []ObjectReferenceApplyConfiguration `json:"secrets,omitempty"` - ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` - AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` + metav1.TypeMetaApplyConfiguration `json:",inline"` + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Secrets []ObjectReferenceApplyConfiguration `json:"secrets,omitempty"` + ImagePullSecrets []LocalObjectReferenceApplyConfiguration `json:"imagePullSecrets,omitempty"` + AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` } // ServiceAccount constructs a declarative configuration of the ServiceAccount type for use with @@ -59,18 +59,18 @@ func ServiceAccount(name, namespace string) *ServiceAccountApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractServiceAccount(serviceAccount *apicorev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { +func ExtractServiceAccount(serviceAccount *corev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { return extractServiceAccount(serviceAccount, fieldManager, "") } // ExtractServiceAccountStatus is the same as ExtractServiceAccount except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractServiceAccountStatus(serviceAccount *apicorev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { +func ExtractServiceAccountStatus(serviceAccount *corev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) { return extractServiceAccount(serviceAccount, fieldManager, "status") } -func extractServiceAccount(serviceAccount *apicorev1.ServiceAccount, fieldManager string, subresource string) (*ServiceAccountApplyConfiguration, error) { +func extractServiceAccount(serviceAccount *corev1.ServiceAccount, fieldManager string, subresource string) (*ServiceAccountApplyConfiguration, error) { b := &ServiceAccountApplyConfiguration{} err := managedfields.ExtractInto(serviceAccount, internal.Parser().Type("io.k8s.api.core.v1.ServiceAccount"), fieldManager, b, subresource) if err != nil { @@ -88,7 +88,7 @@ func extractServiceAccount(serviceAccount *apicorev1.ServiceAccount, fieldManage // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithKind(value string) *ServiceAccountApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -96,7 +96,7 @@ func (b *ServiceAccountApplyConfiguration) WithKind(value string) *ServiceAccoun // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithAPIVersion(value string) *ServiceAccountApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -105,7 +105,7 @@ func (b *ServiceAccountApplyConfiguration) WithAPIVersion(value string) *Service // If called multiple times, the Name field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithName(value string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -114,7 +114,7 @@ func (b *ServiceAccountApplyConfiguration) WithName(value string) *ServiceAccoun // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithGenerateName(value string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -123,7 +123,7 @@ func (b *ServiceAccountApplyConfiguration) WithGenerateName(value string) *Servi // If called multiple times, the Namespace field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithNamespace(value string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -132,7 +132,7 @@ func (b *ServiceAccountApplyConfiguration) WithNamespace(value string) *ServiceA // If called multiple times, the UID field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithUID(value types.UID) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -141,7 +141,7 @@ func (b *ServiceAccountApplyConfiguration) WithUID(value types.UID) *ServiceAcco // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithResourceVersion(value string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -150,25 +150,25 @@ func (b *ServiceAccountApplyConfiguration) WithResourceVersion(value string) *Se // If called multiple times, the Generation field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithGeneration(value int64) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceAccountApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ServiceAccountApplyConfiguration { +func (b *ServiceAccountApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceAccountApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ServiceAccountApplyConfiguration { +func (b *ServiceAccountApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -177,7 +177,7 @@ func (b *ServiceAccountApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ServiceAccountApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -187,11 +187,11 @@ func (b *ServiceAccountApplyConfiguration) WithDeletionGracePeriodSeconds(value // overwriting an existing map entries in Labels field with the same key. func (b *ServiceAccountApplyConfiguration) WithLabels(entries map[string]string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -202,11 +202,11 @@ func (b *ServiceAccountApplyConfiguration) WithLabels(entries map[string]string) // overwriting an existing map entries in Annotations field with the same key. func (b *ServiceAccountApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -214,13 +214,13 @@ func (b *ServiceAccountApplyConfiguration) WithAnnotations(entries map[string]st // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceAccountApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ServiceAccountApplyConfiguration { +func (b *ServiceAccountApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -231,14 +231,14 @@ func (b *ServiceAccountApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ServiceAccountApplyConfiguration) WithFinalizers(values ...string) *ServiceAccountApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } func (b *ServiceAccountApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} } } @@ -279,5 +279,5 @@ func (b *ServiceAccountApplyConfiguration) WithAutomountServiceAccountToken(valu // GetName retrieves the value of the Name field in the declarative configuration. func (b *ServiceAccountApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go index e889f21345..4d5774d8d4 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceport.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" intstr "k8s.io/apimachinery/pkg/util/intstr" ) @@ -27,7 +27,7 @@ import ( // with apply. type ServicePortApplyConfiguration struct { Name *string `json:"name,omitempty"` - Protocol *v1.Protocol `json:"protocol,omitempty"` + Protocol *corev1.Protocol `json:"protocol,omitempty"` AppProtocol *string `json:"appProtocol,omitempty"` Port *int32 `json:"port,omitempty"` TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` @@ -51,7 +51,7 @@ func (b *ServicePortApplyConfiguration) WithName(value string) *ServicePortApply // WithProtocol sets the Protocol field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Protocol field is set to the value of the last call. -func (b *ServicePortApplyConfiguration) WithProtocol(value v1.Protocol) *ServicePortApplyConfiguration { +func (b *ServicePortApplyConfiguration) WithProtocol(value corev1.Protocol) *ServicePortApplyConfiguration { b.Protocol = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/taint.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/taint.go index a34fb05526..4b9e43051f 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/taint.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/taint.go @@ -19,17 +19,17 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // TaintApplyConfiguration represents a declarative configuration of the Taint type for use // with apply. type TaintApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Value *string `json:"value,omitempty"` - Effect *v1.TaintEffect `json:"effect,omitempty"` - TimeAdded *metav1.Time `json:"timeAdded,omitempty"` + Key *string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + Effect *corev1.TaintEffect `json:"effect,omitempty"` + TimeAdded *metav1.Time `json:"timeAdded,omitempty"` } // TaintApplyConfiguration constructs a declarative configuration of the Taint type for use with @@ -57,7 +57,7 @@ func (b *TaintApplyConfiguration) WithValue(value string) *TaintApplyConfigurati // WithEffect sets the Effect field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Effect field is set to the value of the last call. -func (b *TaintApplyConfiguration) WithEffect(value v1.TaintEffect) *TaintApplyConfiguration { +func (b *TaintApplyConfiguration) WithEffect(value corev1.TaintEffect) *TaintApplyConfiguration { b.Effect = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/toleration.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/toleration.go index 1bcc85b65f..a0a0aac003 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/toleration.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/toleration.go @@ -19,17 +19,17 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // TolerationApplyConfiguration represents a declarative configuration of the Toleration type for use // with apply. type TolerationApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Operator *v1.TolerationOperator `json:"operator,omitempty"` - Value *string `json:"value,omitempty"` - Effect *v1.TaintEffect `json:"effect,omitempty"` - TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"` + Key *string `json:"key,omitempty"` + Operator *corev1.TolerationOperator `json:"operator,omitempty"` + Value *string `json:"value,omitempty"` + Effect *corev1.TaintEffect `json:"effect,omitempty"` + TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"` } // TolerationApplyConfiguration constructs a declarative configuration of the Toleration type for use with @@ -49,7 +49,7 @@ func (b *TolerationApplyConfiguration) WithKey(value string) *TolerationApplyCon // WithOperator sets the Operator field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Operator field is set to the value of the last call. -func (b *TolerationApplyConfiguration) WithOperator(value v1.TolerationOperator) *TolerationApplyConfiguration { +func (b *TolerationApplyConfiguration) WithOperator(value corev1.TolerationOperator) *TolerationApplyConfiguration { b.Operator = &value return b } @@ -65,7 +65,7 @@ func (b *TolerationApplyConfiguration) WithValue(value string) *TolerationApplyC // WithEffect sets the Effect field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Effect field is set to the value of the last call. -func (b *TolerationApplyConfiguration) WithEffect(value v1.TaintEffect) *TolerationApplyConfiguration { +func (b *TolerationApplyConfiguration) WithEffect(value corev1.TaintEffect) *TolerationApplyConfiguration { b.Effect = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go index b21d233513..ab814e8e09 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -28,11 +28,11 @@ import ( type TopologySpreadConstraintApplyConfiguration struct { MaxSkew *int32 `json:"maxSkew,omitempty"` TopologyKey *string `json:"topologyKey,omitempty"` - WhenUnsatisfiable *v1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"` + WhenUnsatisfiable *corev1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"` LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` MinDomains *int32 `json:"minDomains,omitempty"` - NodeAffinityPolicy *v1.NodeInclusionPolicy `json:"nodeAffinityPolicy,omitempty"` - NodeTaintsPolicy *v1.NodeInclusionPolicy `json:"nodeTaintsPolicy,omitempty"` + NodeAffinityPolicy *corev1.NodeInclusionPolicy `json:"nodeAffinityPolicy,omitempty"` + NodeTaintsPolicy *corev1.NodeInclusionPolicy `json:"nodeTaintsPolicy,omitempty"` MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` } @@ -61,7 +61,7 @@ func (b *TopologySpreadConstraintApplyConfiguration) WithTopologyKey(value strin // WithWhenUnsatisfiable sets the WhenUnsatisfiable field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the WhenUnsatisfiable field is set to the value of the last call. -func (b *TopologySpreadConstraintApplyConfiguration) WithWhenUnsatisfiable(value v1.UnsatisfiableConstraintAction) *TopologySpreadConstraintApplyConfiguration { +func (b *TopologySpreadConstraintApplyConfiguration) WithWhenUnsatisfiable(value corev1.UnsatisfiableConstraintAction) *TopologySpreadConstraintApplyConfiguration { b.WhenUnsatisfiable = &value return b } @@ -85,7 +85,7 @@ func (b *TopologySpreadConstraintApplyConfiguration) WithMinDomains(value int32) // WithNodeAffinityPolicy sets the NodeAffinityPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeAffinityPolicy field is set to the value of the last call. -func (b *TopologySpreadConstraintApplyConfiguration) WithNodeAffinityPolicy(value v1.NodeInclusionPolicy) *TopologySpreadConstraintApplyConfiguration { +func (b *TopologySpreadConstraintApplyConfiguration) WithNodeAffinityPolicy(value corev1.NodeInclusionPolicy) *TopologySpreadConstraintApplyConfiguration { b.NodeAffinityPolicy = &value return b } @@ -93,7 +93,7 @@ func (b *TopologySpreadConstraintApplyConfiguration) WithNodeAffinityPolicy(valu // WithNodeTaintsPolicy sets the NodeTaintsPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeTaintsPolicy field is set to the value of the last call. -func (b *TopologySpreadConstraintApplyConfiguration) WithNodeTaintsPolicy(value v1.NodeInclusionPolicy) *TopologySpreadConstraintApplyConfiguration { +func (b *TopologySpreadConstraintApplyConfiguration) WithNodeTaintsPolicy(value corev1.NodeInclusionPolicy) *TopologySpreadConstraintApplyConfiguration { b.NodeTaintsPolicy = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volume.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volume.go index 9a48f83497..e47cd031dd 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volume.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volume.go @@ -43,7 +43,7 @@ func (b *VolumeApplyConfiguration) WithName(value string) *VolumeApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the HostPath field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithHostPath(value *HostPathVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.HostPath = value + b.VolumeSourceApplyConfiguration.HostPath = value return b } @@ -51,7 +51,7 @@ func (b *VolumeApplyConfiguration) WithHostPath(value *HostPathVolumeSourceApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EmptyDir field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithEmptyDir(value *EmptyDirVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.EmptyDir = value + b.VolumeSourceApplyConfiguration.EmptyDir = value return b } @@ -59,7 +59,7 @@ func (b *VolumeApplyConfiguration) WithEmptyDir(value *EmptyDirVolumeSourceApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GCEPersistentDisk field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithGCEPersistentDisk(value *GCEPersistentDiskVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.GCEPersistentDisk = value + b.VolumeSourceApplyConfiguration.GCEPersistentDisk = value return b } @@ -67,7 +67,7 @@ func (b *VolumeApplyConfiguration) WithGCEPersistentDisk(value *GCEPersistentDis // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AWSElasticBlockStore field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithAWSElasticBlockStore(value *AWSElasticBlockStoreVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.AWSElasticBlockStore = value + b.VolumeSourceApplyConfiguration.AWSElasticBlockStore = value return b } @@ -75,7 +75,7 @@ func (b *VolumeApplyConfiguration) WithAWSElasticBlockStore(value *AWSElasticBlo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GitRepo field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithGitRepo(value *GitRepoVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.GitRepo = value + b.VolumeSourceApplyConfiguration.GitRepo = value return b } @@ -83,7 +83,7 @@ func (b *VolumeApplyConfiguration) WithGitRepo(value *GitRepoVolumeSourceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Secret field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithSecret(value *SecretVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Secret = value + b.VolumeSourceApplyConfiguration.Secret = value return b } @@ -91,7 +91,7 @@ func (b *VolumeApplyConfiguration) WithSecret(value *SecretVolumeSourceApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NFS field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithNFS(value *NFSVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.NFS = value + b.VolumeSourceApplyConfiguration.NFS = value return b } @@ -99,7 +99,7 @@ func (b *VolumeApplyConfiguration) WithNFS(value *NFSVolumeSourceApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ISCSI field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithISCSI(value *ISCSIVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.ISCSI = value + b.VolumeSourceApplyConfiguration.ISCSI = value return b } @@ -107,7 +107,7 @@ func (b *VolumeApplyConfiguration) WithISCSI(value *ISCSIVolumeSourceApplyConfig // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Glusterfs field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithGlusterfs(value *GlusterfsVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Glusterfs = value + b.VolumeSourceApplyConfiguration.Glusterfs = value return b } @@ -115,7 +115,7 @@ func (b *VolumeApplyConfiguration) WithGlusterfs(value *GlusterfsVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PersistentVolumeClaim field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithPersistentVolumeClaim(value *PersistentVolumeClaimVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.PersistentVolumeClaim = value + b.VolumeSourceApplyConfiguration.PersistentVolumeClaim = value return b } @@ -123,7 +123,7 @@ func (b *VolumeApplyConfiguration) WithPersistentVolumeClaim(value *PersistentVo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RBD field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithRBD(value *RBDVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.RBD = value + b.VolumeSourceApplyConfiguration.RBD = value return b } @@ -131,7 +131,7 @@ func (b *VolumeApplyConfiguration) WithRBD(value *RBDVolumeSourceApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FlexVolume field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithFlexVolume(value *FlexVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.FlexVolume = value + b.VolumeSourceApplyConfiguration.FlexVolume = value return b } @@ -139,7 +139,7 @@ func (b *VolumeApplyConfiguration) WithFlexVolume(value *FlexVolumeSourceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Cinder field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithCinder(value *CinderVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Cinder = value + b.VolumeSourceApplyConfiguration.Cinder = value return b } @@ -147,7 +147,7 @@ func (b *VolumeApplyConfiguration) WithCinder(value *CinderVolumeSourceApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CephFS field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithCephFS(value *CephFSVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.CephFS = value + b.VolumeSourceApplyConfiguration.CephFS = value return b } @@ -155,7 +155,7 @@ func (b *VolumeApplyConfiguration) WithCephFS(value *CephFSVolumeSourceApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Flocker field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithFlocker(value *FlockerVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Flocker = value + b.VolumeSourceApplyConfiguration.Flocker = value return b } @@ -163,7 +163,7 @@ func (b *VolumeApplyConfiguration) WithFlocker(value *FlockerVolumeSourceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DownwardAPI field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithDownwardAPI(value *DownwardAPIVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.DownwardAPI = value + b.VolumeSourceApplyConfiguration.DownwardAPI = value return b } @@ -171,7 +171,7 @@ func (b *VolumeApplyConfiguration) WithDownwardAPI(value *DownwardAPIVolumeSourc // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FC field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithFC(value *FCVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.FC = value + b.VolumeSourceApplyConfiguration.FC = value return b } @@ -179,7 +179,7 @@ func (b *VolumeApplyConfiguration) WithFC(value *FCVolumeSourceApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AzureFile field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithAzureFile(value *AzureFileVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.AzureFile = value + b.VolumeSourceApplyConfiguration.AzureFile = value return b } @@ -187,7 +187,7 @@ func (b *VolumeApplyConfiguration) WithAzureFile(value *AzureFileVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ConfigMap field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithConfigMap(value *ConfigMapVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.ConfigMap = value + b.VolumeSourceApplyConfiguration.ConfigMap = value return b } @@ -195,7 +195,7 @@ func (b *VolumeApplyConfiguration) WithConfigMap(value *ConfigMapVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the VsphereVolume field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithVsphereVolume(value *VsphereVirtualDiskVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.VsphereVolume = value + b.VolumeSourceApplyConfiguration.VsphereVolume = value return b } @@ -203,7 +203,7 @@ func (b *VolumeApplyConfiguration) WithVsphereVolume(value *VsphereVirtualDiskVo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Quobyte field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithQuobyte(value *QuobyteVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Quobyte = value + b.VolumeSourceApplyConfiguration.Quobyte = value return b } @@ -211,7 +211,7 @@ func (b *VolumeApplyConfiguration) WithQuobyte(value *QuobyteVolumeSourceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the AzureDisk field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithAzureDisk(value *AzureDiskVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.AzureDisk = value + b.VolumeSourceApplyConfiguration.AzureDisk = value return b } @@ -219,7 +219,7 @@ func (b *VolumeApplyConfiguration) WithAzureDisk(value *AzureDiskVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PhotonPersistentDisk field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithPhotonPersistentDisk(value *PhotonPersistentDiskVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.PhotonPersistentDisk = value + b.VolumeSourceApplyConfiguration.PhotonPersistentDisk = value return b } @@ -227,7 +227,7 @@ func (b *VolumeApplyConfiguration) WithPhotonPersistentDisk(value *PhotonPersist // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Projected field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithProjected(value *ProjectedVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Projected = value + b.VolumeSourceApplyConfiguration.Projected = value return b } @@ -235,7 +235,7 @@ func (b *VolumeApplyConfiguration) WithProjected(value *ProjectedVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PortworxVolume field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithPortworxVolume(value *PortworxVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.PortworxVolume = value + b.VolumeSourceApplyConfiguration.PortworxVolume = value return b } @@ -243,7 +243,7 @@ func (b *VolumeApplyConfiguration) WithPortworxVolume(value *PortworxVolumeSourc // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ScaleIO field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithScaleIO(value *ScaleIOVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.ScaleIO = value + b.VolumeSourceApplyConfiguration.ScaleIO = value return b } @@ -251,7 +251,7 @@ func (b *VolumeApplyConfiguration) WithScaleIO(value *ScaleIOVolumeSourceApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StorageOS field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithStorageOS(value *StorageOSVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.StorageOS = value + b.VolumeSourceApplyConfiguration.StorageOS = value return b } @@ -259,7 +259,7 @@ func (b *VolumeApplyConfiguration) WithStorageOS(value *StorageOSVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CSI field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithCSI(value *CSIVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.CSI = value + b.VolumeSourceApplyConfiguration.CSI = value return b } @@ -267,7 +267,7 @@ func (b *VolumeApplyConfiguration) WithCSI(value *CSIVolumeSourceApplyConfigurat // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Ephemeral field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithEphemeral(value *EphemeralVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Ephemeral = value + b.VolumeSourceApplyConfiguration.Ephemeral = value return b } @@ -275,6 +275,6 @@ func (b *VolumeApplyConfiguration) WithEphemeral(value *EphemeralVolumeSourceApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Image field is set to the value of the last call. func (b *VolumeApplyConfiguration) WithImage(value *ImageVolumeSourceApplyConfiguration) *VolumeApplyConfiguration { - b.Image = value + b.VolumeSourceApplyConfiguration.Image = value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go index 49f22cc4e7..ccd426a0cf 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemount.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // VolumeMountApplyConfiguration represents a declarative configuration of the VolumeMount type for use // with apply. type VolumeMountApplyConfiguration struct { - Name *string `json:"name,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - SubPath *string `json:"subPath,omitempty"` - MountPropagation *v1.MountPropagationMode `json:"mountPropagation,omitempty"` - SubPathExpr *string `json:"subPathExpr,omitempty"` + Name *string `json:"name,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + RecursiveReadOnly *corev1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + SubPath *string `json:"subPath,omitempty"` + MountPropagation *corev1.MountPropagationMode `json:"mountPropagation,omitempty"` + SubPathExpr *string `json:"subPathExpr,omitempty"` } // VolumeMountApplyConfiguration constructs a declarative configuration of the VolumeMount type for use with @@ -59,7 +59,7 @@ func (b *VolumeMountApplyConfiguration) WithReadOnly(value bool) *VolumeMountApp // WithRecursiveReadOnly sets the RecursiveReadOnly field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RecursiveReadOnly field is set to the value of the last call. -func (b *VolumeMountApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountApplyConfiguration { +func (b *VolumeMountApplyConfiguration) WithRecursiveReadOnly(value corev1.RecursiveReadOnlyMode) *VolumeMountApplyConfiguration { b.RecursiveReadOnly = &value return b } @@ -83,7 +83,7 @@ func (b *VolumeMountApplyConfiguration) WithSubPath(value string) *VolumeMountAp // WithMountPropagation sets the MountPropagation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MountPropagation field is set to the value of the last call. -func (b *VolumeMountApplyConfiguration) WithMountPropagation(value v1.MountPropagationMode) *VolumeMountApplyConfiguration { +func (b *VolumeMountApplyConfiguration) WithMountPropagation(value corev1.MountPropagationMode) *VolumeMountApplyConfiguration { b.MountPropagation = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go index a0a9b5401c..f55c407235 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumemountstatus.go @@ -19,16 +19,16 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // VolumeMountStatusApplyConfiguration represents a declarative configuration of the VolumeMountStatus type for use // with apply. type VolumeMountStatusApplyConfiguration struct { - Name *string `json:"name,omitempty"` - MountPath *string `json:"mountPath,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - RecursiveReadOnly *v1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` + Name *string `json:"name,omitempty"` + MountPath *string `json:"mountPath,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty"` + RecursiveReadOnly *corev1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` } // VolumeMountStatusApplyConfiguration constructs a declarative configuration of the VolumeMountStatus type for use with @@ -64,7 +64,7 @@ func (b *VolumeMountStatusApplyConfiguration) WithReadOnly(value bool) *VolumeMo // WithRecursiveReadOnly sets the RecursiveReadOnly field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RecursiveReadOnly field is set to the value of the last call. -func (b *VolumeMountStatusApplyConfiguration) WithRecursiveReadOnly(value v1.RecursiveReadOnlyMode) *VolumeMountStatusApplyConfiguration { +func (b *VolumeMountStatusApplyConfiguration) WithRecursiveReadOnly(value corev1.RecursiveReadOnlyMode) *VolumeMountStatusApplyConfiguration { b.RecursiveReadOnly = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go index ae849f7741..5c83ae6d45 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go +++ b/vendor/k8s.io/client-go/applyconfigurations/core/v1/volumeresourcerequirements.go @@ -19,14 +19,14 @@ limitations under the License. package v1 import ( - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" ) // VolumeResourceRequirementsApplyConfiguration represents a declarative configuration of the VolumeResourceRequirements type for use // with apply. type VolumeResourceRequirementsApplyConfiguration struct { - Limits *v1.ResourceList `json:"limits,omitempty"` - Requests *v1.ResourceList `json:"requests,omitempty"` + Limits *corev1.ResourceList `json:"limits,omitempty"` + Requests *corev1.ResourceList `json:"requests,omitempty"` } // VolumeResourceRequirementsApplyConfiguration constructs a declarative configuration of the VolumeResourceRequirements type for use with @@ -38,7 +38,7 @@ func VolumeResourceRequirements() *VolumeResourceRequirementsApplyConfiguration // WithLimits sets the Limits field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Limits field is set to the value of the last call. -func (b *VolumeResourceRequirementsApplyConfiguration) WithLimits(value v1.ResourceList) *VolumeResourceRequirementsApplyConfiguration { +func (b *VolumeResourceRequirementsApplyConfiguration) WithLimits(value corev1.ResourceList) *VolumeResourceRequirementsApplyConfiguration { b.Limits = &value return b } @@ -46,7 +46,7 @@ func (b *VolumeResourceRequirementsApplyConfiguration) WithLimits(value v1.Resou // WithRequests sets the Requests field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Requests field is set to the value of the last call. -func (b *VolumeResourceRequirementsApplyConfiguration) WithRequests(value v1.ResourceList) *VolumeResourceRequirementsApplyConfiguration { +func (b *VolumeResourceRequirementsApplyConfiguration) WithRequests(value corev1.ResourceList) *VolumeResourceRequirementsApplyConfiguration { b.Requests = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go b/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go index 43c9ae05a1..cd9fcd98b7 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -19,8 +19,8 @@ limitations under the License. package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) @@ -512,6 +512,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: url type: scalar: string +- name: io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration + map: + fields: + - name: expression + type: + scalar: string - name: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation map: fields: @@ -534,6 +540,12 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" +- name: io.k8s.api.admissionregistration.v1alpha1.JSONPatch + map: + fields: + - name: expression + type: + scalar: string - name: io.k8s.api.admissionregistration.v1alpha1.MatchCondition map: fields: @@ -570,6 +582,100 @@ var schemaYAML = typed.YAMLObject(`types: namedType: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations elementRelationship: atomic elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec + default: {} +- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec + default: {} +- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec + map: + fields: + - name: matchResources + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources + - name: paramRef + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.ParamRef + - name: policyName + type: + scalar: string +- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec + map: + fields: + - name: failurePolicy + type: + scalar: string + - name: matchConditions + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1alpha1.MatchCondition + elementRelationship: associative + keys: + - name + - name: matchConstraints + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources + - name: mutations + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1alpha1.Mutation + elementRelationship: atomic + - name: paramKind + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.ParamKind + - name: reinvocationPolicy + type: + scalar: string + - name: variables + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1alpha1.Variable + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1alpha1.Mutation + map: + fields: + - name: applyConfiguration + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration + - name: jsonPatch + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.JSONPatch + - name: patchType + type: + scalar: string + default: "" - name: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations map: fields: @@ -4365,7 +4471,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: strategy type: scalar: string -- name: io.k8s.api.coordination.v1alpha1.LeaseCandidate +- name: io.k8s.api.coordination.v1alpha2.LeaseCandidate map: fields: - name: apiVersion @@ -4380,14 +4486,15 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec + namedType: io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec default: {} -- name: io.k8s.api.coordination.v1alpha1.LeaseCandidateSpec +- name: io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec map: fields: - name: binaryVersion type: scalar: string + default: "" - name: emulationVersion type: scalar: string @@ -4398,15 +4505,12 @@ var schemaYAML = typed.YAMLObject(`types: - name: pingTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: preferredStrategies - type: - list: - elementType: - scalar: string - elementRelationship: atomic - name: renewTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime + - name: strategy + type: + scalar: string - name: io.k8s.api.coordination.v1beta1.Lease map: fields: @@ -6920,6 +7024,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: runAsUser type: scalar: numeric + - name: seLinuxChangePolicy + type: + scalar: string - name: seLinuxOptions type: namedType: io.k8s.api.core.v1.SELinuxOptions @@ -7060,6 +7167,9 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name + - name: resources + type: + namedType: io.k8s.api.core.v1.ResourceRequirements - name: restartPolicy type: scalar: string @@ -12244,12 +12354,38 @@ var schemaYAML = typed.YAMLObject(`types: - name: namespace type: scalar: string -- name: io.k8s.api.resource.v1alpha3.AllocationResult +- name: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus map: fields: - - name: controller + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: data + type: + namedType: __untyped_atomic_ + - name: device + type: + scalar: string + default: "" + - name: driver + type: + scalar: string + default: "" + - name: networkData + type: + namedType: io.k8s.api.resource.v1alpha3.NetworkDeviceData + - name: pool type: scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha3.AllocationResult + map: + fields: - name: devices type: namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationResult @@ -12404,9 +12540,6 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: io.k8s.api.resource.v1alpha3.DeviceSelector elementRelationship: atomic - - name: suitableNodes - type: - namedType: io.k8s.api.core.v1.NodeSelector - name: io.k8s.api.resource.v1alpha3.DeviceConstraint map: fields: @@ -12425,7 +12558,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: adminAccess type: scalar: boolean - default: false - name: allocationMode type: scalar: string @@ -12449,6 +12581,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult map: fields: + - name: adminAccess + type: + scalar: boolean - name: device type: scalar: string @@ -12471,60 +12606,31 @@ var schemaYAML = typed.YAMLObject(`types: - name: cel type: namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector -- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: parameters - type: - namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha3.PodSchedulingContext +- name: io.k8s.api.resource.v1alpha3.NetworkDeviceData map: fields: - - name: apiVersion + - name: hardwareAddress type: scalar: string - - name: kind + - name: interfaceName type: scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec - default: {} - - name: status - type: - namedType: io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus - default: {} -- name: io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec - map: - fields: - - name: potentialNodes + - name: ips type: list: elementType: scalar: string elementRelationship: atomic - - name: selectedNode - type: - scalar: string -- name: io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus +- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration map: fields: - - name: resourceClaims + - name: driver type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus - elementRelationship: associative - keys: - - name + scalar: string + default: "" + - name: parameters + type: + namedType: __untyped_atomic_ - name: io.k8s.api.resource.v1alpha3.ResourceClaim map: fields: @@ -12564,25 +12670,9 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: unsuitableNodes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec map: fields: - - name: controller - type: - scalar: string - name: devices type: namedType: io.k8s.api.resource.v1alpha3.DeviceClaim @@ -12593,9 +12683,16 @@ var schemaYAML = typed.YAMLObject(`types: - name: allocation type: namedType: io.k8s.api.resource.v1alpha3.AllocationResult - - name: deallocationRequested + - name: devices type: - scalar: boolean + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus + elementRelationship: associative + keys: + - driver + - device + - pool - name: reservedFor type: list: @@ -12690,49 +12787,488 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.resource.v1alpha3.ResourcePool default: {} -- name: io.k8s.api.scheduling.v1.PriorityClass +- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus map: fields: - - name: apiVersion + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: data + type: + namedType: __untyped_atomic_ + - name: device type: scalar: string - - name: description + default: "" + - name: driver type: scalar: string - - name: globalDefault + default: "" + - name: networkData type: - scalar: boolean - - name: kind + namedType: io.k8s.api.resource.v1beta1.NetworkDeviceData + - name: pool type: scalar: string - - name: metadata + default: "" +- name: io.k8s.api.resource.v1beta1.AllocationResult + map: + fields: + - name: devices type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + namedType: io.k8s.api.resource.v1beta1.DeviceAllocationResult default: {} - - name: preemptionPolicy - type: - scalar: string - - name: value + - name: nodeSelector type: - scalar: numeric - default: 0 -- name: io.k8s.api.scheduling.v1alpha1.PriorityClass + namedType: io.k8s.api.core.v1.NodeSelector +- name: io.k8s.api.resource.v1beta1.BasicDevice map: fields: - - name: apiVersion + - name: attributes type: - scalar: string - - name: description + map: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceAttribute + - name: capacity + type: + map: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceCapacity +- name: io.k8s.api.resource.v1beta1.CELDeviceSelector + map: + fields: + - name: expression type: scalar: string - - name: globalDefault + default: "" +- name: io.k8s.api.resource.v1beta1.Device + map: + fields: + - name: basic type: - scalar: boolean - - name: kind + namedType: io.k8s.api.resource.v1beta1.BasicDevice + - name: name type: scalar: string - - name: metadata - type: + default: "" +- name: io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration + map: + fields: + - name: opaque + type: + namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration + - name: requests + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: source + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1beta1.DeviceAllocationResult + map: + fields: + - name: config + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration + elementRelationship: atomic + - name: results + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.DeviceAttribute + map: + fields: + - name: bool + type: + scalar: boolean + - name: int + type: + scalar: numeric + - name: string + type: + scalar: string + - name: version + type: + scalar: string +- name: io.k8s.api.resource.v1beta1.DeviceCapacity + map: + fields: + - name: value + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.resource.v1beta1.DeviceClaim + map: + fields: + - name: config + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceClaimConfiguration + elementRelationship: atomic + - name: constraints + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceConstraint + elementRelationship: atomic + - name: requests + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceRequest + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.DeviceClaimConfiguration + map: + fields: + - name: opaque + type: + namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration + - name: requests + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.DeviceClass + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1beta1.DeviceClassSpec + default: {} +- name: io.k8s.api.resource.v1beta1.DeviceClassConfiguration + map: + fields: + - name: opaque + type: + namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration +- name: io.k8s.api.resource.v1beta1.DeviceClassSpec + map: + fields: + - name: config + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceClassConfiguration + elementRelationship: atomic + - name: selectors + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceSelector + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.DeviceConstraint + map: + fields: + - name: matchAttribute + type: + scalar: string + - name: requests + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.DeviceRequest + map: + fields: + - name: adminAccess + type: + scalar: boolean + - name: allocationMode + type: + scalar: string + - name: count + type: + scalar: numeric + - name: deviceClassName + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: selectors + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.DeviceSelector + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult + map: + fields: + - name: adminAccess + type: + scalar: boolean + - name: device + type: + scalar: string + default: "" + - name: driver + type: + scalar: string + default: "" + - name: pool + type: + scalar: string + default: "" + - name: request + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1beta1.DeviceSelector + map: + fields: + - name: cel + type: + namedType: io.k8s.api.resource.v1beta1.CELDeviceSelector +- name: io.k8s.api.resource.v1beta1.NetworkDeviceData + map: + fields: + - name: hardwareAddress + type: + scalar: string + - name: interfaceName + type: + scalar: string + - name: ips + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration + map: + fields: + - name: driver + type: + scalar: string + default: "" + - name: parameters + type: + namedType: __untyped_atomic_ +- name: io.k8s.api.resource.v1beta1.ResourceClaim + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1beta1.ResourceClaimSpec + default: {} + - name: status + type: + namedType: io.k8s.api.resource.v1beta1.ResourceClaimStatus + default: {} +- name: io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference + map: + fields: + - name: apiGroup + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: resource + type: + scalar: string + default: "" + - name: uid + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1beta1.ResourceClaimSpec + map: + fields: + - name: devices + type: + namedType: io.k8s.api.resource.v1beta1.DeviceClaim + default: {} +- name: io.k8s.api.resource.v1beta1.ResourceClaimStatus + map: + fields: + - name: allocation + type: + namedType: io.k8s.api.resource.v1beta1.AllocationResult + - name: devices + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus + elementRelationship: associative + keys: + - driver + - device + - pool + - name: reservedFor + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference + elementRelationship: associative + keys: + - uid +- name: io.k8s.api.resource.v1beta1.ResourceClaimTemplate + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec + default: {} +- name: io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec + map: + fields: + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1beta1.ResourceClaimSpec + default: {} +- name: io.k8s.api.resource.v1beta1.ResourcePool + map: + fields: + - name: generation + type: + scalar: numeric + default: 0 + - name: name + type: + scalar: string + default: "" + - name: resourceSliceCount + type: + scalar: numeric + default: 0 +- name: io.k8s.api.resource.v1beta1.ResourceSlice + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1beta1.ResourceSliceSpec + default: {} +- name: io.k8s.api.resource.v1beta1.ResourceSliceSpec + map: + fields: + - name: allNodes + type: + scalar: boolean + - name: devices + type: + list: + elementType: + namedType: io.k8s.api.resource.v1beta1.Device + elementRelationship: atomic + - name: driver + type: + scalar: string + default: "" + - name: nodeName + type: + scalar: string + - name: nodeSelector + type: + namedType: io.k8s.api.core.v1.NodeSelector + - name: pool + type: + namedType: io.k8s.api.resource.v1beta1.ResourcePool + default: {} +- name: io.k8s.api.scheduling.v1.PriorityClass + map: + fields: + - name: apiVersion + type: + scalar: string + - name: description + type: + scalar: string + - name: globalDefault + type: + scalar: boolean + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: preemptionPolicy + type: + scalar: string + - name: value + type: + scalar: numeric + default: 0 +- name: io.k8s.api.scheduling.v1alpha1.PriorityClass + map: + fields: + - name: apiVersion + type: + scalar: string + - name: description + type: + scalar: string + - name: globalDefault + type: + scalar: boolean + - name: kind + type: + scalar: string + - name: metadata + type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - name: preemptionPolicy @@ -13539,6 +14075,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: gracePeriodSeconds type: scalar: numeric + - name: ignoreStoreReadErrorWithClusterBreakingPotential + type: + scalar: boolean - name: kind type: scalar: string diff --git a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/condition.go b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/condition.go index 466aaebb61..69063df65b 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/condition.go +++ b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/condition.go @@ -19,18 +19,18 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ConditionApplyConfiguration represents a declarative configuration of the Condition type for use // with apply. type ConditionApplyConfiguration struct { - Type *string `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + Type *string `json:"type,omitempty"` + Status *metav1.ConditionStatus `json:"status,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // ConditionApplyConfiguration constructs a declarative configuration of the Condition type for use with @@ -50,7 +50,7 @@ func (b *ConditionApplyConfiguration) WithType(value string) *ConditionApplyConf // WithStatus sets the Status field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Status field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ConditionApplyConfiguration { +func (b *ConditionApplyConfiguration) WithStatus(value metav1.ConditionStatus) *ConditionApplyConfiguration { b.Status = &value return b } @@ -66,7 +66,7 @@ func (b *ConditionApplyConfiguration) WithObservedGeneration(value int64) *Condi // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *ConditionApplyConfiguration { +func (b *ConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ConditionApplyConfiguration { b.LastTransitionTime = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go index 313bb9784d..ab398ef563 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go +++ b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go @@ -25,12 +25,13 @@ import ( // DeleteOptionsApplyConfiguration represents a declarative configuration of the DeleteOptions type for use // with apply. type DeleteOptionsApplyConfiguration struct { - TypeMetaApplyConfiguration `json:",inline"` - GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` - Preconditions *PreconditionsApplyConfiguration `json:"preconditions,omitempty"` - OrphanDependents *bool `json:"orphanDependents,omitempty"` - PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"` - DryRun []string `json:"dryRun,omitempty"` + TypeMetaApplyConfiguration `json:",inline"` + GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` + Preconditions *PreconditionsApplyConfiguration `json:"preconditions,omitempty"` + OrphanDependents *bool `json:"orphanDependents,omitempty"` + PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"` + DryRun []string `json:"dryRun,omitempty"` + IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty"` } // DeleteOptionsApplyConfiguration constructs a declarative configuration of the DeleteOptions type for use with @@ -46,7 +47,7 @@ func DeleteOptions() *DeleteOptionsApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -54,7 +55,7 @@ func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsA // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *DeleteOptionsApplyConfiguration) WithAPIVersion(value string) *DeleteOptionsApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -99,3 +100,11 @@ func (b *DeleteOptionsApplyConfiguration) WithDryRun(values ...string) *DeleteOp } return b } + +// WithIgnoreStoreReadErrorWithClusterBreakingPotential sets the IgnoreStoreReadErrorWithClusterBreakingPotential field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IgnoreStoreReadErrorWithClusterBreakingPotential field is set to the value of the last call. +func (b *DeleteOptionsApplyConfiguration) WithIgnoreStoreReadErrorWithClusterBreakingPotential(value bool) *DeleteOptionsApplyConfiguration { + b.IgnoreStoreReadErrorWithClusterBreakingPotential = &value + return b +} diff --git a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go index bd9db9659b..c8b015c985 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go +++ b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/labelselectorrequirement.go @@ -19,15 +19,15 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // LabelSelectorRequirementApplyConfiguration represents a declarative configuration of the LabelSelectorRequirement type for use // with apply. type LabelSelectorRequirementApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Operator *v1.LabelSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` + Key *string `json:"key,omitempty"` + Operator *metav1.LabelSelectorOperator `json:"operator,omitempty"` + Values []string `json:"values,omitempty"` } // LabelSelectorRequirementApplyConfiguration constructs a declarative configuration of the LabelSelectorRequirement type for use with @@ -47,7 +47,7 @@ func (b *LabelSelectorRequirementApplyConfiguration) WithKey(value string) *Labe // WithOperator sets the Operator field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Operator field is set to the value of the last call. -func (b *LabelSelectorRequirementApplyConfiguration) WithOperator(value v1.LabelSelectorOperator) *LabelSelectorRequirementApplyConfiguration { +func (b *LabelSelectorRequirementApplyConfiguration) WithOperator(value metav1.LabelSelectorOperator) *LabelSelectorRequirementApplyConfiguration { b.Operator = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go index 6913df8226..7175537c3e 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go +++ b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/managedfieldsentry.go @@ -19,19 +19,19 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ManagedFieldsEntryApplyConfiguration represents a declarative configuration of the ManagedFieldsEntry type for use // with apply. type ManagedFieldsEntryApplyConfiguration struct { - Manager *string `json:"manager,omitempty"` - Operation *v1.ManagedFieldsOperationType `json:"operation,omitempty"` - APIVersion *string `json:"apiVersion,omitempty"` - Time *v1.Time `json:"time,omitempty"` - FieldsType *string `json:"fieldsType,omitempty"` - FieldsV1 *v1.FieldsV1 `json:"fieldsV1,omitempty"` - Subresource *string `json:"subresource,omitempty"` + Manager *string `json:"manager,omitempty"` + Operation *metav1.ManagedFieldsOperationType `json:"operation,omitempty"` + APIVersion *string `json:"apiVersion,omitempty"` + Time *metav1.Time `json:"time,omitempty"` + FieldsType *string `json:"fieldsType,omitempty"` + FieldsV1 *metav1.FieldsV1 `json:"fieldsV1,omitempty"` + Subresource *string `json:"subresource,omitempty"` } // ManagedFieldsEntryApplyConfiguration constructs a declarative configuration of the ManagedFieldsEntry type for use with @@ -51,7 +51,7 @@ func (b *ManagedFieldsEntryApplyConfiguration) WithManager(value string) *Manage // WithOperation sets the Operation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Operation field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithOperation(value v1.ManagedFieldsOperationType) *ManagedFieldsEntryApplyConfiguration { +func (b *ManagedFieldsEntryApplyConfiguration) WithOperation(value metav1.ManagedFieldsOperationType) *ManagedFieldsEntryApplyConfiguration { b.Operation = &value return b } @@ -67,7 +67,7 @@ func (b *ManagedFieldsEntryApplyConfiguration) WithAPIVersion(value string) *Man // WithTime sets the Time field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Time field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithTime(value v1.Time) *ManagedFieldsEntryApplyConfiguration { +func (b *ManagedFieldsEntryApplyConfiguration) WithTime(value metav1.Time) *ManagedFieldsEntryApplyConfiguration { b.Time = &value return b } @@ -83,7 +83,7 @@ func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsType(value string) *Man // WithFieldsV1 sets the FieldsV1 field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FieldsV1 field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsV1(value v1.FieldsV1) *ManagedFieldsEntryApplyConfiguration { +func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsV1(value metav1.FieldsV1) *ManagedFieldsEntryApplyConfiguration { b.FieldsV1 = &value return b } diff --git a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go index a9419975ef..9b98d2209b 100644 --- a/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go +++ b/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go @@ -19,7 +19,7 @@ limitations under the License. package v1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" ) @@ -32,8 +32,8 @@ type ObjectMetaApplyConfiguration struct { UID *types.UID `json:"uid,omitempty"` ResourceVersion *string `json:"resourceVersion,omitempty"` Generation *int64 `json:"generation,omitempty"` - CreationTimestamp *v1.Time `json:"creationTimestamp,omitempty"` - DeletionTimestamp *v1.Time `json:"deletionTimestamp,omitempty"` + CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"` + DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty"` DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` @@ -98,7 +98,7 @@ func (b *ObjectMetaApplyConfiguration) WithGeneration(value int64) *ObjectMetaAp // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithCreationTimestamp(value v1.Time) *ObjectMetaApplyConfiguration { +func (b *ObjectMetaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ObjectMetaApplyConfiguration { b.CreationTimestamp = &value return b } @@ -106,7 +106,7 @@ func (b *ObjectMetaApplyConfiguration) WithCreationTimestamp(value v1.Time) *Obj // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithDeletionTimestamp(value v1.Time) *ObjectMetaApplyConfiguration { +func (b *ObjectMetaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ObjectMetaApplyConfiguration { b.DeletionTimestamp = &value return b } diff --git a/vendor/k8s.io/client-go/features/features.go b/vendor/k8s.io/client-go/features/features.go index afb67f509e..5ccdcc55f6 100644 --- a/vendor/k8s.io/client-go/features/features.go +++ b/vendor/k8s.io/client-go/features/features.go @@ -18,9 +18,9 @@ package features import ( "errors" + "sync/atomic" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "sync/atomic" ) // NOTE: types Feature, FeatureSpec, prerelease (and its values) diff --git a/vendor/k8s.io/client-go/features/known_features.go b/vendor/k8s.io/client-go/features/known_features.go index 0c972a46fd..a74f6a8333 100644 --- a/vendor/k8s.io/client-go/features/known_features.go +++ b/vendor/k8s.io/client-go/features/known_features.go @@ -28,6 +28,31 @@ const ( // of code conflicts because changes are more likely to be scattered // across the file. + // owner: @benluddy + // kep: https://kep.k8s.io/4222 + // alpha: 1.32 + // + // If disabled, clients configured to accept "application/cbor" will instead accept + // "application/json" with the same relative preference, and clients configured to write + // "application/cbor" or "application/apply-patch+cbor" will instead write + // "application/json" or "application/apply-patch+yaml", respectively. + ClientsAllowCBOR Feature = "ClientsAllowCBOR" + + // owner: @benluddy + // kep: https://kep.k8s.io/4222 + // alpha: 1.32 + // + // If enabled, and only if ClientsAllowCBOR is also enabled, the default request content + // type (if not explicitly configured) and the dynamic client's request content type both + // become "application/cbor" instead of "application/json". The default content type for + // apply patch requests becomes "application/apply-patch+cbor" instead of + // "application/apply-patch+yaml". + ClientsPreferCBOR Feature = "ClientsPreferCBOR" + + // owner: @nilekhc + // alpha: v1.30 + InformerResourceVersion Feature = "InformerResourceVersion" + // owner: @p0lyn0mial // beta: v1.30 // @@ -37,10 +62,6 @@ const ( // The feature is disabled in Beta by default because // it will only be turned on for selected control plane component(s). WatchListClient Feature = "WatchListClient" - - // owner: @nilekhc - // alpha: v1.30 - InformerResourceVersion Feature = "InformerResourceVersion" ) // defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys. @@ -49,6 +70,8 @@ const ( // After registering with the binary, the features are, by default, controllable using environment variables. // For more details, please see envVarFeatureGates implementation. var defaultKubernetesFeatureGates = map[Feature]FeatureSpec{ - WatchListClient: {Default: false, PreRelease: Beta}, + ClientsAllowCBOR: {Default: false, PreRelease: Alpha}, + ClientsPreferCBOR: {Default: false, PreRelease: Alpha}, InformerResourceVersion: {Default: false, PreRelease: Alpha}, + WatchListClient: {Default: false, PreRelease: Beta}, } diff --git a/vendor/k8s.io/client-go/gentype/fake.go b/vendor/k8s.io/client-go/gentype/fake.go new file mode 100644 index 0000000000..bcb9ca27f5 --- /dev/null +++ b/vendor/k8s.io/client-go/gentype/fake.go @@ -0,0 +1,304 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package gentype + +import ( + "context" + json "encoding/json" + "fmt" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeClient represents a fake client +type FakeClient[T objectWithMeta] struct { + *testing.Fake + ns string + resource schema.GroupVersionResource + kind schema.GroupVersionKind + newObject func() T +} + +// FakeClientWithList represents a fake client with support for lists. +type FakeClientWithList[T objectWithMeta, L runtime.Object] struct { + *FakeClient[T] + alsoFakeLister[T, L] +} + +// FakeClientWithApply represents a fake client with support for apply declarative configurations. +type FakeClientWithApply[T objectWithMeta, C namedObject] struct { + *FakeClient[T] + alsoFakeApplier[T, C] +} + +// FakeClientWithListAndApply represents a fake client with support for lists and apply declarative configurations. +type FakeClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject] struct { + *FakeClient[T] + alsoFakeLister[T, L] + alsoFakeApplier[T, C] +} + +// Helper types for composition +type alsoFakeLister[T objectWithMeta, L runtime.Object] struct { + client *FakeClient[T] + newList func() L + copyListMeta func(L, L) + getItems func(L) []T + setItems func(L, []T) +} + +type alsoFakeApplier[T objectWithMeta, C namedObject] struct { + client *FakeClient[T] +} + +// NewFakeClient constructs a fake client, namespaced or not, with no support for lists or apply. +// Non-namespaced clients are constructed by passing an empty namespace (""). +func NewFakeClient[T objectWithMeta]( + fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, +) *FakeClient[T] { + return &FakeClient[T]{fake, namespace, resource, kind, emptyObjectCreator} +} + +// NewFakeClientWithList constructs a namespaced client with support for lists. +func NewFakeClientWithList[T objectWithMeta, L runtime.Object]( + fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, + emptyListCreator func() L, listMetaCopier func(L, L), itemGetter func(L) []T, itemSetter func(L, []T), +) *FakeClientWithList[T, L] { + fakeClient := NewFakeClient[T](fake, namespace, resource, kind, emptyObjectCreator) + return &FakeClientWithList[T, L]{ + fakeClient, + alsoFakeLister[T, L]{fakeClient, emptyListCreator, listMetaCopier, itemGetter, itemSetter}, + } +} + +// NewFakeClientWithApply constructs a namespaced client with support for apply declarative configurations. +func NewFakeClientWithApply[T objectWithMeta, C namedObject]( + fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, +) *FakeClientWithApply[T, C] { + fakeClient := NewFakeClient[T](fake, namespace, resource, kind, emptyObjectCreator) + return &FakeClientWithApply[T, C]{ + fakeClient, + alsoFakeApplier[T, C]{fakeClient}, + } +} + +// NewFakeClientWithListAndApply constructs a client with support for lists and applying declarative configurations. +func NewFakeClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject]( + fake *testing.Fake, namespace string, resource schema.GroupVersionResource, kind schema.GroupVersionKind, emptyObjectCreator func() T, + emptyListCreator func() L, listMetaCopier func(L, L), itemGetter func(L) []T, itemSetter func(L, []T), +) *FakeClientWithListAndApply[T, L, C] { + fakeClient := NewFakeClient[T](fake, namespace, resource, kind, emptyObjectCreator) + return &FakeClientWithListAndApply[T, L, C]{ + fakeClient, + alsoFakeLister[T, L]{fakeClient, emptyListCreator, listMetaCopier, itemGetter, itemSetter}, + alsoFakeApplier[T, C]{fakeClient}, + } +} + +// Get takes name of a resource, and returns the corresponding object, and an error if there is any. +func (c *FakeClient[T]) Get(ctx context.Context, name string, options metav1.GetOptions) (T, error) { + emptyResult := c.newObject() + + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(c.resource, c.ns, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +func ToPointerSlice[T any](src []T) []*T { + if src == nil { + return nil + } + result := make([]*T, len(src)) + for i := range src { + result[i] = &src[i] + } + return result +} + +func FromPointerSlice[T any](src []*T) []T { + if src == nil { + return nil + } + result := make([]T, len(src)) + for i := range src { + result[i] = *src[i] + } + return result +} + +// List takes label and field selectors, and returns the list of resources that match those selectors. +func (l *alsoFakeLister[T, L]) List(ctx context.Context, opts metav1.ListOptions) (result L, err error) { + emptyResult := l.newList() + obj, err := l.client.Fake. + Invokes(testing.NewListActionWithOptions(l.client.resource, l.client.kind, l.client.ns, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + // Everything matches + return obj.(L), nil + } + list := l.newList() + l.copyListMeta(list, obj.(L)) + var items []T + for _, item := range l.getItems(obj.(L)) { + itemMeta, err := meta.Accessor(item) + if err != nil { + // No ObjectMeta, nothing can match + continue + } + if label.Matches(labels.Set(itemMeta.GetLabels())) { + items = append(items, item) + } + } + l.setItems(list, items) + return list, err +} + +// Watch returns a watch.Interface that watches the requested resources. +func (c *FakeClient[T]) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(c.resource, c.ns, opts)) +} + +// Create takes the representation of a resource and creates it. Returns the server's representation of the resource, and an error, if there is any. +func (c *FakeClient[T]) Create(ctx context.Context, resource T, opts metav1.CreateOptions) (result T, err error) { + emptyResult := c.newObject() + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(c.resource, c.ns, resource, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +// Update takes the representation of a resource and updates it. Returns the server's representation of the resource, and an error, if there is any. +func (c *FakeClient[T]) Update(ctx context.Context, resource T, opts metav1.UpdateOptions) (result T, err error) { + emptyResult := c.newObject() + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(c.resource, c.ns, resource, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +// UpdateStatus updates the resource's status and returns the updated resource. +func (c *FakeClient[T]) UpdateStatus(ctx context.Context, resource T, opts metav1.UpdateOptions) (result T, err error) { + emptyResult := c.newObject() + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(c.resource, "status", c.ns, resource, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +// Delete deletes the resource matching the given name. Returns an error if one occurs. +func (c *FakeClient[T]) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(c.resource, c.ns, name, opts), c.newObject()) + return err +} + +// DeleteCollection deletes a collection of objects. +func (l *alsoFakeLister[T, L]) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + _, err := l.client.Fake. + Invokes(testing.NewDeleteCollectionActionWithOptions(l.client.resource, l.client.ns, opts, listOpts), l.newList()) + return err +} + +// Patch applies the patch and returns the patched resource. +func (c *FakeClient[T]) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result T, err error) { + emptyResult := c.newObject() + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(c.resource, c.ns, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied resource. +func (a *alsoFakeApplier[T, C]) Apply(ctx context.Context, configuration C, opts metav1.ApplyOptions) (result T, err error) { + if configuration == *new(C) { + return *new(T), fmt.Errorf("configuration provided to Apply must not be nil") + } + data, err := json.Marshal(configuration) + if err != nil { + return *new(T), err + } + name := configuration.GetName() + if name == nil { + return *new(T), fmt.Errorf("configuration.Name must be provided to Apply") + } + emptyResult := a.client.newObject() + obj, err := a.client.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(a.client.resource, a.client.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +// ApplyStatus applies the given apply declarative configuration to the resource's status and returns the updated resource. +func (a *alsoFakeApplier[T, C]) ApplyStatus(ctx context.Context, configuration C, opts metav1.ApplyOptions) (result T, err error) { + if configuration == *new(C) { + return *new(T), fmt.Errorf("configuration provided to Apply must not be nil") + } + data, err := json.Marshal(configuration) + if err != nil { + return *new(T), err + } + name := configuration.GetName() + if name == nil { + return *new(T), fmt.Errorf("configuration.Name must be provided to Apply") + } + emptyResult := a.client.newObject() + obj, err := a.client.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(a.client.resource, a.client.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(T), err +} + +func (c *FakeClient[T]) Namespace() string { + return c.ns +} + +func (c *FakeClient[T]) Kind() schema.GroupVersionKind { + return c.kind +} + +func (c *FakeClient[T]) Resource() schema.GroupVersionResource { + return c.resource +} diff --git a/vendor/k8s.io/client-go/gentype/type.go b/vendor/k8s.io/client-go/gentype/type.go index b5be84318d..e6ed6aae7b 100644 --- a/vendor/k8s.io/client-go/gentype/type.go +++ b/vendor/k8s.io/client-go/gentype/type.go @@ -18,7 +18,6 @@ package gentype import ( "context" - json "encoding/json" "fmt" "time" @@ -27,6 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + "k8s.io/client-go/util/apply" "k8s.io/client-go/util/consistencydetector" "k8s.io/client-go/util/watchlist" "k8s.io/klog/v2" @@ -51,6 +51,8 @@ type Client[T objectWithMeta] struct { namespace string // "" for non-namespaced clients newObject func() T parameterCodec runtime.ParameterCodec + + prefersProtobuf bool } // ClientWithList represents a client with support for lists. @@ -82,26 +84,37 @@ type alsoApplier[T objectWithMeta, C namedObject] struct { client *Client[T] } +type Option[T objectWithMeta] func(*Client[T]) + +func PrefersProtobuf[T objectWithMeta]() Option[T] { + return func(c *Client[T]) { c.prefersProtobuf = true } +} + // NewClient constructs a client, namespaced or not, with no support for lists or apply. // Non-namespaced clients are constructed by passing an empty namespace (""). func NewClient[T objectWithMeta]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, + options ...Option[T], ) *Client[T] { - return &Client[T]{ + c := &Client[T]{ resource: resource, client: client, parameterCodec: parameterCodec, namespace: namespace, newObject: emptyObjectCreator, } + for _, option := range options { + option(c) + } + return c } // NewClientWithList constructs a namespaced client with support for lists. func NewClientWithList[T objectWithMeta, L runtime.Object]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, - emptyListCreator func() L, + emptyListCreator func() L, options ...Option[T], ) *ClientWithList[T, L] { - typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator) + typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator, options...) return &ClientWithList[T, L]{ typeClient, alsoLister[T, L]{typeClient, emptyListCreator}, @@ -111,8 +124,9 @@ func NewClientWithList[T objectWithMeta, L runtime.Object]( // NewClientWithApply constructs a namespaced client with support for apply declarative configurations. func NewClientWithApply[T objectWithMeta, C namedObject]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, + options ...Option[T], ) *ClientWithApply[T, C] { - typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator) + typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator, options...) return &ClientWithApply[T, C]{ typeClient, alsoApplier[T, C]{typeClient}, @@ -122,9 +136,9 @@ func NewClientWithApply[T objectWithMeta, C namedObject]( // NewClientWithListAndApply constructs a client with support for lists and applying declarative configurations. func NewClientWithListAndApply[T objectWithMeta, L runtime.Object, C namedObject]( resource string, client rest.Interface, parameterCodec runtime.ParameterCodec, namespace string, emptyObjectCreator func() T, - emptyListCreator func() L, + emptyListCreator func() L, options ...Option[T], ) *ClientWithListAndApply[T, L, C] { - typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator) + typeClient := NewClient[T](resource, client, parameterCodec, namespace, emptyObjectCreator, options...) return &ClientWithListAndApply[T, L, C]{ typeClient, alsoLister[T, L]{typeClient, emptyListCreator}, @@ -146,6 +160,7 @@ func (c *Client[T]) GetNamespace() string { func (c *Client[T]) Get(ctx context.Context, name string, options metav1.GetOptions) (T, error) { result := c.newObject() err := c.client.Get(). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(name). @@ -181,6 +196,7 @@ func (l *alsoLister[T, L]) list(ctx context.Context, opts metav1.ListOptions) (L timeout = time.Duration(*opts.TimeoutSeconds) * time.Second } err := l.client.client.Get(). + UseProtobufAsDefaultIfPreferred(l.client.prefersProtobuf). NamespaceIfScoped(l.client.namespace, l.client.namespace != ""). Resource(l.client.resource). VersionedParams(&opts, l.client.parameterCodec). @@ -198,6 +214,7 @@ func (l *alsoLister[T, L]) watchList(ctx context.Context, opts metav1.ListOption } result = l.newList() err = l.client.client.Get(). + UseProtobufAsDefaultIfPreferred(l.client.prefersProtobuf). NamespaceIfScoped(l.client.namespace, l.client.namespace != ""). Resource(l.client.resource). VersionedParams(&opts, l.client.parameterCodec). @@ -215,6 +232,7 @@ func (c *Client[T]) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I } opts.Watch = true return c.client.Get(). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). VersionedParams(&opts, c.parameterCodec). @@ -226,6 +244,7 @@ func (c *Client[T]) Watch(ctx context.Context, opts metav1.ListOptions) (watch.I func (c *Client[T]) Create(ctx context.Context, obj T, opts metav1.CreateOptions) (T, error) { result := c.newObject() err := c.client.Post(). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). VersionedParams(&opts, c.parameterCodec). @@ -239,6 +258,7 @@ func (c *Client[T]) Create(ctx context.Context, obj T, opts metav1.CreateOptions func (c *Client[T]) Update(ctx context.Context, obj T, opts metav1.UpdateOptions) (T, error) { result := c.newObject() err := c.client.Put(). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(obj.GetName()). @@ -253,6 +273,7 @@ func (c *Client[T]) Update(ctx context.Context, obj T, opts metav1.UpdateOptions func (c *Client[T]) UpdateStatus(ctx context.Context, obj T, opts metav1.UpdateOptions) (T, error) { result := c.newObject() err := c.client.Put(). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(obj.GetName()). @@ -267,6 +288,7 @@ func (c *Client[T]) UpdateStatus(ctx context.Context, obj T, opts metav1.UpdateO // Delete takes name of the resource and deletes it. Returns an error if one occurs. func (c *Client[T]) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(name). @@ -282,6 +304,7 @@ func (l *alsoLister[T, L]) DeleteCollection(ctx context.Context, opts metav1.Del timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return l.client.client.Delete(). + UseProtobufAsDefaultIfPreferred(l.client.prefersProtobuf). NamespaceIfScoped(l.client.namespace, l.client.namespace != ""). Resource(l.client.resource). VersionedParams(&listOpts, l.client.parameterCodec). @@ -295,6 +318,7 @@ func (l *alsoLister[T, L]) DeleteCollection(ctx context.Context, opts metav1.Del func (c *Client[T]) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (T, error) { result := c.newObject() err := c.client.Patch(pt). + UseProtobufAsDefaultIfPreferred(c.prefersProtobuf). NamespaceIfScoped(c.namespace, c.namespace != ""). Resource(c.resource). Name(name). @@ -313,19 +337,21 @@ func (a *alsoApplier[T, C]) Apply(ctx context.Context, obj C, opts metav1.ApplyO return *new(T), fmt.Errorf("object provided to Apply must not be nil") } patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(obj) - if err != nil { - return *new(T), err - } if obj.GetName() == nil { return *new(T), fmt.Errorf("obj.Name must be provided to Apply") } - err = a.client.client.Patch(types.ApplyPatchType). + + request, err := apply.NewRequest(a.client.client, obj) + if err != nil { + return *new(T), err + } + + err = request. + UseProtobufAsDefaultIfPreferred(a.client.prefersProtobuf). NamespaceIfScoped(a.client.namespace, a.client.namespace != ""). Resource(a.client.resource). Name(*obj.GetName()). VersionedParams(&patchOpts, a.client.parameterCodec). - Body(data). Do(ctx). Into(result) return result, err @@ -337,23 +363,24 @@ func (a *alsoApplier[T, C]) ApplyStatus(ctx context.Context, obj C, opts metav1. return *new(T), fmt.Errorf("object provided to Apply must not be nil") } patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(obj) - if err != nil { - return *new(T), err - } if obj.GetName() == nil { return *new(T), fmt.Errorf("obj.Name must be provided to Apply") } + request, err := apply.NewRequest(a.client.client, obj) + if err != nil { + return *new(T), err + } + result := a.client.newObject() - err = a.client.client.Patch(types.ApplyPatchType). + err = request. + UseProtobufAsDefaultIfPreferred(a.client.prefersProtobuf). NamespaceIfScoped(a.client.namespace, a.client.namespace != ""). Resource(a.client.resource). Name(*obj.GetName()). SubResource("status"). VersionedParams(&patchOpts, a.client.parameterCodec). - Body(data). Do(ctx). Into(result) return result, err diff --git a/vendor/k8s.io/client-go/kubernetes/scheme/register.go b/vendor/k8s.io/client-go/kubernetes/scheme/register.go index 5262b0f046..a9a5d8eb7d 100644 --- a/vendor/k8s.io/client-go/kubernetes/scheme/register.go +++ b/vendor/k8s.io/client-go/kubernetes/scheme/register.go @@ -41,7 +41,7 @@ import ( certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" coordinationv1 "k8s.io/api/coordination/v1" - coordinationv1alpha1 "k8s.io/api/coordination/v1alpha1" + coordinationv1alpha2 "k8s.io/api/coordination/v1alpha2" coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" discoveryv1 "k8s.io/api/discovery/v1" @@ -65,6 +65,7 @@ import ( rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" resourcev1alpha3 "k8s.io/api/resource/v1alpha3" + resourcev1beta1 "k8s.io/api/resource/v1beta1" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -104,7 +105,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ certificatesv1.AddToScheme, certificatesv1beta1.AddToScheme, certificatesv1alpha1.AddToScheme, - coordinationv1alpha1.AddToScheme, + coordinationv1alpha2.AddToScheme, coordinationv1beta1.AddToScheme, coordinationv1.AddToScheme, corev1.AddToScheme, @@ -128,6 +129,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ rbacv1.AddToScheme, rbacv1beta1.AddToScheme, rbacv1alpha1.AddToScheme, + resourcev1beta1.AddToScheme, resourcev1alpha3.AddToScheme, schedulingv1alpha1.AddToScheme, schedulingv1beta1.AddToScheme, diff --git a/vendor/k8s.io/client-go/openapi/groupversion.go b/vendor/k8s.io/client-go/openapi/groupversion.go index 601dcbe3cc..40d91b9a53 100644 --- a/vendor/k8s.io/client-go/openapi/groupversion.go +++ b/vendor/k8s.io/client-go/openapi/groupversion.go @@ -27,6 +27,12 @@ const ContentTypeOpenAPIV3PB = "application/com.github.proto-openapi.spec.v3@v1. type GroupVersion interface { Schema(contentType string) ([]byte, error) + + // ServerRelativeURL. Returns the path and parameters used to fetch the schema. + // You should use the Schema method to fetch it, but this value can be used + // to key the current version of the schema in a cache since it contains a + // hash string which changes upon schema update. + ServerRelativeURL() string } type groupversion struct { @@ -68,3 +74,9 @@ func (g *groupversion) Schema(contentType string) ([]byte, error) { return path.Do(context.TODO()).Raw() } + +// URL used for fetching the schema. The URL includes a hash and can be used +// to key the current version of the schema in a cache. +func (g *groupversion) ServerRelativeURL() string { + return g.item.ServerRelativeURL +} diff --git a/vendor/k8s.io/client-go/rest/client.go b/vendor/k8s.io/client-go/rest/client.go index 60df7e568c..159caa13fa 100644 --- a/vendor/k8s.io/client-go/rest/client.go +++ b/vendor/k8s.io/client-go/rest/client.go @@ -17,16 +17,21 @@ limitations under the License. package rest import ( + "fmt" + "mime" "net/http" "net/url" "os" "strconv" "strings" + "sync/atomic" "time" + "github.com/munnerz/goautoneg" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + clientfeatures "k8s.io/client-go/features" "k8s.io/client-go/util/flowcontrol" ) @@ -85,7 +90,7 @@ type RESTClient struct { versionedAPIPath string // content describes how a RESTClient encodes and decodes responses. - content ClientContentConfig + content requestClientContentConfigProvider // creates BackoffManager that is passed to requests. createBackoffMgr func() BackoffManager @@ -105,10 +110,6 @@ type RESTClient struct { // NewRESTClient creates a new RESTClient. This client performs generic REST functions // such as Get, Put, Post, and Delete on specified paths. func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ClientContentConfig, rateLimiter flowcontrol.RateLimiter, client *http.Client) (*RESTClient, error) { - if len(config.ContentType) == 0 { - config.ContentType = "application/json" - } - base := *baseURL if !strings.HasSuffix(base.Path, "/") { base.Path += "/" @@ -119,14 +120,53 @@ func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ClientConte return &RESTClient{ base: &base, versionedAPIPath: versionedAPIPath, - content: config, + content: requestClientContentConfigProvider{base: scrubCBORContentConfigIfDisabled(config)}, createBackoffMgr: readExpBackoffConfig, rateLimiter: rateLimiter, - - Client: client, + Client: client, }, nil } +func scrubCBORContentConfigIfDisabled(content ClientContentConfig) ClientContentConfig { + if clientfeatures.FeatureGates().Enabled(clientfeatures.ClientsAllowCBOR) { + content.Negotiator = clientNegotiatorWithCBORSequenceStreamDecoder{content.Negotiator} + return content + } + + if mediatype, _, err := mime.ParseMediaType(content.ContentType); err == nil && mediatype == "application/cbor" { + content.ContentType = "application/json" + } + + clauses := goautoneg.ParseAccept(content.AcceptContentTypes) + scrubbed := false + for i, clause := range clauses { + if clause.Type == "application" && clause.SubType == "cbor" { + scrubbed = true + clauses[i].SubType = "json" + } + } + if !scrubbed { + // No application/cbor in AcceptContentTypes, nothing more to do. + return content + } + + parts := make([]string, 0, len(clauses)) + for _, clause := range clauses { + // ParseAccept does not store the parameter "q" in Params. + params := clause.Params + if clause.Q < 1 { // omit q=1, it's the default + if params == nil { + params = make(map[string]string, 1) + } + params["q"] = strconv.FormatFloat(clause.Q, 'g', 3, 32) + } + parts = append(parts, mime.FormatMediaType(fmt.Sprintf("%s/%s", clause.Type, clause.SubType), params)) + } + content.AcceptContentTypes = strings.Join(parts, ",") + + return content +} + // GetRateLimiter returns rate limiter for a given client, or nil if it's called on a nil client func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter { if c == nil { @@ -198,5 +238,106 @@ func (c *RESTClient) Delete() *Request { // APIVersion returns the APIVersion this RESTClient is expected to use. func (c *RESTClient) APIVersion() schema.GroupVersion { - return c.content.GroupVersion + config, _ := c.content.GetClientContentConfig() + return config.GroupVersion +} + +// requestClientContentConfigProvider observes HTTP 415 (Unsupported Media Type) responses to detect +// that the server does not understand CBOR. Once this has happened, future requests are forced to +// use JSON so they can succeed. This is convenient for client users that want to prefer CBOR, but +// also need to interoperate with older servers so requests do not permanently fail. The clients +// will not default to using CBOR until at least all supported kube-apiservers have enable-CBOR +// locked to true, so this path will be rarely taken. Additionally, all generated clients accessing +// built-in kube resources are forced to protobuf, so those will not degrade to JSON. +type requestClientContentConfigProvider struct { + base ClientContentConfig + + // Becomes permanently true if a server responds with HTTP 415 (Unsupported Media Type) to a + // request with "Content-Type" header containing the CBOR media type. + sawUnsupportedMediaTypeForCBOR atomic.Bool +} + +// GetClientContentConfig returns the ClientContentConfig that should be used for new requests by +// this client and true if the request ContentType was selected by default. +func (p *requestClientContentConfigProvider) GetClientContentConfig() (ClientContentConfig, bool) { + config := p.base + + defaulted := config.ContentType == "" + if defaulted { + config.ContentType = "application/json" + } + + if !clientfeatures.FeatureGates().Enabled(clientfeatures.ClientsAllowCBOR) { + return config, defaulted + } + + if defaulted && clientfeatures.FeatureGates().Enabled(clientfeatures.ClientsPreferCBOR) { + config.ContentType = "application/cbor" + } + + if sawUnsupportedMediaTypeForCBOR := p.sawUnsupportedMediaTypeForCBOR.Load(); !sawUnsupportedMediaTypeForCBOR { + return config, defaulted + } + + if mediaType, _, _ := mime.ParseMediaType(config.ContentType); mediaType != runtime.ContentTypeCBOR { + return config, defaulted + } + + // The effective ContentType is CBOR and the client has previously received an HTTP 415 in + // response to a CBOR request. Override ContentType to JSON. + config.ContentType = runtime.ContentTypeJSON + return config, defaulted +} + +// UnsupportedMediaType reports that the server has responded to a request with HTTP 415 Unsupported +// Media Type. +func (p *requestClientContentConfigProvider) UnsupportedMediaType(requestContentType string) { + if !clientfeatures.FeatureGates().Enabled(clientfeatures.ClientsAllowCBOR) { + return + } + + // This could be extended to consider the Content-Encoding request header, the Accept and + // Accept-Encoding response headers, the request method, and URI (as mentioned in + // https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.16). The request Content-Type + // header is sufficient to implement a blanket CBOR fallback mechanism. + requestContentType, _, _ = mime.ParseMediaType(requestContentType) + switch requestContentType { + case runtime.ContentTypeCBOR, string(types.ApplyCBORPatchType): + p.sawUnsupportedMediaTypeForCBOR.Store(true) + } +} + +// clientNegotiatorWithCBORSequenceStreamDecoder is a ClientNegotiator that delegates to another +// ClientNegotiator to select the appropriate Encoder or Decoder for a given media type. As a +// special case, it will resolve "application/cbor-seq" (a CBOR Sequence, the concatenation of zero +// or more CBOR data items) as an alias for "application/cbor" (exactly one CBOR data item) when +// selecting a stream decoder. +type clientNegotiatorWithCBORSequenceStreamDecoder struct { + negotiator runtime.ClientNegotiator +} + +func (n clientNegotiatorWithCBORSequenceStreamDecoder) Encoder(contentType string, params map[string]string) (runtime.Encoder, error) { + return n.negotiator.Encoder(contentType, params) +} + +func (n clientNegotiatorWithCBORSequenceStreamDecoder) Decoder(contentType string, params map[string]string) (runtime.Decoder, error) { + return n.negotiator.Decoder(contentType, params) +} + +func (n clientNegotiatorWithCBORSequenceStreamDecoder) StreamDecoder(contentType string, params map[string]string) (runtime.Decoder, runtime.Serializer, runtime.Framer, error) { + if !clientfeatures.FeatureGates().Enabled(clientfeatures.ClientsAllowCBOR) { + return n.negotiator.StreamDecoder(contentType, params) + } + + switch contentType { + case runtime.ContentTypeCBORSequence: + return n.negotiator.StreamDecoder(runtime.ContentTypeCBOR, params) + case runtime.ContentTypeCBOR: + // This media type is only appropriate for exactly one data item, not the zero or + // more events of a watch stream. + return nil, nil, nil, runtime.NegotiateError{ContentType: contentType, Stream: true} + default: + return n.negotiator.StreamDecoder(contentType, params) + } + } diff --git a/vendor/k8s.io/client-go/rest/config.go b/vendor/k8s.io/client-go/rest/config.go index f8ff7e928c..f2e813d075 100644 --- a/vendor/k8s.io/client-go/rest/config.go +++ b/vendor/k8s.io/client-go/rest/config.go @@ -32,6 +32,9 @@ import ( 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/runtime/serializer/cbor" + "k8s.io/client-go/features" "k8s.io/client-go/pkg/version" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/transport" @@ -113,6 +116,9 @@ type Config struct { // QPS indicates the maximum QPS to the master from this client. // If it's zero, the created RESTClient will use DefaultQPS: 5 + // + // Setting this to a negative value will disable client-side ratelimiting + // unless `Ratelimiter` is also set. QPS float32 // Maximum burst for throttle. @@ -669,3 +675,19 @@ func CopyConfig(config *Config) *Config { } return c } + +// CodecFactoryForGeneratedClient returns the provided CodecFactory if there are no enabled client +// feature gates affecting serialization. Otherwise, it constructs and returns a new CodecFactory +// from the provided Scheme. +// +// This is supported ONLY for use by clients generated with client-gen. The caller is responsible +// for ensuring that the CodecFactory argument was constructed using the Scheme argument. +func CodecFactoryForGeneratedClient(scheme *runtime.Scheme, codecs serializer.CodecFactory) serializer.CodecFactory { + if !features.FeatureGates().Enabled(features.ClientsAllowCBOR) { + // NOTE: This assumes client-gen will not generate CBOR-enabled Codecs as long as + // the feature gate exists. + return codecs + } + + return serializer.NewCodecFactory(scheme, serializer.WithSerializer(cbor.NewSerializerInfo)) +} diff --git a/vendor/k8s.io/client-go/rest/request.go b/vendor/k8s.io/client-go/rest/request.go index f5a9f68ca4..0ec90ad188 100644 --- a/vendor/k8s.io/client-go/rest/request.go +++ b/vendor/k8s.io/client-go/rest/request.go @@ -19,6 +19,7 @@ package rest import ( "bytes" "context" + "encoding/base64" "encoding/hex" "fmt" "io" @@ -99,6 +100,9 @@ func defaultRequestRetryFn(maxRetries int) WithRetry { type Request struct { c *RESTClient + contentConfig ClientContentConfig + contentTypeNotSet bool + warningHandler WarningHandler rateLimiter flowcontrol.RateLimiter @@ -123,7 +127,7 @@ type Request struct { // output err error - // only one of body / bodyBytes may be set. requests using body are not retriable. + // only one of body / bodyBytes may be set. requests using body are not retryable. body io.Reader bodyBytes []byte @@ -152,6 +156,11 @@ func NewRequest(c *RESTClient) *Request { timeout = c.Client.Timeout } + // A request needs to know whether the content type was explicitly configured or selected by + // default in order to support the per-request Protobuf override used by clients generated + // with --prefers-protobuf. + contentConfig, contentTypeDefaulted := c.content.GetClientContentConfig() + r := &Request{ c: c, rateLimiter: c.rateLimiter, @@ -161,14 +170,12 @@ func NewRequest(c *RESTClient) *Request { maxRetries: 10, retryFn: defaultRequestRetryFn, warningHandler: c.warningHandler, - } - switch { - case len(c.content.AcceptContentTypes) > 0: - r.SetHeader("Accept", c.content.AcceptContentTypes) - case len(c.content.ContentType) > 0: - r.SetHeader("Accept", c.content.ContentType+", */*") + contentConfig: contentConfig, + contentTypeNotSet: contentTypeDefaulted, } + + r.setAcceptHeader() return r } @@ -177,11 +184,36 @@ func NewRequestWithClient(base *url.URL, versionedAPIPath string, content Client return NewRequest(&RESTClient{ base: base, versionedAPIPath: versionedAPIPath, - content: content, + content: requestClientContentConfigProvider{base: content}, Client: client, }) } +func (r *Request) UseProtobufAsDefaultIfPreferred(prefersProtobuf bool) *Request { + if prefersProtobuf { + return r.UseProtobufAsDefault() + } + return r +} + +func (r *Request) UseProtobufAsDefault() *Request { + if r.contentTypeNotSet && len(r.contentConfig.AcceptContentTypes) == 0 { + r.contentConfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + r.contentConfig.ContentType = "application/vnd.kubernetes.protobuf" + r.setAcceptHeader() + } + return r +} + +func (r *Request) setAcceptHeader() { + switch { + case len(r.contentConfig.AcceptContentTypes) > 0: + r.SetHeader("Accept", r.contentConfig.AcceptContentTypes) + case len(r.contentConfig.ContentType) > 0: + r.SetHeader("Accept", r.contentConfig.ContentType+", */*") + } +} + // Verb sets the verb this request will use. func (r *Request) Verb(verb string) *Request { r.verb = verb @@ -370,7 +402,7 @@ func (r *Request) Param(paramName, s string) *Request { // VersionedParams will not write query parameters that have omitempty set and are empty. If a // parameter has already been set it is appended to (Params and VersionedParams are additive). func (r *Request) VersionedParams(obj runtime.Object, codec runtime.ParameterCodec) *Request { - return r.SpecificallyVersionedParams(obj, codec, r.c.content.GroupVersion) + return r.SpecificallyVersionedParams(obj, codec, r.contentConfig.GroupVersion) } func (r *Request) SpecificallyVersionedParams(obj runtime.Object, codec runtime.ParameterCodec, version schema.GroupVersion) *Request { @@ -450,11 +482,9 @@ func (r *Request) Body(obj interface{}) *Request { r.err = err return r } - glogBody("Request Body", data) r.body = nil r.bodyBytes = data case []byte: - glogBody("Request Body", t) r.body = nil r.bodyBytes = t case io.Reader: @@ -465,7 +495,7 @@ func (r *Request) Body(obj interface{}) *Request { if reflect.ValueOf(t).IsNil() { return r } - encoder, err := r.c.content.Negotiator.Encoder(r.c.content.ContentType, nil) + encoder, err := r.contentConfig.Negotiator.Encoder(r.contentConfig.ContentType, nil) if err != nil { r.err = err return r @@ -475,10 +505,9 @@ func (r *Request) Body(obj interface{}) *Request { r.err = err return r } - glogBody("Request Body", data) r.body = nil r.bodyBytes = data - r.SetHeader("Content-Type", r.c.content.ContentType) + r.SetHeader("Content-Type", r.contentConfig.ContentType) default: r.err = fmt.Errorf("unknown type used for body: %+v", obj) } @@ -704,10 +733,19 @@ func (b *throttledLogger) Infof(message string, args ...interface{}) { // Watch attempts to begin watching the requested location. // Returns a watch.Interface, or an error. func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { + w, _, e := r.watchInternal(ctx) + return w, e +} + +func (r *Request) watchInternal(ctx context.Context) (watch.Interface, runtime.Decoder, error) { + if r.body == nil { + logBody(ctx, 2, "Request Body", r.bodyBytes) + } + // We specifically don't want to rate limit watches, so we // don't use r.rateLimiter here. if r.err != nil { - return nil, r.err + return nil, nil, r.err } client := r.c.Client @@ -727,12 +765,12 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { url := r.URL().String() for { if err := retry.Before(ctx, r); err != nil { - return nil, retry.WrapPreviousError(err) + return nil, nil, retry.WrapPreviousError(err) } req, err := r.newHTTPRequest(ctx) if err != nil { - return nil, err + return nil, nil, err } resp, err := client.Do(req) @@ -752,21 +790,22 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { // the server must have sent us an error in 'err' return true, nil } - if result := r.transformResponse(resp, req); result.err != nil { - return true, result.err + result := r.transformResponse(ctx, resp, req) + if err := result.Error(); err != nil { + return true, err } return true, fmt.Errorf("for request %s, got status: %v", url, resp.StatusCode) }() if done { if isErrRetryableFunc(req, err) { - return watch.NewEmptyWatch(), nil + return watch.NewEmptyWatch(), nil, nil } if err == nil { // if the server sent us an HTTP Response object, // we need to return the error object from that. err = transformErr } - return nil, retry.WrapPreviousError(err) + return nil, nil, retry.WrapPreviousError(err) } } } @@ -784,22 +823,35 @@ type WatchListResult struct { // the end of the stream. initialEventsEndBookmarkRV string - // gv represents the API version - // it is used to construct the final list response - // normally this information is filled by the server - gv schema.GroupVersion + // negotiatedObjectDecoder knows how to decode + // the initialEventsListBlueprint + negotiatedObjectDecoder runtime.Decoder + + // base64EncodedInitialEventsListBlueprint contains an empty, + // versioned list encoded in the requested format + // (e.g., protobuf, JSON, CBOR) and stored as a base64-encoded string + base64EncodedInitialEventsListBlueprint string } +// Into stores the result into obj. The passed obj parameter must be a pointer to a list type. +// +// Note: +// +// Special attention should be given to the type *unstructured.Unstructured, +// which represents a list type but does not have an "Items" field. +// Users who directly use RESTClient may store the response in such an object. +// This particular case is not handled by the current implementation of this function, +// but may be considered for future updates. func (r WatchListResult) Into(obj runtime.Object) error { if r.err != nil { return r.err } - listPtr, err := meta.GetItemsPtr(obj) + listItemsPtr, err := meta.GetItemsPtr(obj) if err != nil { return err } - listVal, err := conversion.EnforcePtr(listPtr) + listVal, err := conversion.EnforcePtr(listItemsPtr) if err != nil { return err } @@ -807,6 +859,16 @@ func (r WatchListResult) Into(obj runtime.Object) error { return fmt.Errorf("need a pointer to slice, got %v", listVal.Kind()) } + encodedInitialEventsListBlueprint, err := base64.StdEncoding.DecodeString(r.base64EncodedInitialEventsListBlueprint) + if err != nil { + return fmt.Errorf("failed to decode the received blueprint list, err %w", err) + } + + err = runtime.DecodeInto(r.negotiatedObjectDecoder, encodedInitialEventsListBlueprint, obj) + if err != nil { + return err + } + if len(r.items) == 0 { listVal.Set(reflect.MakeSlice(listVal.Type(), 0, 0)) } else { @@ -824,15 +886,6 @@ func (r WatchListResult) Into(obj runtime.Object) error { return err } listMeta.SetResourceVersion(r.initialEventsEndBookmarkRV) - - typeMeta, err := meta.TypeAccessor(obj) - if err != nil { - return err - } - version := r.gv.String() - typeMeta.SetAPIVersion(version) - typeMeta.SetKind(reflect.TypeOf(obj).Elem().Name()) - return nil } @@ -844,6 +897,10 @@ func (r WatchListResult) Into(obj runtime.Object) error { // Check the documentation https://kubernetes.io/docs/reference/using-api/api-concepts/#streaming-lists // to see what parameters are currently required. func (r *Request) WatchList(ctx context.Context) WatchListResult { + if r.body == nil { + logBody(ctx, 2, "Request Body", r.bodyBytes) + } + if !clientfeatures.FeatureGates().Enabled(clientfeatures.WatchListClient) { return WatchListResult{err: fmt.Errorf("%q feature gate is not enabled", clientfeatures.WatchListClient)} } @@ -851,16 +908,16 @@ func (r *Request) WatchList(ctx context.Context) WatchListResult { // Most users use the generated client, which handles the proper setting of parameters. // We don't have validation for other methods (e.g., the Watch) // thus, for symmetry, we haven't added additional checks for the WatchList method. - w, err := r.Watch(ctx) + w, d, err := r.watchInternal(ctx) if err != nil { return WatchListResult{err: err} } - return r.handleWatchList(ctx, w) + return r.handleWatchList(ctx, w, d) } // handleWatchList holds the actual logic for easier unit testing. // Note that this function will close the passed watch. -func (r *Request) handleWatchList(ctx context.Context, w watch.Interface) WatchListResult { +func (r *Request) handleWatchList(ctx context.Context, w watch.Interface, negotiatedObjectDecoder runtime.Decoder) WatchListResult { defer w.Stop() var lastKey string var items []runtime.Object @@ -894,10 +951,15 @@ func (r *Request) handleWatchList(ctx context.Context, w watch.Interface) WatchL lastKey = key case watch.Bookmark: if meta.GetAnnotations()[metav1.InitialEventsAnnotationKey] == "true" { + base64EncodedInitialEventsListBlueprint := meta.GetAnnotations()[metav1.InitialEventsListBlueprintAnnotationKey] + if len(base64EncodedInitialEventsListBlueprint) == 0 { + return WatchListResult{err: fmt.Errorf("%q annotation is missing content", metav1.InitialEventsListBlueprintAnnotationKey)} + } return WatchListResult{ - items: items, - initialEventsEndBookmarkRV: meta.GetResourceVersion(), - gv: r.c.content.GroupVersion, + items: items, + initialEventsEndBookmarkRV: meta.GetResourceVersion(), + negotiatedObjectDecoder: negotiatedObjectDecoder, + base64EncodedInitialEventsListBlueprint: base64EncodedInitialEventsListBlueprint, } } default: @@ -907,15 +969,15 @@ func (r *Request) handleWatchList(ctx context.Context, w watch.Interface) WatchL } } -func (r *Request) newStreamWatcher(resp *http.Response) (watch.Interface, error) { +func (r *Request) newStreamWatcher(resp *http.Response) (watch.Interface, runtime.Decoder, error) { contentType := resp.Header.Get("Content-Type") mediaType, params, err := mime.ParseMediaType(contentType) if err != nil { klog.V(4).Infof("Unexpected content type from the server: %q: %v", contentType, err) } - objectDecoder, streamingSerializer, framer, err := r.c.content.Negotiator.StreamDecoder(mediaType, params) + objectDecoder, streamingSerializer, framer, err := r.contentConfig.Negotiator.StreamDecoder(mediaType, params) if err != nil { - return nil, err + return nil, nil, err } handleWarnings(resp.Header, r.warningHandler) @@ -928,7 +990,7 @@ func (r *Request) newStreamWatcher(resp *http.Response) (watch.Interface, error) // use 500 to indicate that the cause of the error is unknown - other error codes // are more specific to HTTP interactions, and set a reason errors.NewClientErrorReporter(http.StatusInternalServerError, r.verb, "ClientWatchDecoding"), - ), nil + ), objectDecoder, nil } // updateRequestResultMetric increments the RequestResult metric counter, @@ -968,6 +1030,10 @@ func sanitize(req *Request, resp *http.Response, err error) (string, string) { // Any non-2xx http status code causes an error. If we get a non-2xx code, we try to convert the body into an APIStatus object. // If we can, we return that as an error. Otherwise, we create an error that lists the http status and the content of the response. func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { + if r.body == nil { + logBody(ctx, 2, "Request Body", r.bodyBytes) + } + if r.err != nil { return nil, r.err } @@ -1011,7 +1077,7 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { if retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) { return false, nil } - result := r.transformResponse(resp, req) + result := r.transformResponse(ctx, resp, req) if err := result.Error(); err != nil { return true, err } @@ -1143,7 +1209,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp return false } // For connection errors and apiserver shutdown errors retry. - if net.IsConnectionReset(err) || net.IsProbableEOF(err) { + if net.IsConnectionReset(err) || net.IsProbableEOF(err) || net.IsHTTP2ConnectionLost(err) { return true } return false @@ -1165,6 +1231,9 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp if req.ContentLength >= 0 && !(req.Body != nil && req.ContentLength == 0) { metrics.RequestSize.Observe(ctx, r.verb, r.URL().Host, float64(req.ContentLength)) } + if resp != nil && resp.StatusCode == http.StatusUnsupportedMediaType { + r.c.content.UnsupportedMediaType(resp.Request.Header.Get("Content-Type")) + } retry.After(ctx, r, resp, err) done := func() bool { @@ -1198,9 +1267,13 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp // - If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError // - http.Client.Do errors are returned directly. func (r *Request) Do(ctx context.Context) Result { + if r.body == nil { + logBody(ctx, 2, "Request Body", r.bodyBytes) + } + var result Result err := r.request(ctx, func(req *http.Request, resp *http.Response) { - result = r.transformResponse(resp, req) + result = r.transformResponse(ctx, resp, req) }) if err != nil { return Result{err: err} @@ -1213,10 +1286,14 @@ func (r *Request) Do(ctx context.Context) Result { // DoRaw executes the request but does not process the response body. func (r *Request) DoRaw(ctx context.Context) ([]byte, error) { + if r.body == nil { + logBody(ctx, 2, "Request Body", r.bodyBytes) + } + var result Result err := r.request(ctx, func(req *http.Request, resp *http.Response) { result.body, result.err = io.ReadAll(resp.Body) - glogBody("Response Body", result.body) + logBody(ctx, 2, "Response Body", result.body) if resp.StatusCode < http.StatusOK || resp.StatusCode > http.StatusPartialContent { result.err = r.transformUnstructuredResponseError(resp, req, result.body) } @@ -1231,7 +1308,7 @@ func (r *Request) DoRaw(ctx context.Context) ([]byte, error) { } // transformResponse converts an API response into a structured API object -func (r *Request) transformResponse(resp *http.Response, req *http.Request) Result { +func (r *Request) transformResponse(ctx context.Context, resp *http.Response, req *http.Request) Result { var body []byte if resp.Body != nil { data, err := io.ReadAll(resp.Body) @@ -1260,13 +1337,14 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu } } - glogBody("Response Body", body) + // Call depth is tricky. This one is okay for Do and DoRaw. + logBody(ctx, 7, "Response Body", body) // verify the content type is accurate var decoder runtime.Decoder contentType := resp.Header.Get("Content-Type") if len(contentType) == 0 { - contentType = r.c.content.ContentType + contentType = r.contentConfig.ContentType } if len(contentType) > 0 { var err error @@ -1274,7 +1352,7 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu if err != nil { return Result{err: errors.NewInternalError(err)} } - decoder, err = r.c.content.Negotiator.Decoder(mediaType, params) + decoder, err = r.contentConfig.Negotiator.Decoder(mediaType, params) if err != nil { // if we fail to negotiate a decoder, treat this as an unstructured error switch { @@ -1320,14 +1398,14 @@ func (r *Request) transformResponse(resp *http.Response, req *http.Request) Resu } // truncateBody decides if the body should be truncated, based on the glog Verbosity. -func truncateBody(body string) string { +func truncateBody(logger klog.Logger, body string) string { max := 0 switch { - case bool(klog.V(10).Enabled()): + case bool(logger.V(10).Enabled()): return body - case bool(klog.V(9).Enabled()): + case bool(logger.V(9).Enabled()): max = 10240 - case bool(klog.V(8).Enabled()): + case bool(logger.V(8).Enabled()): max = 1024 } @@ -1338,17 +1416,21 @@ func truncateBody(body string) string { return body[:max] + fmt.Sprintf(" [truncated %d chars]", len(body)-max) } -// glogBody logs a body output that could be either JSON or protobuf. It explicitly guards against +// logBody 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 klogV := klog.V(8); klogV.Enabled() { +// +// It needs to be called by all functions which send or receive the data. +func logBody(ctx context.Context, callDepth int, prefix string, body []byte) { + logger := klog.FromContext(ctx) + if loggerV := logger.V(8); loggerV.Enabled() { + loggerV := loggerV.WithCallDepth(callDepth) if bytes.IndexFunc(body, func(r rune) bool { return r < 0x0a }) != -1 { - klogV.Infof("%s:\n%s", prefix, truncateBody(hex.Dump(body))) + loggerV.Info(prefix, "body", truncateBody(logger, hex.Dump(body))) } else { - klogV.Infof("%s: %s", prefix, truncateBody(string(body))) + loggerV.Info(prefix, "body", truncateBody(logger, string(body))) } } } @@ -1397,7 +1479,7 @@ func (r *Request) newUnstructuredResponseError(body []byte, isTextResponse bool, } var groupResource schema.GroupResource if len(r.resource) > 0 { - groupResource.Group = r.c.content.GroupVersion.Group + groupResource.Group = r.contentConfig.GroupVersion.Group groupResource.Resource = r.resource } return errors.NewGenericServerResponse( diff --git a/vendor/k8s.io/client-go/rest/url_utils.go b/vendor/k8s.io/client-go/rest/url_utils.go index c4ce6e3b8f..0a0ab79173 100644 --- a/vendor/k8s.io/client-go/rest/url_utils.go +++ b/vendor/k8s.io/client-go/rest/url_utils.go @@ -61,7 +61,7 @@ func DefaultServerURL(host, apiPath string, groupVersion schema.GroupVersion, de return hostURL, versionedAPIPath, nil } -// DefaultVersionedAPIPathFor constructs the default path for the given group version, assuming the given +// DefaultVersionedAPIPath constructs the default path for the given group version, assuming the given // API path, following the standard conventions of the Kubernetes API. func DefaultVersionedAPIPath(apiPath string, groupVersion schema.GroupVersion) string { versionedAPIPath := path.Join("/", apiPath) diff --git a/vendor/k8s.io/client-go/rest/watch/decoder.go b/vendor/k8s.io/client-go/rest/watch/decoder.go index 9e1e04d14e..c2b68cbcb7 100644 --- a/vendor/k8s.io/client-go/rest/watch/decoder.go +++ b/vendor/k8s.io/client-go/rest/watch/decoder.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package versioned +package watch import ( "fmt" diff --git a/vendor/k8s.io/client-go/rest/watch/encoder.go b/vendor/k8s.io/client-go/rest/watch/encoder.go index e55aa12d9b..a95b4985c5 100644 --- a/vendor/k8s.io/client-go/rest/watch/encoder.go +++ b/vendor/k8s.io/client-go/rest/watch/encoder.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package versioned +package watch import ( "encoding/json" diff --git a/vendor/k8s.io/client-go/testing/actions.go b/vendor/k8s.io/client-go/testing/actions.go index 270cc4ddbd..e7af4d6e8d 100644 --- a/vendor/k8s.io/client-go/testing/actions.go +++ b/vendor/k8s.io/client-go/testing/actions.go @@ -29,6 +29,10 @@ import ( "k8s.io/apimachinery/pkg/types" ) +// All NewRoot... functions return non-namespaced actions, and are equivalent to +// calling the corresponding New... function with an empty namespace. +// This is assumed by the fake client generator. + func NewRootGetAction(resource schema.GroupVersionResource, name string) GetActionImpl { return NewRootGetActionWithOptions(resource, name, metav1.GetOptions{}) } diff --git a/vendor/k8s.io/client-go/testing/fixture.go b/vendor/k8s.io/client-go/testing/fixture.go index d288a3aa45..15b3e53348 100644 --- a/vendor/k8s.io/client-go/testing/fixture.go +++ b/vendor/k8s.io/client-go/testing/fixture.go @@ -214,6 +214,7 @@ func (o objectTrackerReact) Apply(action PatchActionImpl) (runtime.Object, error if err := yaml.Unmarshal(action.GetPatch(), &patchObj.Object); err != nil { return nil, err } + patchObj.SetName(action.GetName()) err := o.tracker.Apply(gvr, patchObj, ns, action.PatchOptions) if err != nil { return nil, err diff --git a/vendor/k8s.io/client-go/tools/cache/OWNERS b/vendor/k8s.io/client-go/tools/cache/OWNERS index 921ac2fa02..fc441e0efa 100644 --- a/vendor/k8s.io/client-go/tools/cache/OWNERS +++ b/vendor/k8s.io/client-go/tools/cache/OWNERS @@ -7,7 +7,6 @@ approvers: - deads2k - caesarxuchao - liggitt - - ncdc reviewers: - thockin - smarterclayton @@ -23,6 +22,6 @@ reviewers: - jsafrane - dims - ingvagabund - - ncdc emeritus_approvers: - lavalamp + - ncdc diff --git a/vendor/k8s.io/client-go/tools/cache/reflector.go b/vendor/k8s.io/client-go/tools/cache/reflector.go index 5e7dd57409..030b452979 100644 --- a/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -57,7 +57,7 @@ var ( // 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 name of the type we expect to place in the store. The name // will be the stringification of expectedGVK if provided, and the @@ -121,6 +121,14 @@ type Reflector struct { UseWatchList *bool } +func (r *Reflector) Name() string { + return r.name +} + +func (r *Reflector) TypeDescription() string { + return r.typeDescription +} + // ResourceVersionUpdater is an interface that allows store implementation to // track the current resource version of the reflector. This is especially // important if storage bookmarks are enabled. diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go b/vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go index 35bb5dde19..c575652b1a 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go @@ -50,7 +50,7 @@ func init() { Scheme = runtime.NewScheme() utilruntime.Must(api.AddToScheme(Scheme)) utilruntime.Must(v1.AddToScheme(Scheme)) - yamlSerializer := json.NewYAMLSerializer(json.DefaultMetaFactory, Scheme, Scheme) + yamlSerializer := json.NewSerializerWithOptions(json.DefaultMetaFactory, Scheme, Scheme, json.SerializerOptions{Yaml: true}) Codec = versioning.NewDefaultingCodecForScheme( Scheme, yamlSerializer, diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go index 952f6d7eb6..cd0a8649b1 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go @@ -29,8 +29,6 @@ import ( clientauth "k8s.io/client-go/tools/auth" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/klog/v2" - - "github.com/imdario/mergo" ) const ( @@ -241,45 +239,37 @@ func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { if err != nil { return nil, err } - mergo.Merge(clientConfig, userAuthPartialConfig, mergo.WithOverride) + if err := merge(clientConfig, userAuthPartialConfig); err != nil { + return nil, err + } - serverAuthPartialConfig, err := getServerIdentificationPartialConfig(configAuthInfo, configClusterInfo) - if err != nil { + serverAuthPartialConfig := getServerIdentificationPartialConfig(configClusterInfo) + if err := merge(clientConfig, serverAuthPartialConfig); err != nil { return nil, err } - mergo.Merge(clientConfig, serverAuthPartialConfig, mergo.WithOverride) } return clientConfig, nil } // clientauth.Info object contain both user identification and server identification. We want different precedence orders for -// both, so we have to split the objects and merge them separately -// we want this order of precedence for the server identification -// 1. configClusterInfo (the final result of command line flags and merged .kubeconfig files) -// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) -// 3. load the ~/.kubernetes_auth file as a default -func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) { - mergedConfig := &restclient.Config{} +// both, so we have to split the objects and merge them separately. - // configClusterInfo holds the information identify the server provided by .kubeconfig +// getServerIdentificationPartialConfig extracts server identification information from configClusterInfo +// (the final result of command line flags and merged .kubeconfig files). +func getServerIdentificationPartialConfig(configClusterInfo clientcmdapi.Cluster) *restclient.Config { configClientConfig := &restclient.Config{} configClientConfig.CAFile = configClusterInfo.CertificateAuthority configClientConfig.CAData = configClusterInfo.CertificateAuthorityData configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify configClientConfig.ServerName = configClusterInfo.TLSServerName - mergo.Merge(mergedConfig, configClientConfig, mergo.WithOverride) - return mergedConfig, nil + return configClientConfig } -// clientauth.Info object contain both user identification and server identification. We want different precedence orders for -// both, so we have to split the objects and merge them separately -// we want this order of precedence for user identification -// 1. configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files) -// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) -// 3. if there is not enough information to identify the user, load try the ~/.kubernetes_auth file -// 4. if there is not enough information to identify the user, prompt if possible +// getUserIdentificationPartialConfig extracts user identification information from configAuthInfo +// (the final result of command line flags and merged .kubeconfig files); +// if the information available there is insufficient, it prompts (if possible) for additional information. func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig restclient.AuthProviderConfigPersister, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) { mergedConfig := &restclient.Config{} @@ -338,8 +328,12 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo) previouslyMergedConfig := mergedConfig mergedConfig = &restclient.Config{} - mergo.Merge(mergedConfig, promptedConfig, mergo.WithOverride) - mergo.Merge(mergedConfig, previouslyMergedConfig, mergo.WithOverride) + if err := merge(mergedConfig, promptedConfig); err != nil { + return nil, err + } + if err := merge(mergedConfig, previouslyMergedConfig); err != nil { + return nil, err + } config.promptedCredentials.username = mergedConfig.Username config.promptedCredentials.password = mergedConfig.Password } @@ -347,7 +341,7 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI return mergedConfig, nil } -// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only user identification information +// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged for only user identification information func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config { config := &restclient.Config{} config.Username = info.User @@ -507,12 +501,16 @@ func (config *DirectClientConfig) getContext() (clientcmdapi.Context, error) { mergedContext := clientcmdapi.NewContext() if configContext, exists := contexts[contextName]; exists { - mergo.Merge(mergedContext, configContext, mergo.WithOverride) + if err := merge(mergedContext, configContext); err != nil { + return clientcmdapi.Context{}, err + } } else if required { return clientcmdapi.Context{}, fmt.Errorf("context %q does not exist", contextName) } if config.overrides != nil { - mergo.Merge(mergedContext, config.overrides.Context, mergo.WithOverride) + if err := merge(mergedContext, &config.overrides.Context); err != nil { + return clientcmdapi.Context{}, err + } } return *mergedContext, nil @@ -525,12 +523,16 @@ func (config *DirectClientConfig) getAuthInfo() (clientcmdapi.AuthInfo, error) { mergedAuthInfo := clientcmdapi.NewAuthInfo() if configAuthInfo, exists := authInfos[authInfoName]; exists { - mergo.Merge(mergedAuthInfo, configAuthInfo, mergo.WithOverride) + if err := merge(mergedAuthInfo, configAuthInfo); err != nil { + return clientcmdapi.AuthInfo{}, err + } } else if required { return clientcmdapi.AuthInfo{}, fmt.Errorf("auth info %q does not exist", authInfoName) } if config.overrides != nil { - mergo.Merge(mergedAuthInfo, config.overrides.AuthInfo, mergo.WithOverride) + if err := merge(mergedAuthInfo, &config.overrides.AuthInfo); err != nil { + return clientcmdapi.AuthInfo{}, err + } } return *mergedAuthInfo, nil @@ -543,15 +545,21 @@ func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { mergedClusterInfo := clientcmdapi.NewCluster() if config.overrides != nil { - mergo.Merge(mergedClusterInfo, config.overrides.ClusterDefaults, mergo.WithOverride) + if err := merge(mergedClusterInfo, &config.overrides.ClusterDefaults); err != nil { + return clientcmdapi.Cluster{}, err + } } if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists { - mergo.Merge(mergedClusterInfo, configClusterInfo, mergo.WithOverride) + if err := merge(mergedClusterInfo, configClusterInfo); err != nil { + return clientcmdapi.Cluster{}, err + } } else if required { return clientcmdapi.Cluster{}, fmt.Errorf("cluster %q does not exist", clusterInfoName) } if config.overrides != nil { - mergo.Merge(mergedClusterInfo, config.overrides.ClusterInfo, mergo.WithOverride) + if err := merge(mergedClusterInfo, &config.overrides.ClusterInfo); err != nil { + return clientcmdapi.Cluster{}, err + } } // * An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data diff --git a/vendor/k8s.io/client-go/tools/clientcmd/loader.go b/vendor/k8s.io/client-go/tools/clientcmd/loader.go index b75737f1c9..c900e5fd19 100644 --- a/vendor/k8s.io/client-go/tools/clientcmd/loader.go +++ b/vendor/k8s.io/client-go/tools/clientcmd/loader.go @@ -24,7 +24,6 @@ import ( goruntime "runtime" "strings" - "github.com/imdario/mergo" "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/runtime" @@ -248,7 +247,9 @@ func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { mapConfig := clientcmdapi.NewConfig() for _, kubeconfig := range kubeconfigs { - mergo.Merge(mapConfig, kubeconfig, mergo.WithOverride) + if err := merge(mapConfig, kubeconfig); err != nil { + return nil, err + } } // merge all of the struct values in the reverse order so that priority is given correctly @@ -256,14 +257,20 @@ func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { nonMapConfig := clientcmdapi.NewConfig() for i := len(kubeconfigs) - 1; i >= 0; i-- { kubeconfig := kubeconfigs[i] - mergo.Merge(nonMapConfig, kubeconfig, mergo.WithOverride) + if err := merge(nonMapConfig, kubeconfig); err != nil { + return nil, err + } } // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and // get the values we expect. config := clientcmdapi.NewConfig() - mergo.Merge(config, mapConfig, mergo.WithOverride) - mergo.Merge(config, nonMapConfig, mergo.WithOverride) + if err := merge(config, mapConfig); err != nil { + return nil, err + } + if err := merge(config, nonMapConfig); err != nil { + return nil, err + } if rules.ResolvePaths() { if err := ResolveLocalPaths(config); err != nil { diff --git a/vendor/k8s.io/client-go/tools/clientcmd/merge.go b/vendor/k8s.io/client-go/tools/clientcmd/merge.go new file mode 100644 index 0000000000..3d74e60292 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/merge.go @@ -0,0 +1,121 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientcmd + +import ( + "fmt" + "reflect" + "strings" +) + +// recursively merges src into dst: +// - non-pointer struct fields with any exported fields are recursively merged +// - non-pointer struct fields with only unexported fields prefer src if the field is non-zero +// - maps are shallow merged with src keys taking priority over dst +// - non-zero src fields encountered during recursion that are not maps or structs overwrite and recursion stops +func merge[T any](dst, src *T) error { + if dst == nil { + return fmt.Errorf("cannot merge into nil pointer") + } + if src == nil { + return nil + } + return mergeValues(nil, reflect.ValueOf(dst).Elem(), reflect.ValueOf(src).Elem()) +} + +func mergeValues(fieldNames []string, dst, src reflect.Value) error { + dstType := dst.Type() + // no-op if we can't read the src + if !src.IsValid() { + return nil + } + // sanity check types match + if srcType := src.Type(); dstType != srcType { + return fmt.Errorf("cannot merge mismatched types (%s, %s) at %s", dstType, srcType, strings.Join(fieldNames, ".")) + } + + switch dstType.Kind() { + case reflect.Struct: + if hasExportedField(dstType) { + // recursively merge + for i, n := 0, dstType.NumField(); i < n; i++ { + if err := mergeValues(append(fieldNames, dstType.Field(i).Name), dst.Field(i), src.Field(i)); err != nil { + return err + } + } + } else if dst.CanSet() { + // If all fields are unexported, overwrite with src. + // Using src.IsZero() would make more sense but that's not what mergo did. + dst.Set(src) + } + + case reflect.Map: + if dst.CanSet() && !src.IsZero() { + // initialize dst if needed + if dst.IsZero() { + dst.Set(reflect.MakeMap(dstType)) + } + // shallow-merge overwriting dst keys with src keys + for _, mapKey := range src.MapKeys() { + dst.SetMapIndex(mapKey, src.MapIndex(mapKey)) + } + } + + case reflect.Slice: + if dst.CanSet() && src.Len() > 0 { + // overwrite dst with non-empty src slice + dst.Set(src) + } + + case reflect.Pointer: + if dst.CanSet() && !src.IsZero() { + // overwrite dst with non-zero values for other types + if dstType.Elem().Kind() == reflect.Struct { + // use struct pointer as-is + dst.Set(src) + } else { + // shallow-copy non-struct pointer (interfaces, primitives, etc) + dst.Set(reflect.New(dstType.Elem())) + dst.Elem().Set(src.Elem()) + } + } + + default: + if dst.CanSet() && !src.IsZero() { + // overwrite dst with non-zero values for other types + dst.Set(src) + } + } + + return nil +} + +// hasExportedField returns true if the given type has any exported fields, +// or if it has any anonymous/embedded struct fields with exported fields +func hasExportedField(dstType reflect.Type) bool { + for i, n := 0, dstType.NumField(); i < n; i++ { + field := dstType.Field(i) + if field.Anonymous && field.Type.Kind() == reflect.Struct { + if hasExportedField(dstType.Field(i).Type) { + return true + } + } else if len(field.PkgPath) == 0 { + return true + } + } + return false +} diff --git a/vendor/k8s.io/client-go/transport/cache_go118.go b/vendor/k8s.io/client-go/transport/cache_go118.go index d21d5137d4..babdaf8b5a 100644 --- a/vendor/k8s.io/client-go/transport/cache_go118.go +++ b/vendor/k8s.io/client-go/transport/cache_go118.go @@ -18,7 +18,29 @@ limitations under the License. package transport +// this is just to make the "unused" linter rule happy +var _ = isCacheKeyComparable[tlsCacheKey] + // assert at compile time that tlsCacheKey is comparable in a way that will never panic at runtime. -var _ = isComparable[tlsCacheKey] +// +// Golang 1.20 introduced an exception to type constraints that allows comparable, but not +// necessarily strictly comparable type arguments to satisfy the `comparable` type constraint, +// thus allowing interfaces to fulfil the `comparable` constraint. +// However, by definition, "A comparison of two interface values with identical +// dynamic types causes a run-time panic if that type is not comparable". +// +// We want to make sure that comparing two `tlsCacheKey` elements won't cause a +// runtime panic. In order to do that, we'll force the `tlsCacheKey` to be strictly +// comparable, thus making it impossible for it to contain interfaces. +// To assert strict comparability, we'll use another definition: "Type +// parameters are comparable if they are strictly comparable". +// Below, we first construct a type parameter from the `tlsCacheKey` type so that +// we can then push this type parameter to a comparable check, thus checking these +// are strictly comparable. +// +// Original suggestion from https://github.com/golang/go/issues/56548#issuecomment-1317673963 +func isCacheKeyComparable[K tlsCacheKey]() { + _ = isComparable[K] +} func isComparable[T comparable]() {} diff --git a/vendor/k8s.io/client-go/transport/round_trippers.go b/vendor/k8s.io/client-go/transport/round_trippers.go index e2d1dcc9a9..52fefb5316 100644 --- a/vendor/k8s.io/client-go/transport/round_trippers.go +++ b/vendor/k8s.io/client-go/transport/round_trippers.go @@ -86,6 +86,7 @@ func DebugWrappers(rt http.RoundTripper) http.RoundTripper { type authProxyRoundTripper struct { username string + uid string groups []string extra map[string][]string @@ -98,15 +99,17 @@ var _ utilnet.RoundTripperWrapper = &authProxyRoundTripper{} // authentication terminating proxy cases // assuming you pull the user from the context: // username is the user.Info.GetName() of the user +// uid is the user.Info.GetUID() 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 { +func NewAuthProxyRoundTripper(username, uid string, groups []string, extra map[string][]string, rt http.RoundTripper) http.RoundTripper { return &authProxyRoundTripper{ username: username, + uid: uid, groups: groups, extra: extra, rt: rt, @@ -115,14 +118,15 @@ func NewAuthProxyRoundTripper(username string, groups []string, extra map[string func (rt *authProxyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { req = utilnet.CloneRequest(req) - SetAuthProxyHeaders(req, rt.username, rt.groups, rt.extra) + SetAuthProxyHeaders(req, rt.username, rt.uid, 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) { +func SetAuthProxyHeaders(req *http.Request, username, uid string, groups []string, extra map[string][]string) { req.Header.Del("X-Remote-User") + req.Header.Del("X-Remote-Uid") req.Header.Del("X-Remote-Group") for key := range req.Header { if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { @@ -131,6 +135,9 @@ func SetAuthProxyHeaders(req *http.Request, username string, groups []string, ex } req.Header.Set("X-Remote-User", username) + if len(uid) > 0 { + req.Header.Set("X-Remote-Uid", uid) + } for _, group := range groups { req.Header.Add("X-Remote-Group", group) } diff --git a/vendor/k8s.io/client-go/util/apply/apply.go b/vendor/k8s.io/client-go/util/apply/apply.go new file mode 100644 index 0000000000..0cc85df6c5 --- /dev/null +++ b/vendor/k8s.io/client-go/util/apply/apply.go @@ -0,0 +1,49 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apply + +import ( + "fmt" + + cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/client-go/features" + "k8s.io/client-go/rest" +) + +// NewRequest builds a new server-side apply request. The provided apply configuration object will +// be marshalled to the request's body using the default encoding, and the Content-Type header will +// be set to application/apply-patch with the appropriate structured syntax name suffix (today, +// either +yaml or +cbor, see +// https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml). +func NewRequest(client rest.Interface, applyConfiguration interface{}) (*rest.Request, error) { + pt := types.ApplyYAMLPatchType + marshal := json.Marshal + + if features.FeatureGates().Enabled(features.ClientsAllowCBOR) && features.FeatureGates().Enabled(features.ClientsPreferCBOR) { + pt = types.ApplyCBORPatchType + marshal = cbor.Marshal + } + + body, err := marshal(applyConfiguration) + if err != nil { + return nil, fmt.Errorf("failed to marshal apply configuration: %w", err) + } + + return client.Patch(pt).Body(body), nil +} diff --git a/vendor/k8s.io/client-go/util/consistencydetector/list_data_consistency_detector.go b/vendor/k8s.io/client-go/util/consistencydetector/list_data_consistency_detector.go index 7610c05c28..61b8fe28b9 100644 --- a/vendor/k8s.io/client-go/util/consistencydetector/list_data_consistency_detector.go +++ b/vendor/k8s.io/client-go/util/consistencydetector/list_data_consistency_detector.go @@ -32,6 +32,12 @@ func init() { dataConsistencyDetectionForListFromCacheEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_LIST_FROM_CACHE_INCONSISTENCY_DETECTOR")) } +// IsDataConsistencyDetectionForListEnabled returns true when +// the KUBE_LIST_FROM_CACHE_INCONSISTENCY_DETECTOR environment variable was set during a binary startup. +func IsDataConsistencyDetectionForListEnabled() bool { + return dataConsistencyDetectionForListFromCacheEnabled +} + // CheckListFromCacheDataConsistencyIfRequested performs a data consistency check only when // the KUBE_LIST_FROM_CACHE_INCONSISTENCY_DETECTOR environment variable was set during a binary startup // for requests that have a high chance of being served from the watch-cache. @@ -50,7 +56,7 @@ func init() { // the cache (even though this might not be true for some requests) // and issue the second call to get data from etcd for comparison. func CheckListFromCacheDataConsistencyIfRequested[T runtime.Object](ctx context.Context, identity string, listItemsFn ListFunc[T], optionsUsedToReceiveList metav1.ListOptions, receivedList runtime.Object) { - if !dataConsistencyDetectionForListFromCacheEnabled { + if !IsDataConsistencyDetectionForListEnabled() { return } checkListFromCacheDataConsistencyIfRequestedInternal(ctx, identity, listItemsFn, optionsUsedToReceiveList, receivedList) diff --git a/vendor/k8s.io/client-go/util/flowcontrol/backoff.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go index 82e4c4c408..899b8e34ef 100644 --- a/vendor/k8s.io/client-go/util/flowcontrol/backoff.go +++ b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go @@ -32,7 +32,12 @@ type backoffEntry struct { type Backoff struct { sync.RWMutex - Clock clock.Clock + Clock clock.Clock + // HasExpiredFunc controls the logic that determines whether the backoff + // counter should be reset, and when to GC old backoff entries. If nil, the + // default hasExpired function will restart the backoff factor to the + // beginning after observing time has passed at least equal to 2*maxDuration + HasExpiredFunc func(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool defaultDuration time.Duration maxDuration time.Duration perItemBackoff map[string]*backoffEntry @@ -93,7 +98,7 @@ func (p *Backoff) Next(id string, eventTime time.Time) { p.Lock() defer p.Unlock() entry, ok := p.perItemBackoff[id] - if !ok || hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { + if !ok || p.hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { entry = p.initEntryUnsafe(id) entry.backoff += p.jitter(entry.backoff) } else { @@ -119,7 +124,7 @@ func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool { if !ok { return false } - if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { + if p.hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { return false } return p.Clock.Since(eventTime) < entry.backoff @@ -133,21 +138,21 @@ func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool { if !ok { return false } - if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { + if p.hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { return false } return eventTime.Sub(entry.lastUpdate) < entry.backoff } -// Garbage collect records that have aged past maxDuration. Backoff users are expected -// to invoke this periodically. +// Garbage collect records that have aged past their expiration, which defaults +// to 2*maxDuration (see hasExpired godoc). Backoff users are expected to invoke +// this periodically. func (p *Backoff) GC() { p.Lock() defer p.Unlock() now := p.Clock.Now() for id, entry := range p.perItemBackoff { - if now.Sub(entry.lastUpdate) > p.maxDuration*2 { - // GC when entry has not been updated for 2*maxDuration + if p.hasExpired(now, entry.lastUpdate, p.maxDuration) { delete(p.perItemBackoff, id) } } @@ -174,7 +179,10 @@ func (p *Backoff) jitter(delay time.Duration) time.Duration { return time.Duration(p.rand.Float64() * p.maxJitterFactor * float64(delay)) } -// After 2*maxDuration we restart the backoff factor to the beginning -func hasExpired(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool { +// Unless an alternate function is provided, after 2*maxDuration we restart the backoff factor to the beginning +func (p *Backoff) hasExpired(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool { + if p.HasExpiredFunc != nil { + return p.HasExpiredFunc(eventTime, lastUpdate, maxDuration) + } return eventTime.Sub(lastUpdate) > maxDuration*2 // consider stable if it's ok for twice the maxDuration } diff --git a/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go b/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go index 958b96a80c..e33a6c6929 100644 --- a/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go +++ b/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go @@ -64,26 +64,33 @@ type TypedDelayingQueueConfig[T comparable] struct { // NewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use // NewDelayingQueueWithConfig instead and specify a name. // -// Deprecated: use TypedNewDelayingQueue instead. +// Deprecated: use NewTypedDelayingQueue instead. func NewDelayingQueue() DelayingInterface { return NewDelayingQueueWithConfig(DelayingQueueConfig{}) } -// TypedNewDelayingQueue constructs a new workqueue with delayed queuing ability. -// TypedNewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use -// TypedNewDelayingQueueWithConfig instead and specify a name. -func TypedNewDelayingQueue[T comparable]() TypedDelayingInterface[T] { +// NewTypedDelayingQueue constructs a new workqueue with delayed queuing ability. +// NewTypedDelayingQueue does not emit metrics. For use with a MetricsProvider, please use +// NewTypedDelayingQueueWithConfig instead and specify a name. +func NewTypedDelayingQueue[T comparable]() TypedDelayingInterface[T] { return NewTypedDelayingQueueWithConfig(TypedDelayingQueueConfig[T]{}) } // NewDelayingQueueWithConfig constructs a new workqueue with options to // customize different properties. // -// Deprecated: use TypedNewDelayingQueueWithConfig instead. +// Deprecated: use NewTypedDelayingQueueWithConfig instead. func NewDelayingQueueWithConfig(config DelayingQueueConfig) DelayingInterface { return NewTypedDelayingQueueWithConfig[any](config) } +// TypedNewDelayingQueue exists for backwards compatibility only. +// +// Deprecated: use NewTypedDelayingQueueWithConfig instead. +func TypedNewDelayingQueue[T comparable]() TypedDelayingInterface[T] { + return NewTypedDelayingQueue[T]() +} + // NewTypedDelayingQueueWithConfig constructs a new workqueue with options to // customize different properties. func NewTypedDelayingQueueWithConfig[T comparable](config TypedDelayingQueueConfig[T]) TypedDelayingInterface[T] { @@ -134,7 +141,7 @@ func newDelayingQueue[T comparable](clock clock.WithTicker, q TypedInterface[T], clock: clock, heartbeat: clock.NewTicker(maxWait), stopCh: make(chan struct{}), - waitingForAddCh: make(chan *waitFor, 1000), + waitingForAddCh: make(chan *waitFor[T], 1000), metrics: newRetryMetrics(name, provider), } @@ -158,15 +165,15 @@ type delayingType[T comparable] struct { heartbeat clock.Ticker // waitingForAddCh is a buffered channel that feeds waitingForAdd - waitingForAddCh chan *waitFor + waitingForAddCh chan *waitFor[T] // metrics counts the number of retries metrics retryMetrics } // waitFor holds the data to add and the time it should be added -type waitFor struct { - data t +type waitFor[T any] struct { + data T readyAt time.Time // index in the priority queue (heap) index int @@ -180,15 +187,15 @@ type waitFor struct { // it has been removed from the queue and placed at index Len()-1 by // container/heap. Push adds an item at index Len(), and container/heap // percolates it into the correct location. -type waitForPriorityQueue []*waitFor +type waitForPriorityQueue[T any] []*waitFor[T] -func (pq waitForPriorityQueue) Len() int { +func (pq waitForPriorityQueue[T]) Len() int { return len(pq) } -func (pq waitForPriorityQueue) Less(i, j int) bool { +func (pq waitForPriorityQueue[T]) Less(i, j int) bool { return pq[i].readyAt.Before(pq[j].readyAt) } -func (pq waitForPriorityQueue) Swap(i, j int) { +func (pq waitForPriorityQueue[T]) Swap(i, j int) { pq[i], pq[j] = pq[j], pq[i] pq[i].index = i pq[j].index = j @@ -196,16 +203,16 @@ func (pq waitForPriorityQueue) Swap(i, j int) { // Push adds an item to the queue. Push should not be called directly; instead, // use `heap.Push`. -func (pq *waitForPriorityQueue) Push(x interface{}) { +func (pq *waitForPriorityQueue[T]) Push(x interface{}) { n := len(*pq) - item := x.(*waitFor) + item := x.(*waitFor[T]) item.index = n *pq = append(*pq, item) } // Pop removes an item from the queue. Pop should not be called directly; // instead, use `heap.Pop`. -func (pq *waitForPriorityQueue) Pop() interface{} { +func (pq *waitForPriorityQueue[T]) Pop() interface{} { n := len(*pq) item := (*pq)[n-1] item.index = -1 @@ -215,7 +222,7 @@ func (pq *waitForPriorityQueue) Pop() interface{} { // Peek returns the item at the beginning of the queue, without removing the // item or otherwise mutating the queue. It is safe to call directly. -func (pq waitForPriorityQueue) Peek() interface{} { +func (pq waitForPriorityQueue[T]) Peek() interface{} { return pq[0] } @@ -247,7 +254,7 @@ func (q *delayingType[T]) AddAfter(item T, duration time.Duration) { select { case <-q.stopCh: // unblock if ShutDown() is called - case q.waitingForAddCh <- &waitFor{data: item, readyAt: q.clock.Now().Add(duration)}: + case q.waitingForAddCh <- &waitFor[T]{data: item, readyAt: q.clock.Now().Add(duration)}: } } @@ -266,10 +273,10 @@ func (q *delayingType[T]) waitingLoop() { // Make a timer that expires when the item at the head of the waiting queue is ready var nextReadyAtTimer clock.Timer - waitingForQueue := &waitForPriorityQueue{} + waitingForQueue := &waitForPriorityQueue[T]{} heap.Init(waitingForQueue) - waitingEntryByData := map[t]*waitFor{} + waitingEntryByData := map[T]*waitFor[T]{} for { if q.TypedInterface.ShuttingDown() { @@ -280,13 +287,13 @@ func (q *delayingType[T]) waitingLoop() { // Add ready entries for waitingForQueue.Len() > 0 { - entry := waitingForQueue.Peek().(*waitFor) + entry := waitingForQueue.Peek().(*waitFor[T]) if entry.readyAt.After(now) { break } - entry = heap.Pop(waitingForQueue).(*waitFor) - q.Add(entry.data.(T)) + entry = heap.Pop(waitingForQueue).(*waitFor[T]) + q.Add(entry.data) delete(waitingEntryByData, entry.data) } @@ -296,7 +303,7 @@ func (q *delayingType[T]) waitingLoop() { if nextReadyAtTimer != nil { nextReadyAtTimer.Stop() } - entry := waitingForQueue.Peek().(*waitFor) + entry := waitingForQueue.Peek().(*waitFor[T]) nextReadyAtTimer = q.clock.NewTimer(entry.readyAt.Sub(now)) nextReadyAt = nextReadyAtTimer.C() } @@ -315,7 +322,7 @@ func (q *delayingType[T]) waitingLoop() { if waitEntry.readyAt.After(q.clock.Now()) { insert(waitingForQueue, waitingEntryByData, waitEntry) } else { - q.Add(waitEntry.data.(T)) + q.Add(waitEntry.data) } drained := false @@ -325,7 +332,7 @@ func (q *delayingType[T]) waitingLoop() { if waitEntry.readyAt.After(q.clock.Now()) { insert(waitingForQueue, waitingEntryByData, waitEntry) } else { - q.Add(waitEntry.data.(T)) + q.Add(waitEntry.data) } default: drained = true @@ -336,7 +343,7 @@ func (q *delayingType[T]) waitingLoop() { } // insert adds the entry to the priority queue, or updates the readyAt if it already exists in the queue -func insert(q *waitForPriorityQueue, knownEntries map[t]*waitFor, entry *waitFor) { +func insert[T comparable](q *waitForPriorityQueue[T], knownEntries map[T]*waitFor[T], entry *waitFor[T]) { // if the entry already exists, update the time only if it would cause the item to be queued sooner existing, exists := knownEntries[entry.data] if exists { diff --git a/vendor/k8s.io/client-go/util/workqueue/metrics.go b/vendor/k8s.io/client-go/util/workqueue/metrics.go index f012ccc554..4400cb65e1 100644 --- a/vendor/k8s.io/client-go/util/workqueue/metrics.go +++ b/vendor/k8s.io/client-go/util/workqueue/metrics.go @@ -26,10 +26,10 @@ import ( // This file provides abstractions for setting the provider (e.g., prometheus) // of metrics. -type queueMetrics interface { - add(item t) - get(item t) - done(item t) +type queueMetrics[T comparable] interface { + add(item T) + get(item T) + done(item T) updateUnfinishedWork() } @@ -70,7 +70,7 @@ func (noopMetric) Set(float64) {} func (noopMetric) Observe(float64) {} // defaultQueueMetrics expects the caller to lock before setting any metrics. -type defaultQueueMetrics struct { +type defaultQueueMetrics[T comparable] struct { clock clock.Clock // current depth of a workqueue @@ -81,15 +81,15 @@ type defaultQueueMetrics struct { latency HistogramMetric // how long processing an item from a workqueue takes workDuration HistogramMetric - addTimes map[t]time.Time - processingStartTimes map[t]time.Time + addTimes map[T]time.Time + processingStartTimes map[T]time.Time // how long have current threads been working? unfinishedWorkSeconds SettableGaugeMetric longestRunningProcessor SettableGaugeMetric } -func (m *defaultQueueMetrics) add(item t) { +func (m *defaultQueueMetrics[T]) add(item T) { if m == nil { return } @@ -101,7 +101,7 @@ func (m *defaultQueueMetrics) add(item t) { } } -func (m *defaultQueueMetrics) get(item t) { +func (m *defaultQueueMetrics[T]) get(item T) { if m == nil { return } @@ -114,7 +114,7 @@ func (m *defaultQueueMetrics) get(item t) { } } -func (m *defaultQueueMetrics) done(item t) { +func (m *defaultQueueMetrics[T]) done(item T) { if m == nil { return } @@ -125,7 +125,7 @@ func (m *defaultQueueMetrics) done(item t) { } } -func (m *defaultQueueMetrics) updateUnfinishedWork() { +func (m *defaultQueueMetrics[T]) updateUnfinishedWork() { // Note that a summary metric would be better for this, but prometheus // doesn't seem to have non-hacky ways to reset the summary metrics. var total float64 @@ -141,15 +141,15 @@ func (m *defaultQueueMetrics) updateUnfinishedWork() { m.longestRunningProcessor.Set(oldest) } -type noMetrics struct{} +type noMetrics[T any] struct{} -func (noMetrics) add(item t) {} -func (noMetrics) get(item t) {} -func (noMetrics) done(item t) {} -func (noMetrics) updateUnfinishedWork() {} +func (noMetrics[T]) add(item T) {} +func (noMetrics[T]) get(item T) {} +func (noMetrics[T]) done(item T) {} +func (noMetrics[T]) updateUnfinishedWork() {} // Gets the time since the specified start in seconds. -func (m *defaultQueueMetrics) sinceInSeconds(start time.Time) float64 { +func (m *defaultQueueMetrics[T]) sinceInSeconds(start time.Time) float64 { return m.clock.Since(start).Seconds() } @@ -210,28 +210,15 @@ func (_ noopMetricsProvider) NewRetriesMetric(name string) CounterMetric { return noopMetric{} } -var globalMetricsFactory = queueMetricsFactory{ - metricsProvider: noopMetricsProvider{}, -} - -type queueMetricsFactory struct { - metricsProvider MetricsProvider +var globalMetricsProvider MetricsProvider = noopMetricsProvider{} - onlyOnce sync.Once -} +var setGlobalMetricsProviderOnce sync.Once -func (f *queueMetricsFactory) setProvider(mp MetricsProvider) { - f.onlyOnce.Do(func() { - f.metricsProvider = mp - }) -} - -func (f *queueMetricsFactory) newQueueMetrics(name string, clock clock.Clock) queueMetrics { - mp := f.metricsProvider +func newQueueMetrics[T comparable](mp MetricsProvider, name string, clock clock.Clock) queueMetrics[T] { if len(name) == 0 || mp == (noopMetricsProvider{}) { - return noMetrics{} + return noMetrics[T]{} } - return &defaultQueueMetrics{ + return &defaultQueueMetrics[T]{ clock: clock, depth: mp.NewDepthMetric(name), adds: mp.NewAddsMetric(name), @@ -239,8 +226,8 @@ func (f *queueMetricsFactory) newQueueMetrics(name string, clock clock.Clock) qu workDuration: mp.NewWorkDurationMetric(name), unfinishedWorkSeconds: mp.NewUnfinishedWorkSecondsMetric(name), longestRunningProcessor: mp.NewLongestRunningProcessorSecondsMetric(name), - addTimes: map[t]time.Time{}, - processingStartTimes: map[t]time.Time{}, + addTimes: map[T]time.Time{}, + processingStartTimes: map[T]time.Time{}, } } @@ -251,7 +238,7 @@ func newRetryMetrics(name string, provider MetricsProvider) retryMetrics { } if provider == nil { - provider = globalMetricsFactory.metricsProvider + provider = globalMetricsProvider } return &defaultRetryMetrics{ @@ -262,5 +249,7 @@ func newRetryMetrics(name string, provider MetricsProvider) retryMetrics { // SetProvider sets the metrics provider for all subsequently created work // queues. Only the first call has an effect. func SetProvider(metricsProvider MetricsProvider) { - globalMetricsFactory.setProvider(metricsProvider) + setGlobalMetricsProviderOnce.Do(func() { + globalMetricsProvider = metricsProvider + }) } diff --git a/vendor/k8s.io/client-go/util/workqueue/queue.go b/vendor/k8s.io/client-go/util/workqueue/queue.go index ff715482c1..3cec1768a0 100644 --- a/vendor/k8s.io/client-go/util/workqueue/queue.go +++ b/vendor/k8s.io/client-go/util/workqueue/queue.go @@ -138,13 +138,9 @@ func NewNamed(name string) *Type { // newQueueWithConfig constructs a new named workqueue // with the ability to customize different properties for testing purposes func newQueueWithConfig[T comparable](config TypedQueueConfig[T], updatePeriod time.Duration) *Typed[T] { - var metricsFactory *queueMetricsFactory + metricsProvider := globalMetricsProvider if config.MetricsProvider != nil { - metricsFactory = &queueMetricsFactory{ - metricsProvider: config.MetricsProvider, - } - } else { - metricsFactory = &globalMetricsFactory + metricsProvider = config.MetricsProvider } if config.Clock == nil { @@ -158,12 +154,12 @@ func newQueueWithConfig[T comparable](config TypedQueueConfig[T], updatePeriod t return newQueue( config.Clock, config.Queue, - metricsFactory.newQueueMetrics(config.Name, config.Clock), + newQueueMetrics[T](metricsProvider, config.Name, config.Clock), updatePeriod, ) } -func newQueue[T comparable](c clock.WithTicker, queue Queue[T], metrics queueMetrics, updatePeriod time.Duration) *Typed[T] { +func newQueue[T comparable](c clock.WithTicker, queue Queue[T], metrics queueMetrics[T], updatePeriod time.Duration) *Typed[T] { t := &Typed[T]{ clock: c, queue: queue, @@ -176,7 +172,7 @@ func newQueue[T comparable](c clock.WithTicker, queue Queue[T], metrics queueMet // Don't start the goroutine for a type of noMetrics so we don't consume // resources unnecessarily - if _, ok := metrics.(noMetrics); !ok { + if _, ok := metrics.(noMetrics[T]); !ok { go t.updateUnfinishedWorkLoop() } @@ -209,14 +205,13 @@ type Typed[t comparable] struct { shuttingDown bool drain bool - metrics queueMetrics + metrics queueMetrics[t] unfinishedWorkUpdatePeriod time.Duration clock clock.WithTicker } type empty struct{} -type t interface{} type set[t comparable] map[t]empty func (s set[t]) has(item t) bool { diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go index 89f7ed4f02..9b6aa7cec9 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go @@ -19,6 +19,7 @@ package generators import ( "io" "path" + "slices" "strings" "k8s.io/gengo/v2/generator" @@ -114,7 +115,7 @@ func (g *applyConfigurationGenerator) GenerateType(c *generator.Context, t *type sw.Do(constructor, typeParams) } } - g.generateWithFuncs(t, typeParams, sw, nil) + g.generateWithFuncs(t, typeParams, sw, nil, &[]string{}) g.generateGetters(t, typeParams, sw, nil) return sw.Error() } @@ -176,7 +177,8 @@ func (g *applyConfigurationGenerator) generateGetters(t *types.Type, typeParams } } -func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParams TypeParams, sw *generator.SnippetWriter, embed *memberParams) { +func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParams TypeParams, sw *generator.SnippetWriter, embed *memberParams, + generated *[]string) { for _, member := range t.Members { if blocklisted(t, member) { continue @@ -186,6 +188,11 @@ func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParam memberType = &types.Type{Kind: types.Pointer, Elem: memberType} } if jsonTags, ok := lookupJSONTags(member); ok { + if slices.Contains(*generated, member.Name) { + klog.V(5).Infof("With%s already generated on %s, skipping\n", member.Name, t.Name) + continue + } + *generated = append(*generated, member.Name) memberParams := memberParams{ TypeParams: typeParams, Member: member, @@ -194,7 +201,7 @@ func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParam EmbeddedIn: embed, } if memberParams.Member.Embedded { - g.generateWithFuncs(member.Type, typeParams, sw, &memberParams) + g.generateWithFuncs(member.Type, typeParams, sw, &memberParams, generated) if !jsonTags.inline { // non-inlined embeds are nillable and need a "ensure exists" utility function sw.Do(ensureEmbedExists, memberParams) @@ -281,9 +288,9 @@ func (g *applyConfigurationGenerator) generateMemberWith(sw *generator.SnippetWr sw.Do("func (b *$.ApplyConfig.ApplyConfiguration|public$) With$.Member.Name$(value $.MemberType|raw$) *$.ApplyConfig.ApplyConfiguration|public$ {\n", memberParams) g.ensureEmbedExistsIfApplicable(sw, memberParams) if g.refGraph.isApplyConfig(memberParams.Member.Type) || isNillable(memberParams.Member.Type) { - sw.Do("b.$.Member.Name$ = value\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = value\n", memberParams) } else { - sw.Do("b.$.Member.Name$ = &value\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = &value\n", memberParams) } sw.Do(" return b\n", memberParams) sw.Do("}\n", memberParams) @@ -297,7 +304,7 @@ func (g *applyConfigurationGenerator) generateMemberGetter(sw *generator.Snippet sw.Do("func (b *$.ApplyConfig.ApplyConfiguration|public$) Get$.Member.Name$() *$.MemberType|raw$ {\n", memberParams) } g.ensureEmbedExistsIfApplicable(sw, memberParams) - sw.Do(" return b.$.Member.Name$\n", memberParams) + sw.Do(" return b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$\n", memberParams) sw.Do("}\n", memberParams) } @@ -324,15 +331,15 @@ func (g *applyConfigurationGenerator) generateMemberWithForSlice(sw *generator.S sw.Do("}\n", memberParams) if memberIsPointerToSlice { - sw.Do("*b.$.Member.Name$ = append(*b.$.Member.Name$, *values[i])\n", memberParams) + sw.Do("*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, *values[i])\n", memberParams) } else { - sw.Do("b.$.Member.Name$ = append(b.$.Member.Name$, *values[i])\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, *values[i])\n", memberParams) } } else { if memberIsPointerToSlice { - sw.Do("*b.$.Member.Name$ = append(*b.$.Member.Name$, values[i])\n", memberParams) + sw.Do("*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, values[i])\n", memberParams) } else { - sw.Do("b.$.Member.Name$ = append(b.$.Member.Name$, values[i])\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, values[i])\n", memberParams) } } sw.Do(" }\n", memberParams) @@ -347,11 +354,11 @@ func (g *applyConfigurationGenerator) generateMemberWithForMap(sw *generator.Sni sw.Do("// overwriting an existing map entries in $.Member.Name$ field with the same key.\n", memberParams) sw.Do("func (b *$.ApplyConfig.ApplyConfiguration|public$) With$.Member.Name$(entries $.MemberType|raw$) *$.ApplyConfig.ApplyConfiguration|public$ {\n", memberParams) g.ensureEmbedExistsIfApplicable(sw, memberParams) - sw.Do(" if b.$.Member.Name$ == nil && len(entries) > 0 {\n", memberParams) - sw.Do(" b.$.Member.Name$ = make($.MemberType|raw$, len(entries))\n", memberParams) + sw.Do(" if b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ == nil && len(entries) > 0 {\n", memberParams) + sw.Do(" b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = make($.MemberType|raw$, len(entries))\n", memberParams) sw.Do(" }\n", memberParams) sw.Do(" for k, v := range entries {\n", memberParams) - sw.Do(" b.$.Member.Name$[k] = v\n", memberParams) + sw.Do(" b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$[k] = v\n", memberParams) sw.Do(" }\n", memberParams) sw.Do(" return b\n", memberParams) sw.Do("}\n", memberParams) diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go index abd6501000..3ccc7ce831 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go @@ -19,13 +19,11 @@ package generators import ( "io" - "gopkg.in/yaml.v2" - - "k8s.io/kube-openapi/pkg/schemaconv" - "k8s.io/gengo/v2/generator" "k8s.io/gengo/v2/namer" "k8s.io/gengo/v2/types" + "k8s.io/kube-openapi/pkg/schemaconv" + yaml "sigs.k8s.io/yaml/goyaml.v2" ) // utilGenerator generates the ForKind() utility function. @@ -71,11 +69,12 @@ func (g *internalGenerator) GenerateType(c *generator.Context, _ *types.Type, w return err } sw.Do(schemaBlock, map[string]interface{}{ - "schemaYAML": string(schemaYAML), - "smdParser": smdParser, - "smdNewParser": smdNewParser, - "yamlObject": yamlObject, - "yamlUnmarshal": yamlUnmarshal, + "schemaYAML": string(schemaYAML), + "smdParser": smdParser, + "smdNewParser": smdNewParser, + "fmtSprintf": fmtSprintf, + "syncOnce": syncOnce, + "yamlObject": yamlObject, }) return sw.Error() @@ -87,13 +86,13 @@ func Parser() *{{.smdParser|raw}} { var err error parser, err = {{.smdNewParser|raw}}(schemaYAML) if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) + panic({{.fmtSprintf|raw}}("Failed to parse schema: %v", err)) } }) return parser } -var parserOnce sync.Once +var parserOnce {{.syncOnce|raw}} var parser *{{.smdParser|raw}} var schemaYAML = {{.yamlObject|raw}}(` + "`{{.schemaYAML}}`" + `) ` diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go index 197e932517..b033d22d82 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go @@ -188,7 +188,7 @@ func targetForApplyConfigurationsPackage(outputDirBase, outputPkgBase, pkgSubdir localPkg: outputPkg, groupVersion: gv, applyConfig: toGenerate, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), refGraph: refs, openAPIType: openAPIType, }) @@ -211,7 +211,7 @@ func targetForUtils(outputDirBase, outputPkgBase string, boilerplate []byte, gro OutputFilename: "utils.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkgBase), groupVersions: groupVersions, typesForGroupVersion: applyConfigsForGroupVersion, groupGoNames: groupGoNames, @@ -236,7 +236,7 @@ func targetForInternal(outputDirBase, outputPkgBase string, boilerplate []byte, OutputFilename: "internal.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), typeModels: models, }) return generators diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go index bc0b54d032..08c53c2a4c 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go @@ -19,6 +19,8 @@ package generators import "k8s.io/gengo/v2/types" var ( + fmtSprintf = types.Ref("fmt", "Sprintf") + syncOnce = types.Ref("sync", "Once") applyConfiguration = types.Ref("k8s.io/apimachinery/pkg/runtime", "ApplyConfiguration") groupVersionKind = types.Ref("k8s.io/apimachinery/pkg/runtime/schema", "GroupVersionKind") typeMeta = types.Ref("k8s.io/apimachinery/pkg/apis/meta/v1", "TypeMeta") @@ -31,5 +33,4 @@ var ( smdParser = types.Ref("sigs.k8s.io/structured-merge-diff/v4/typed", "Parser") testingTypeConverter = types.Ref("k8s.io/client-go/testing", "TypeConverter") yamlObject = types.Ref("sigs.k8s.io/structured-merge-diff/v4/typed", "YAMLObject") - yamlUnmarshal = types.Ref("gopkg.in/yaml.v2", "Unmarshal") ) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go index e0914e69d2..5620fc0c2e 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/args/args.go @@ -61,6 +61,9 @@ type Args struct { // If non-empty, Apply functions are generated for each type and reference the apply builders. // If empty (""), Apply functions are not generated. ApplyConfigurationPackage string + + // PrefersProtobuf determines if the generated clientset uses protobuf for API requests. + PrefersProtobuf bool } func New() *Args { @@ -99,6 +102,8 @@ func (args *Args) AddFlags(fs *pflag.FlagSet, inputBase string) { "list of comma separated plural exception definitions in Type:PluralizedType form") fs.StringVar(&args.ApplyConfigurationPackage, "apply-configuration-package", args.ApplyConfigurationPackage, "optional package of apply configurations, generated by applyconfiguration-gen, that are required to generate Apply functions for each type in the clientset. By default Apply functions are not generated.") + fs.BoolVar(&args.PrefersProtobuf, "prefers-protobuf", args.PrefersProtobuf, + "when set, client-gen will generate a clientset that uses protobuf for API requests") // support old flags fs.SetNormalizeFunc(mapFlagName("clientset-path", "output-pkg", fs.GetNormalizeFunc())) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index 12a4afdbf9..c8fa01a8ec 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -128,7 +128,7 @@ func DefaultNameSystem() string { return "public" } -func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetDir, clientsetPkg string, groupPkgName string, groupGoName string, apiPath string, inputPkg string, applyBuilderPkg string, boilerplate []byte) generator.Target { +func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clientsetDir, clientsetPkg string, groupPkgName string, groupGoName string, apiPath string, inputPkg string, applyBuilderPkg string, boilerplate []byte, prefersProtobuf bool) generator.Target { subdir := []string{"typed", strings.ToLower(groupPkgName), strings.ToLower(gv.Version.NonEmpty())} gvDir := filepath.Join(clientsetDir, filepath.Join(subdir...)) gvPkg := path.Join(clientsetPkg, path.Join(subdir...)) @@ -160,8 +160,9 @@ func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, + prefersProtobuf: prefersProtobuf, typeToMatch: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(gvPkg), }) } @@ -177,7 +178,7 @@ func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie groupGoName: groupGoName, apiPath: apiPath, types: typeList, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(gvPkg), }) expansionFileName := "generated_expansion.go" @@ -214,7 +215,7 @@ func targetForClientset(args *args.Args, clientsetDir, clientsetPkg string, grou groups: args.Groups, groupGoNames: groupGoNames, clientsetPackage: clientsetPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(clientsetPkg), }, } return generators @@ -260,7 +261,7 @@ NextGroup: OutputPath: schemeDir, Groups: args.Groups, GroupGoNames: groupGoNames, - ImportTracker: generator.NewImportTracker(), + ImportTracker: generator.NewImportTrackerForPackage(schemePkg), CreateRegistry: internalClient, }, } @@ -424,7 +425,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target targetForGroup( gv, orderer.OrderTypes(types), clientsetDir, clientsetPkg, group.PackageName, groupGoNames[gv], args.ClientsetAPIPath, - inputPath, args.ApplyConfigurationPackage, boilerplate)) + inputPath, args.ApplyConfigurationPackage, boilerplate, args.PrefersProtobuf)) if args.FakeClient { targetList = append(targetList, fake.TargetForGroup(gv, orderer.OrderTypes(types), clientsetDir, clientsetPkg, group.PackageName, groupGoNames[gv], inputPath, args.ApplyConfigurationPackage, boilerplate)) diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go index 74c98232c5..935efec21a 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go @@ -58,12 +58,12 @@ func TargetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie OutputFilename: "fake_" + strings.ToLower(c.Namers["private"].Name(t)) + ".go", }, outputPackage: outputPkg, + realClientPackage: realClientPkg, inputPackage: inputPkg, - group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, typeToMatch: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), applyConfigurationPackage: applyBuilderPackage, }) } @@ -74,11 +74,10 @@ func TargetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie }, outputPackage: outputPkg, realClientPackage: realClientPkg, - group: gv.Group.NonEmpty(), version: gv.Version.String(), groupGoName: groupGoName, types: typeList, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), }) return generators }, @@ -111,7 +110,7 @@ func TargetForClientset(args *args.Args, clientsetDir, clientsetPkg string, appl groups: args.Groups, groupGoNames: groupGoNames, fakeClientsetPackage: clientsetPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(clientsetPkg), realClientsetPackage: clientsetPkg, applyConfigurationPackage: applyConfigurationPkg, }, @@ -123,7 +122,7 @@ func TargetForClientset(args *args.Args, clientsetDir, clientsetPkg string, appl OutputPkg: clientsetPkg, Groups: args.Groups, GroupGoNames: groupGoNames, - ImportTracker: generator.NewImportTracker(), + ImportTracker: generator.NewImportTrackerForPackage(clientsetPkg), PrivateScheme: true, }, } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go index 3bf7aa12b9..ffb02ebba1 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go @@ -77,7 +77,6 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { "fakediscovery \"k8s.io/client-go/discovery/fake\"", "k8s.io/apimachinery/pkg/runtime", "k8s.io/apimachinery/pkg/watch", - "k8s.io/apimachinery/pkg/api/meta/testrestmapper", ) return diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go index d9c9b8bac4..04c586a0ed 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_group.go @@ -34,7 +34,6 @@ type genFakeForGroup struct { generator.GoGenerator outputPackage string // must be a Go import-path realClientPackage string // must be a Go import-path - group string version string groupGoName string // types in this group @@ -78,6 +77,8 @@ func (g *genFakeForGroup) GenerateType(c *generator.Context, t *types.Type, w io "Fake": c.Universe.Type(types.Name{Package: "k8s.io/client-go/testing", Name: "Fake"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "RESTClient": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClient"}), + "FakeClient": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "FakeClient"}), + "NewFakeClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewFakeClient"}), } sw.Do(groupClientTemplate, m) @@ -110,13 +111,13 @@ type Fake$.GroupGoName$$.Version$ struct { var getterImplNamespaced = ` func (c *Fake$.GroupGoName$$.Version$) $.type|publicPlural$(namespace string) $.realClientPackage$.$.type|public$Interface { - return &Fake$.type|publicPlural${c, namespace} + return newFake$.type|publicPlural$(c, namespace) } ` var getterImplNonNamespaced = ` func (c *Fake$.GroupGoName$$.Version$) $.type|publicPlural$() $.realClientPackage$.$.type|public$Interface { - return &Fake$.type|publicPlural${c} + return newFake$.type|publicPlural$(c) } ` diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go index 20499cf8c1..6c1410039e 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go @@ -35,7 +35,7 @@ import ( type genFakeForType struct { generator.GoGenerator outputPackage string // Must be a Go import-path - group string + realClientPackage string // Must be a Go import-path version string groupGoName string inputPackage string @@ -61,37 +61,9 @@ func (g *genFakeForType) Imports(c *generator.Context) (imports []string) { return g.imports.ImportLines() } -// Ideally, we'd like genStatus to return true if there is a subresource path -// registered for "status" in the API server, but we do not have that -// information, so genStatus returns true if the type has a status field. -func genStatus(t *types.Type) bool { - // Default to true if we have a Status member - hasStatus := false - for _, m := range t.Members { - if m.Name == "Status" { - hasStatus = true - break - } - } - - tags := util.MustParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) - return hasStatus && !tags.NoStatus -} - -// hasObjectMeta returns true if the type has a ObjectMeta field. -func hasObjectMeta(t *types.Type) bool { - for _, m := range t.Members { - if m.Embedded && m.Name == "ObjectMeta" { - return true - } - } - return false -} - // GenerateType makes the body of a file implementing the individual typed client for type t. func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") - pkg := path.Base(t.Name.Package) tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) if err != nil { return err @@ -99,30 +71,28 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. const pkgClientGoTesting = "k8s.io/client-go/testing" m := map[string]interface{}{ - "type": t, - "inputType": t, - "resultType": t, - "subresourcePath": "", - "package": pkg, - "Package": namer.IC(pkg), - "namespaced": !tags.NonNamespaced, - "Group": namer.IC(g.group), - "GroupGoName": g.groupGoName, - "Version": namer.IC(g.version), - "version": g.version, - "SchemeGroupVersion": c.Universe.Type(types.Name{Package: t.Name.Package, Name: "SchemeGroupVersion"}), - "CreateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "CreateOptions"}), - "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), - "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), - "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), - "PatchOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "PatchOptions"}), - "ApplyOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ApplyOptions"}), - "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), - "Everything": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/labels", Name: "Everything"}), - "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), - "ApplyPatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "ApplyPatchType"}), - "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), - "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "type": t, + "inputType": t, + "resultType": t, + "subresourcePath": "", + "namespaced": !tags.NonNamespaced, + "GroupGoName": g.groupGoName, + "Version": namer.IC(g.version), + "realClientInterface": c.Universe.Type(types.Name{Package: g.realClientPackage, Name: t.Name.Name + "Interface"}), + "SchemeGroupVersion": c.Universe.Type(types.Name{Package: t.Name.Package, Name: "SchemeGroupVersion"}), + "CreateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "CreateOptions"}), + "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), + "GetOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GetOptions"}), + "ListOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"}), + "PatchOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "PatchOptions"}), + "ApplyOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ApplyOptions"}), + "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), + "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), + "ApplyPatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "ApplyPatchType"}), + "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), + "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "fmtErrorf": c.Universe.Type(types.Name{Package: "fmt", Name: "Errorf"}), + "contextContext": c.Universe.Type(types.Name{Package: "context", Name: "Context"}), "NewRootListActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootListActionWithOptions"}), "NewListActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewListActionWithOptions"}), @@ -130,8 +100,6 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "NewGetActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewGetActionWithOptions"}), "NewRootDeleteActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootDeleteActionWithOptions"}), "NewDeleteActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewDeleteActionWithOptions"}), - "NewRootDeleteCollectionActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootDeleteCollectionActionWithOptions"}), - "NewDeleteCollectionActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewDeleteCollectionActionWithOptions"}), "NewRootUpdateActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootUpdateActionWithOptions"}), "NewUpdateActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewUpdateActionWithOptions"}), "NewRootCreateActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootCreateActionWithOptions"}), @@ -144,11 +112,16 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "NewGetSubresourceActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewGetSubresourceActionWithOptions"}), "NewRootGetSubresourceActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootGetSubresourceActionWithOptions"}), "NewRootUpdateSubresourceActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootUpdateSubresourceActionWithOptions"}), - "NewRootPatchActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootPatchActionWithOptions"}), - "NewPatchActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewPatchActionWithOptions"}), "NewRootPatchSubresourceActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootPatchSubresourceActionWithOptions"}), "NewPatchSubresourceActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewPatchSubresourceActionWithOptions"}), - "ExtractFromListOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "ExtractFromListOptions"}), + "FakeClient": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "FakeClient"}), + "NewFakeClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewFakeClient"}), + "FakeClientWithApply": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "FakeClientWithApply"}), + "NewFakeClientWithApply": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewFakeClientWithApply"}), + "FakeClientWithList": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "FakeClientWithList"}), + "NewFakeClientWithList": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewFakeClientWithList"}), + "FakeClientWithListAndApply": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "FakeClientWithListAndApply"}), + "NewFakeClientWithListAndApply": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewFakeClientWithListAndApply"}), } generateApply := len(g.applyConfigurationPackage) > 0 @@ -158,56 +131,23 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, gvString), t.Name.Name+"ApplyConfiguration") } - if tags.NonNamespaced { - sw.Do(structNonNamespaced, m) - } else { - sw.Do(structNamespaced, m) - } + listableOrAppliable := noList | noApply - if tags.NoVerbs { - return sw.Error() + if !tags.NoVerbs && tags.HasVerb("list") { + listableOrAppliable |= withList } - sw.Do(resource, m) - sw.Do(kind, m) - if tags.HasVerb("get") { - sw.Do(getTemplate, m) - } - if tags.HasVerb("list") { - if hasObjectMeta(t) { - sw.Do(listUsingOptionsTemplate, m) - } else { - sw.Do(listTemplate, m) - } - } - if tags.HasVerb("watch") { - sw.Do(watchTemplate, m) + if !tags.NoVerbs && tags.HasVerb("apply") && generateApply { + listableOrAppliable |= withApply } - if tags.HasVerb("create") { - sw.Do(createTemplate, m) - } - if tags.HasVerb("update") { - sw.Do(updateTemplate, m) - } - if tags.HasVerb("updateStatus") && genStatus(t) { - sw.Do(updateStatusTemplate, m) - } - if tags.HasVerb("delete") { - sw.Do(deleteTemplate, m) - } - if tags.HasVerb("deleteCollection") { - sw.Do(deleteCollectionTemplate, m) - } - if tags.HasVerb("patch") { - sw.Do(patchTemplate, m) - } - if tags.HasVerb("apply") && generateApply { - sw.Do(applyTemplate, m) - } - if tags.HasVerb("applyStatus") && generateApply && genStatus(t) { - sw.Do(applyStatusTemplate, m) + sw.Do(structType[listableOrAppliable], m) + sw.Do(newStruct[listableOrAppliable], m) + + if tags.NoVerbs { + return sw.Error() } + _, typeGVString := util.ParsePathGroupVersion(g.inputPackage) // generate extended client methods @@ -251,7 +191,6 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. } if e.HasVerb("list") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listTemplate), m) } @@ -305,77 +244,147 @@ func adjustTemplate(name, verbType, template string) string { return strings.ReplaceAll(template, " "+titler.String(verbType), " "+name) } -// template for the struct that implements the type's interface -var structNamespaced = ` -// Fake$.type|publicPlural$ implements $.type|public$Interface -type Fake$.type|publicPlural$ struct { - Fake *Fake$.GroupGoName$$.Version$ - ns string -} -` +// struct and constructor variants +const ( + // The following values are bits in a bitmask. + // The values which can be set indicate list support and apply support; + // to make the declarations easier to read (like a truth table), corresponding zero-values + // are also declared. + noList = 0 + noApply = 0 + withList = 1 << iota + withApply +) -// template for the struct that implements the type's interface -var structNonNamespaced = ` -// Fake$.type|publicPlural$ implements $.type|public$Interface -type Fake$.type|publicPlural$ struct { - Fake *Fake$.GroupGoName$$.Version$ +// The following string slices are similar to maps, but with combinable keys used as indices. +// Each entry defines whether it supports lists and/or apply; each bit is then toggled: +// * noList, noApply: index 0; +// * withList, noApply: index 1; +// * noList, withApply: index 2; +// * withList, withApply: index 3. +// Go enforces index unicity in these kinds of declarations. + +// struct declarations +var structType = []string{ + noList | noApply: ` + // fake$.type|publicPlural$ implements $.type|public$Interface + type fake$.type|publicPlural$ struct { + *$.FakeClient|raw$[*$.type|raw$] + Fake *Fake$.GroupGoName$$.Version$ + } + `, + withList | noApply: ` + // fake$.type|publicPlural$ implements $.type|public$Interface + type fake$.type|publicPlural$ struct { + *$.FakeClientWithList|raw$[*$.type|raw$, *$.type|raw$List] + Fake *Fake$.GroupGoName$$.Version$ + } + `, + noList | withApply: ` + // fake$.type|publicPlural$ implements $.type|public$Interface + type fake$.type|publicPlural$ struct { + *$.FakeClientWithApply|raw$[*$.type|raw$, *$.inputApplyConfig|raw$] + Fake *Fake$.GroupGoName$$.Version$ + } + `, + withList | withApply: ` + // fake$.type|publicPlural$ implements $.type|public$Interface + type fake$.type|publicPlural$ struct { + *$.FakeClientWithListAndApply|raw$[*$.type|raw$, *$.type|raw$List, *$.inputApplyConfig|raw$] + Fake *Fake$.GroupGoName$$.Version$ + } + `, } -` -var resource = ` -var $.type|allLowercasePlural$Resource = $.SchemeGroupVersion|raw$.WithResource("$.type|resource$") -` - -var kind = ` -var $.type|allLowercasePlural$Kind = $.SchemeGroupVersion|raw$.WithKind("$.type|singularKind$") -` - -var listTemplate = ` -// List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { - emptyResult := &$.type|raw$List{} - obj, err := c.Fake. - $if .namespaced$Invokes($.NewListActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, c.ns, opts), emptyResult) - $else$Invokes($.NewRootListActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, opts), emptyResult)$end$ - if obj == nil { - return emptyResult, err +// Constructors for the struct, in all variants +var newStruct = []string{ + noList | noApply: ` + func newFake$.type|publicPlural$(fake *Fake$.GroupGoName$$.Version$$if .namespaced$, namespace string$end$) $.realClientInterface|raw$ { + return &fake$.type|publicPlural${ + $.NewFakeClient|raw$[*$.type|raw$]( + fake.Fake, + $if .namespaced$namespace$else$""$end$, + $.SchemeGroupVersion|raw$.WithResource("$.type|resource$"), + $.SchemeGroupVersion|raw$.WithKind("$.type|singularKind$"), + func() *$.type|raw$ {return &$.type|raw${}}, + ), + fake, + } } - return obj.(*$.type|raw$List), err + `, + noList | withApply: ` + func newFake$.type|publicPlural$(fake *Fake$.GroupGoName$$.Version$$if .namespaced$, namespace string$end$) $.realClientInterface|raw$ { + return &fake$.type|publicPlural${ + $.NewFakeClientWithApply|raw$[*$.type|raw$, *$.inputApplyConfig|raw$]( + fake.Fake, + $if .namespaced$namespace$else$""$end$, + $.SchemeGroupVersion|raw$.WithResource("$.type|resource$"), + $.SchemeGroupVersion|raw$.WithKind("$.type|singularKind$"), + func() *$.type|raw$ {return &$.type|raw${}}, + ), + fake, + } + } + `, + withList | noApply: ` + func newFake$.type|publicPlural$(fake *Fake$.GroupGoName$$.Version$$if .namespaced$, namespace string$end$) $.realClientInterface|raw$ { + return &fake$.type|publicPlural${ + $.NewFakeClientWithList|raw$[*$.type|raw$, *$.type|raw$List]( + fake.Fake, + $if .namespaced$namespace$else$""$end$, + $.SchemeGroupVersion|raw$.WithResource("$.type|resource$"), + $.SchemeGroupVersion|raw$.WithKind("$.type|singularKind$"), + func() *$.type|raw$ {return &$.type|raw${}}, + func() *$.type|raw$List {return &$.type|raw$List{}}, + func(dst, src *$.type|raw$List) {dst.ListMeta = src.ListMeta}, + func(list *$.type|raw$List) []*$.type|raw$ {return gentype.ToPointerSlice(list.Items)}, + func(list *$.type|raw$List, items []*$.type|raw$) {list.Items = gentype.FromPointerSlice(items)}, + ), + fake, + } + } + `, + withList | withApply: ` + func newFake$.type|publicPlural$(fake *Fake$.GroupGoName$$.Version$$if .namespaced$, namespace string$end$) $.realClientInterface|raw$ { + return &fake$.type|publicPlural${ + $.NewFakeClientWithListAndApply|raw$[*$.type|raw$, *$.type|raw$List, *$.inputApplyConfig|raw$]( + fake.Fake, + $if .namespaced$namespace$else$""$end$, + $.SchemeGroupVersion|raw$.WithResource("$.type|resource$"), + $.SchemeGroupVersion|raw$.WithKind("$.type|singularKind$"), + func() *$.type|raw$ {return &$.type|raw${}}, + func() *$.type|raw$List {return &$.type|raw$List{}}, + func(dst, src *$.type|raw$List) {dst.ListMeta = src.ListMeta}, + func(list *$.type|raw$List) []*$.type|raw$ {return gentype.ToPointerSlice(list.Items)}, + func(list *$.type|raw$List, items []*$.type|raw$) {list.Items = gentype.FromPointerSlice(items)}, + ), + fake, + } + } + `, } -` -var listUsingOptionsTemplate = ` +var listTemplate = ` // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { +func (c *fake$.type|publicPlural$) List(ctx $.contextContext|raw$, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { emptyResult := &$.type|raw$List{} obj, err := c.Fake. - $if .namespaced$Invokes($.NewListActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, c.ns, opts), emptyResult) - $else$Invokes($.NewRootListActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, opts), emptyResult)$end$ + $if .namespaced$Invokes($.NewListActionWithOptions|raw$(c.Resource(), c.Kind(), c.Namespace(), opts), emptyResult) + $else$Invokes($.NewRootListActionWithOptions|raw$(c.Resource(), c.Kind(), opts), emptyResult)$end$ if obj == nil { return emptyResult, err } - - label, _, _ := $.ExtractFromListOptions|raw$(opts) - if label == nil { - label = $.Everything|raw$() - } - list := &$.type|raw$List{ListMeta: obj.(*$.type|raw$List).ListMeta} - for _, item := range obj.(*$.type|raw$List).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err + return obj.(*$.type|raw$List), err } ` var getTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Get(ctx $.contextContext|raw$, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewGetActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, options), emptyResult) - $else$Invokes($.NewRootGetActionWithOptions|raw$($.type|allLowercasePlural$Resource, name, options), emptyResult)$end$ + $if .namespaced$Invokes($.NewGetActionWithOptions|raw$(c.Resource(), c.Namespace(), name, options), emptyResult) + $else$Invokes($.NewRootGetActionWithOptions|raw$(c.Resource(), name, options), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -385,11 +394,11 @@ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options var getSubresourceTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Get(ctx $.contextContext|raw$, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewGetSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, "$.subresourcePath$", $.type|private$Name, options), emptyResult) - $else$Invokes($.NewRootGetSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.type|private$Name, options), emptyResult)$end$ + $if .namespaced$Invokes($.NewGetSubresourceActionWithOptions|raw$(c.Resource(), c.Namespace(), "$.subresourcePath$", $.type|private$Name, options), emptyResult) + $else$Invokes($.NewRootGetSubresourceActionWithOptions|raw$(c.Resource(), "$.subresourcePath$", $.type|private$Name, options), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -399,31 +408,21 @@ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name var deleteTemplate = ` // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. -func (c *Fake$.type|publicPlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { +func (c *fake$.type|publicPlural$) Delete(ctx $.contextContext|raw$, name string, opts $.DeleteOptions|raw$) error { _, err := c.Fake. - $if .namespaced$Invokes($.NewDeleteActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, opts), &$.type|raw${}) - $else$Invokes($.NewRootDeleteActionWithOptions|raw$($.type|allLowercasePlural$Resource, name, opts), &$.type|raw${})$end$ + $if .namespaced$Invokes($.NewDeleteActionWithOptions|raw$(c.Resource(), c.Namespace(), name, opts), &$.type|raw${}) + $else$Invokes($.NewRootDeleteActionWithOptions|raw$(c.Resource(), name, opts), &$.type|raw${})$end$ return err } ` -var deleteCollectionTemplate = ` -// DeleteCollection deletes a collection of objects. -func (c *Fake$.type|publicPlural$) DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error { - $if .namespaced$action := $.NewDeleteCollectionActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, opts, listOpts) - $else$action := $.NewRootDeleteCollectionActionWithOptions|raw$($.type|allLowercasePlural$Resource, opts, listOpts) - $end$ - _, err := c.Fake.Invokes(action, &$.type|raw$List{}) - return err -} -` var createTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Create(ctx $.contextContext|raw$, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewCreateActionWithOptions|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$, opts), emptyResult) - $else$Invokes($.NewRootCreateActionWithOptions|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$, opts), emptyResult)$end$ + $if .namespaced$Invokes($.NewCreateActionWithOptions|raw$(c.Resource(), c.Namespace(), $.inputType|private$, opts), emptyResult) + $else$Invokes($.NewRootCreateActionWithOptions|raw$(c.Resource(), $.inputType|private$, opts), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -433,11 +432,11 @@ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|priva var createSubresourceTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Create(ctx $.contextContext|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewCreateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", c.ns, $.inputType|private$, opts), emptyResult) - $else$Invokes($.NewRootCreateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", $.inputType|private$, opts), emptyResult)$end$ + $if .namespaced$Invokes($.NewCreateSubresourceActionWithOptions|raw$(c.Resource(), $.type|private$Name, "$.subresourcePath$", c.Namespace(), $.inputType|private$, opts), emptyResult) + $else$Invokes($.NewRootCreateSubresourceActionWithOptions|raw$(c.Resource(), $.type|private$Name, "$.subresourcePath$", $.inputType|private$, opts), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -447,11 +446,11 @@ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Na var updateTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Update(ctx $.contextContext|raw$, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewUpdateActionWithOptions|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$, opts), emptyResult) - $else$Invokes($.NewRootUpdateActionWithOptions|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$, opts), emptyResult)$end$ + $if .namespaced$Invokes($.NewUpdateActionWithOptions|raw$(c.Resource(), c.Namespace(), $.inputType|private$, opts), emptyResult) + $else$Invokes($.NewRootUpdateActionWithOptions|raw$(c.Resource(), $.inputType|private$, opts), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -461,11 +460,11 @@ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|priva var updateSubresourceTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Update(ctx $.contextContext|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewUpdateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", c.ns, $.inputType|private$, opts), &$.inputType|raw${}) - $else$Invokes($.NewRootUpdateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$, opts), emptyResult)$end$ + $if .namespaced$Invokes($.NewUpdateSubresourceActionWithOptions|raw$(c.Resource(), "$.subresourcePath$", c.Namespace(), $.inputType|private$, opts), &$.inputType|raw${}) + $else$Invokes($.NewRootUpdateSubresourceActionWithOptions|raw$(c.Resource(), "$.subresourcePath$", $.inputType|private$, opts), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -473,37 +472,22 @@ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Na } ` -var updateStatusTemplate = ` -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *Fake$.type|publicPlural$) UpdateStatus(ctx context.Context, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (result *$.type|raw$, err error) { - emptyResult := &$.type|raw${} - obj, err := c.Fake. - $if .namespaced$Invokes($.NewUpdateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "status", c.ns, $.type|private$, opts), emptyResult) - $else$Invokes($.NewRootUpdateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "status", $.type|private$, opts), emptyResult)$end$ - if obj == nil { - return emptyResult, err - } - return obj.(*$.type|raw$), err -} -` - var watchTemplate = ` // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. -func (c *Fake$.type|publicPlural$) Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { +func (c *fake$.type|publicPlural$) Watch(ctx $.contextContext|raw$, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { return c.Fake. - $if .namespaced$InvokesWatch($.NewWatchActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, opts)) - $else$InvokesWatch($.NewRootWatchActionWithOptions|raw$($.type|allLowercasePlural$Resource, opts))$end$ + $if .namespaced$InvokesWatch($.NewWatchActionWithOptions|raw$(c.Resource(), c.Namespace(), opts)) + $else$InvokesWatch($.NewRootWatchActionWithOptions|raw$(c.Resource(), opts))$end$ } ` var patchTemplate = ` // Patch applies the patch and returns the patched $.resultType|private$. -func (c *Fake$.type|publicPlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Patch(ctx $.contextContext|raw$, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, pt, data, opts, subresources... ), emptyResult) - $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, name, pt, data, opts, subresources...), emptyResult)$end$ + $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$(c.Resource(), c.Namespace(), name, pt, data, opts, subresources... ), emptyResult) + $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$(c.Resource(), name, pt, data, opts, subresources...), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -513,35 +497,9 @@ func (c *Fake$.type|publicPlural$) Patch(ctx context.Context, name string, pt $. var applyTemplate = ` // Apply takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$. -func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { - if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") - } - data, err := $.jsonMarshal|raw$($.inputType|private$) - if err != nil { - return nil, err - } - name := $.inputType|private$.Name - if name == nil { - return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply") - } - emptyResult := &$.resultType|raw${} - obj, err := c.Fake. - $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, *name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions()), emptyResult) - $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, *name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions()), emptyResult)$end$ - if obj == nil { - return emptyResult, err - } - return obj.(*$.resultType|raw$), err -} -` - -var applyStatusTemplate = ` -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Apply(ctx $.contextContext|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to Apply must not be nil") } data, err := $.jsonMarshal|raw$($.inputType|private$) if err != nil { @@ -549,12 +507,12 @@ func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType| } name := $.inputType|private$.Name if name == nil { - return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply") + return nil, $.fmtErrorf|raw$("$.inputType|private$.Name must be provided to Apply") } emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, *name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions(), "status"), emptyResult) - $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, *name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions(), "status"), emptyResult)$end$ + $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$(c.Resource(), c.Namespace(), *name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions()), emptyResult) + $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$(c.Resource(), *name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions()), emptyResult)$end$ if obj == nil { return emptyResult, err } @@ -565,9 +523,9 @@ func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType| var applySubresourceTemplate = ` // Apply takes top resource name and the apply declarative configuration for $.subresourcePath$, // applies it and returns the applied $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *fake$.type|publicPlural$) Apply(ctx $.contextContext|raw$, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to Apply must not be nil") } data, err := $.jsonMarshal|raw$($.inputType|private$) if err != nil { @@ -575,8 +533,8 @@ func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.type|private$Nam } emptyResult := &$.resultType|raw${} obj, err := c.Fake. - $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, $.type|private$Name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions(), "$.inputType|private$"), emptyResult) - $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions(), "$.inputType|private$"), emptyResult)$end$ + $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$(c.Resource(), c.Namespace(), $.type|private$Name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions(), "$.inputType|private$"), emptyResult) + $else$Invokes($.NewRootPatchSubresourceActionWithOptions|raw$(c.Resource(), $.type|private$Name, $.ApplyPatchType|raw$, data, opts.ToPatchOptions(), "$.inputType|private$"), emptyResult)$end$ if obj == nil { return emptyResult, err } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index 0c043cee9e..e84205604d 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -73,12 +73,14 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr allGroups := clientgentypes.ToGroupVersionInfo(g.groups, g.groupGoNames) m := map[string]interface{}{ "allGroups": allGroups, + "fmtErrorf": c.Universe.Type(types.Name{Package: "fmt", Name: "Errorf"}), "Config": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Config"}), "DefaultKubernetesUserAgent": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "DefaultKubernetesUserAgent"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), "DiscoveryInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/discovery", Name: "DiscoveryInterface"}), "DiscoveryClient": c.Universe.Type(types.Name{Package: "k8s.io/client-go/discovery", Name: "DiscoveryClient"}), + "httpClient": c.Universe.Type(types.Name{Package: "net/http", Name: "Client"}), "NewDiscoveryClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClientForConfigAndClient"}), "NewDiscoveryClientForConfigOrDie": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClientForConfigOrDie"}), "NewDiscoveryClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClient"}), @@ -160,11 +162,11 @@ var newClientsetForConfigAndClientTemplate = ` // Note the http client provided takes precedence over the configured transport values. // If config's RateLimiter is not set and QPS and Burst are acceptable, // NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *$.Config|raw$, httpClient *http.Client) (*Clientset, error) { +func NewForConfigAndClient(c *$.Config|raw$, httpClient *$.httpClient|raw$) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, $.fmtErrorf|raw$("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = $.flowcontrolNewTokenBucketRateLimiter|raw$(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go index 83b13b11cd..8196871753 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go @@ -64,7 +64,6 @@ func (g *genGroup) Namers(c *generator.Context) namer.NameSystems { func (g *genGroup) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, path.Join(g.clientsetPackage, "scheme")) return } @@ -82,23 +81,28 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer if groupName == "" { apiPath = `"/api"` } - + schemePackage := path.Join(g.clientsetPackage, "scheme") m := map[string]interface{}{ - "version": g.version, - "groupName": groupName, - "GroupGoName": g.groupGoName, - "Version": namer.IC(g.version), - "types": g.types, - "apiPath": apiPath, - "schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}), - "runtimeAPIVersionInternal": c.Universe.Variable(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "APIVersionInternal"}), - "restConfig": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Config"}), - "restDefaultKubernetesUserAgent": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "DefaultKubernetesUserAgent"}), - "restRESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), - "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), - "restRESTClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientFor"}), - "restRESTClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientForConfigAndClient"}), - "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: g.inputPackage, Name: "SchemeGroupVersion"}), + "version": g.version, + "groupName": groupName, + "GroupGoName": g.groupGoName, + "Version": namer.IC(g.version), + "types": g.types, + "apiPath": apiPath, + "httpClient": c.Universe.Type(types.Name{Package: "net/http", Name: "Client"}), + "schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}), + "runtimeAPIVersionInternal": c.Universe.Variable(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "APIVersionInternal"}), + "restConfig": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Config"}), + "restDefaultKubernetesUserAgent": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "DefaultKubernetesUserAgent"}), + "restRESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), + "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), + "restRESTClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientFor"}), + "restRESTClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientForConfigAndClient"}), + "restCodecFactoryForGeneratedClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "CodecFactoryForGeneratedClient"}), + "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: g.inputPackage, Name: "SchemeGroupVersion"}), + "SchemePrioritizedVersionsForGroup": c.Universe.Variable(types.Name{Package: schemePackage, Name: "Scheme.PrioritizedVersionsForGroup"}), + "Codecs": c.Universe.Variable(types.Name{Package: schemePackage, Name: "Codecs"}), + "Scheme": c.Universe.Variable(types.Name{Package: schemePackage, Name: "Scheme"}), } sw.Do(groupInterfaceTemplate, m) sw.Do(groupClientTemplate, m) @@ -179,7 +183,7 @@ func NewForConfig(c *$.restConfig|raw$) (*$.GroupGoName$$.Version$Client, error) var newClientForConfigAndClientTemplate = ` // NewForConfigAndClient creates a new $.GroupGoName$$.Version$Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *$.restConfig|raw$, h *http.Client) (*$.GroupGoName$$.Version$Client, error) { +func NewForConfigAndClient(c *$.restConfig|raw$, h *$.httpClient|raw$) (*$.GroupGoName$$.Version$Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -228,11 +232,11 @@ func setConfigDefaults(config *$.restConfig|raw$) error { if config.UserAgent == "" { config.UserAgent = $.restDefaultKubernetesUserAgent|raw$() } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("$.groupName$")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("$.groupName$")[0] + if config.GroupVersion == nil || config.GroupVersion.Group != $.SchemePrioritizedVersionsForGroup|raw$("$.groupName$")[0].Group { + gv := $.SchemePrioritizedVersionsForGroup|raw$("$.groupName$")[0] config.GroupVersion = &gv } - config.NegotiatedSerializer = scheme.Codecs + config.NegotiatedSerializer = $.restCodecFactoryForGeneratedClient|raw$($.Scheme|raw$, $.Codecs|raw$) if config.QPS == 0 { config.QPS = 5 @@ -250,7 +254,7 @@ func setConfigDefaults(config *$.restConfig|raw$) error { gv := $.SchemeGroupVersion|raw$ config.GroupVersion = &gv config.APIPath = $.apiPath$ - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = $.restCodecFactoryForGeneratedClient|raw$($.Scheme|raw$, $.Codecs|raw$).WithoutConversion() if config.UserAgent == "" { config.UserAgent = $.restDefaultKubernetesUserAgent|raw$() diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index 7361c48f1f..00b949a776 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -23,6 +23,7 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" + "k8s.io/gengo/v2/generator" "k8s.io/gengo/v2/namer" "k8s.io/gengo/v2/types" @@ -40,6 +41,7 @@ type genClientForType struct { group string version string groupGoName string + prefersProtobuf bool typeToMatch *types.Type imports namer.ImportTracker } @@ -139,7 +141,8 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), "ApplyOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ApplyOptions"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), - "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "PatchOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "PatchOptions"}), + "context": c.Universe.Type(types.Name{Package: "context", Name: "Context"}), }, } if e.HasVerb("apply") { @@ -158,6 +161,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "subresource": false, "subresourcePath": "", "GroupGoName": g.groupGoName, + "prefersProtobuf": g.prefersProtobuf, "Version": namer.IC(g.version), "CreateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "CreateOptions"}), "DeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "DeleteOptions"}), @@ -167,19 +171,27 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "ApplyOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ApplyOptions"}), "UpdateOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "UpdateOptions"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), - "ApplyPatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "ApplyPatchType"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "schemeParameterCodec": c.Universe.Variable(types.Name{Package: path.Join(g.clientsetPackage, "scheme"), Name: "ParameterCodec"}), - "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "fmtErrorf": c.Universe.Function(types.Name{Package: "fmt", Name: "Errorf"}), + "klogWarningf": c.Universe.Function(types.Name{Package: "k8s.io/klog/v2", Name: "Warningf"}), + "context": c.Universe.Type(types.Name{Package: "context", Name: "Context"}), + "timeDuration": c.Universe.Type(types.Name{Package: "time", Name: "Duration"}), + "timeSecond": c.Universe.Type(types.Name{Package: "time", Name: "Second"}), "resourceVersionMatchNotOlderThan": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ResourceVersionMatchNotOlderThan"}), "CheckListFromCacheDataConsistencyIfRequested": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/consistencydetector", Name: "CheckListFromCacheDataConsistencyIfRequested"}), "CheckWatchListFromCacheDataConsistencyIfRequested": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/consistencydetector", Name: "CheckWatchListFromCacheDataConsistencyIfRequested"}), "PrepareWatchListOptionsFromListOptions": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/watchlist", Name: "PrepareWatchListOptionsFromListOptions"}), + "applyNewRequest": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/apply", Name: "NewRequest"}), "Client": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "Client"}), "ClientWithList": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "ClientWithList"}), "ClientWithApply": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "ClientWithApply"}), "ClientWithListAndApply": c.Universe.Type(types.Name{Package: "k8s.io/client-go/gentype", Name: "ClientWithListAndApply"}), + "NewClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewClient"}), + "NewClientWithApply": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewClientWithApply"}), + "NewClientWithList": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewClientWithList"}), + "NewClientWithListAndApply": c.Universe.Function(types.Name{Package: "k8s.io/client-go/gentype", Name: "NewClientWithListAndApply"}), } if generateApply { @@ -267,64 +279,65 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i m["inputType"] = &inputType m["resultType"] = &resultType m["subresourcePath"] = e.SubResourcePath + m["verb"] = e.VerbName if e.HasVerb("apply") { m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, inputGVString), inputType.Name.Name+"ApplyConfiguration") } if e.HasVerb("get") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, getSubresourceTemplate), m) + sw.Do(getSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, getTemplate), m) + sw.Do(getTemplate, m) } } if e.HasVerb("list") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listSubresourceTemplate), m) + sw.Do(listSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listTemplate), m) - sw.Do(adjustTemplate(e.VerbName, e.VerbType, privateListTemplate), m) - sw.Do(adjustTemplate(e.VerbName, e.VerbType, watchListTemplate), m) + sw.Do(listTemplate, m) + sw.Do(privateListTemplate, m) + sw.Do(watchListTemplate, m) } } // TODO: Figure out schemantic for watching a sub-resource. if e.HasVerb("watch") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, watchTemplate), m) + sw.Do(watchTemplate, m) } if e.HasVerb("create") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, createSubresourceTemplate), m) + sw.Do(createSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, createTemplate), m) + sw.Do(createTemplate, m) } } if e.HasVerb("update") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, updateSubresourceTemplate), m) + sw.Do(updateSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, updateTemplate), m) + sw.Do(updateTemplate, m) } } // TODO: Figure out schemantic for deleting a sub-resource (what arguments // are passed, does it need two names? etc. if e.HasVerb("delete") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, deleteTemplate), m) + sw.Do(deleteTemplate, m) } if e.HasVerb("patch") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, patchTemplate), m) + sw.Do(patchTemplate, m) } if e.HasVerb("apply") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, applySubresourceTemplate), m) + sw.Do(applySubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, applyTemplate), m) + sw.Do(applyTemplate, m) } } } @@ -332,13 +345,6 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i return sw.Error() } -// adjustTemplate adjust the origin verb template using the expansion name. -// TODO: Make the verbs in templates parametrized so the strings.Replace() is -// not needed. -func adjustTemplate(name, verbType, template string) string { - return strings.ReplaceAll(template, " "+titler.String(verbType), " "+name) -} - func generateInterface(defaultVerbTemplates map[string]string, tags util.Tags) string { // need an ordered list here to guarantee order of generated methods. out := []string{} @@ -352,34 +358,34 @@ func generateInterface(defaultVerbTemplates map[string]string, tags util.Tags) s func buildSubresourceDefaultVerbTemplates(generateApply bool) map[string]string { m := map[string]string{ - "create": `Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, - "list": `List(ctx context.Context, $.type|private$Name string, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, - "update": `Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, - "get": `Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, + "create": `Create(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, + "list": `List(ctx $.context|raw$, $.type|private$Name string, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, + "update": `Update(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, + "get": `Get(ctx $.context|raw$, $.type|private$Name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, } if generateApply { - m["apply"] = `Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (*$.resultType|raw$, error)` + m["apply"] = `Apply(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (*$.resultType|raw$, error)` } return m } func buildDefaultVerbTemplates(generateApply bool) map[string]string { m := map[string]string{ - "create": `Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, - "update": `Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, + "create": `Create(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, + "update": `Update(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, "updateStatus": `// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -UpdateStatus(ctx context.Context, $.inputType|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error)`, - "delete": `Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error`, - "deleteCollection": `DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error`, - "get": `Get(ctx context.Context, name string, opts $.GetOptions|raw$) (*$.resultType|raw$, error)`, - "list": `List(ctx context.Context, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, - "watch": `Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error)`, - "patch": `Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error)`, +UpdateStatus(ctx $.context|raw$, $.inputType|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error)`, + "delete": `Delete(ctx $.context|raw$, name string, opts $.DeleteOptions|raw$) error`, + "deleteCollection": `DeleteCollection(ctx $.context|raw$, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error`, + "get": `Get(ctx $.context|raw$, name string, opts $.GetOptions|raw$) (*$.resultType|raw$, error)`, + "list": `List(ctx $.context|raw$, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, + "watch": `Watch(ctx $.context|raw$, opts $.ListOptions|raw$) ($.watchInterface|raw$, error)`, + "patch": `Patch(ctx $.context|raw$, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error)`, } if generateApply { - m["apply"] = `Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` + m["apply"] = `Apply(ctx $.context|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` m["applyStatus"] = `// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -ApplyStatus(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` +ApplyStatus(ctx $.context|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` } return m } @@ -472,12 +478,14 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client, namespace string) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClient[*$.resultType|raw$]( + $.NewClient|raw$[*$.resultType|raw$]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, namespace, - func() *$.resultType|raw$ { return &$.resultType|raw${} }), + func() *$.resultType|raw$ { return &$.resultType|raw${} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -485,12 +493,14 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client, namespace string) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClientWithApply[*$.resultType|raw$, *$.inputApplyConfig|raw$]( + $.NewClientWithApply|raw$[*$.resultType|raw$, *$.inputApplyConfig|raw$]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, namespace, - func() *$.resultType|raw$ { return &$.resultType|raw${} }), + func() *$.resultType|raw$ { return &$.resultType|raw${} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -498,13 +508,15 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client, namespace string) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClientWithList[*$.resultType|raw$, *$.resultType|raw$List]( + $.NewClientWithList|raw$[*$.resultType|raw$, *$.resultType|raw$List]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, namespace, func() *$.resultType|raw$ { return &$.resultType|raw${} }, - func() *$.resultType|raw$List { return &$.resultType|raw$List{} }), + func() *$.resultType|raw$List { return &$.resultType|raw$List{} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -512,13 +524,15 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client, namespace string) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClientWithListAndApply[*$.resultType|raw$, *$.resultType|raw$List, *$.inputApplyConfig|raw$]( + $.NewClientWithListAndApply|raw$[*$.resultType|raw$, *$.resultType|raw$List, *$.inputApplyConfig|raw$]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, namespace, func() *$.resultType|raw$ { return &$.resultType|raw${} }, - func() *$.resultType|raw$List { return &$.resultType|raw$List{} }), + func() *$.resultType|raw$List { return &$.resultType|raw$List{} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -526,12 +540,14 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClient[*$.resultType|raw$]( + $.NewClient|raw$[*$.resultType|raw$]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, "", - func() *$.resultType|raw$ { return &$.resultType|raw${} }), + func() *$.resultType|raw$ { return &$.resultType|raw${} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -539,12 +555,14 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClientWithApply[*$.resultType|raw$, *$.inputApplyConfig|raw$]( + $.NewClientWithApply|raw$[*$.resultType|raw$, *$.inputApplyConfig|raw$]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, "", - func() *$.resultType|raw$ { return &$.resultType|raw${} }), + func() *$.resultType|raw$ { return &$.resultType|raw${} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -552,13 +570,15 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClientWithList[*$.resultType|raw$, *$.resultType|raw$List]( + $.NewClientWithList|raw$[*$.resultType|raw$, *$.resultType|raw$List]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, "", func() *$.resultType|raw$ { return &$.resultType|raw${} }, - func() *$.resultType|raw$List { return &$.resultType|raw$List{} }), + func() *$.resultType|raw$List { return &$.resultType|raw$List{} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, @@ -566,30 +586,32 @@ var newStruct = []string{ // new$.type|publicPlural$ returns a $.type|publicPlural$ func new$.type|publicPlural$(c *$.GroupGoName$$.Version$Client) *$.type|privatePlural$ { return &$.type|privatePlural${ - gentype.NewClientWithListAndApply[*$.resultType|raw$, *$.resultType|raw$List, *$.inputApplyConfig|raw$]( + $.NewClientWithListAndApply|raw$[*$.resultType|raw$, *$.resultType|raw$List, *$.inputApplyConfig|raw$]( "$.type|resource$", c.RESTClient(), $.schemeParameterCodec|raw$, "", func() *$.resultType|raw$ { return &$.resultType|raw${} }, - func() *$.resultType|raw$List { return &$.resultType|raw$List{} }), + func() *$.resultType|raw$List { return &$.resultType|raw$List{} }, + $if .prefersProtobuf$gentype.PrefersProtobuf[*$.resultType|raw$](),$end$ + ), } } `, } var listTemplate = ` -// List takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) List(ctx context.Context, opts $.ListOptions|raw$) (*$.resultType|raw$List, error) { +// $.verb$ takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, opts $.ListOptions|raw$) (*$.resultType|raw$List, error) { if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := $.PrepareWatchListOptionsFromListOptions|raw$(opts); watchListOptionsErr != nil { - klog.Warningf("Failed preparing watchlist options for $.type|resource$, falling back to the standard LIST semantics, err = %v", watchListOptionsErr ) + $.klogWarningf|raw$("Failed preparing watchlist options for $.type|resource$, falling back to the standard LIST semantics, err = %v", watchListOptionsErr ) } else if hasWatchListOptionsPrepared { result, err := c.watchList(ctx, watchListOptions) if err == nil { $.CheckWatchListFromCacheDataConsistencyIfRequested|raw$(ctx, "watchlist request for $.type|resource$", c.list, opts, result) return result, nil } - klog.Warningf("The watchlist request for $.type|resource$ ended with an error, falling back to the standard LIST semantics, err = %v", err) + $.klogWarningf|raw$("The watchlist request for $.type|resource$ ended with an error, falling back to the standard LIST semantics, err = %v", err) } result, err := c.list(ctx, opts) if err == nil { @@ -601,13 +623,14 @@ func (c *$.type|privatePlural$) List(ctx context.Context, opts $.ListOptions|raw var privateListTemplate = ` // list takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) list(ctx context.Context, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { - var timeout time.Duration +func (c *$.type|privatePlural$) list(ctx $.context|raw$, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { + var timeout $.timeDuration|raw$ if opts.TimeoutSeconds != nil{ - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + timeout = $.timeDuration|raw$(*opts.TimeoutSeconds) * $.timeSecond|raw$ } result = &$.resultType|raw$List{} err = c.GetClient().Get(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). @@ -619,14 +642,15 @@ func (c *$.type|privatePlural$) list(ctx context.Context, opts $.ListOptions|raw ` var listSubresourceTemplate = ` -// List takes $.type|raw$ name, label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) List(ctx context.Context, $.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { - var timeout time.Duration +// $.verb$ takes $.type|raw$ name, label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { + var timeout $.timeDuration|raw$ if opts.TimeoutSeconds != nil{ - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + timeout = $.timeDuration|raw$(*opts.TimeoutSeconds) * $.timeSecond|raw$ } result = &$.resultType|raw$List{} err = c.GetClient().Get(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -640,10 +664,11 @@ func (c *$.type|privatePlural$) List(ctx context.Context, $.type|private$Name st ` var getTemplate = ` -// Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *$.type|privatePlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Get(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name(name). @@ -655,10 +680,11 @@ func (c *$.type|privatePlural$) Get(ctx context.Context, name string, options $. ` var getSubresourceTemplate = ` -// Get takes name of the $.type|private$, and returns the corresponding $.resultType|raw$ object, and an error if there is any. -func (c *$.type|privatePlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes name of the $.type|private$, and returns the corresponding $.resultType|raw$ object, and an error if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Get(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -671,9 +697,10 @@ func (c *$.type|privatePlural$) Get(ctx context.Context, $.type|private$Name str ` var deleteTemplate = ` -// Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. -func (c *$.type|privatePlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { +// $.verb$ takes name of the $.type|private$ and deletes it. Returns an error if one occurs. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, name string, opts $.DeleteOptions|raw$) error { return c.GetClient().Delete(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name(name). @@ -684,10 +711,11 @@ func (c *$.type|privatePlural$) Delete(ctx context.Context, name string, opts $. ` var createSubresourceTemplate = ` -// Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Post(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -701,10 +729,11 @@ func (c *$.type|privatePlural$) Create(ctx context.Context, $.type|private$Name ` var createTemplate = ` -// Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Post(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). @@ -716,10 +745,11 @@ func (c *$.type|privatePlural$) Create(ctx context.Context, $.inputType|private$ ` var updateSubresourceTemplate = ` -// Update takes the top resource name and the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the top resource name and the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Put(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name($.type|private$Name). @@ -733,10 +763,11 @@ func (c *$.type|privatePlural$) Update(ctx context.Context, $.type|private$Name ` var updateTemplate = ` -// Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Put(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name($.inputType|private$.Name). @@ -749,14 +780,15 @@ func (c *$.type|privatePlural$) Update(ctx context.Context, $.inputType|private$ ` var watchTemplate = ` -// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. -func (c *$.type|privatePlural$) Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { - var timeout time.Duration +// $.verb$ returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { + var timeout $.timeDuration|raw$ if opts.TimeoutSeconds != nil{ - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + timeout = $.timeDuration|raw$(*opts.TimeoutSeconds) * $.timeSecond|raw$ } opts.Watch = true return c.GetClient().Get(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ VersionedParams(&opts, $.schemeParameterCodec|raw$). Timeout(timeout). @@ -766,14 +798,15 @@ func (c *$.type|privatePlural$) Watch(ctx context.Context, opts $.ListOptions|ra var watchListTemplate = ` // watchList establishes a watch stream with the server and returns the list of $.resultType|publicPlural$ -func (c *$.type|privatePlural$) watchList(ctx context.Context, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { - var timeout time.Duration +func (c *$.type|privatePlural$) watchList(ctx $.context|raw$, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { + var timeout $.timeDuration|raw$ if opts.TimeoutSeconds != nil{ - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + timeout = $.timeDuration|raw$(*opts.TimeoutSeconds) * $.timeSecond|raw$ } result = &$.resultType|raw$List{} - err = c.client.Get(). - $if .namespaced$Namespace(c.ns).$end$ + err = c.GetClient().Get(). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ + $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). VersionedParams(&opts, $.schemeParameterCodec|raw$). Timeout(timeout). @@ -784,10 +817,11 @@ func (c *$.type|privatePlural$) watchList(ctx context.Context, opts $.ListOption ` var patchTemplate = ` -// Patch applies the patch and returns the patched $.resultType|private$. -func (c *$.type|privatePlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { +// $.verb$ applies the patch and returns the patched $.resultType|private$. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Patch(pt). + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name(name). @@ -801,27 +835,27 @@ func (c *$.type|privatePlural$) Patch(ctx context.Context, name string, pt $.Pat ` var applyTemplate = ` -// Apply takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$. -func (c *$.type|privatePlural$) Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to $.verb$ must not be nil") } patchOpts := opts.ToPatchOptions() - data, err := $.jsonMarshal|raw$($.inputType|private$) + name := $.inputType|private$.Name + if name == nil { + return nil, $.fmtErrorf|raw$("$.inputType|private$.Name must be provided to $.verb$") + } + request, err := $.applyNewRequest|raw$(c.GetClient(), $.inputType|private$) if err != nil { return nil, err } - name := $.inputType|private$.Name - if name == nil { - return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply") - } result = &$.resultType|raw${} - err = c.GetClient().Patch($.ApplyPatchType|raw$). + err = request. + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name(*name). VersionedParams(&patchOpts, $.schemeParameterCodec|raw$). - Body(data). Do(ctx). Into(result) return @@ -829,26 +863,26 @@ func (c *$.type|privatePlural$) Apply(ctx context.Context, $.inputType|private$ ` var applySubresourceTemplate = ` -// Apply takes top resource name and the apply declarative configuration for $.subresourcePath$, +// $.verb$ takes top resource name and the apply declarative configuration for $.subresourcePath$, // applies it and returns the applied $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to $.verb$ must not be nil") } patchOpts := opts.ToPatchOptions() - data, err := $.jsonMarshal|raw$($.inputType|private$) + request, err := $.applyNewRequest|raw$(c.GetClient(), $.inputType|private$) if err != nil { return nil, err } result = &$.resultType|raw${} - err = c.GetClient().Patch($.ApplyPatchType|raw$). + err = request. + $if .prefersProtobuf$UseProtobufAsDefault().$end$ $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). Name($.type|private$Name). SubResource("$.subresourcePath$"). VersionedParams(&patchOpts, $.schemeParameterCodec|raw$). - Body(data). Do(ctx). Into(result) return diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go index cc61c48d49..eaadaa1b93 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/args/args.go @@ -20,6 +20,8 @@ import ( "fmt" "github.com/spf13/pflag" + + "k8s.io/gengo/v2" ) // DefaultBasePeerDirs are the peer-dirs nearly everybody will use, i.e. those coming from @@ -43,11 +45,6 @@ type Args struct { // generator pick up manually written conversion funcs from external packages. ExtraPeerDirs []string - // Additional dirs to parse and load, but not consider for peers. This is - // useful when packages depend on other packages and want to call - // conversions across them. - ExtraDirs []string - // SkipUnsafe indicates whether to generate unsafe conversions to improve the efficiency // of these operations. The unsafe operation is a direct pointer assignment via unsafe // (within the allowed uses of unsafe) and is equivalent to a proposed Golang change to @@ -57,13 +54,20 @@ type Args struct { // GoHeaderFile is the path to a boilerplate header file for generated // code. GoHeaderFile string + + // GeneratedBuildTag is the tag used to identify code generated by execution + // of this type. Each generator should use a different tag, and different + // groups of generators (external API that depends on Kube generations) should + // keep tags distinct as well. + GeneratedBuildTag string } // New returns default arguments for the generator. func New() *Args { return &Args{ - BasePeerDirs: DefaultBasePeerDirs, - SkipUnsafe: false, + BasePeerDirs: DefaultBasePeerDirs, + SkipUnsafe: false, + GeneratedBuildTag: gengo.StdBuildTag, } } @@ -75,12 +79,11 @@ func (args *Args) AddFlags(fs *pflag.FlagSet) { "Comma-separated list of apimachinery import paths which are considered, after tag-specified peers, for conversions. Only change these if you have very good reasons.") fs.StringSliceVar(&args.ExtraPeerDirs, "extra-peer-dirs", args.ExtraPeerDirs, "Application specific comma-separated list of import paths which are considered, after tag-specified peers and base-peer-dirs, for conversions.") - fs.StringSliceVar(&args.ExtraDirs, "extra-dirs", args.ExtraDirs, - "Application specific comma-separated list of import paths which are loaded and considered for callable conversions, but are not considered peers for conversion.") fs.BoolVar(&args.SkipUnsafe, "skip-unsafe", args.SkipUnsafe, "If true, will not generate code using unsafe pointer conversions; resulting code may be slower.") fs.StringVar(&args.GoHeaderFile, "go-header-file", "", "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.StringVar(&args.GeneratedBuildTag, "build-tag", args.GeneratedBuildTag, "A Go build tag to use to identify files generated by this command. Should be unique.") } // Validate checks the given arguments. diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go index f58130af25..a5f1b0cfb4 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go @@ -158,16 +158,16 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package klog.V(6).Infof("%s has a receiver", f.Name) continue } - if len(signature.Parameters) != 3 || signature.Parameters[2].Name != scopeName { + if len(signature.Parameters) != 3 || signature.Parameters[2].Type.Name != scopeName { klog.V(6).Infof("%s has wrong parameters", f.Name) continue } - if len(signature.Results) != 1 || signature.Results[0].Name != errorName { + if len(signature.Results) != 1 || signature.Results[0].Type.Name != errorName { klog.V(6).Infof("%s has wrong results", f.Name) continue } - inType := signature.Parameters[0] - outType := signature.Parameters[1] + inType := signature.Parameters[0].Type + outType := signature.Parameters[1].Type if inType.Kind != types.Pointer || outType.Kind != types.Pointer { klog.V(6).Infof("%s has wrong parameter types", f.Name) continue @@ -196,7 +196,7 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package } func GetTargets(context *generator.Context, args *args.Args) []generator.Target { - boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, args.GeneratedBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } @@ -478,7 +478,7 @@ func NewGenConversion(outputFilename, typesPackage, outputPackage string, manual outputPackage: outputPackage, peerPackages: peerPkgs, manualConversions: manualConversions, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPackage), types: []*types.Type{}, explicitConversions: []conversionPair{}, skippedFields: map[*types.Type][]string{}, diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go index cd52a9b964..5aec5025d5 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/main.go @@ -128,7 +128,7 @@ func main() { generators.NameSystems(), generators.DefaultNameSystem(), myTargets, - gengo.StdBuildTag, + args.GeneratedBuildTag, pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) diff --git a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go index c6047aacae..e1a8e4c166 100644 --- a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go +++ b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go @@ -222,7 +222,7 @@ func NewGenDeepCopy(outputFilename, targetPackage string, boundingDirs []string, boundingDirs: boundingDirs, allTypes: allTypes, registerTypes: registerTypes, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(targetPackage), typesForInit: make([]*types.Type, 0), } } @@ -277,8 +277,8 @@ func deepCopyMethod(t *types.Type) (*types.Signature, error) { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected exactly one result", t) } - ptrResult := f.Signature.Results[0].Kind == types.Pointer && f.Signature.Results[0].Elem.Name == t.Name - nonPtrResult := f.Signature.Results[0].Name == t.Name + ptrResult := f.Signature.Results[0].Type.Kind == types.Pointer && f.Signature.Results[0].Type.Elem.Name == t.Name + nonPtrResult := f.Signature.Results[0].Type.Name == t.Name if !ptrResult && !nonPtrResult { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected to return %s or *%s", t, t.Name.Name, t.Name.Name) @@ -329,7 +329,7 @@ func deepCopyIntoMethod(t *types.Type) (*types.Signature, error) { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected no result type", t) } - ptrParam := f.Signature.Parameters[0].Kind == types.Pointer && f.Signature.Parameters[0].Elem.Name == t.Name + ptrParam := f.Signature.Parameters[0].Type.Kind == types.Pointer && f.Signature.Parameters[0].Type.Elem.Name == t.Name if !ptrParam { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected parameter of type *%s", t, t.Name.Name) @@ -696,7 +696,7 @@ func (g *genDeepCopy) doMap(t *types.Type, sw *generator.SnippetWriter) { leftPointer := ut.Elem.Kind == types.Pointer rightPointer := !isReference(ut.Elem) if dc != nil { - rightPointer = dc.Results[0].Kind == types.Pointer + rightPointer = dc.Results[0].Type.Kind == types.Pointer } if leftPointer == rightPointer { sw.Do("(*out)[key] = val.DeepCopy()\n", nil) @@ -812,7 +812,7 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { leftPointer := ft.Kind == types.Pointer rightPointer := !isReference(ft) if dc != nil { - rightPointer = dc.Results[0].Kind == types.Pointer + rightPointer = dc.Results[0].Type.Kind == types.Pointer } if leftPointer == rightPointer { sw.Do("out.$.name$ = in.$.name$.DeepCopy()\n", args) @@ -866,7 +866,7 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) { case dc != nil || dci != nil: rightPointer := !isReference(ut.Elem) if dc != nil { - rightPointer = dc.Results[0].Kind == types.Pointer + rightPointer = dc.Results[0].Type.Kind == types.Pointer } if rightPointer { sw.Do("*out = (*in).DeepCopy()\n", nil) diff --git a/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go index 52a9d1c67d..8d8dfe97f4 100644 --- a/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/args/args.go @@ -20,17 +20,27 @@ import ( "fmt" "github.com/spf13/pflag" + + "k8s.io/gengo/v2" ) type Args struct { OutputFile string ExtraPeerDirs []string // Always consider these as last-ditch possibilities for conversions. GoHeaderFile string + + // GeneratedBuildTag is the tag used to identify code generated by execution + // of this type. Each generator should use a different tag, and different + // groups of generators (external API that depends on Kube generations) should + // keep tags distinct as well. + GeneratedBuildTag string } // New returns default arguments for the generator. func New() *Args { - return &Args{} + return &Args{ + GeneratedBuildTag: gengo.StdBuildTag, + } } // AddFlags add the generator flags to the flag set. @@ -41,6 +51,7 @@ func (args *Args) AddFlags(fs *pflag.FlagSet) { "Comma-separated list of import paths which are considered, after tag-specified peers, for conversions.") fs.StringVar(&args.GoHeaderFile, "go-header-file", "", "the path to a file containing boilerplate header text; the string \"YEAR\" will be replaced with the current 4-digit year") + fs.StringVar(&args.GeneratedBuildTag, "build-tag", args.GeneratedBuildTag, "A Go build tag to use to identify files generated by this command. Should be unique.") } // Validate checks the given arguments. diff --git a/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go index 64b9ff2999..82e1cdd207 100644 --- a/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go @@ -165,7 +165,7 @@ func getManualDefaultingFunctions(context *generator.Context, pkg *types.Package if len(signature.Results) != 0 { continue } - inType := signature.Parameters[0] + inType := signature.Parameters[0].Type if inType.Kind != types.Pointer { continue } @@ -222,7 +222,7 @@ func getManualDefaultingFunctions(context *generator.Context, pkg *types.Package } func GetTargets(context *generator.Context, args *args.Args) []generator.Target { - boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, gengo.StdBuildTag, gengo.StdGeneratedBy) + boilerplate, err := gengo.GoBoilerplate(args.GoHeaderFile, args.GeneratedBuildTag, gengo.StdGeneratedBy) if err != nil { klog.Fatalf("Failed loading boilerplate: %v", err) } @@ -823,7 +823,7 @@ func (g *genDefaulter) GenerateType(c *generator.Context, t *types.Type, w io.Wr }) sw := generator.NewSnippetWriter(w, c, "$", "$") - g.generateDefaulter(t, callTree, sw) + g.generateDefaulter(c, t, callTree, sw) return sw.Error() } @@ -833,9 +833,9 @@ func defaultingArgsFromType(inType *types.Type) generator.Args { } } -func (g *genDefaulter) generateDefaulter(inType *types.Type, callTree *callNode, sw *generator.SnippetWriter) { +func (g *genDefaulter) generateDefaulter(c *generator.Context, inType *types.Type, callTree *callNode, sw *generator.SnippetWriter) { sw.Do("func $.inType|objectdefaultfn$(in *$.inType|raw$) {\n", defaultingArgsFromType(inType)) - callTree.WriteMethod("in", 0, nil, sw) + callTree.WriteMethod(c, "in", 0, nil, sw) sw.Do("}\n\n", nil) } @@ -996,15 +996,19 @@ func getTypeZeroValue(t string) (interface{}, error) { return defaultZero, nil } -func (n *callNode) writeDefaulter(varName string, index string, isVarPointer bool, sw *generator.SnippetWriter) { +func (n *callNode) writeDefaulter(c *generator.Context, varName string, index string, isVarPointer bool, sw *generator.SnippetWriter) { if n.defaultValue.IsEmpty() { return } + + jsonUnmarshalType := c.Universe.Type(types.Name{Package: "encoding/json", Name: "Unmarshal"}) + args := generator.Args{ - "defaultValue": n.defaultValue.Resolved(), - "varName": varName, - "index": index, - "varTopType": n.defaultTopLevelType, + "defaultValue": n.defaultValue.Resolved(), + "varName": varName, + "index": index, + "varTopType": n.defaultTopLevelType, + "jsonUnmarshal": jsonUnmarshalType, } variablePlaceholder := "" @@ -1101,13 +1105,13 @@ func (n *callNode) writeDefaulter(varName string, index string, isVarPointer boo // This applies to maps with non-primitive values (eg: map[string]SubStruct) if n.key { sw.Do("$.mapDefaultVar$ := $.varName$[$.index$]\n", args) - sw.Do("if err := json.Unmarshal([]byte(`$.defaultValue$`), &$.mapDefaultVar$); err != nil {\n", args) + sw.Do("if err := $.jsonUnmarshal|raw$([]byte(`$.defaultValue$`), &$.mapDefaultVar$); err != nil {\n", args) } else { variablePointer := variablePlaceholder if !isVarPointer { variablePointer = "&" + variablePointer } - sw.Do(fmt.Sprintf("if err := json.Unmarshal([]byte(`$.defaultValue$`), %s); err != nil {\n", variablePointer), args) + sw.Do(fmt.Sprintf("if err := $.jsonUnmarshal|raw$([]byte(`$.defaultValue$`), %s); err != nil {\n", variablePointer), args) } sw.Do("panic(err)\n", nil) sw.Do("}\n", nil) @@ -1121,7 +1125,7 @@ func (n *callNode) writeDefaulter(varName string, index string, isVarPointer boo // WriteMethod performs an in-order traversal of the calltree, generating loops and if blocks as necessary // to correctly turn the call tree into a method body that invokes all calls on all child nodes of the call tree. // Depth is used to generate local variables at the proper depth. -func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, sw *generator.SnippetWriter) { +func (n *callNode) WriteMethod(c *generator.Context, varName string, depth int, ancestors []*callNode, sw *generator.SnippetWriter) { // if len(n.call) > 0 { // sw.Do(fmt.Sprintf("// %s\n", callPath(append(ancestors, n)).String()), nil) // } @@ -1153,10 +1157,10 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, } } - n.writeDefaulter(varName, index, isPointer, sw) + n.writeDefaulter(c, varName, index, isPointer, sw) n.writeCalls(local, true, sw) for i := range n.children { - n.children[i].WriteMethod(local, depth+1, append(ancestors, n), sw) + n.children[i].WriteMethod(c, local, depth+1, append(ancestors, n), sw) } sw.Do("}\n", nil) case n.key: @@ -1165,14 +1169,14 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, index = index + "_" + ancestors[len(ancestors)-1].field vars["index"] = index sw.Do("for $.index$ := range $.var$ {\n", vars) - n.writeDefaulter(varName, index, isPointer, sw) + n.writeDefaulter(c, varName, index, isPointer, sw) sw.Do("}\n", nil) } default: - n.writeDefaulter(varName, index, isPointer, sw) + n.writeDefaulter(c, varName, index, isPointer, sw) n.writeCalls(varName, isPointer, sw) for i := range n.children { - n.children[i].WriteMethod(varName, depth, append(ancestors, n), sw) + n.children[i].WriteMethod(c, varName, depth, append(ancestors, n), sw) } } diff --git a/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go index d57ca0666c..0250c1328f 100644 --- a/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/main.go @@ -74,7 +74,7 @@ func main() { generators.NameSystems(), generators.DefaultNameSystem(), myTargets, - gengo.StdBuildTag, + args.GeneratedBuildTag, pflag.Args(), ); err != nil { klog.Fatalf("Error: %v", err) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go index 0fc653dda1..c9eadd812f 100644 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go +++ b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go @@ -145,10 +145,7 @@ func isOptionalAlias(t *types.Type) bool { if t.Underlying == nil || (t.Underlying.Kind != types.Map && t.Underlying.Kind != types.Slice) { return false } - if extractBoolTagOrDie("protobuf.nullable", t.CommentLines) == false { - return false - } - return true + return extractBoolTagOrDie("protobuf.nullable", t.CommentLines) } func (g *genProtoIDL) Imports(c *generator.Context) (imports []string) { @@ -187,7 +184,7 @@ func (g *genProtoIDL) GenerateType(c *generator.Context, t *types.Type, w io.Wri case types.Struct: return b.doStruct(sw) default: - return b.unknown(sw) + return b.unknown() } } @@ -262,7 +259,7 @@ type bodyGen struct { t *types.Type } -func (b bodyGen) unknown(sw *generator.SnippetWriter) error { +func (b bodyGen) unknown() error { return fmt.Errorf("not sure how to generate: %#v", b.t) } diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index d8e8873aab..e863b1d2fd 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -61,7 +61,6 @@ func (g *genericGenerator) Namers(c *generator.Context) namer.NameSystems { func (g *genericGenerator) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, "fmt") return } @@ -127,6 +126,7 @@ func (g *genericGenerator) GenerateType(c *generator.Context, t *types.Type, w i "cacheGenericLister": c.Universe.Type(cacheGenericLister), "cacheNewGenericLister": c.Universe.Function(cacheNewGenericLister), "cacheSharedIndexInformer": c.Universe.Type(cacheSharedIndexInformer), + "fmtErrorf": c.Universe.Type(fmtErrorfFunc), "groups": groups, "schemeGVs": schemeGVs, "schemaGroupResource": c.Universe.Type(schemaGroupResource), @@ -179,6 +179,6 @@ func (f *sharedInformerFactory) ForResource(resource {{.schemaGroupVersionResour {{end -}} } - return nil, fmt.Errorf("no informer found for %v", resource) + return nil, {{.fmtErrorf|raw}}("no informer found for %v", resource) } ` diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go index 9d786ea07d..4034695ddf 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go @@ -86,6 +86,7 @@ func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w "cacheNewSharedIndexInformer": c.Universe.Function(cacheNewSharedIndexInformer), "cacheSharedIndexInformer": c.Universe.Type(cacheSharedIndexInformer), "clientSetInterface": clientSetInterface, + "contextTODO": c.Universe.Type(contextTODOFunc), "group": namer.IC(g.groupGoName), "informerFor": informerFor, "interfacesTweakListOptionsFunc": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "TweakListOptionsFunc"}), @@ -151,13 +152,13 @@ func NewFiltered$.type|public$Informer(client $.clientSetInterface|raw$$if .name if tweakListOptions != nil { tweakListOptions(&options) } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).List(context.TODO(), options) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).List($.contextTODO|raw$(), options) }, WatchFunc: func(options $.v1ListOptions|raw$) ($.watchInterface|raw$, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).Watch(context.TODO(), options) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).Watch($.contextTODO|raw$(), options) }, }, &$.type|raw${}, diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go index 65dc89d038..2e886d4e00 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go @@ -249,7 +249,7 @@ func factoryTarget(outputDirBase, outputPkgBase string, boilerplate []byte, grou OutputFilename: "factory.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkgBase), groupVersions: groupVersions, clientSetPackage: clientSetPackage, internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), @@ -261,7 +261,7 @@ func factoryTarget(outputDirBase, outputPkgBase string, boilerplate []byte, grou OutputFilename: "generic.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkgBase), groupVersions: groupVersions, pluralExceptions: pluralExceptions, typesForGroupVersion: typesForGroupVersion, @@ -288,7 +288,7 @@ func factoryInterfaceTarget(outputDirBase, outputPkgBase string, boilerplate []b OutputFilename: "factory_interfaces.go", }, outputPackage: outputPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), clientSetPackage: clientSetPackage, }) @@ -314,7 +314,7 @@ func groupTarget(outputDirBase, outputPackageBase string, groupVersions clientge }, outputPackage: outputPkg, groupVersions: groupVersions, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), internalInterfacesPackage: path.Join(outputPackageBase, subdirForInternalInterfaces), }) return generators @@ -342,7 +342,7 @@ func versionTarget(outputDirBase, outputPkgBase string, groupPkgName string, gv OutputFilename: "interface.go", }, outputPackage: outputPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), types: typesToGenerate, internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), }) @@ -357,7 +357,7 @@ func versionTarget(outputDirBase, outputPkgBase string, groupPkgName string, gv groupVersion: gv, groupGoName: groupGoName, typeToGenerate: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), clientSetPackage: clientSetPackage, listersPackage: listersPackage, internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go index 4ca511ea4e..b717adfd3e 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go @@ -29,6 +29,8 @@ var ( cacheNewSharedIndexInformer = types.Name{Package: "k8s.io/client-go/tools/cache", Name: "NewSharedIndexInformer"} cacheSharedIndexInformer = types.Name{Package: "k8s.io/client-go/tools/cache", Name: "SharedIndexInformer"} cacheTransformFunc = types.Name{Package: "k8s.io/client-go/tools/cache", Name: "TransformFunc"} + contextTODOFunc = types.Name{Package: "context", Name: "TODO"} + fmtErrorfFunc = types.Name{Package: "fmt", Name: "Errorf"} listOptions = types.Name{Package: "k8s.io/kubernetes/pkg/apis/core", Name: "ListOptions"} reflectType = types.Name{Package: "reflect", Name: "Type"} runtimeObject = types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "Object"} diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 8955e076f6..a5beb2a7f1 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -149,7 +149,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target groupVersion: gv, internalGVPkg: internalGVPkg, typeToGenerate: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), objectMeta: objectMeta, }) } @@ -213,11 +213,6 @@ func (g *listerGenerator) Namers(c *generator.Context) namer.NameSystems { func (g *listerGenerator) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, "k8s.io/apimachinery/pkg/api/errors") - imports = append(imports, "k8s.io/apimachinery/pkg/labels") - imports = append(imports, "k8s.io/client-go/listers") - // for Indexer - imports = append(imports, "k8s.io/client-go/tools/cache") return } @@ -226,9 +221,14 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io klog.V(5).Infof("processing type %v", t) m := map[string]interface{}{ - "Resource": c.Universe.Function(types.Name{Package: t.Name.Package, Name: "Resource"}), - "type": t, - "objectMeta": g.objectMeta, + "Resource": c.Universe.Function(types.Name{Package: t.Name.Package, Name: "Resource"}), + "labelsSelector": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/labels", Name: "Selector"}), + "listersResourceIndexer": c.Universe.Function(types.Name{Package: "k8s.io/client-go/listers", Name: "ResourceIndexer"}), + "listersNew": c.Universe.Function(types.Name{Package: "k8s.io/client-go/listers", Name: "New"}), + "listersNewNamespaced": c.Universe.Function(types.Name{Package: "k8s.io/client-go/listers", Name: "NewNamespaced"}), + "cacheIndexer": c.Universe.Type(types.Name{Package: "k8s.io/client-go/tools/cache", Name: "Indexer"}), + "type": t, + "objectMeta": g.objectMeta, } tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) @@ -262,7 +262,7 @@ var typeListerInterface = ` type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*$.type|raw$, err error) + List(selector $.labelsSelector|raw$) (ret []*$.type|raw$, err error) // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. $.type|publicPlural$(namespace string) $.type|public$NamespaceLister $.type|public$ListerExpansion @@ -275,7 +275,7 @@ var typeListerInterfaceNonNamespaced = ` type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*$.type|raw$, err error) + List(selector $.labelsSelector|raw$) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) @@ -289,21 +289,21 @@ type $.type|public$Lister interface { var typeListerStruct = ` // $.type|private$Lister implements the $.type|public$Lister interface. type $.type|private$Lister struct { - listers.ResourceIndexer[*$.type|raw$] + $.listersResourceIndexer|raw$[*$.type|raw$] } ` var typeListerConstructor = ` // New$.type|public$Lister returns a new $.type|public$Lister. -func New$.type|public$Lister(indexer cache.Indexer) $.type|public$Lister { - return &$.type|private$Lister{listers.New[*$.type|raw$](indexer, $.Resource|raw$("$.type|lowercaseSingular$"))} +func New$.type|public$Lister(indexer $.cacheIndexer|raw$) $.type|public$Lister { + return &$.type|private$Lister{$.listersNew|raw$[*$.type|raw$](indexer, $.Resource|raw$("$.type|lowercaseSingular$"))} } ` var typeListerNamespaceLister = ` // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. func (s *$.type|private$Lister) $.type|publicPlural$(namespace string) $.type|public$NamespaceLister { - return $.type|private$NamespaceLister{listers.NewNamespaced[*$.type|raw$](s.ResourceIndexer, namespace)} + return $.type|private$NamespaceLister{$.listersNewNamespaced|raw$[*$.type|raw$](s.ResourceIndexer, namespace)} } ` @@ -313,7 +313,7 @@ var namespaceListerInterface = ` type $.type|public$NamespaceLister interface { // List lists all $.type|publicPlural$ in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*$.type|raw$, err error) + List(selector $.labelsSelector|raw$) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) @@ -328,6 +328,6 @@ var namespaceListerStruct = ` // $.type|private$NamespaceLister implements the $.type|public$NamespaceLister // interface. type $.type|private$NamespaceLister struct { - listers.ResourceIndexer[*$.type|raw$] + $.listersResourceIndexer|raw$[*$.type|raw$] } ` diff --git a/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go b/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go index d2998261c8..952e276f7b 100644 --- a/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go +++ b/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go @@ -115,7 +115,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target gv: gv, typesToGenerate: typesToRegister, outputPackage: pkg.Path, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(pkg.Path), }, } }, diff --git a/vendor/k8s.io/code-generator/kube_codegen.sh b/vendor/k8s.io/code-generator/kube_codegen.sh index f57c52caec..8207da5edd 100644 --- a/vendor/k8s.io/code-generator/kube_codegen.sh +++ b/vendor/k8s.io/code-generator/kube_codegen.sh @@ -433,6 +433,9 @@ function kube::codegen::gen_openapi() { # --plural-exceptions # An optional list of comma separated plural exception definitions in Type:PluralizedType form. # +# --prefers-protobuf +# Enables generation of clientsets that use protobuf for API requests. +# function kube::codegen::gen_client() { local in_dir="" local one_input_api="" @@ -450,6 +453,7 @@ function kube::codegen::gen_client() { local boilerplate="${KUBE_CODEGEN_ROOT}/hack/boilerplate.go.txt" local plural_exceptions="" local v="${KUBE_VERBOSE:-0}" + local prefers_protobuf="false" while [ "$#" -gt 0 ]; do case "$1" in @@ -509,6 +513,10 @@ function kube::codegen::gen_client() { plural_exceptions="$2" shift 2 ;; + "--prefers-protobuf") + prefers_protobuf="true" + shift + ;; *) if [[ "$1" =~ ^-- ]]; then echo "unknown argument: $1" >&2 @@ -625,6 +633,7 @@ function kube::codegen::gen_client() { --apply-configuration-package "${applyconfig_pkg}" \ --input-base "$(cd "${in_dir}" && pwd -P)" `# must be absolute path or Go import path"` \ --plural-exceptions "${plural_exceptions}" \ + --prefers-protobuf="${prefers_protobuf}" \ "${inputs[@]}" if [ "${watchable}" == "true" ]; then diff --git a/vendor/k8s.io/gengo/v2/Makefile b/vendor/k8s.io/gengo/v2/Makefile new file mode 100644 index 0000000000..8d0fbdaa8a --- /dev/null +++ b/vendor/k8s.io/gengo/v2/Makefile @@ -0,0 +1,14 @@ +all: + go build ./... + +test: + GODEBUG=gotypesalias=0 go test -race ./... -count=1 + GODEBUG=gotypesalias=1 go test -race ./... -count=1 + +# We verify for the maximum version of the go directive as 1.20 +# here because the oldest go directive that exists on our supported +# release branches in k/k is 1.20. +verify: + GODEBUG=gotypesalias=0 ./hack/verify-examples.sh + GODEBUG=gotypesalias=1 ./hack/verify-examples.sh + ./hack/verify-go-directive.sh 1.20 diff --git a/vendor/k8s.io/gengo/v2/generator/execute.go b/vendor/k8s.io/gengo/v2/generator/execute.go index 02b4c3318a..a1e052f5cc 100644 --- a/vendor/k8s.io/gengo/v2/generator/execute.go +++ b/vendor/k8s.io/gengo/v2/generator/execute.go @@ -26,6 +26,7 @@ import ( "strings" "golang.org/x/tools/imports" + "k8s.io/gengo/v2/namer" "k8s.io/gengo/v2/types" "k8s.io/klog/v2" @@ -114,7 +115,13 @@ func assembleGoFile(w io.Writer, f *File) { } func importsWrapper(src []byte) ([]byte, error) { - return imports.Process("", src, nil) + opt := imports.Options{ + Comments: true, + TabIndent: true, + TabWidth: 8, + FormatOnly: true, // Disable the insertion and deletion of imports + } + return imports.Process("", src, &opt) } func NewGoFile() *DefaultFileType { diff --git a/vendor/k8s.io/gengo/v2/generator/import_tracker.go b/vendor/k8s.io/gengo/v2/generator/import_tracker.go index 70b86cf56b..22393e4d49 100644 --- a/vendor/k8s.io/gengo/v2/generator/import_tracker.go +++ b/vendor/k8s.io/gengo/v2/generator/import_tracker.go @@ -18,6 +18,7 @@ package generator import ( "go/token" + "path/filepath" "strings" "k8s.io/klog/v2" @@ -45,7 +46,7 @@ import ( func NewImportTrackerForPackage(local string, typesToAdd ...*types.Type) *namer.DefaultImportTracker { tracker := namer.NewDefaultImportTracker(types.Name{Package: local}) tracker.IsInvalidType = func(*types.Type) bool { return false } - tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, name) } + tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, local, name) } tracker.PrintImport = func(path, name string) string { return name + " \"" + path + "\"" } tracker.AddTypes(typesToAdd...) @@ -56,7 +57,7 @@ func NewImportTracker(typesToAdd ...*types.Type) *namer.DefaultImportTracker { return NewImportTrackerForPackage("", typesToAdd...) } -func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { +func goTrackerLocalName(tracker namer.ImportTracker, localPkg string, t types.Name) string { path := t.Package // Using backslashes in package names causes gengo to produce Go code which @@ -64,6 +65,7 @@ func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { if strings.ContainsRune(path, '\\') { klog.Warningf("Warning: backslash used in import path '%v', this is unsupported.\n", path) } + localLeaf := filepath.Base(localPkg) dirs := strings.Split(path, namer.GoSeperator) for n := len(dirs) - 1; n >= 0; n-- { @@ -74,8 +76,13 @@ func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { // packages, but aren't legal go names. So we'll sanitize. name = strings.ReplaceAll(name, ".", "") name = strings.ReplaceAll(name, "-", "") - if _, found := tracker.PathOf(name); found { - // This name collides with some other package + if _, found := tracker.PathOf(name); found || name == localLeaf { + // This name collides with some other package. + // Or, this name is tne same name as the local package, + // which we avoid because it can be confusing. For example, + // if the local package is v1, we to avoid importing + // another package using the v1 name, and instead import + // it with a more qualified name, such as metav1. continue } diff --git a/vendor/k8s.io/gengo/v2/generator/snippet_writer.go b/vendor/k8s.io/gengo/v2/generator/snippet_writer.go index 7f4610c00f..550214e163 100644 --- a/vendor/k8s.io/gengo/v2/generator/snippet_writer.go +++ b/vendor/k8s.io/gengo/v2/generator/snippet_writer.go @@ -123,25 +123,28 @@ func (s *SnippetWriter) Do(format string, args interface{}) *SnippetWriter { // SnippetWriter.Do. type Args map[interface{}]interface{} -// With makes a copy of a and adds the given key, value pair. +// With makes a copy of a and adds the given key, value pair. If key overlaps, +// the new value wins. func (a Args) With(key, value interface{}) Args { - a2 := Args{key: value} + result := Args{} for k, v := range a { - a2[k] = v + result[k] = v } - return a2 + result[key] = value + return result } -// WithArgs makes a copy of a and adds the given arguments. +// WithArgs makes a copy of a and adds the given arguments. If any keys +// overlap, the values from rhs win. func (a Args) WithArgs(rhs Args) Args { - a2 := Args{} - for k, v := range rhs { - a2[k] = v - } + result := Args{} for k, v := range a { - a2[k] = v + result[k] = v + } + for k, v := range rhs { + result[k] = v } - return a2 + return result } func (s *SnippetWriter) Out() io.Writer { @@ -152,3 +155,16 @@ func (s *SnippetWriter) Out() io.Writer { func (s *SnippetWriter) Error() error { return s.err } + +// Dup creates an exact duplicate SnippetWriter with a different io.Writer. +func (s *SnippetWriter) Dup(w io.Writer) *SnippetWriter { + ret := *s + ret.w = w + return &ret +} + +// Append adds the contents of the io.Reader to this SnippetWriter's buffer. +func (s *SnippetWriter) Append(r io.Reader) error { + _, err := io.Copy(s.w, r) + return err +} diff --git a/vendor/k8s.io/gengo/v2/namer/namer.go b/vendor/k8s.io/gengo/v2/namer/namer.go index e82fe66adc..37877eb492 100644 --- a/vendor/k8s.io/gengo/v2/namer/namer.go +++ b/vendor/k8s.io/gengo/v2/namer/namer.go @@ -281,12 +281,12 @@ func (ns *NameStrategy) Name(t *types.Type) string { case types.Func: // TODO: add to name test parts := []string{"Func"} - for _, pt := range t.Signature.Parameters { - parts = append(parts, ns.removePrefixAndSuffix(ns.Name(pt))) + for _, param := range t.Signature.Parameters { + parts = append(parts, ns.removePrefixAndSuffix(ns.Name(param.Type))) } parts = append(parts, "Returns") - for _, rt := range t.Signature.Results { - parts = append(parts, ns.removePrefixAndSuffix(ns.Name(rt))) + for _, result := range t.Signature.Results { + parts = append(parts, ns.removePrefixAndSuffix(ns.Name(result.Type))) } name = ns.Join(ns.Prefix, parts, ns.Suffix) default: @@ -374,12 +374,12 @@ func (r *rawNamer) Name(t *types.Type) string { case types.Func: // TODO: add to name test params := []string{} - for _, pt := range t.Signature.Parameters { - params = append(params, r.Name(pt)) + for _, param := range t.Signature.Parameters { + params = append(params, r.Name(param.Type)) } results := []string{} - for _, rt := range t.Signature.Results { - results = append(results, r.Name(rt)) + for _, result := range t.Signature.Results { + results = append(results, r.Name(result.Type)) } name = "func(" + strings.Join(params, ",") + ")" if len(results) == 1 { diff --git a/vendor/k8s.io/gengo/v2/parser/parse.go b/vendor/k8s.io/gengo/v2/parser/parse.go index a5993d1639..d4de19e769 100644 --- a/vendor/k8s.io/gengo/v2/parser/parse.go +++ b/vendor/k8s.io/gengo/v2/parser/parse.go @@ -29,6 +29,7 @@ import ( "time" "golang.org/x/tools/go/packages" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -572,6 +573,9 @@ func goVarNameToName(in string) types.Name { return goNameToName(nameParts[1]) } +// goNameToName converts a go name string to a gengo types.Name. +// It operates solely on the string on a best effort basis. The name may be updated +// in walkType for generics. func goNameToName(in string) types.Name { // Detect anonymous type names. (These may have '.' characters because // embedded types may have packages, so we detect them specially.) @@ -587,14 +591,25 @@ func goNameToName(in string) types.Name { return types.Name{Name: in} } + // There may be '.' characters within a generic. Temporarily remove + // the generic. + genericIndex := strings.IndexRune(in, '[') + if genericIndex == -1 { + genericIndex = len(in) + } + // Otherwise, if there are '.' characters present, the name has a // package path in front. - nameParts := strings.Split(in, ".") + nameParts := strings.Split(in[:genericIndex], ".") name := types.Name{Name: in} if n := len(nameParts); n >= 2 { // The final "." is the name of the type--previous ones must // have been in the package path. name.Package, name.Name = strings.Join(nameParts[:n-1], "."), nameParts[n-1] + // Add back the generic component now that the package and type name have been separated. + if genericIndex != len(in) { + name.Name = name.Name + in[genericIndex:] + } } return name } @@ -602,12 +617,16 @@ func goNameToName(in string) types.Name { func (p *Parser) convertSignature(u types.Universe, t *gotypes.Signature) *types.Signature { signature := &types.Signature{} for i := 0; i < t.Params().Len(); i++ { - signature.Parameters = append(signature.Parameters, p.walkType(u, nil, t.Params().At(i).Type())) - signature.ParameterNames = append(signature.ParameterNames, t.Params().At(i).Name()) + signature.Parameters = append(signature.Parameters, &types.ParamResult{ + Name: t.Params().At(i).Name(), + Type: p.walkType(u, nil, t.Params().At(i).Type()), + }) } for i := 0; i < t.Results().Len(); i++ { - signature.Results = append(signature.Results, p.walkType(u, nil, t.Results().At(i).Type())) - signature.ResultNames = append(signature.ResultNames, t.Results().At(i).Name()) + signature.Results = append(signature.Results, &types.ParamResult{ + Name: t.Results().At(i).Name(), + Type: p.walkType(u, nil, t.Results().At(i).Type()), + }) } if r := t.Recv(); r != nil { signature.Receiver = p.walkType(u, nil, r.Type()) @@ -624,6 +643,12 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type name = *useName } + // Handle alias types conditionally on go1.22+. + // Inline this once the minimum supported version is go1.22 + if out := p.walkAliasType(u, in); out != nil { + return out + } + switch t := in.(type) { case *gotypes.Struct: out := u.Type(name) @@ -734,6 +759,27 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type } out.Kind = types.Alias out.Underlying = p.walkType(u, nil, t.Underlying()) + case *gotypes.Struct, *gotypes.Interface: + name := goNameToName(t.String()) + tpMap := map[string]*types.Type{} + if t.TypeParams().Len() != 0 { + // Remove generics, then readd them without the encoded + // type, e.g. Foo[T any] => Foo[T] + var tpNames []string + for i := 0; i < t.TypeParams().Len(); i++ { + tp := t.TypeParams().At(i) + tpName := tp.Obj().Name() + tpNames = append(tpNames, tpName) + tpMap[tpName] = p.walkType(u, nil, tp.Constraint()) + } + name.Name = fmt.Sprintf("%s[%s]", strings.SplitN(name.Name, "[", 2)[0], strings.Join(tpNames, ",")) + } + + if out := u.Type(name); out.Kind != types.Unknown { + return out // short circuit if we've already made this. + } + out = p.walkType(u, &name, t.Underlying()) + out.TypeParams = tpMap default: // gotypes package makes everything "named" with an // underlying anonymous type--we remove that annoying @@ -760,6 +806,15 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type } } return out + case *gotypes.TypeParam: + // DO NOT retrieve the type from the universe. The default type-param name is only the + // generic variable name. Ideally, it would be namespaced by package and struct but it is + // not. Thus, if we try to use the universe, we would start polluting it. + // e.g. if Foo[T] and Bar[T] exists, we'd mistakenly use the same type T for both. + return &types.Type{ + Name: name, + Kind: types.TypeParam, + } default: out := u.Type(name) if out.Kind != types.Unknown { diff --git a/vendor/k8s.io/gengo/v2/parser/parse_122.go b/vendor/k8s.io/gengo/v2/parser/parse_122.go new file mode 100644 index 0000000000..ec2064958a --- /dev/null +++ b/vendor/k8s.io/gengo/v2/parser/parse_122.go @@ -0,0 +1,33 @@ +//go:build go1.22 +// +build go1.22 + +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package parser + +import ( + gotypes "go/types" + + "k8s.io/gengo/v2/types" +) + +func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type { + if t, isAlias := in.(*gotypes.Alias); isAlias { + return p.walkType(u, nil, gotypes.Unalias(t)) + } + return nil +} diff --git a/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go b/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go new file mode 100644 index 0000000000..6f62100c0a --- /dev/null +++ b/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go @@ -0,0 +1,30 @@ +//go:build !go1.22 +// +build !go1.22 + +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package parser + +import ( + gotypes "go/types" + + "k8s.io/gengo/v2/types" +) + +func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type { + return nil +} diff --git a/vendor/k8s.io/gengo/v2/types/types.go b/vendor/k8s.io/gengo/v2/types/types.go index e9c8319c65..7bbca01733 100644 --- a/vendor/k8s.io/gengo/v2/types/types.go +++ b/vendor/k8s.io/gengo/v2/types/types.go @@ -98,6 +98,7 @@ const ( DeclarationOf Kind = "DeclarationOf" Unknown Kind = "" Unsupported Kind = "Unsupported" + TypeParam Kind = "TypeParam" // Protobuf is protobuf type. Protobuf Kind = "Protobuf" @@ -324,6 +325,9 @@ type Type struct { // If Kind == Struct Members []Member + // If Kind == Struct + TypeParams map[string]*Type + // If Kind == Map, Slice, Pointer, or Chan Elem *Type @@ -423,14 +427,20 @@ func (m Member) String() string { return m.Name + " " + m.Type.String() } +// ParamResult represents a parameter or a result of a method's signature. +type ParamResult struct { + // The name of the parameter or result. + Name string + // The type of this parameter or result. + Type *Type +} + // Signature is a function's signature. type Signature struct { // If a method of some type, this is the type it's a member of. - Receiver *Type - Parameters []*Type - ParameterNames []string - Results []*Type - ResultNames []string + Receiver *Type + Parameters []*ParamResult + Results []*ParamResult // True if the last in parameter is of the form ...T. Variadic bool diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go index 7f0fe985a6..c4dd67d3be 100644 --- a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go +++ b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go @@ -75,7 +75,29 @@ func (c *CELTag) Validate() error { // - +listMapKeys // - +mapType type commentTags struct { - spec.SchemaProps + Nullable *bool `json:"nullable,omitempty"` + Format *string `json:"format,omitempty"` + Maximum *float64 `json:"maximum,omitempty"` + ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + Pattern *string `json:"pattern,omitempty"` + MaxItems *int64 `json:"maxItems,omitempty"` + MinItems *int64 `json:"minItems,omitempty"` + UniqueItems *bool `json:"uniqueItems,omitempty"` + MultipleOf *float64 `json:"multipleOf,omitempty"` + Enum []interface{} `json:"enum,omitempty"` + MaxProperties *int64 `json:"maxProperties,omitempty"` + MinProperties *int64 `json:"minProperties,omitempty"` + + // Nested commentTags for extending the schemas of subfields at point-of-use + // when you cant annotate them directly. Cannot be used to add properties + // or remove validations on the overridden schema. + Items *commentTags `json:"items,omitempty"` + Properties map[string]*commentTags `json:"properties,omitempty"` + AdditionalProperties *commentTags `json:"additionalProperties,omitempty"` CEL []CELTag `json:"cel,omitempty"` @@ -86,9 +108,75 @@ type commentTags struct { // Returns the schema for the given CommentTags instance. // This is the final authoritative schema for the comment tags -func (c commentTags) ValidationSchema() (*spec.Schema, error) { +func (c *commentTags) ValidationSchema() (*spec.Schema, error) { + if c == nil { + return nil, nil + } + + isNullable := c.Nullable != nil && *c.Nullable + format := "" + if c.Format != nil { + format = *c.Format + } + isExclusiveMaximum := c.ExclusiveMaximum != nil && *c.ExclusiveMaximum + isExclusiveMinimum := c.ExclusiveMinimum != nil && *c.ExclusiveMinimum + isUniqueItems := c.UniqueItems != nil && *c.UniqueItems + pattern := "" + if c.Pattern != nil { + pattern = *c.Pattern + } + + var transformedItems *spec.SchemaOrArray + var transformedProperties map[string]spec.Schema + var transformedAdditionalProperties *spec.SchemaOrBool + + if c.Items != nil { + items, err := c.Items.ValidationSchema() + if err != nil { + return nil, fmt.Errorf("failed to transform items: %w", err) + } + transformedItems = &spec.SchemaOrArray{Schema: items} + } + + if c.Properties != nil { + properties := make(map[string]spec.Schema) + for key, value := range c.Properties { + property, err := value.ValidationSchema() + if err != nil { + return nil, fmt.Errorf("failed to transform property %q: %w", key, err) + } + properties[key] = *property + } + transformedProperties = properties + } + + if c.AdditionalProperties != nil { + additionalProperties, err := c.AdditionalProperties.ValidationSchema() + if err != nil { + return nil, fmt.Errorf("failed to transform additionalProperties: %w", err) + } + transformedAdditionalProperties = &spec.SchemaOrBool{Schema: additionalProperties, Allows: true} + } + res := spec.Schema{ - SchemaProps: c.SchemaProps, + SchemaProps: spec.SchemaProps{ + Nullable: isNullable, + Format: format, + Maximum: c.Maximum, + ExclusiveMaximum: isExclusiveMaximum, + Minimum: c.Minimum, + ExclusiveMinimum: isExclusiveMinimum, + MaxLength: c.MaxLength, + MinLength: c.MinLength, + Pattern: pattern, + MaxItems: c.MaxItems, + MinItems: c.MinItems, + UniqueItems: isUniqueItems, + MultipleOf: c.MultipleOf, + Enum: c.Enum, + MaxProperties: c.MaxProperties, + MinProperties: c.MinProperties, + }, } if len(c.CEL) > 0 { @@ -105,6 +193,18 @@ func (c commentTags) ValidationSchema() (*spec.Schema, error) { res.VendorExtensible.AddExtension("x-kubernetes-validations", celTagMap) } + // Dont add structural properties directly to this schema. This schema + // is used only for validation. + if transformedItems != nil || len(transformedProperties) > 0 || transformedAdditionalProperties != nil { + res.AllOf = append(res.AllOf, spec.Schema{ + SchemaProps: spec.SchemaProps{ + Items: transformedItems, + Properties: transformedProperties, + AdditionalProperties: transformedAdditionalProperties, + }, + }) + } + return &res, nil } @@ -134,7 +234,7 @@ func (c commentTags) Validate() error { if c.Minimum != nil && c.Maximum != nil && *c.Minimum > *c.Maximum { err = errors.Join(err, fmt.Errorf("minimum %f is greater than maximum %f", *c.Minimum, *c.Maximum)) } - if (c.ExclusiveMinimum || c.ExclusiveMaximum) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum { + if (c.ExclusiveMinimum != nil || c.ExclusiveMaximum != nil) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum { err = errors.Join(err, fmt.Errorf("exclusiveMinimum/Maximum cannot be set when minimum == maximum")) } if c.MinLength != nil && c.MaxLength != nil && *c.MinLength > *c.MaxLength { @@ -146,10 +246,10 @@ func (c commentTags) Validate() error { if c.MinProperties != nil && c.MaxProperties != nil && *c.MinProperties > *c.MaxProperties { err = errors.Join(err, fmt.Errorf("minProperties %d is greater than maxProperties %d", *c.MinProperties, *c.MaxProperties)) } - if c.Pattern != "" { - _, e := regexp.Compile(c.Pattern) + if c.Pattern != nil { + _, e := regexp.Compile(*c.Pattern) if e != nil { - err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", c.Pattern, e)) + err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", *c.Pattern, e)) } } if c.MultipleOf != nil && *c.MultipleOf == 0 { @@ -175,10 +275,23 @@ func (c commentTags) ValidateType(t *types.Type) error { typeString, _ := openapi.OpenAPITypeFormat(resolvedType.String()) // will be empty for complicated types // Structs and interfaces may dynamically be any type, so we cant validate them - // easily. We may be able to if we check that they don't implement all the - // override functions, but for now we just skip them. + // easily. if resolvedType.Kind == types.Interface || resolvedType.Kind == types.Struct { - return nil + // Skip validation for structs and interfaces which implement custom + // overrides + // + // Only check top-level t type without resolving alias to mirror generator + // behavior. Generator only checks the top level type without resolving + // alias. The `has*Method` functions can be changed to add this behavior in the + // future if needed. + elemT := resolvePtrType(t) + if hasOpenAPIDefinitionMethod(elemT) || + hasOpenAPIDefinitionMethods(elemT) || + hasOpenAPIV3DefinitionMethod(elemT) || + hasOpenAPIV3OneOfMethod(elemT) { + + return nil + } } isArray := resolvedType.Kind == types.Slice || resolvedType.Kind == types.Array @@ -186,6 +299,7 @@ func (c commentTags) ValidateType(t *types.Type) error { isString := typeString == "string" isInt := typeString == "integer" isFloat := typeString == "number" + isStruct := resolvedType.Kind == types.Struct if c.MaxItems != nil && !isArray { err = errors.Join(err, fmt.Errorf("maxItems can only be used on array types")) @@ -193,13 +307,13 @@ func (c commentTags) ValidateType(t *types.Type) error { if c.MinItems != nil && !isArray { err = errors.Join(err, fmt.Errorf("minItems can only be used on array types")) } - if c.UniqueItems && !isArray { + if c.UniqueItems != nil && !isArray { err = errors.Join(err, fmt.Errorf("uniqueItems can only be used on array types")) } - if c.MaxProperties != nil && !isMap { + if c.MaxProperties != nil && !(isMap || isStruct) { err = errors.Join(err, fmt.Errorf("maxProperties can only be used on map types")) } - if c.MinProperties != nil && !isMap { + if c.MinProperties != nil && !(isMap || isStruct) { err = errors.Join(err, fmt.Errorf("minProperties can only be used on map types")) } if c.MinLength != nil && !isString { @@ -208,7 +322,7 @@ func (c commentTags) ValidateType(t *types.Type) error { if c.MaxLength != nil && !isString { err = errors.Join(err, fmt.Errorf("maxLength can only be used on string types")) } - if c.Pattern != "" && !isString { + if c.Pattern != nil && !isString { err = errors.Join(err, fmt.Errorf("pattern can only be used on string types")) } if c.Minimum != nil && !isInt && !isFloat { @@ -220,16 +334,57 @@ func (c commentTags) ValidateType(t *types.Type) error { if c.MultipleOf != nil && !isInt && !isFloat { err = errors.Join(err, fmt.Errorf("multipleOf can only be used on numeric types")) } - if c.ExclusiveMinimum && !isInt && !isFloat { + if c.ExclusiveMinimum != nil && !isInt && !isFloat { err = errors.Join(err, fmt.Errorf("exclusiveMinimum can only be used on numeric types")) } - if c.ExclusiveMaximum && !isInt && !isFloat { + if c.ExclusiveMaximum != nil && !isInt && !isFloat { err = errors.Join(err, fmt.Errorf("exclusiveMaximum can only be used on numeric types")) } + if c.AdditionalProperties != nil && !isMap { + err = errors.Join(err, fmt.Errorf("additionalProperties can only be used on map types")) + + if err == nil { + err = errors.Join(err, c.AdditionalProperties.ValidateType(t)) + } + } + if c.Items != nil && !isArray { + err = errors.Join(err, fmt.Errorf("items can only be used on array types")) + + if err == nil { + err = errors.Join(err, c.Items.ValidateType(t)) + } + } + if c.Properties != nil { + if !isStruct && !isMap { + err = errors.Join(err, fmt.Errorf("properties can only be used on struct types")) + } else if isStruct && err == nil { + for key, tags := range c.Properties { + if member := memberWithJSONName(resolvedType, key); member == nil { + err = errors.Join(err, fmt.Errorf("property used in comment tag %q not found in struct %s", key, resolvedType.String())) + } else if nestedErr := tags.ValidateType(member.Type); nestedErr != nil { + err = errors.Join(err, fmt.Errorf("failed to validate property %q: %w", key, nestedErr)) + } + } + } + } return err } +func memberWithJSONName(t *types.Type, key string) *types.Member { + for _, member := range t.Members { + tags := getJsonTags(&member) + if len(tags) > 0 && tags[0] == key { + return &member + } else if member.Embedded { + if embeddedMember := memberWithJSONName(member.Type, key); embeddedMember != nil { + return embeddedMember + } + } + } + return nil +} + // Parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result. // Accepts an optional type to validate against, and a prefix to filter out markers not related to validation. // Accepts a prefix to filter out markers not related to validation. diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go index 743f5b8b2e..c5c0093818 100644 --- a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go +++ b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go @@ -249,7 +249,7 @@ func methodReturnsValue(mt *types.Type, pkg, name string) bool { return false } r := mt.Signature.Results[0] - return r.Name.Name == name && r.Name.Package == pkg + return r.Type.Name.Name == name && r.Type.Name.Package == pkg } func hasOpenAPIV3DefinitionMethod(t *types.Type) bool { @@ -362,6 +362,88 @@ func (g openAPITypeWriter) generateCall(t *types.Type) error { return g.Error() } +// Generates Go code to represent an OpenAPI schema. May be refactored in +// the future to take more responsibility as we transition from an on-line +// approach to parsing the comments to spec.Schema +func (g openAPITypeWriter) generateSchema(s *spec.Schema) error { + if !reflect.DeepEqual(s.SchemaProps, spec.SchemaProps{}) { + g.Do("SchemaProps: spec.SchemaProps{\n", nil) + err := g.generateValueValidations(&s.SchemaProps) + if err != nil { + return err + } + + if len(s.Properties) > 0 { + g.Do("Properties: map[string]spec.Schema{\n", nil) + + // Sort property names to generate deterministic output + keys := []string{} + for k := range s.Properties { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := s.Properties[k] + g.Do("$.$: {\n", fmt.Sprintf("%#v", k)) + err := g.generateSchema(&v) + if err != nil { + return err + } + g.Do("},\n", nil) + } + g.Do("},\n", nil) + } + + if s.AdditionalProperties != nil && s.AdditionalProperties.Schema != nil { + g.Do("AdditionalProperties: &spec.SchemaOrBool{\n", nil) + g.Do("Allows: true,\n", nil) + g.Do("Schema: &spec.Schema{\n", nil) + err := g.generateSchema(s.AdditionalProperties.Schema) + if err != nil { + return err + } + g.Do("},\n", nil) + g.Do("},\n", nil) + } + + if s.Items != nil && s.Items.Schema != nil { + g.Do("Items: &spec.SchemaOrArray{\n", nil) + g.Do("Schema: &spec.Schema{\n", nil) + err := g.generateSchema(s.Items.Schema) + if err != nil { + return err + } + g.Do("},\n", nil) + g.Do("},\n", nil) + } + + g.Do("},\n", nil) + } + + if len(s.Extensions) > 0 { + g.Do("VendorExtensible: spec.VendorExtensible{\nExtensions: spec.Extensions{\n", nil) + + // Sort extension keys to generate deterministic output + keys := []string{} + for k := range s.Extensions { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := s.Extensions[k] + g.Do("$.key$: $.value$,\n", map[string]interface{}{ + "key": fmt.Sprintf("%#v", k), + "value": fmt.Sprintf("%#v", v), + }) + } + g.Do("},\n},\n", nil) + } + + return nil +} + func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error { if vs == nil { @@ -420,6 +502,18 @@ func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error g.Do("UniqueItems: true,\n", nil) } + if len(vs.AllOf) > 0 { + g.Do("AllOf: []spec.Schema{\n", nil) + for _, s := range vs.AllOf { + g.Do("{\n", nil) + if err := g.generateSchema(&s); err != nil { + return err + } + g.Do("},\n", nil) + } + g.Do("},\n", nil) + } + return nil } @@ -429,7 +523,7 @@ func (g openAPITypeWriter) generate(t *types.Type) error { case types.Struct: validationSchema, err := ParseCommentTags(t, t.CommentLines, markerPrefix) if err != nil { - return err + return fmt.Errorf("failed parsing comment tags for %v: %w", t.String(), err) } hasV2Definition := hasOpenAPIDefinitionMethod(t) @@ -644,7 +738,15 @@ func (g openAPITypeWriter) emitExtensions(extensions []extension, unions []union } if len(otherExtensions) > 0 { - for k, v := range otherExtensions { + // Sort extension keys to generate deterministic output + keys := []string{} + for k := range otherExtensions { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := otherExtensions[k] g.Do("$.key$: $.value$,\n", map[string]interface{}{ "key": fmt.Sprintf("%#v", k), "value": fmt.Sprintf("%#v", v), @@ -704,7 +806,7 @@ func defaultFromComments(comments []string, commentPath string, t *types.Type) ( var i interface{} if id, ok := parseSymbolReference(tag, commentPath); ok { - klog.Errorf("%v, %v", id, commentPath) + klog.V(5).Infof("%v, %v", id, commentPath) return nil, &id, nil } else if err := json.Unmarshal([]byte(tag), &i); err != nil { return nil, nil, fmt.Errorf("failed to unmarshal default: %v", err) @@ -844,15 +946,9 @@ func (g openAPITypeWriter) generateDescription(CommentLines []string) { } } - postDoc := strings.TrimLeft(buffer.String(), "\n") - postDoc = strings.TrimRight(postDoc, "\n") - postDoc = strings.Replace(postDoc, "\\\"", "\"", -1) // replace user's \" to " - postDoc = strings.Replace(postDoc, "\"", "\\\"", -1) // Escape " - postDoc = strings.Replace(postDoc, "\n", "\\n", -1) - postDoc = strings.Replace(postDoc, "\t", "\\t", -1) - postDoc = strings.Trim(postDoc, " ") - if postDoc != "" { - g.Do("Description: \"$.$\",\n", postDoc) + postDoc := strings.TrimSpace(buffer.String()) + if len(postDoc) > 0 { + g.Do("Description: $.$,\n", fmt.Sprintf("%#v", postDoc)) } } @@ -934,6 +1030,17 @@ func (g openAPITypeWriter) generateReferenceProperty(t *types.Type) { g.Do("Ref: ref(\"$.$\"),\n", t.Name.String()) } +func resolvePtrType(t *types.Type) *types.Type { + var prev *types.Type + for prev != t { + prev = t + if t.Kind == types.Pointer { + t = t.Elem + } + } + return t +} + func resolveAliasAndPtrType(t *types.Type) *types.Type { var prev *types.Type for prev != t { diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go b/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go index af30edc5ed..d7655f0d92 100644 --- a/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go +++ b/vendor/k8s.io/kube-openapi/pkg/generators/rules/names_match.go @@ -32,14 +32,6 @@ var ( "-", ) - // Blacklist of JSON names that should skip match evaluation - jsonNameBlacklist = sets.NewString( - // Empty name is used for inline struct field (e.g. metav1.TypeMeta) - "", - // Special case for object and list meta - "metadata", - ) - // List of substrings that aren't allowed in Go name and JSON name disallowedNameSubstrings = sets.NewString( // Underscore is not allowed in either name @@ -73,12 +65,11 @@ is also considered matched. HTTPJSONSpec httpjsonSpec true -NOTE: JSON names in jsonNameBlacklist should skip evaluation +NOTE: an empty JSON name is valid only for inlined structs or pointer to structs. +It cannot be empty for anything else because capitalization must be set explicitly. - true - podSpec true - podSpec - true - podSpec metadata true +NOTE: metav1.ListMeta and metav1.ObjectMeta by convention must have "metadata" as name. +Other fields may have that JSON name if the field name matches. */ type NamesMatch struct{} @@ -109,7 +100,7 @@ func (n *NamesMatch) Validate(t *types.Type) ([]string, error) { continue } jsonName := strings.Split(jsonTag, ",")[0] - if !namesMatch(goName, jsonName) { + if !nameIsOkay(m, jsonName) { fields = append(fields, goName) } } @@ -117,6 +108,22 @@ func (n *NamesMatch) Validate(t *types.Type) ([]string, error) { return fields, nil } +func nameIsOkay(member types.Member, jsonName string) bool { + if jsonName == "" { + return member.Type.Kind == types.Struct || + member.Type.Kind == types.Pointer && member.Type.Elem.Kind == types.Struct + } + + typeName := member.Type.String() + switch typeName { + case "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": + return jsonName == "metadata" + } + + return namesMatch(member.Name, jsonName) +} + // namesMatch evaluates if goName and jsonName match the API rule // TODO: Use an off-the-shelf CamelCase solution instead of implementing this logic. The following existing // @@ -129,9 +136,6 @@ func (n *NamesMatch) Validate(t *types.Type) ([]string, error) { // about why they don't satisfy our need. What we need can be a function that detects an acronym at the // beginning of a string. func namesMatch(goName, jsonName string) bool { - if jsonNameBlacklist.Has(jsonName) { - return true - } if !isAllowedName(goName) || !isAllowedName(jsonName) { return false } diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go index 5789e67ab7..1b758ab25a 100644 --- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go +++ b/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go @@ -22,7 +22,7 @@ import ( "strings" openapi_v2 "github.com/google/gnostic-models/openapiv2" - "gopkg.in/yaml.v2" + yaml "sigs.k8s.io/yaml/goyaml.v2" ) func newSchemaError(path *Path, format string, a ...interface{}) error { diff --git a/vendor/k8s.io/utils/strings/slices/slices.go b/vendor/k8s.io/utils/strings/slices/slices.go deleted file mode 100644 index 8e21838f24..0000000000 --- a/vendor/k8s.io/utils/strings/slices/slices.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package slices defines various functions useful with slices of string type. -// The goal is to be as close as possible to -// https://github.com/golang/go/issues/45955. Ideal would be if we can just -// replace "stringslices" if the "slices" package becomes standard. -package slices - -// Equal reports whether two slices are equal: the same length and all -// elements equal. If the lengths are different, Equal returns false. -// Otherwise, the elements are compared in index order, and the -// comparison stops at the first unequal pair. -func Equal(s1, s2 []string) bool { - if len(s1) != len(s2) { - return false - } - for i, n := range s1 { - if n != s2[i] { - return false - } - } - return true -} - -// Filter appends to d each element e of s for which keep(e) returns true. -// It returns the modified d. d may be s[:0], in which case the kept -// elements will be stored in the same slice. -// if the slices overlap in some other way, the results are unspecified. -// To create a new slice with the filtered results, pass nil for d. -func Filter(d, s []string, keep func(string) bool) []string { - for _, n := range s { - if keep(n) { - d = append(d, n) - } - } - return d -} - -// Contains reports whether v is present in s. -func Contains(s []string, v string) bool { - return Index(s, v) >= 0 -} - -// Index returns the index of the first occurrence of v in s, or -1 if -// not present. -func Index(s []string, v string) int { - // "Contains" may be replaced with "Index(s, v) >= 0": - // https://github.com/golang/go/issues/45955#issuecomment-873377947 - for i, n := range s { - if n == v { - return i - } - } - return -1 -} - -// Functions below are not in https://github.com/golang/go/issues/45955 - -// Clone returns a new clone of s. -func Clone(s []string) []string { - // https://github.com/go101/go101/wiki/There-is-not-a-perfect-way-to-clone-slices-in-Go - if s == nil { - return nil - } - c := make([]string, len(s)) - copy(c, s) - return c -} diff --git a/vendor/modules.txt b/vendor/modules.txt index d60e0f2016..ccc827903c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -11,15 +11,15 @@ github.com/fxamacker/cbor/v2 # github.com/go-logr/logr v1.4.2 ## explicit; go 1.18 github.com/go-logr/logr -# github.com/go-openapi/jsonpointer v0.19.6 -## explicit; go 1.13 +# github.com/go-openapi/jsonpointer v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonpointer # github.com/go-openapi/jsonreference v0.20.2 ## explicit; go 1.13 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/swag v0.22.4 -## explicit; go 1.18 +# github.com/go-openapi/swag v0.23.0 +## explicit; go 1.20 github.com/go-openapi/swag # github.com/gogo/protobuf v1.3.2 ## explicit; go 1.15 @@ -53,9 +53,6 @@ github.com/google/gofuzz/bytesource # github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid -# github.com/imdario/mergo v0.3.6 -## explicit -github.com/imdario/mergo # github.com/josharian/intern v1.0.0 ## explicit; go 1.5 github.com/josharian/intern @@ -76,8 +73,8 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/openshift/api v0.0.0-20241129195214-14a6da22da50 -## explicit; go 1.22.0 +# github.com/openshift/api v0.0.0-20241129195214-14a6da22da50 => github.com/dusk125/api v0.0.0-20241209155505-523f1022cf43 +## explicit; go 1.23.0 github.com/openshift/api/apiserver/v1 github.com/openshift/api/apps/v1 github.com/openshift/api/authorization/v1 @@ -134,33 +131,33 @@ github.com/spf13/pflag # github.com/x448/float16 v0.8.4 ## explicit; go 1.11 github.com/x448/float16 -# golang.org/x/mod v0.17.0 -## explicit; go 1.18 +# golang.org/x/mod v0.21.0 +## explicit; go 1.22.0 golang.org/x/mod/internal/lazyregexp golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.29.0 +# golang.org/x/net v0.30.0 ## explicit; go 1.18 golang.org/x/net/http/httpguts golang.org/x/net/http2 golang.org/x/net/http2/hpack golang.org/x/net/idna -# golang.org/x/oauth2 v0.21.0 +# golang.org/x/oauth2 v0.23.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/internal # golang.org/x/sync v0.8.0 ## explicit; go 1.18 golang.org/x/sync/errgroup -# golang.org/x/sys v0.25.0 +# golang.org/x/sys v0.26.0 ## explicit; go 1.18 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.24.0 +# golang.org/x/term v0.25.0 ## explicit; go 1.18 golang.org/x/term -# golang.org/x/text v0.18.0 +# golang.org/x/text v0.19.0 ## explicit; go 1.18 golang.org/x/text/cases golang.org/x/text/internal @@ -172,16 +169,16 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/time v0.3.0 -## explicit +# golang.org/x/time v0.7.0 +## explicit; go 1.18 golang.org/x/time/rate -# golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d -## explicit; go 1.19 +# golang.org/x/tools v0.26.0 +## explicit; go 1.22.0 golang.org/x/tools/go/ast/astutil golang.org/x/tools/go/gcexportdata -golang.org/x/tools/go/internal/packagesdriver golang.org/x/tools/go/packages golang.org/x/tools/go/types/objectpath +golang.org/x/tools/go/types/typeutil golang.org/x/tools/imports golang.org/x/tools/internal/aliases golang.org/x/tools/internal/event @@ -195,11 +192,11 @@ golang.org/x/tools/internal/imports golang.org/x/tools/internal/packagesinternal golang.org/x/tools/internal/pkgbits golang.org/x/tools/internal/stdlib -golang.org/x/tools/internal/tokeninternal +golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# google.golang.org/protobuf v1.34.2 -## explicit; go 1.20 +# google.golang.org/protobuf v1.35.1 +## explicit; go 1.21 google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/internal/descfmt @@ -239,14 +236,11 @@ gopkg.in/evanphx/json-patch.v4 # gopkg.in/inf.v0 v0.9.1 ## explicit gopkg.in/inf.v0 -# gopkg.in/yaml.v2 v2.4.0 -## explicit; go 1.15 -gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/api v0.31.1 -## explicit; go 1.22.0 +# k8s.io/api v0.32.0-rc.2 +## explicit; go 1.23.0 k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1alpha1 k8s.io/api/admissionregistration/v1beta1 @@ -271,7 +265,7 @@ k8s.io/api/certificates/v1 k8s.io/api/certificates/v1alpha1 k8s.io/api/certificates/v1beta1 k8s.io/api/coordination/v1 -k8s.io/api/coordination/v1alpha1 +k8s.io/api/coordination/v1alpha2 k8s.io/api/coordination/v1beta1 k8s.io/api/core/v1 k8s.io/api/discovery/v1 @@ -295,6 +289,7 @@ k8s.io/api/rbac/v1 k8s.io/api/rbac/v1alpha1 k8s.io/api/rbac/v1beta1 k8s.io/api/resource/v1alpha3 +k8s.io/api/resource/v1beta1 k8s.io/api/scheduling/v1 k8s.io/api/scheduling/v1alpha1 k8s.io/api/scheduling/v1beta1 @@ -302,8 +297,8 @@ k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1alpha1 -# k8s.io/apimachinery v0.31.1 -## explicit; go 1.22.0 +# k8s.io/apimachinery v0.32.0-rc.2 +## explicit; go 1.23.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors k8s.io/apimachinery/pkg/api/meta @@ -323,6 +318,7 @@ k8s.io/apimachinery/pkg/labels k8s.io/apimachinery/pkg/runtime k8s.io/apimachinery/pkg/runtime/schema k8s.io/apimachinery/pkg/runtime/serializer +k8s.io/apimachinery/pkg/runtime/serializer/cbor k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes k8s.io/apimachinery/pkg/runtime/serializer/json @@ -355,8 +351,8 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/client-go v0.31.1 -## explicit; go 1.22.0 +# k8s.io/client-go v0.32.0-rc.2 +## explicit; go 1.23.0 k8s.io/client-go/applyconfigurations/core/v1 k8s.io/client-go/applyconfigurations/internal k8s.io/client-go/applyconfigurations/meta/v1 @@ -386,6 +382,7 @@ k8s.io/client-go/tools/clientcmd/api/v1 k8s.io/client-go/tools/metrics k8s.io/client-go/tools/pager k8s.io/client-go/transport +k8s.io/client-go/util/apply k8s.io/client-go/util/cert k8s.io/client-go/util/connrotation k8s.io/client-go/util/consistencydetector @@ -394,8 +391,8 @@ k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/watchlist k8s.io/client-go/util/workqueue -# k8s.io/code-generator v0.31.1 -## explicit; go 1.22.0 +# k8s.io/code-generator v0.32.0-rc.2 +## explicit; go 1.23.0 k8s.io/code-generator k8s.io/code-generator/cmd/applyconfiguration-gen k8s.io/code-generator/cmd/applyconfiguration-gen/args @@ -430,7 +427,7 @@ k8s.io/code-generator/cmd/register-gen/generators k8s.io/code-generator/pkg/namer k8s.io/code-generator/pkg/util k8s.io/code-generator/third_party/forked/golang/reflect -# k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 +# k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 ## explicit; go 1.20 k8s.io/gengo/v2 k8s.io/gengo/v2/generator @@ -446,7 +443,7 @@ k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler -# k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 +# k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f ## explicit; go 1.20 k8s.io/kube-openapi/cmd/openapi-gen k8s.io/kube-openapi/cmd/openapi-gen/args @@ -462,7 +459,7 @@ k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/util/sets k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 +# k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock @@ -471,13 +468,12 @@ k8s.io/utils/internal/third_party/forked/golang/net k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/ptr -k8s.io/utils/strings/slices k8s.io/utils/trace -# sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd -## explicit; go 1.18 +# sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 +## explicit; go 1.21 sigs.k8s.io/json sigs.k8s.io/json/internal/golang/encoding/json -# sigs.k8s.io/structured-merge-diff/v4 v4.4.1 +# sigs.k8s.io/structured-merge-diff/v4 v4.4.2 ## explicit; go 1.13 sigs.k8s.io/structured-merge-diff/v4/fieldpath sigs.k8s.io/structured-merge-diff/v4/merge @@ -488,3 +484,4 @@ sigs.k8s.io/structured-merge-diff/v4/value ## explicit; go 1.12 sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 +# github.com/openshift/api => github.com/dusk125/api v0.0.0-20241209155505-523f1022cf43 diff --git a/vendor/sigs.k8s.io/json/Makefile b/vendor/sigs.k8s.io/json/Makefile index 07b8bfa857..fb6cf040f5 100644 --- a/vendor/sigs.k8s.io/json/Makefile +++ b/vendor/sigs.k8s.io/json/Makefile @@ -19,7 +19,7 @@ vet: go vet sigs.k8s.io/json @echo "checking for external dependencies" - @deps=$$(go mod graph); \ + @deps=$$(go list -f '{{ if not (or .Standard .Module.Main) }}{{.ImportPath}}{{ end }}' -deps sigs.k8s.io/json/... || true); \ if [ -n "$${deps}" ]; then \ echo "only stdlib dependencies allowed, found:"; \ echo "$${deps}"; \ diff --git a/vendor/sigs.k8s.io/json/OWNERS b/vendor/sigs.k8s.io/json/OWNERS index 0fadafbddb..a08a434e61 100644 --- a/vendor/sigs.k8s.io/json/OWNERS +++ b/vendor/sigs.k8s.io/json/OWNERS @@ -2,5 +2,5 @@ approvers: - deads2k - - lavalamp + - jpbetz - liggitt diff --git a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go index 6a13cf2df0..d538ac119b 100644 --- a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go +++ b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go @@ -21,10 +21,10 @@ import ( // Unmarshal parses the JSON-encoded data and stores the result // in the value pointed to by v. If v is nil or not a pointer, -// Unmarshal returns an InvalidUnmarshalError. +// Unmarshal returns an [InvalidUnmarshalError]. // // Unmarshal uses the inverse of the encodings that -// Marshal uses, allocating maps, slices, and pointers as necessary, +// [Marshal] uses, allocating maps, slices, and pointers as necessary, // with the following additional rules: // // To unmarshal JSON into a pointer, Unmarshal first handles the case of @@ -33,28 +33,28 @@ import ( // the value pointed at by the pointer. If the pointer is nil, Unmarshal // allocates a new value for it to point to. // -// To unmarshal JSON into a value implementing the Unmarshaler interface, -// Unmarshal calls that value's UnmarshalJSON method, including +// To unmarshal JSON into a value implementing [Unmarshaler], +// Unmarshal calls that value's [Unmarshaler.UnmarshalJSON] method, including // when the input is a JSON null. -// Otherwise, if the value implements encoding.TextUnmarshaler -// and the input is a JSON quoted string, Unmarshal calls that value's -// UnmarshalText method with the unquoted form of the string. +// Otherwise, if the value implements [encoding.TextUnmarshaler] +// and the input is a JSON quoted string, Unmarshal calls +// [encoding.TextUnmarshaler.UnmarshalText] with the unquoted form of the string. // // To unmarshal JSON into a struct, Unmarshal matches incoming object -// keys to the keys used by Marshal (either the struct field name or its tag), +// keys to the keys used by [Marshal] (either the struct field name or its tag), // preferring an exact match but also accepting a case-insensitive match. By // default, object keys which don't have a corresponding struct field are -// ignored (see Decoder.DisallowUnknownFields for an alternative). +// ignored (see [Decoder.DisallowUnknownFields] for an alternative). // // To unmarshal JSON into an interface value, // Unmarshal stores one of these in the interface value: // -// bool, for JSON booleans -// float64, for JSON numbers -// string, for JSON strings -// []interface{}, for JSON arrays -// map[string]interface{}, for JSON objects -// nil for JSON null +// - bool, for JSON booleans +// - float64, for JSON numbers +// - string, for JSON strings +// - []interface{}, for JSON arrays +// - map[string]interface{}, for JSON objects +// - nil for JSON null // // To unmarshal a JSON array into a slice, Unmarshal resets the slice length // to zero and then appends each element to the slice. @@ -72,16 +72,15 @@ import ( // use. If the map is nil, Unmarshal allocates a new map. Otherwise Unmarshal // reuses the existing map, keeping existing entries. Unmarshal then stores // key-value pairs from the JSON object into the map. The map's key type must -// either be any string type, an integer, implement json.Unmarshaler, or -// implement encoding.TextUnmarshaler. +// either be any string type, an integer, or implement [encoding.TextUnmarshaler]. // -// If the JSON-encoded data contain a syntax error, Unmarshal returns a SyntaxError. +// If the JSON-encoded data contain a syntax error, Unmarshal returns a [SyntaxError]. // // If a JSON value is not appropriate for a given target type, // or if a JSON number overflows the target type, Unmarshal // skips that field and completes the unmarshaling as best it can. // If no more serious errors are encountered, Unmarshal returns -// an UnmarshalTypeError describing the earliest such error. In any +// an [UnmarshalTypeError] describing the earliest such error. In any // case, it's not guaranteed that all the remaining fields following // the problematic one will be unmarshaled into the target object. // @@ -119,7 +118,7 @@ func Unmarshal(data []byte, v any, opts ...UnmarshalOpt) error { // a JSON value. UnmarshalJSON must copy the JSON data // if it wishes to retain the data after returning. // -// By convention, to approximate the behavior of Unmarshal itself, +// By convention, to approximate the behavior of [Unmarshal] itself, // Unmarshalers implement UnmarshalJSON([]byte("null")) as a no-op. type Unmarshaler interface { UnmarshalJSON([]byte) error @@ -157,8 +156,8 @@ func (e *UnmarshalFieldError) Error() string { return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String() } -// An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. -// (The argument to Unmarshal must be a non-nil pointer.) +// An InvalidUnmarshalError describes an invalid argument passed to [Unmarshal]. +// (The argument to [Unmarshal] must be a non-nil pointer.) type InvalidUnmarshalError struct { Type reflect.Type } @@ -573,17 +572,10 @@ func (d *decodeState) array(v reflect.Value) error { break } - // Get element of array, growing if necessary. + // Expand slice length, growing the slice if necessary. if v.Kind() == reflect.Slice { - // Grow slice if necessary if i >= v.Cap() { - newcap := v.Cap() + v.Cap()/2 - if newcap < 4 { - newcap = 4 - } - newv := reflect.MakeSlice(v.Type(), v.Len(), newcap) - reflect.Copy(newv, v) - v.Set(newv) + v.Grow(1) } if i >= v.Len() { v.SetLen(i + 1) @@ -620,13 +612,11 @@ func (d *decodeState) array(v reflect.Value) error { if i < v.Len() { if v.Kind() == reflect.Array { - // Array. Zero the rest. - z := reflect.Zero(v.Type().Elem()) for ; i < v.Len(); i++ { - v.Index(i).Set(z) + v.Index(i).SetZero() // zero remainder of array } } else { - v.SetLen(i) + v.SetLen(i) // truncate the slice } } if i == 0 && v.Kind() == reflect.Slice { @@ -636,7 +626,7 @@ func (d *decodeState) array(v reflect.Value) error { } var nullLiteral = []byte("null") -var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() +var textUnmarshalerType = reflect.TypeFor[encoding.TextUnmarshaler]() // object consumes an object from d.data[d.off-1:], decoding into v. // The first byte ('{') of the object has been read already. @@ -776,7 +766,7 @@ func (d *decodeState) object(v reflect.Value) error { if !mapElem.IsValid() { mapElem = reflect.New(elemType).Elem() } else { - mapElem.Set(reflect.Zero(elemType)) + mapElem.SetZero() } subv = mapElem if checkDuplicateField != nil { @@ -784,28 +774,14 @@ func (d *decodeState) object(v reflect.Value) error { } d.appendStrictFieldStackKey(string(key)) } else { - var f *field - if i, ok := fields.nameIndex[string(key)]; ok { - // Found an exact name match. - f = &fields.list[i] - if checkDuplicateField != nil { - checkDuplicateField(i, f.name) - } - } else if !d.caseSensitive { - // Fall back to the expensive case-insensitive - // linear search. - for i := range fields.list { - ff := &fields.list[i] - if ff.equalFold(ff.nameBytes, key) { - f = ff - if checkDuplicateField != nil { - checkDuplicateField(i, f.name) - } - break - } - } + f := fields.byExactName[string(key)] + if f == nil && !d.caseSensitive { + f = fields.byFoldedName[string(foldName(key))] } if f != nil { + if checkDuplicateField != nil { + checkDuplicateField(f.listIndex, f.name) + } subv = v destring = f.quoted for _, i := range f.index { @@ -874,33 +850,35 @@ func (d *decodeState) object(v reflect.Value) error { if v.Kind() == reflect.Map { kt := t.Key() var kv reflect.Value - switch { - case reflect.PointerTo(kt).Implements(textUnmarshalerType): + if reflect.PointerTo(kt).Implements(textUnmarshalerType) { kv = reflect.New(kt) if err := d.literalStore(item, kv, true); err != nil { return err } kv = kv.Elem() - case kt.Kind() == reflect.String: - kv = reflect.ValueOf(key).Convert(kt) - default: + } else { switch kt.Kind() { + case reflect.String: + kv = reflect.New(kt).Elem() + kv.SetString(string(key)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: s := string(key) n, err := strconv.ParseInt(s, 10, 64) - if err != nil || reflect.Zero(kt).OverflowInt(n) { + if err != nil || kt.OverflowInt(n) { d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: kt, Offset: int64(start + 1)}) break } - kv = reflect.ValueOf(n).Convert(kt) + kv = reflect.New(kt).Elem() + kv.SetInt(n) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: s := string(key) n, err := strconv.ParseUint(s, 10, 64) - if err != nil || reflect.Zero(kt).OverflowUint(n) { + if err != nil || kt.OverflowUint(n) { d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: kt, Offset: int64(start + 1)}) break } - kv = reflect.ValueOf(n).Convert(kt) + kv = reflect.New(kt).Elem() + kv.SetUint(n) default: panic("json: Unexpected key type") // should never occur } @@ -950,12 +928,12 @@ func (d *decodeState) convertNumber(s string) (any, error) { f, err := strconv.ParseFloat(s, 64) if err != nil { - return nil, &UnmarshalTypeError{Value: "number " + s, Type: reflect.TypeOf(0.0), Offset: int64(d.off)} + return nil, &UnmarshalTypeError{Value: "number " + s, Type: reflect.TypeFor[float64](), Offset: int64(d.off)} } return f, nil } -var numberType = reflect.TypeOf(Number("")) +var numberType = reflect.TypeFor[Number]() // literalStore decodes a literal stored in item into v. // @@ -965,7 +943,7 @@ var numberType = reflect.TypeOf(Number("")) func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool) error { // Check for unmarshaler. if len(item) == 0 { - //Empty string given + // Empty string given. d.saveError(fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", item, v.Type())) return nil } @@ -1012,7 +990,7 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool } switch v.Kind() { case reflect.Interface, reflect.Pointer, reflect.Map, reflect.Slice: - v.Set(reflect.Zero(v.Type())) + v.SetZero() // otherwise, ignore null for primitives/string } case 't', 'f': // true, false @@ -1064,10 +1042,11 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool } v.SetBytes(b[:n]) case reflect.String: - if v.Type() == numberType && !isValidNumber(string(s)) { + t := string(s) + if v.Type() == numberType && !isValidNumber(t) { return fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item) } - v.SetString(string(s)) + v.SetString(t) case reflect.Interface: if v.NumMethod() == 0 { v.Set(reflect.ValueOf(string(s))) @@ -1083,13 +1062,12 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool } panic(phasePanicMsg) } - s := string(item) switch v.Kind() { default: if v.Kind() == reflect.String && v.Type() == numberType { // s must be a valid number, because it's // already been tokenized. - v.SetString(s) + v.SetString(string(item)) break } if fromQuoted { @@ -1097,7 +1075,7 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool } d.saveError(&UnmarshalTypeError{Value: "number", Type: v.Type(), Offset: int64(d.readIndex())}) case reflect.Interface: - n, err := d.convertNumber(s) + n, err := d.convertNumber(string(item)) if err != nil { d.saveError(err) break @@ -1109,25 +1087,25 @@ func (d *decodeState) literalStore(item []byte, v reflect.Value, fromQuoted bool v.Set(reflect.ValueOf(n)) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - n, err := strconv.ParseInt(s, 10, 64) + n, err := strconv.ParseInt(string(item), 10, 64) if err != nil || v.OverflowInt(n) { - d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) + d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())}) break } v.SetInt(n) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - n, err := strconv.ParseUint(s, 10, 64) + n, err := strconv.ParseUint(string(item), 10, 64) if err != nil || v.OverflowUint(n) { - d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) + d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())}) break } v.SetUint(n) case reflect.Float32, reflect.Float64: - n, err := strconv.ParseFloat(s, v.Type().Bits()) + n, err := strconv.ParseFloat(string(item), v.Type().Bits()) if err != nil || v.OverflowFloat(n) { - d.saveError(&UnmarshalTypeError{Value: "number " + s, Type: v.Type(), Offset: int64(d.readIndex())}) + d.saveError(&UnmarshalTypeError{Value: "number " + string(item), Type: v.Type(), Offset: int64(d.readIndex())}) break } v.SetFloat(n) diff --git a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go index 5b67251fbb..eb73bff58b 100644 --- a/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go +++ b/vendor/sigs.k8s.io/json/internal/golang/encoding/json/encode.go @@ -12,12 +12,13 @@ package json import ( "bytes" + "cmp" "encoding" "encoding/base64" "fmt" "math" "reflect" - "sort" + "slices" "strconv" "strings" "sync" @@ -28,29 +29,30 @@ import ( // Marshal returns the JSON encoding of v. // // Marshal traverses the value v recursively. -// If an encountered value implements the Marshaler interface -// and is not a nil pointer, Marshal calls its MarshalJSON method -// to produce JSON. If no MarshalJSON method is present but the -// value implements encoding.TextMarshaler instead, Marshal calls -// its MarshalText method and encodes the result as a JSON string. +// If an encountered value implements [Marshaler] +// and is not a nil pointer, Marshal calls [Marshaler.MarshalJSON] +// to produce JSON. If no [Marshaler.MarshalJSON] method is present but the +// value implements [encoding.TextMarshaler] instead, Marshal calls +// [encoding.TextMarshaler.MarshalText] and encodes the result as a JSON string. // The nil pointer exception is not strictly necessary // but mimics a similar, necessary exception in the behavior of -// UnmarshalJSON. +// [Unmarshaler.UnmarshalJSON]. // // Otherwise, Marshal uses the following type-dependent default encodings: // // Boolean values encode as JSON booleans. // -// Floating point, integer, and Number values encode as JSON numbers. +// Floating point, integer, and [Number] values encode as JSON numbers. +// NaN and +/-Inf values will return an [UnsupportedValueError]. // // String values encode as JSON strings coerced to valid UTF-8, // replacing invalid bytes with the Unicode replacement rune. // So that the JSON will be safe to embed inside HTML